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

Klaus Darilion klaus.darilion at nic.at
Wed Sep 27 07:14:38 UTC 2023


You can do this in PowerDNS Authoritative using LUA records, see:
https://doc.powerdns.com/authoritative/lua-records/

regards
Klaus

> -----Ursprüngliche Nachricht-----
> Von: Pdns-users <pdns-users-bounces at mailman.powerdns.com> Im
> Auftrag von Riccardo Brunetti via Pdns-users
> Gesendet: Dienstag, 26. September 2023 18:43
> An: pdns-users at mailman.powerdns.com
> Cc: Riccardo Brunetti <riccardo.brunetti at host.it>
> Betreff: [Pdns-users] Return answer according to availability of a server
> 
> 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
> 



More information about the Pdns-users mailing list