Search squid archive

Re: source-hash balancing...

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

 



>> > 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...?
>> >
>>
>> 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
>
> Do I need to explicitly deny the other dstdomains or can I just use a deny
> all (unless it will override the previous allow)?
> By example If I have 3 pools of 2 servers:
>
> acl u1 dstdomain u1.example.com
> acl u2 dstdomain u2.example.com
> acl u3 dstdomain u3.example.com
>
<snip>

The *_access lines are run from top down an a first-match-wins basis per
peer. So an allow of whatever you want, followed by a deny all for each
peer should be fine.

Amos


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

  Powered by Linux