Search squid archive

Re: the duplicated setting for the same dstdomain

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

 



Jeff Peng wrote:
> Amos Jeffries 写道:
>> 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.
> 
> 
> Thanks Amos.
> In this case, why squid prefer sourcehash group more than round-bin
> group? does sourcehash has higher PRI than round-bin? Thanks again.
> 

The preferences are really hard-coded order of testing each method.
I think we've sorted them by efficiency or stability or something. The
new ones I've seen go in, certainly went into specific places middle of
the list.

FWIW the order I read in the code is:

  (always direct? -> DIRECT)
  (filter out any peers whose ACL deny their use)

  sibling or parent with object (digests)
  closest parent peer (netdb RTT measured)
  default parent
  userhash parent
  srchash parent
  carp parent
  round-robin parent
  weighted-round-robin parent
  first parent
  any parent
  DIRECT

Amos
-- 
Please use Squid 2.7.STABLE4 or 3.0.STABLE9

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

  Powered by Linux