[dnsdist] Responding from cache when all pool servers are down?

Remi Gacogne remi.gacogne at powerdns.com
Tue Nov 15 08:53:32 UTC 2022


Hi Aaron,

On 01/11/2022 23:03, Aaron de Bruyn via dnsdist wrote:
> Is there a way to specifically respond to cached items and return 
> SERVFAIL if it's not in the cache?

I'm afraid there is no way to do exactly that. I guess we would need a 
selector with the ability to look into the packet-cache (so you could 
use RCodeAction only if the entry is not there) or a chain of rules that 
is executed after the packet-cache lookup.

But if I understand correctly what you are looking for, 
setServFailWhenNoServer(true) [1] should do what you want:

- look into the packet cache and return the result on a hit
- forward the query to an available server in the selected pool, if any
- return a ServFail response if there is no available server in the 
selected pool

[1]: 
https://dnsdist.org/guides/serverselection.html?#setServFailWhenNoServer

-- 
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20221115/0ee6da6c/attachment.sig>


More information about the dnsdist mailing list