Search squid archive

Re: squid accel peer load balancing weighted round robbin?

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

 



Sylvain Viart wrote:
Hi,

I've a squid Version 2.6.STABLE16

with the following config accel mode

design:

proxy ----> php-01..php-08

php are apache server no slibing proxy.


cache_peer php-01 parent 80 0 no-query originserver round-robin weight=1
login=PASS max-conn=100

If things haven't changed, weight only works with ICP. Basically an ICP query is sent out, and the weight is added to an internal calculation based on response latency (and possibly other factors) to determine which affirmative responding ICP peer to request the actual object from.

Squid 3's conf file seems to confirm this (http://www.squid-cache.org/Versions/v3/3.0/cfgman/cache_peer.html):

use 'weight=n' to affect the selection of a peer during any weighted peer-selection mechanisms.  The weight must be an integer; default is 1, larger weights are favored more.  This option does not affect parent selection if a peering protocol is not in use.


#cache_peer php-02 parent 80 0 no-query originserver round-robin
weight=0 login=PASS
cache_peer php-03 parent 80 0 no-query originserver round-robin weight=1
login=PASS
cache_peer php-04 parent 80 0 no-query originserver round-robin weight=1
login=PASS
cache_peer php-05 parent 80 0 no-query originserver round-robin weight=1
login=PASS
cache_peer php-06 parent 80 0 no-query originserver round-robin weight=1
login=PASS
cache_peer php-07 parent 80 0 no-query originserver round-robin weight=3
login=PASS max-conn=100
cache_peer php-08 parent 80 0 no-query originserver round-robin weight=1
login=PASS max-conn=100

Strangely the weight seems not impact the load balancing as I might expect.

If increase weight on a the peer php-03 result
 * less load on peer 01
 * more load on peer 03
 * less load on peer 04
 * more load on peer 05
 * same load on peer 06
 * same load on peer 07
 * more load on peer 08

All my test seem to show always very more load on the last peer in the list. That why I protect with max-conn=100.


How are you measuring load? Round-robin is exactly what it sounds like. Each request is sent to the next peer in line. Processing load is not taken in to consideration.

is the orginiserver loadbalancing, a well tested and official squid behavior.

It seems in squid 2.6 a new feature arround the cache_peer directive, which was about proxy slibing sharing...

The doc said:

#         icp_port:  Used for querying neighbor caches about
#                    objects.  To have a non-ICP neighbor
#                    specify '7' for the ICP port and make sure the
#                    neighbor machine has the UDP echo port
#                    enabled in its /etc/inetd.conf file.

Here I've copied form the wiki I use 0, is it the same?

If you specify "no-query" on the cache_peer line, it doesn't matter what port you specify for ICP communications. It's likely this documentation is a leftover from a time before the no-query directive.

I've no ICP parent, just origin server.

Any hint?

CARP is purpose build load balancing algorithm, and as far as I know, it should work with originserver. http://docs.huihoo.com/gnu_linux/squid/html/x2398.html


Sylvain.

Chris


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

  Powered by Linux