Henrik Nordstrom wrote:
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..
Can this be controlled, i.e. squid not serve very old files? I have
gotten fooled with a recent squid (2.6) hiding a down server, which did
not happen with the 2.5 version we were running.
Of course if I were properly monitoring the servers this would not be a
problem, which might be the best answer. Would squid care if I put
hundreds of origin servers in its list?
Benno
--
Dr. M. Benno Blumenthal benno@xxxxxxxxxxxxxxxx
International Research Institute for climate and society
The Earth Institute at Columbia University
Lamont Campus, Palisades NY 10964-8000 (845) 680-4450