Hi Henrik:
> Can you please explain in more depth what it is you are trying to
> accomplish? Ignoring the code as such, focusing more on how you like
> Squid to behave.
We've here a couple of Zope servers which, I really don't know in depth,
from time to time becomes lazy, accepting a TCP connection, reading
a HTTP request but simply does not answer after a read_timeout time.
I'd like to Squid assumes it is dead and after a given time make a request
again and see if the backend server answer the request. Apache with
mod_proxy_balancer behaves this way.
Attached goes another patch which is now be able to try if a 'dead' server is
answering requests after a hardcoded given time (10 seconds).
What this patch does is zeroing peer->weight which makes peerSelect()
never return it. If it becomes 'alive', original peer->weight is re-established.
I gonna look around the 'cf.data.pre' magic to probably create an option
to set the now hardcoded retrial time.
> If a server accepts the TCP connection but never responds then things is
> trickier as it's very hard to know how long a server will think before
> it responds. There is read_timeout to abort the request, but we do not
> declare the peer dead here because there could be a number of reasons
> why the response took long time and very often it's isolated to a
> specific URL and not the whole server.
I see.. but in our case when a given URL requested reads timeout, the
whole server is stale.
> If this is not sufficient then the peer monitor function is quite
> helpful in detecting malfunctioning servers, verifying nearly the
> complete operations of the server at any rate you desire. Or as far as
> can be verified with a request for a single URL defined in squid.conf..
Hmmm.. great. I didn't try peer monitor. I gonna take a look. Maybe it
fits our needs..
regards
Lucas Brasilino
This archive was generated by hypermail pre-2.1.9 : Thu Mar 01 2007 - 12:00:02 MST