Prefetch Serve expired behavior per cache

George Thessalonikefs george at nlnetlabs.nl
Fri May 13 09:36:30 UTC 2022


Hi Ashok,

The Unbound daemon runs as one cache resolver.
Are you perhaps using libunound and creating your own contexts?
In that case yes the options are per context.
You can have different options per context though, if you use the 
'ub_ctx_set_option' function.
Since the options you mention are configurable and not hard coded, the 
aforementioned function works on them.

Best regards,
-- George

On 13/05/2022 07:25, ashok athukuri via Unbound-users wrote:
> Hello All,
> 
> I am a newbie for unbound, please apologize if my question is wrong or 
> my understanding is wrong.
> 
> I see below variables make unbound to use a single configuration for all 
> cache resolvers.
> As these variables are global and don't bind with any unbound context or 
> configuration for each cache
> 
> I wonder how to solve this problem? as I need different cache conf for 
> different cache resolvers.
> 
> 64   <https://indexing2.f5net.com/source/xref/tmos-dns-bugs/ports/unbound/build/util/data/msgreply.c#64>/** If we serve expired entries and prefetch them */
> 65   <https://indexing2.f5net.com/source/xref/tmos-dns-bugs/ports/unbound/build/util/data/msgreply.c#65>THREAD  <https://indexing2.f5net.com/source/s?defs=THREAD&project=tmos-dns-bugs>  *int*  SERVE_EXPIRED  <https://indexing2.f5net.com/source/s?refs=SERVE_EXPIRED&project=tmos-dns-bugs>  = 0;
> 66   <https://indexing2.f5net.com/source/xref/tmos-dns-bugs/ports/unbound/build/util/data/msgreply.c#66>/** Time to serve records after expiration */
> 67   <https://indexing2.f5net.com/source/xref/tmos-dns-bugs/ports/unbound/build/util/data/msgreply.c#67>THREAD  <https://indexing2.f5net.com/source/s?defs=THREAD&project=tmos-dns-bugs>  time_t  <https://indexing2.f5net.com/source/s?defs=time_t&project=tmos-dns-bugs>  SERVE_EXPIRED_TTL  <https://indexing2.f5net.com/source/s?refs=SERVE_EXPIRED_TTL&project=tmos-dns-bugs>  = 0;
> 68   <https://indexing2.f5net.com/source/xref/tmos-dns-bugs/ports/unbound/build/util/data/msgreply.c#68>/** TTL to use for expired records */
> 69   <https://indexing2.f5net.com/source/xref/tmos-dns-bugs/ports/unbound/build/util/data/msgreply.c#69>THREAD  <https://indexing2.f5net.com/source/s?defs=THREAD&project=tmos-dns-bugs>  time_t  <https://indexing2.f5net.com/source/s?defs=time_t&project=tmos-dns-bugs>  SERVE_EXPIRED_REPLY_TTL  <https://indexing2.f5net.com/source/s?refs=SERVE_EXPIRED_REPLY_TTL&project=tmos-dns-bugs>  =30;
> 
> 
> Thanks,
> 
> Ashok
> 


More information about the Unbound-users mailing list