Re: [squid-users] Re: can't failover in round-robin

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 26 Jun 2009 18:32:42 +1200

Ken Peng wrote:
> Hello again,
>
> I watched cache.log and found these info:
>
> 2009/06/26 14:04:36| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:05:07| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:05:18| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:05:48| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:05:48| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:05:49| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:06:52| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:07:42| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:07:43| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:07:43| TCP connection to 192.168.1.101/80 failed
> 2009/06/26 14:07:43| Detected DEAD Parent: portsw_1_2
>
>
> After long time (it's about 3 minutes), Squid found that peer was dead.
> So my question is, by what way squid will find a peer is dead or alive?

By 10 consecutive request failures.

> Why it takes so long time?

Because its 10* request timeout.

There are fixes in more recent Squid to improve this situation by making
the number of retries configurable.

>
> Thanks again.
>
> Regards.
>
>
>
>> Dear Gurus,
>>
>> I have configured squid-3.0.stable15 with these rules for an
>> accelerator:
>>
>> cache_peer 192.168.1.100 parent 80 0 no-query front-end-https=auto
>> originserver name=portsw_1_1 round-robin
>> cache_peer 192.168.1.101 parent 80 0 no-query front-end-https=auto
>> originserver name=portsw_1_2 round-robin
>>
>> acl port_1 myport 80
>> cache_peer_access portsw_1_1 allow port_1
>> cache_peer_access portsw_1_2 allow port_1
>>
>>
>> All run fine when both backend servers are fine.
>>
>> But, when I shutdown one of the backend servers (for example,shutdown
>> 192.168.1.101), I then accessed to Squid, got an error page and can't
>> open the website correctly.
>>
>> The cache.log said:
>>
>> 2009/06/26 12:50:02| TCP connection to 192.168.1.101/80 failed
>>
>>
>> Why Squid doesn't failover between the two backend servers?
>> When 1.101 is down, squid should choose 1.100 as original server, and
>> should not show an error page to users.
>>
>> Please help, thank you a lot in advance.
>>
>> Regards.
>
>

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE16
   Current Beta Squid 3.1.0.8
Received on Fri Jun 26 2009 - 06:32:53 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 26 2009 - 12:00:04 MDT