Re: Going direct if parent proxy is down

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 14 Jul 1999 23:26:01 +0200

Niall Young wrote:

> I'm running a non-ICP parent. While testing I firewalled the parent
> from the child and assumed that the TCP detection would kick in and
> instead start going direct but this doesn't appear to be working for
> STABLE4. Repeated requets for an object seem to eventually go direct,
> but requests for other objects keep trying the parent for many minutes
> after the parent became unreachable. Any idea why or how to solve this?

Just have some patience, or use one of my patches.

Squid will declare the parent as dead when 10 TCP connections to it has
failed. It will then remain dead until a TCP connection to it is
successful to the proxy port. Problem is that if the parent is fully non
responding (not even host unreachable returned on connection attempts)
then it may take quite a bit of time until 10 connections have failed.
This is because A TCP connection defaults to use a timeout of 2 minutes,
and squid will not count the attempt if the client aborts the connection
before Squid times out.

The relevant patch I have adds per peer configurable connect timeout.
What I recommended to use for peer connections is in the range of a few
seconds (20 if you are on a slow dialup connection, 2 on a fast
connection).

A small reservation on the above timeout calculations: I don't remember
exacly how the timeouts works in barebone Squid 2.2. In my version I
have made quite extensive changes in this area, and I have a vague
memory that there was some kind of situation where Squid did not count
timed out connections as failures..

--
Henrik Nordstrom
Spare time Squid hacker
http://hem.passagen.se/hno/squid/
Received on Wed Jul 14 1999 - 15:56:24 MDT

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