<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello Christoph,</p>
<div class="moz-cite-prefix">On 12.09.23 13:35, Christoph via
Pdns-users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:22553d96-b77f-0fbc-5210-74107ce1f1e0@appliedprivacy.net">Hi
Winfried,
<br>
<br>
<blockquote type="cite">My recommendation is to limit the TTL to
12 or 6 hours and find out
<br>
how many cache entries are created during this time. Increase
that by
<br>
50% and that's your value. </blockquote>
<br>
thanks for your recommendation. I've played a bit with this to see
what
<br>
max-cache-entries values this procedure would result in.
<br>
What input should influence whether this should be done with a
max-cache-ttl of 6, 12 or 24 hours?
<br>
<br>
The change to max-cache-ttl [1] to N hours would just be
temporary, during the collection of the cache-entries metric, and
be set back to 1d (default) after that or stay at N hours?<br>
</blockquote>
It stays at N hours.
<blockquote type="cite"
cite="mid:22553d96-b77f-0fbc-5210-74107ce1f1e0@appliedprivacy.net">Should
this procedure be done with refresh-on-ttl-perc=0 for the data
gathering phase?
<br>
</blockquote>
<p><span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span
class="ryNqvb">If you use prefetching, I would also turn it
on for the </span></span></span><span class="HwtZe"
lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">data
gathering phase.</span></span></span></p>
<blockquote type="cite"
cite="mid:22553d96-b77f-0fbc-5210-74107ce1f1e0@appliedprivacy.net">In
any way, the approach results in a significantly larger
max-cache-entries setting than we currently use.
<br>
</blockquote>
<span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span
class="ryNqvb">If max-cache-entries is too small, cache
cleaning will also delete cache entries whose TTL has not yet
expired.</span></span></span>
<blockquote type="cite"
cite="mid:22553d96-b77f-0fbc-5210-74107ce1f1e0@appliedprivacy.net">
<br>
Does the same apply to other caches like
<br>
max-packetcache-entries
<br>
aggressive-nsec-cache-size and
<br>
dnsdist's packetCache maxEntries?
<br>
</blockquote>
<p>Yes. But in my opinion, maxTTL=900 can be used with dnsdists
cache. This reduces the time how long RRs are cached in dnsdist to
900s, and with it the cache size. However, the expiring TTL that
was originally supplied by the Recursor is delivered, so the
clients does not see this reduction. 900s is enough to still serve
most out of the dnsdist cache under heavy load. The additional
latency due to cache misses is not significant <span
class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span
class="ryNqvb">because the Recursor cache catches these
requests.</span></span></span></p>
<p>Winfried<br>
</p>
</body>
</html>