[Pdns-users] Recursor Cache entries per record

Otto Moerbeek otto at drijf.net
Mon Nov 28 19:37:04 UTC 2022


Hello

What Winfried says is true, with the note that a few more bits of the
query are included in the hash, while some other pats are skipped;
e.g. the recursor skips the EDSN ECS and Cookie bits when computing
the hash.

Also note that while the packet cache is per thread, the other cache
(record cache) is shared between all threads since a few releases.
The latter is used to lookup packet hash misses, to retrieve infra
data to find auths and a few more things).

	-Otto

On Mon, Nov 28, 2022 at 07:01:12PM +0100, abang--- via Pdns-users wrote:

> Hi Giovanni,
> 
> As far as I know, the Recursor is exactly doing what you want. IP addresses are not part of the hash. Only the query name is base of the hash.
> 
> Identical query names are routed to the same thread and thus to the same cache.
> 
> Winfried
> 
> 
> Am 28. November 2022 18:37:19 MEZ schrieb Giovanni Vecchi via Pdns-users <pdns-users at mailman.powerdns.com>:
> >Hi guys,
> >
> >I'm doing some tests on recursor 4.7.4 and I would some confirmation from
> >you about caching behaviour: I understood that
> >enabling pdns-distributes-queries, cached entries are served only in case
> >of matching query hash, so different clients (with different source ip)
> >will not hit cache for the same record in their first queries, isn't it?
> >
> >Let's do an example, starting from time 0:
> >- time 0+1 -> client1 ask for my.domain -> cache miss
> >- time 0+2 -> client2 ask for my.domain -> cache miss
> >- time 0+3 -> client1 ask for my.domain -> cache hit
> >- time 0+4 -> client2 ask for my.domain -> cache hit
> >If it's true, is it possible to configure recursor cache by record and not
> >by hash?
> >My ultimate goal is to take advantage from cached entries regardless client
> >query hash, in this way:
> >- time 0+1 -> client1 ask for my.domain -> cache miss
> >- time 0+2 -> client2 ask for my.domain -> cache hit
> >- time 0+3 -> client1 ask for my.domain -> cache hit
> >- time 0+4 -> client2 ask for my.domain -> cache hit
> >
> >Thanks
> >
> >
> >
> >-- 
> ><https://www.certego.net/>
> >Giovanni Vecchi
> >Infrastructure Lead Engineer, Certego
> >+39-059-7353333
> ><https://www.linkedin.com/company/certego>
> ><https://twitter.com/Certego_IRT>  <https://github.com/certego>
> ><https://www.youtube.com/CERTEGOsrl>
> ><https://plus.google.com/117641917176532015312>
> >Use of the information within this document constitutes acceptance for use
> >in an "as is" condition. There are no warranties with regard to this
> >information; Certego has verified the data as thoroughly as possible. Any
> >use of this information lies within the user's responsibility. In no event
> >shall Certego be liable for any consequences or damages, including direct,
> >indirect, incidental, consequential, loss of business profits or special
> >damages, arising out of or in connection with the use or spread of this
> >information.

> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users



More information about the Pdns-users mailing list