<html><head></head><body>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><div class="gmail_quote">Am 28. November 2022 18:37:19 MEZ schrieb Giovanni Vecchi via Pdns-users <pdns-users@mailman.powerdns.com>:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div class="gmail_default" style=""><font face="monospace">Hi guys,</font></div><div class="gmail_default" style=""><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">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?</font></div><div class="gmail_default" style=""><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">Let's do an example, starting from time 0:</font></div><div class="gmail_default" style=""><font face="monospace">- time 0+1 -> client1 ask for my.domain -> cache miss</font></div><div class="gmail_default" style=""><font face="monospace">- time 0+2 -> client2 ask for my.domain -> cache miss</font></div><div class="gmail_default" style=""><font face="monospace">- time 0+3 -> client1 ask for my.domain -> cache hit</font></div><div class="gmail_default" style=""><font face="monospace">- time 0+4 -> client2 ask for my.domain -> cache hit</font></div><div class="gmail_default" style=""><font face="monospace"></font></div><div><div class="gmail_default" style=""><font face="monospace">If it's true, is it possible to configure recursor cache by record and not by hash?</font></div><div class="gmail_default" style=""><font face="monospace">My ultimate goal is to take advantage from cached entries regardless client query hash, in this way:</font></div><div class="gmail_default" style=""><div class="gmail_default"><font face="monospace">- time 0+1 -> client1 ask for my.domain -> cache miss</font></div><div class="gmail_default"><font face="monospace">- time 0+2 -> client2 ask for my.domain -> cache hit</font></div><div class="gmail_default"><font face="monospace">- time 0+3 -> client1 ask for my.domain -> cache hit</font></div><div class="gmail_default"><font face="monospace">- time 0+4 -> client2 ask for my.domain -> cache hit</font></div></div><font face="monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace">Thanks</font></div><br class="gmail-Apple-interchange-newline"><div class="gmail_default" style="font-family:monospace,monospace"><span style="font-family:Arial,Helvetica,sans-serif"> </span></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="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></div>
</blockquote></div></body></html>