On Tue, 6 Jun 2006, Martijn Grendelman wrote:
> > > When I first started to toy around with LVS, I did just what is written
> > > here:
> > > i tried to use the SH scheduler for "session affinity" at L7.
> >
> > Looking at your original post from 2004, you are using source hashing with a
> > weight of 1. This will result in the service being overloaded when the
> > number
> > of connections is greater than 2, as your output of ipvsadm shows. Have you
> > tried increasing the weight?
>
> No I haven't. Can you explain why a weight of 1 will result in the service
> being overloaded, and how would weight = 2 make a difference?
>
> As I understand it, the weight only specifies the relative weight of the real
> servers. It has nothing to do with the actual number of connections. Am I
> wrong? My current setup also has weight = 1 for all real servers.
The weight when used with SH and DH has a different meaning than most, if not
all, the other standard LVS scheduling methods. Although this doesn't appear
to be mentioned in the man page for ipvsadm.
>From ip_vs_sh.c
The sh algorithm is to select server by the hash key of source IP
address. The pseudo code is as follows:
n <- servernode[src_ip];
if (n is dead) OR
(n is overloaded, such as n.conns>2*n.weight) then
return NULL;
return n;
|