[Pdns-users] Return answer according to availability of a server

Riccardo Brunetti riccardo.brunetti at host.it
Tue Sep 26 16:43:20 UTC 2023


Hello everybody.

I'm trying to figure out if it is possible to make pdns (or dnsdist) to return a different answer according to the availability of a service.

Suppose we have:



- server A with IP: XXX.XXX.XXX.XXX

- server B with IP: YYY.YYY.YYY.YYY



Server A and B are two web servers which are configured to answer to a given http GET like http://myservice.net.

They are both configured in the same way and are independent.



I would like the DNS query to return XXX.XXX.XXX.XXX as long as the server A is working (returns 200 to the GET) or return YYY.YYY.YYY.YYY when server A is not working.

In other words, I would like to have two records A for myservice.net with a somehow "intelligent" behavior and not a simple round-robin.



Can you suggest me how to achieve this, if it's possible?



Thanks a lot

Riccardo



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20230926/847124dd/attachment.htm>


More information about the Pdns-users mailing list