Re: [squid-users] How does weighted-round-robin work?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 11 Jun 2008 21:10:53 +1200

Roy M. wrote:
> According to 3.0 manual:
>
>
> =========
> weighted-round-robin
> to define a set of parents which should be used in a round-robin
> fashion with the frequency of each parent being based on the round
> trip time. Closer parents are used more often.
> =========
>
>
> Currently I have 3 Apache web servers, A, B, C,
> where B has Dual CPU and more memory, they are under the same private network.
> So I assign B with more weight.
>
>
> #A
> parent 80 0 no-query originserver weighted-round-robin login=PASS weight=1
>
> #B
> parent 80 0 no-query originserver weighted-round-robin login=PASS weight=2
>
> #C
> parent 80 0 no-query originserver weighted-round-robin login=PASS weight=1
>
>
> However, from the access log from these 3 web servers, I found that
> the MISS request to #B is only around 130% higher than A and C
>
> Is it normal or I misunderstood the weighted-round-robin settings?

Small mis-reading perhapse. weighted-round-robin works the same as
round-robin only its based on the peer RTT (network delay to reach peer).

In vanilla robin, the counter gets 1 added, which evenly balances
requests through the peers, regardless of network trouble or anything else.

In weighted, the counter gets RTT/weight, which balances things more in
favour of close peers. But weight= can give an extra boost to preferred
peers or a manual balancing if the expected RTT (in ms) to that peer is
large. The division is never allowed to produce a non-integer or stat
under 1.

Amos

-- 
Please use Squid 2.7.STABLE1 or 3.0.STABLE6
Received on Wed Jun 11 2008 - 09:10:59 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 11 2008 - 12:00:05 MDT