[Dnsmasq-discuss] Any plans on adding ability to store cachetodisk?

Nicholas Weaver nweaver at gmail.com
Tue May 15 18:20:43 BST 2012


>> gypsy wrote:
>>
>>> If Simon is offended, then so be it, but I mean no offense. I just fail
>>> to see how a save to/restore from disk could bloat the code;
>>> save/restore IS a basic feature. TTL will expire out any crap
>>> naturally.
>>> --
>>> gypsy

Speaking as just a general DNS guy (I'm not a DNSMasq developer):  Saving cache state is stupid.

TTL dictates a MAXIMUM that data can remain in the cache, but doesn't dictate a minimum, as any "minimum" could be enforced on the authority side by simply ensuring that the answer is consistent.

The savings is also trivial:  It only saves one RTT to the recursive resolver per lookup, since the recursive resolver should still have the item in its cache.  And this should be a short RTT: if your ISP doesn't have the recursive resolver within 30-40ms of your system, its either a high latency link overall (in which case amdahl's law ensures that the RTT for DNS lookups are still going to be irrelevant).

So why bother saving and restoring cache?




More information about the Dnsmasq-discuss mailing list