positive_dns_ttl

From: Mark Nottingham <mnot@dont-contact.us>
Date: Wed, 10 Oct 2007 12:14:08 +1000

 From ipcache.c;

> if (ttl == 0 || ttl > Config.positiveDnsTtl)
> ttl = Config.positiveDnsTtl;
> if (ttl < Config.negativeDnsTtl)
> ttl = Config.negativeDnsTtl;
> i->expires = squid_curtime + ttl;

As I read this, if the TTL from an upstream resolver happens to be
'0', it changes it to whatever positive_dns_ttl is -- even though
that also acts as a ceiling for DNS TTLs.

The problem is that this plays havoc with DNS-based load balancers,
which will be '0' more often than other DNS entries by nature. Any
chance of either;

a) having the ttl == 0 test taken out

b) having the default if it is 0 separated out to a separate config

?

Cheers,

--
Mark Nottingham       mnot@yahoo-inc.com
Received on Tue Oct 09 2007 - 20:16:11 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Oct 30 2007 - 13:00:03 MDT