Re: Re : Re: how squid handle time outs to origin server

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 02 Apr 2003 08:39:14 +0200

atit_ldce wrote:
>
> hello Henrik,
> I already had gone through code before asking my confusion.
> I have confusion with logic used........
> so can u give me answer for the fwdserverlist i mentioned in previos mail...
> it will make me clear.

        if (fwdState->servers->next) {
            /* use next, or cycle if origin server isn't last */

  so

   Peer1 -> Peer2 -> Peer3 -> Origin

  becomes

   Peer1 -> Peer2 -> Peer3 -> Origin -> Origin -> Origin -> Origin ->
Origin -> Origin -> ...

  but

   Peer1 -> Peer2 -> Origin -> Peer3

  becomes

   Peer1 -> Peer2 -> Origin -> Peer3 -> Peer1 -> Peer2 -> Origin ->
Origin -> Origin -> Origin

until a viable path is found.

If there is a timeout then fwdConnectTimeout is called, which closes the
unconnected server connection, which triggers fwdServerClosed().

If there is an error then the server connecion is closed, which triggers
fwdServerClosed().

If there is a response then the server connection is closed when the
response have been received, which triggers fwdServerClosed().

In all cases fwdServerClosed() verifies if the request has to be
retried, and then selects the next possible path if it has to.

Regards
Henrik
Received on Tue Apr 01 2003 - 23:39:39 MST

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