My connection-retry patch & IP address changes

From: Michael Pelletier <>
Date: Mon, 7 Jul 1997 15:33:38 -0400 (EDT)

This issue burbled up into my consciousness just recently...

The way in which bad entries are handled in my connection retry patch may
cause problems in the event of DNS A-record updates, for example, if changes their IP address.

The IP cache TTL for a marked-bad address is set to the same timeout as a
good address, and is reset each time the address is accessed, even if all
the addresses are marked bad (oops). If a DNS entry changes, the IP cache
may never find out about it until Squid is restarted, depending on how
frequently that address is accessed -- an address would have to go ~22,000
seconds without a hit in order to fall out of the IP cache.

Two possibilities come to mind -- reduce the timeout for cache entries
where all the addresses are marked bad, perhaps to the IPCache negative
TTL value, and/or make it so that if an all-bad cache entry is accessed,
its TTL value is not reset.

The reason that the address is not simply removed is because a bad address
can be retried and marked good if it succeeds. Also, most of the time IP
addresses don't change, so doing another DNS lookup would be redundant as
we already have the IP address information in the IP cache.

I haven't taken a close look at this issue, as it hasn't come up here, but
for those of you using this patch, you should keep this quirk in mind if
you're chasing down strange Squid problems.

I should have some time this week, so I'll plan on coming up with a
modified patch to cover this contingency, and maybe even a 1.1.11 version.

        -Mike Pelletier.
Received on Mon Jul 07 1997 - 12:34:52 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:41 MST