Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
dnsdist: Add option to set interval between health checks #7142
Add option 'checkInterval' for newServer() to set the interval between
referenced this pull request
Nov 5, 2018
First commit is the initial commit with the fix requested by @rgacogne (sorry I read your comment about pdns_stou() too late, will fix later).
What do you think? Anything else you would like to change besides pdns_stou()?
So I would be fine with merging a branch with only the first commit.
The second one is a nice attempt at introducing a better granularity but IMHO this would need much more work. Waking up every second is not an issue, so the only benefit I could see would be sub-second granularity but because the health check thread is currently blocking while checking a backend, which might take up to 1s (the duration of the currently hardcoded timeout), it seems a bit useless to try implementing a sub-second granularity without fixing that at the same time. We should probably make that timeout configurable, and perhaps consider spawning a new thread to do the actual blocking check or use a multiplexer. This is 1.4.0 material, though.
Yes I think multiplexing would be the right approach, I am thinking about some timers+epoll stuff. But as you said, thats out of this scope.
If you ever want to start working on that, please use our multiplexer code in
I'm fine with the current code.