Re: [squid-users] Squid Accelerator continue serving without backend server

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 06 Mar 2007 02:17:36 +0100

mån 2007-03-05 klockan 12:43 +0200 skrev Heikki Lampén:

> I would like to Squid to serve stale objects if the backend server is
> not responding or throws errors. Is there an obvious way to configure
> Squid for this that I have missed or what would be the way to go if
> not?
>
> Any version of Squid is ok.

Squid tries to do this, but there is some pitfalls..

Make sure negative_ttl is set to 0 seconds to disable caching of errors.

Also if the server as such may be unreachable (not at all responding,
not even with a TCP reset) then remember to set the connect timeout
sufficiently short. There is three different connect timeouts depending
on your config and requirements..

config_timeout, for requests going DIRECT

peer_config_timeout, default timeout for requests to a cache_peer

cache_peer ... timeout=XXX, specific timeout for this cache peer,
overrides peer_config_timeout.

Default values is 1 minute for requests going direct and 30 seconds for
requests sent to a cache_peer.

In most accelerator type setups you want the backend connect timeout
quite short, a few seconds. Note: going below 2 seconds is not
recommended due to a timing inaccuracy of up to almost a second..

Regards
Henrik

Received on Mon Mar 05 2007 - 18:17:45 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 31 2007 - 13:00:01 MDT