]> git.ipfire.org Git - thirdparty/pdns.git/commit
Implementation of serve-stale from record cache.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 14 Jun 2022 13:42:41 +0000 (15:42 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 9 Sep 2022 07:43:34 +0000 (09:43 +0200)
commitedabff75e8f628b68be876497b8a6b771a08a3d1
treef4950d8fd1615530e6a84b51bddb8ad4af041e1c
parent171089f5eceb4918de3de5e79497e0590aeaaa8e
Implementation of serve-stale from record cache.

If a resolve fails, we try it again with serveStale is true.  If
serveStale is true or a record is already being server stale, the
record cache is willing to produce (and extend the ttd) of stale
records. It wil also keep a count of the extensions, to be able to
limit those and trigger a task te refresh once every while.

If we (potentially) serve stale, we are less aggessive evicting
stale records from the record cache.

Enable by setting server-stale-extensions (default 0). The unit is
30s. So a value of 2880 will keep serving the record for 24 hours, even
if it cannot be refreshed. If the original ttl of a record is less than 30,
the extension unit will be that ttl.
14 files changed:
pdns/cachecleaner.hh
pdns/dnsseckeeper.hh
pdns/recpacketcache.cc
pdns/recpacketcache.hh
pdns/recursor_cache.cc
pdns/recursor_cache.hh
pdns/recursordist/negcache.hh
pdns/recursordist/rec-main.cc
pdns/recursordist/rec-taskqueue.cc
pdns/recursordist/rec-taskqueue.hh
pdns/recursordist/taskqueue.hh
pdns/recursordist/test-rec-taskqueue.cc
pdns/syncres.cc
pdns/syncres.hh