[squid-users] Squid keep using one parent proxy while I have multiple parent proxies
squid3 at treenet.co.nz
Thu Dec 29 07:47:46 UTC 2016
On 2016-12-27 16:37, wei wrote:
> The curl command is:
> curl -s -i http://showip.net 
> The configuration in squid.conf is:
> cache_peer 192.168.1.100 parent 3128 weight=5 no-query name=p1
> cache_peer 192.168.1.101 parent 3128 weight=5 no-query name=p2
> cache_peer 192.168.1.102 parent 3128 weight=5 no-query name=p3
Since you have equal weightings on each peer they are irrelevant. Remove
the weight=5 for better performance.
> cache_peer_domain p1 .com
> cache_peer_domain p1 .net
> cache_peer_domain p2 .com
> cache_peer_domain p2 .net
> cache_peer_domain p3 .com
> cache_peer_domain p3 .net
Please use the cache_peer_access directive instead. cache_peer_domain is
> From: wei
> Hi Amos,
> The Squid version I tested is 3.4.14(installed by yum on Centos 6.8)
> 3.4.8(installed by apt on Debian 7), both have the problem of use same
> parent proxy after about 55 seconds. I also test 3.5.23(compiled by
> parameter) and found the time increased from 55 to 85 seconds or so.
I have just checked the code. The round-robin counters are 'cleared' on
a 5min cycle, on startup, on reconfigure, or when peers change from DEAD
to ALIVE state "to prevent the revived CachePeer being flooded with
requests which it has 'missed' during the down period."
So if your peers are being reset every minute, then either you are
reconfiguring Squid that often, or they are constantly being detected as
DEAD. Neither of which is good.
More information about the squid-users