> 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? Did you move to 2.6 in the process? I found that carp is accepted in 2.5 but marked experimental and before many bugs fixes that went into 2.6. Try adding debug_options ALL,1, 39,5 to squid.conf and see what pops into cache.log Amos