[dnsdist] Packetcache expiring
Remi Gacogne
remi.gacogne at powerdns.com
Wed Mar 14 11:25:33 UTC 2018
Hi Nick,
On 03/09/2018 12:24 PM, Nemanja Zeljkovic wrote:
> I assumed the following while working with newPacketCache():
> - temporaryFailureTTL - if we can’t get response from any backend, cache
> for this long
> - staleTTL - when no backend servers are reachable, serve for this long
> from cache (what I assumed my case would be)
>
> and with setStaleCacheEntriesTTL() to eventually override TTL for stale
> entires. What is confusing is “use expired entires” on [1] which I
> cannot envision at all since they are purged from packet cache when they
> expire.>
> Basically what I want(ed) to accomplish is to give me some time in case
> of a problem regardless of what TTL someone set for the zone/record. In
> case every backend server is unavailable (broken vpn for example),
> dnsdist would still serve until it’s been fixed. I would love to use
> anycast for this kind of fault tolerance but it’s currently out of my
> reach so I’m trying a poor man’s packet cache approach.
>
> Maybe an option not to purge entires from cache if there is no backend
> server available would be beneficial for this use case, but what I
> currently envision as a “fix” would be to when failure to all backens
> happen, and it’s detected, to somehow connect to console remotely and
> set setCacheCleaningPercentage(0), and revert once we have working backends.
>
> Do you have any insights on how to accomplish this at it’s current
> state, or maybe if this would be viable addition to dnsdist?
What you could do if you are willing to write a few lines of Lua is to
use the "maintenance" hook to check whether all backends are down and
then disable cache cleaning by calling setCacheCleaningPercentage(0).
You could then restore the cache cleaning after at least one backend
comes back in the same way.
--
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20180314/a1007317/attachment.sig>
More information about the dnsdist
mailing list