Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getServer property for drops #9861

ptruman opened this issue Dec 11, 2020 · 0 comments · Fixed by #9862

getServer property for drops #9861

ptruman opened this issue Dec 11, 2020 · 0 comments · Fixed by #9862


Copy link

ptruman commented Dec 11, 2020

  • Program: dnsdist
  • Issue type: Feature request

Short description

It would be nice to have a directly accessible property for backend DNS server "Drops"
These are listed under showServers() for all backends, but not accessible on an individual level.

Something like getServer(0).drops or getServer(0).dropCount


I am using to provide fixed failover between servers (i.e. always use X until X is down, then use Y), although have modified the line:

if (servers[i].upStatus == true) then

to be

if (servers[i].upStatus == true) then if (servers[i]:isUp() == true) then isUp will respond differently based on if the server is marked down outside of a health check.

However, if a healthcheck is set to a high number (to avoid log pollution on the respective backend) then it takes whatever interval is present before failover happens.

I would like to use a Lua query (and local var) to track the number of drops, and once the drops increment beyond a given number (since the last set point), I can manually mark the backend as down, so my Lua if statement (above) will catch it,
dnsdist's own healthcheck will "catch up" on it's own.

A separate "last check" variable on the healthcheck can then be used to note dnsdists own healthcheck resuming (marked back up) and manually mark the server up, so "isUp" responds positively also.


Provide a property for the server class that responds with that backend servers "drop" count

@rgacogne rgacogne added this to the dnsdist-1.6.0 milestone Dec 11, 2020
ptruman added a commit to ptruman/diab that referenced this issue Dec 11, 2020
Updated to V1.3
Added "order" to backend servers
Expanded DIAB_UPSTREAM_IP_AND_PORT to allow for multiple servers (in preference order)
Added orderedLeastOutstanding function based on
Pending addition of PowerDNS/pdns#9861 within dnsdist to enable failover checking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

2 participants