Search squid archive

Re: How to trick splay trees?

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

 



On 31/07/2012 1:25 a.m., Jannis Kafkoulas wrote:
Hi,

(I use squid 2.7. STABLE9 on RedHat EL 5.6)

Following problem:

I have following dstdomains defined
going to par-std and par-alt  cache_peers respectively:

acl alt dstdomain .fa-intracomp.net
acl std dstdomain .intracomp.com

Now I'd like  "abc.intracomp.com"  to also go via  cache_peer par-alt.

Following two tries didn't work:

# acl alt-2 dstdom_regex -i abc.intracomp.com
# acl alt dstdomain abc.intracomp.com

The dstdomain one is faster. Both are correct for your requested policy. The key word you stated being "also" ...


The requests were sent to par-std cache_peer

cache_peer 192.10.10.22    parent    3128    0     no-query login=PASS proxy-only no-digest name=par-std
cache_peer 192.10.10.22    parent    80    0     no-query login=PASS proxy-only no-digest name=par-alt

cache_peer_access  par-alt  allow alt-2
cache_peer_access  par-alt  allow alt
cache_peer_access  par-std  allow std


Is there a way for that to work at all?

Unless given some specific selection algorithm (digest, ICP, hshes, carp, roundrobin etc) Squid lists peers in configuration order when attemping to pass traffic.

As I said above the key word in your policy statements is "also" - with both peers *available* for use Squid will pick the first one that works. With par-std being listed first your logs will show it being used until such time as it becomes unresponsive or overloaded. Then par-alt will pick up the slack for that one domain.

I think you are looking at the logs and seeing only par-std, thinking its not working when actually it is. You can test by changing the order of cache_peer definitions in your config and seeing the preferred peer switch to the par-alt when the new ACL is added.

NOTE: you canot send a request via *both* using TCP unicast links, just one.

Amos


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

  Powered by Linux