[Dnsmasq-discuss] Preemptive cache refresh?

Simon Kelley simon at thekelleys.org.uk
Mon Mar 25 20:31:30 GMT 2013


On 25/03/13 10:04, Cristian Măgherușan-Stanciu wrote:
> Hello,
>
> I didn't yet read the caching algorithm, but does dnscache by any chance
> preemptively refresh the entries that are about to expire a few seconds
> before expiration, or will it just drop the entry from the cache and
> then lazily resolve it again if needed, using an upstream recursive server?

The later, it doesn't pre-emptively cache.
>
> This use case could be useful for server-side use against entries with
> short TTL that always change such as Amazon AWS ELBs which rotate IPs a
> lot and use 60s TTL by default. I think a preemptive resolution would
> somehow even out all the requests.
>
> Off course, this approach would mean that the cache policy would have to
> be updated, so entries are cleared depending on the last recent usage
> not on their TTL expiration.

The cache does do LRU, since the cache size is fixed, LRU is used as the 
eviction strategy when the  cache is full, and not entries have expired.


Cheers,

Simon.

>
> Thanks,
> Cristian
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>




More information about the Dnsmasq-discuss mailing list