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

Victor Hugo dos Santos listas.vhs at gmail.com
Tue Sep 26 17:37:30 UTC 2023


Hello there,

you mean, something like this:
https://doc.powerdns.com/authoritative/lua-records/index.html

Anyway, you don't need it for http protocol, because it is included by
default in almost all the browsers (rfc8305 if I remember well), so,
you only need to create the registers:

www IN A 1.1.1.1.1
www IN A 2.2.2.2.2
www IN A 3.3.3.3.3

and it will create a round robin for you on the DNS server and if the
web server on 1.1.1.1 is down, the client will automatically use the
others servers.

Note: There is a small performance, because the browser will need to
contact the next server if the first is down.

Salu2

On Tue, 26 Sept 2023 at 18:43, Riccardo Brunetti via Pdns-users
<pdns-users at mailman.powerdns.com> wrote:
>
> 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
>
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users



-- 
--
Victor Hugo dos Santos
http://www.vhsantos.net
Linux Counter #224399


More information about the Pdns-users mailing list