[Pdns-users] Recursor Cache entries per record

Giovanni Vecchi g.vecchi at certego.net
Tue Nov 29 10:23:23 UTC 2022


Hi guys,

I enabled tracing and I can confirm what you said.
Before my test I missed the difference between record cache and packet
cache, so I misunderstood.

Thanks a lot!

On Mon, 28 Nov 2022 at 20:37, Otto Moerbeek via Pdns-users <
pdns-users at mailman.powerdns.com> wrote:

> 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
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
>


-- 
<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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20221129/564e1be2/attachment-0001.htm>


More information about the Pdns-users mailing list