Hello Brandon!
Just like to have any recommendations on how to fast up restart phase, coz currently it takes a lot of time:
# time /etc/init.d/gdnsd restart
* Restarting gdnsd gdnsd [ OK ]
real 0m18.686s
user 0m2.608s
sys 0m0.356s
Top15 calls been made during restart:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
45.46 0.448028 40730 11 wait4
11.77 0.116007 116007 1 mlockall
9.52 0.093860 456 206 mmap
8.12 0.080006 159 504 nanosleep
4.90 0.048251 43 1134 1133 connect
3.91 0.038509 987 39 munmap
3.65 0.036002 1800 20 clone
2.45 0.024111 22 1119 recvfrom
2.44 0.024042 21 1130 getsockopt
2.44 0.024001 2000 12 execve
2.08 0.020501 16 1312 close
2.03 0.020021 39 511 epoll_wait
0.77 0.007570 505 15 mremap
0.41 0.004000 235 17 write
0.02 0.000215 0 2000 sendto
0.02 0.000186 0 1141 1 socket
0.02 0.000156 0 1119 shutdown
0.01 0.000132 0 2265 epoll_ctl
0.00 0.000019 0 1034 clock_gettime
0.00 0.000018 0 114 fstat
We still using restart to apply new configurations since count of zone files changes and pool changes in "config" file are almost the same during the day. Unfortunately there is no way to reduce count of pool adjustments during the day.
Currently I'm thinking in a bad way:
- create satellite process for gdnsd using the same configuration
- reroute incoming requests to satellite process with 'iptables -j REDIRECT' for a moment while main instance restarting
- route requests back to the main process by removing 'iptables -j REDIRECT' rule
- restart the satellite process
- introduce all that logic in init script
I know that according to RFC requesting DNS resolver should retry resolve few times in a row before give up, however I've met too many non-RFC implementations to sleep well with current state.
Also it's quite feasible to reach maxtry threshold by doing configuration apply / gdnsd restart on all servers one by one.
And as a last argument, this temporary unavailability of each server breaks RFC-compliant optimizations for the nearest auth. DNS server based on NS wights (like BIND implementation has)
Installed gdnsd version 1.10.1.
Do you have any best practices for that case?
Thank you in advance!