Re: [squid-users] How does weighted-round-robin work?
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
Re: [squid-users] How does weighted-round-robin work?
Hi, On Wed, Jun 11, 2008 at 5:10 PM, Amos Jeffries <[EMAIL PROTECTED]> wrote: > Roy M. wrote: > 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. Thanks. Since all web servers are under private Gigabit network, RTT delay or bandwidth stuffs are not important. However, they are application servers and CPU intensive and therefore I run squid as reverse proxy. So I hope the one with more CPU power (it can be config. my me manually) can be sharing more requests, what would be the best setup for this? Howard
Re: [squid-users] How does weighted-round-robin work?
On ons, 2008-06-11 at 19:27 +0800, Roy M. wrote: > So I hope the one with more CPU power (it can be config. my me > manually) can be sharing more requests, what would be the best setup > for this? round-robin weight=X assigns requests proportional to the weight assigned to the server. a weight=1, b weight=2, c weight=1, sends 25% (1/(1+2+1)) of the requests to a, 50% to b and 25% to c. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: [squid-users] How does weighted-round-robin work?
Hi, Henrik Nordstrom a écrit : On ons, 2008-06-11 at 19:27 +0800, Roy M. wrote So I hope the one with more CPU power (it can be config. my me manually) can be sharing more requests, what would be the best setup for this? round-robin weight=X assigns requests proportional to the weight assigned to the server. a weight=1, b weight=2, c weight=1, sends 25% (1/(1+2+1)) of the requests to a, 50% to b and 25% to c. Ok, but what about cache_peer's option : "weighted-round-robin"? http://www1.at.squid-cache.org/Versions/v3/3.0/cfgman/cache_peer.html Can it be used in surrogate mode to define the weight of defined origin server? Something like? http_port 80 defaultsite=subdom.somedomain.com vhost cache_peer php-01 parent 80 0 no-query no-digest originserver login=PASS name=php-pool weighted-round-robin=25 cache_peer php-03 parent 80 0 no-query no-digest originserver login=PASS name=php-pool weighted-round-robin=25 cache_peer php-04 parent 80 0 no-query no-digest originserver login=PASS name=php-pool weighted-round-robin=40 cache_peer php-05 parent 80 0 no-query no-digest originserver login=PASS name=php-pool weighted-round-robin=10 Regards, Sylvain.
Re: [squid-users] How does weighted-round-robin work?
On tor, 2008-06-12 at 10:04 +0200, Sylvain Viart wrote: > Ok, but what about cache_peer's option : "weighted-round-robin"? > > http://www1.at.squid-cache.org/Versions/v3/3.0/cfgman/cache_peer.html > > Can it be used in surrogate mode to define the weight of defined origin > server? The difference between round-robin and weighted-round-robin is that weighted-round-robin also includes the network round-trip-time to the server. both are weighted, or at least supposed to be weighted.. but unfortunately a bit broken for round-robin.. http://www.squid-cache.org/bugs/show_bug.cgi?id=2241 Regards Henrik signature.asc Description: This is a digitally signed message part
Re: [squid-users] How does weighted-round-robin work?
Hi Henrik, Henrik Nordstrom a écrit : The difference between round-robin and weighted-round-robin is that weighted-round-robin also includes the network round-trip-time to the server. Ok, thanks. both are weighted, or at least supposed to be weighted.. but unfortunately a bit broken for round-robin.. http://www.squid-cache.org/bugs/show_bug.cgi?id=224 Hey cool, that exactly what I'm facing: Description:Opened: 2008-02-26 14:25 If peers have differing weights the selection mechanism only considers the peer with the highest weight. Is it fixed in some release? Regards, Sylvain.
Re: [squid-users] How does weighted-round-robin work?
Sylvain Viart wrote: Hi Henrik, Henrik Nordstrom a écrit : The difference between round-robin and weighted-round-robin is that weighted-round-robin also includes the network round-trip-time to the server. Ok, thanks. both are weighted, or at least supposed to be weighted.. but unfortunately a bit broken for round-robin.. http://www.squid-cache.org/bugs/show_bug.cgi?id=224 Hey cool, that exactly what I'm facing: Description:Opened: 2008-02-26 14:25 If peers have differing weights the selection mechanism only considers the peer with the highest weight. Is it fixed in some release? Next round of daily snapshots for 3-HEAD and 2-HEAD already done. It's scheduled against 3.0, so it'll probably be in snapshots shortly and 3.0.STABLE7 in a few weeks. Amos -- Please use Squid 2.7.STABLE2 or 3.0.STABLE6
Re: [squid-users] How does weighted-round-robin work?
On Thu, Jun 12, 2008 at 5:52 PM, Henrik Nordstrom <[EMAIL PROTECTED]> wrote: > On tor, 2008-06-12 at 10:04 +0200, Sylvain Viart wrote: .. but > unfortunately a bit broken for round-robin.. So do you mean only a peer with more weight will receive the requests? Other didn't? But from my access log, I see both 3 servers are receiving, when using round-robin (although the weight seems not perfectly 1:2:1 as in my case, but seems better a lot than weight RR before) Roy
Re: [squid-users] How does weighted-round-robin work?
On tor, 2008-06-12 at 22:33 +0800, Roy M. wrote: > So do you mean only a peer with more weight will receive the requests? > Other didn't? No, but some of the weights is ignored causing the balance to not match the configured weights.. How badly this gets depends on how large weights you are using. Will be fixed in 3.0.STABLE7 and 2.7.STABLE3. Patch already in the queue.. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: [squid-users] How does weighted-round-robin work?
Hi On Thu, Jun 12, 2008 at 10:49 PM, Henrik Nordstrom <[EMAIL PROTECTED]> wrote: but some of the weights is ignored causing the balance to not match > the configured weights.. > > How badly this gets depends on how large weights you are using. > So since some weight might be affected, without patching, can you suggest the weight for my cases which could or the best to avoid the problem? e.g. I want to assign 1:2:1 to my server A:B:C, what weight I can assign? Thanks.
Re: [squid-users] How does weighted-round-robin work?
On tor, 2008-06-12 at 23:54 +0800, Roy M. wrote: > So since some weight might be affected, without patching, can you > suggest the weight for my cases which could or the best to avoid the > problem? > > e.g. I want to assign 1:2:1 to my server A:B:C, what weight I can assign? No idea really. Better to patch your Squid with the patch which is already available.. Squid-2: http://www.squid-cache.org/Versions/v2/HEAD/changesets/12213.patch Squid-3: http://www.squid-cache.org/Versions/v3/HEAD/changesets/b9026.patch But I guess it may work out as you indend if you order your squid.conf so the servers is listed in 1, 1, 2 order. Or maybe it's 2, 1, 1... REgards Henrik signature.asc Description: This is a digitally signed message part
Re: [squid-users] How does weighted-round-robin work?
Henrik Nordstrom disse na ultima mensagem: > On tor, 2008-06-12 at 23:54 +0800, Roy M. wrote: >> So since some weight might be affected, without patching, can you >> suggest the weight for my cases which could or the best to avoid the >> problem? >> >> e.g. I want to assign 1:2:1 to my server A:B:C, what weight I can >> assign? > > No idea really. Better to patch your Squid with the patch which is > already available.. > > Squid-2: > http://www.squid-cache.org/Versions/v2/HEAD/changesets/12213.patch > soo is was not me that the weight thing wasn't working :) this is in the daily 2.7 tar ball or only on Head? > But I guess it may work out as you indend if you order your squid.conf > so the servers is listed in 1, 1, 2 order. Or maybe it's 2, 1, 1... > and the other 1-1-2 of course ... in my experience the first does it all so long as it can handle the load but depends on sibling|peer|no-cache settings, but definitely more than 2:1 michel ... Tecnologia Internet Matik http://info.matik.com.br Sistemas Wireless para o Provedor Banda Larga Hospedagem e Email personalizado - e claro, no Brasil.
Re: [squid-users] How does weighted-round-robin work?
On tor, 2008-06-12 at 14:30 -0300, Michel (M) wrote: > soo is was not me that the weight thing wasn't working :) > this is in the daily 2.7 tar ball or only on Head? Only head/trunk so far, but the patches applies as-is on 2.7 and 3.0. Regards Henrik signature.asc Description: This is a digitally signed message part