<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hi guys,</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">I enabled tracing and I can confirm what you said.<br></div><div class="gmail_default" style="font-family:monospace,monospace">Before my test I missed the difference between record cache and packet cache, so I misunderstood.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Thanks a lot!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Nov 2022 at 20:37, Otto Moerbeek via Pdns-users <<a href="mailto:pdns-users@mailman.powerdns.com">pdns-users@mailman.powerdns.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello<br>
<br>
What Winfried says is true, with the note that a few more bits of the<br>
query are included in the hash, while some other pats are skipped;<br>
e.g. the recursor skips the EDSN ECS and Cookie bits when computing<br>
the hash.<br>
<br>
Also note that while the packet cache is per thread, the other cache<br>
(record cache) is shared between all threads since a few releases.<br>
The latter is used to lookup packet hash misses, to retrieve infra<br>
data to find auths and a few more things).<br>
<br>
        -Otto<br>
<br>
On Mon, Nov 28, 2022 at 07:01:12PM +0100, abang--- via Pdns-users wrote:<br>
<br>
> Hi Giovanni,<br>
> <br>
> 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.<br>
> <br>
> Identical query names are routed to the same thread and thus to the same cache.<br>
> <br>
> Winfried<br>
> <br>
> <br>
> Am 28. November 2022 18:37:19 MEZ schrieb Giovanni Vecchi via Pdns-users <<a href="mailto:pdns-users@mailman.powerdns.com" target="_blank">pdns-users@mailman.powerdns.com</a>>:<br>
> >Hi guys,<br>
> ><br>
> >I'm doing some tests on recursor 4.7.4 and I would some confirmation from<br>
> >you about caching behaviour: I understood that<br>
> >enabling pdns-distributes-queries, cached entries are served only in case<br>
> >of matching query hash, so different clients (with different source ip)<br>
> >will not hit cache for the same record in their first queries, isn't it?<br>
> ><br>
> >Let's do an example, starting from time 0:<br>
> >- time 0+1 -> client1 ask for my.domain -> cache miss<br>
> >- time 0+2 -> client2 ask for my.domain -> cache miss<br>
> >- time 0+3 -> client1 ask for my.domain -> cache hit<br>
> >- time 0+4 -> client2 ask for my.domain -> cache hit<br>
> >If it's true, is it possible to configure recursor cache by record and not<br>
> >by hash?<br>
> >My ultimate goal is to take advantage from cached entries regardless client<br>
> >query hash, in this way:<br>
> >- time 0+1 -> client1 ask for my.domain -> cache miss<br>
> >- time 0+2 -> client2 ask for my.domain -> cache hit<br>
> >- time 0+3 -> client1 ask for my.domain -> cache hit<br>
> >- time 0+4 -> client2 ask for my.domain -> cache hit<br>
> ><br>
> >Thanks<br>
> ><br>
> ><br>
> ><br>
> >-- <br>
> ><<a href="https://www.certego.net/" rel="noreferrer" target="_blank">https://www.certego.net/</a>><br>
> >Giovanni Vecchi<br>
> >Infrastructure Lead Engineer, Certego<br>
> >+39-059-7353333<br>
> ><<a href="https://www.linkedin.com/company/certego" rel="noreferrer" target="_blank">https://www.linkedin.com/company/certego</a>><br>
> ><<a href="https://twitter.com/Certego_IRT" rel="noreferrer" target="_blank">https://twitter.com/Certego_IRT</a>>  <<a href="https://github.com/certego" rel="noreferrer" target="_blank">https://github.com/certego</a>><br>
> ><<a href="https://www.youtube.com/CERTEGOsrl" rel="noreferrer" target="_blank">https://www.youtube.com/CERTEGOsrl</a>><br>
> ><<a href="https://plus.google.com/117641917176532015312" rel="noreferrer" target="_blank">https://plus.google.com/117641917176532015312</a>><br>
> >Use of the information within this document constitutes acceptance for use<br>
> >in an "as is" condition. There are no warranties with regard to this<br>
> >information; Certego has verified the data as thoroughly as possible. Any<br>
> >use of this information lies within the user's responsibility. In no event<br>
> >shall Certego be liable for any consequences or damages, including direct,<br>
> >indirect, incidental, consequential, loss of business profits or special<br>
> >damages, arising out of or in connection with the use or spread of this<br>
> >information.<br>
<br>
> _______________________________________________<br>
> Pdns-users mailing list<br>
> <a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
> <a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel="noreferrer" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
<br>
_______________________________________________<br>
Pdns-users mailing list<br>
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel="noreferrer" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><table border="0" cellspacing="0" cellpadding="0" style="font-family:"Times New Roman";width:420px"><tbody><tr valign="top"><td><table border="0" cellspacing="0" cellpadding="0"><tbody><tr valign="top"><td style="text-align:initial;vertical-align:top;padding:0px 8px"><a href="https://www.certego.net/" target="_blank"><img width="96" height="96" src="https://www.certego.net/email/certego.png" alt="" style="border-radius: 0px;"></a></td><td style="text-align:initial;vertical-align:top;padding:4px 0px"><div style="padding-top:2px;color:rgb(0,172,237);font-weight:bold;font-stretch:normal;font-size:18px;line-height:normal;font-family:sans-serif;letter-spacing:1px">Giovanni Vecchi</div><div style="padding-top:2px;color:rgb(32,32,32);font-weight:bold;font-stretch:normal;font-size:14px;line-height:normal;font-family:sans-serif">Infrastructure Lead Engineer, Certego</div><div style="padding-top:4px"><a href="tel:+39-059-7353333" style="color:rgb(84,84,84);font-stretch:normal;font-size:12px;line-height:normal;font-family:sans-serif" target="_blank">+39-059-7353333</a><span style="color:rgb(0,172,237);font-stretch:normal;font-size:12px;line-height:normal;font-family:sans-serif"></span></div><div style="padding-top:6px"><a href="https://www.linkedin.com/company/certego" target="_blank"><img width="24" height="24" src="https://www.certego.net/email/linkedin.png" style="border-radius: 0px; border: 0px; width: 24px; min-height: 24px;"></a> <a href="https://twitter.com/Certego_IRT" target="_blank"><img width="24" height="24" src="https://www.certego.net/email/twitter.png" style="border-radius: 0px; border: 0px; width: 24px; min-height: 24px;"></a> <a href="https://github.com/certego" target="_blank"><img width="24" height="24" src="https://www.certego.net/email/github.png" style="border-radius: 0px; border: 0px; width: 24px; min-height: 24px;"></a> <a href="https://www.youtube.com/CERTEGOsrl" target="_blank"><img width="24" height="24" src="https://www.certego.net/email/youtube.png" style="border-radius: 0px; border: 0px; width: 24px; min-height: 24px;"></a> <a href="https://plus.google.com/117641917176532015312" target="_blank"><img width="24" height="24" src="https://www.certego.net/email/googleplus.png" style="border-radius: 0px; border: 0px; width: 24px; min-height: 24px;"></a></div></td></tr></tbody></table></td></tr></tbody></table><div style="font-stretch:normal;font-size:8px;line-height:normal;font-family:sans-serif;width:420px;text-align:justify;vertical-align:top;padding:8px 0px;color:rgb(224,224,224)">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.</div></div></div>