Search squid archive

Re: cache_peer weighting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Dec 2007 13:53:42 +1300 (NZDT)
"Amos Jeffries" <squid3@xxxxxxxxxxxxx> wrote:

> 
> IIRC Squid3.0 introduces weighted-round-robin for this purpose.
> Otherwise there is CARP in 2.6.

So, I've implemented CARP, but I'm seeing some odd behavior...

Given the following config lines:


###Userserve
cache_peer 10.0.20.1 parent 81 0 no-query originserver no-digest
no-netdb-exchange name=userserve1-81 carp weight=1 cache_peer_domain
userserve1-81 userserve.last.fm

cache_peer 10.0.20.1 parent 82 0 no-query originserver no-digest
no-netdb-exchange name=userserve1-82 carp weight=1 cache_peer_domain
userserve1-82 userserve.last.fm

cache_peer 10.0.20.1 parent 83 0 no-query originserver no-digest
no-netdb-exchange name=userserve1-83 carp weight=1 cache_peer_domain
userserve1-83 userserve.last.fm

cache_peer 10.0.20.1 parent 84 0 no-query originserver no-digest
no-netdb-exchange name=userserve1-84 carp weight=1 cache_peer_domain
userserve1-84 userserve.last.fm

cache_peer 10.0.20.2 parent 81 0 no-query originserver no-digest
no-netdb-exchange name=userserve2-81 carp weight=1 cache_peer_domain
userserve2-81 userserve.last.fm

cache_peer 10.0.20.2 parent 82 0 no-query originserver no-digest
no-netdb-exchange name=userserve2-82 carp weight=1 cache_peer_domain
userserve2-82 userserve.last.fm

cache_peer 10.0.20.2 parent 83 0 no-query originserver no-digest
no-netdb-exchange name=userserve2-83 carp weight=1 cache_peer_domain
userserve2-83 userserve.last.fm

cache_peer 10.0.20.2 parent 84 0 no-query originserver no-digest
no-netdb-exchange name=userserve2-84 carp weight=1 cache_peer_domain
userserve2-84 userserve.last.fm
###Userserve Ends

I had expected to get an equal number of connections spread across each
cache_peer instance (we run one perlbal instance per core on each of
the machines).  What I'm seeing though, is that squid is only
connecting to two of the above, and in both cases, the first occurrence
of each:

[root@cache7 ~]# sort /userservestats | uniq -c
  25244 CARP/userserve1-81
  25949 CARP/userserve2-81

Does squid, or rather the squid CARP code have something in it which
allows it to only use one port per IP address?

Thanks!


-- 
Tony Dodd, Systems Administrator

Last.fm | http://www.last.fm
Karen House 1-11 Baches Street
London N1 6DL

check out my music taste at:
http://www.last.fm/user/hawkeviper

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux