Re: [squid-users] source-hash balancing...

From: Jeff Peng <jeffpeng_at_gmx.net>
Date: Tue, 02 Sep 2008 17:03:31 +0800

Try something like this:

cache_peer 192.168.1.1 parent 80 0 no-query front-end-https=auto
originserver name=origin_1_1 sourcehash
cache_peer 192.168.1.2 parent 8080 0 no-query front-end-https=auto
originserver name=origin_1_2 sourcehash
acl service_1 dstdomain site.com
cache_peer_access origin_1_1 allow service_1
cache_peer_access origin_1_2 allow service_1

John Doe wrote:
>> I tried it once with squid 2.6. It did not work. But I would really
>> like it if that would actually work (i.e. grouping multiple peers
>> together so one doesn't need to create the same cache_peer_access-rules
>> for all peers).
>
> Thx for all the replies.
> So what would be the alternative method in my case (2 pools of 3 servers)?
> Would this work?
>
> acl u1 dstdomain u1.example.com
> acl u2 dstdomain u2.example.com
>
> cache_peer_access u1pool1 allow u1
> cache_peer_access u1pool2 allow u1
> cache_peer_access u1pool3 allow u1
> cache_peer_access u1pool1 deny u2
> cache_peer_access u1pool2 deny u2
> cache_peer_access u1pool3 deny u2
>
> cache_peer_access u2pool1 allow u2
> cache_peer_access u2pool2 allow u2
> cache_peer_access u2pool3 allow u2
> cache_peer_access u2pool1 deny u1
> cache_peer_access u2pool2 deny u1
> cache_peer_access u2pool3 deny u1
>
> Does it spread the requests or won't the first cache_peer_access always be chosen...?
>
> Thx,
> JD
>
>
>
>
Received on Tue Sep 02 2008 - 09:03:44 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 02 2008 - 12:00:02 MDT