Re: [squid-users] the duplicated setting for the same dstdomain

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 19 Sep 2008 16:06:00 +1200

Jeff Peng wrote:
> Hi,
>
> I set up two groups of rules for the same accelerated domain name, but
> the selection arithmetic and original servers are different.
> Why squid doesn't complain about this setting? Which rule will squid
> choose when accept that a request? Thanks.

Squid doesn't complain because its a possible configuration, with peer
failover.

What it does is when looking to find a peer, checks each possible
selection method. First that produces usable peers wins.

In this case sourcehash is more preferred than round-robin, so...
One of C and D will be picked based on the source hash.
If C and D are (both?) down then it will failover to try A and B based
on the round-robin method.
If all peers are down AND it is allowed to go DIRECT it will try that.

This way you can have a domain available through different peer groups,
or sub-groups of groups. Whatever your policy needs but with more
efficient selection methods preferred over less efficient or more
troublesome ones.

Amos

>
> The rules are below:
>
> cache_peer 192.168.1.1 parent 80 0 no-query originserver name=a round-robin
> cache_peer 192.168.1.2 parent 8080 0 no-query originserver name=b
> round-robin
> acl service_a dstdomain mysite.com
> cache_peer_access a allow service_a
> cache_peer_access b allow service_a
>
> cache_peer 192.168.1.3 parent 80 0 no-query originserver name=c sourcehash
> cache_peer 192.168.1.4 parent 8080 0 no-query originserver name=d
> sourcehash
> acl service_b dstdomain mysite.com
> cache_peer_access c allow service_b
> cache_peer_access d allow service_b
>
>
> Regards,
> Jeff.

-- 
Please use Squid 2.7.STABLE4 or 3.0.STABLE9
Received on Fri Sep 19 2008 - 04:06:15 MDT

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