Hello. I will have a look at LUA records.
Thank you all for your help. Riccardo 26/09/2023, 19:51 Victor Hugo dos Santos ha scritto: > BTW, > > > > The lua configuration will only deliver the list of the servers > > available for the new queries. For example, let imagine you have the 3 > > registers www and a TTL of 1 hour: > > > > - One client makes a query for the www register and will store it > > locally for 1 hour > > - 5 minutes later, one of your servers goes down. > > - the PDNS will now only respond to the www queries with the 2 > > available servers/IPs. > > - but the first client, will maintain the 3 IPs/servers on it cache > > - the client browser will then try to connect to one of your servers, > > but if it is unavailable, it will try the next one > > - after 55 minutes more, the first client will ask again for the www > > register and then will get only the 2 available servers/IPs. > > > > So, you can reduce the TTL of the www register from 1 hour to 60 or 30 > > seconds and try to reduce/eliminate this "dead connection" on the > > client side, "but" with these change you will increase the queries > > that the clients are doing to the DNS servers. ;-/ > > > > you need to pick one !! :-D > > > > Salu2 > > > > On Tue, 26 Sept 2023 at 19:37, Victor Hugo dos Santos > > <listas....@gmail.com> wrote: > > > > > > 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@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@mailman.powerdns.com > > > > https://mailman.powerdns.com/mailman/listinfo/pdns-users > > > > > > > > > > > > -- > > > -- > > > Victor Hugo dos Santos > > > http://www.vhsantos.net > > > Linux Counter #224399 > > > > > > > > -- > > -- > > Victor Hugo dos Santos > > http://www.vhsantos.net > > Linux Counter #224399
_______________________________________________ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users