Hi
I have installed unbound version: 1.20.0 on a FreeBSD 14 server. This was working fine until the server lost internet connectivity to the upstream internet provider. Prior to this the average cache hit rate on the server was 99.0% with only 1% recursive replies.
Part of my unbound.conf file is shown below
server:
prefetch: yes
serve-expired: yes
# serve-expired-ttl: 0
# serve-expired-ttl-reset: no
After loss of internet average cache hit rate has reduced to 14% whiles recursive queries is showing 86% (still internet is not restored)
My expectation is
Caching server should continue to serve expired and keep the cache hit rate high because the serve-expired-ttl is default
(meaning it should continue serving cached content until upstream is restored).
My observation is the opposite. Is there anything I am missing? How can i ensure that the caching server will continue serving cache data several days after upstream
Can any one clarify a parameter combination which allows immediate cache responses, and which tells prefetch to always ignore negative responses?
I wonder if taking the advice of the above article (and being mindful of this https://github.com/NLnetLabs/unbound/issues/533 it is possible to get this working). Just can’t figure out how to force prefetch to ignore negative responses.
Maybe you are both hitting a variation of https://github.com/NLnetLabs/unbound/issues/994.
Namely, Unbound when resolving will try to update the cache with new data even if the stale data would have been more useful.
There is ongoing work to make Unbound more careful with replacing cached content when serve-expired is used.
FYI, the relevant fixes [1] were merged and this will be included in the upcoming 1.22.0 release.
An announcement in this mailing list will happen when that is ready.