]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MAJOR] implement the Fast Weighted Round Robin (FWRR) algo
authorWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2007 00:15:43 +0000 (01:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 Nov 2007 13:23:17 +0000 (14:23 +0100)
commitb625a085d81cf852a4140f3b3153da7ec9fb9356
tree6269050e938c6e28a0f09831555828ffb91f52b2
parent5dc2fa660c25be38a0eec9e49fea11955465e64b
[MAJOR] implement the Fast Weighted Round Robin (FWRR) algo

This round robin algorithm was written from trees, so that we
do not have to recompute any table when changing server weights.
This solution allows on-the-fly weight adjustments with immediate
effect on the load distribution.

There is still a limitation due to 32-bit computations, to about
2000 servers at full scale (weight 255), or more servers with
lower weights. Basically, sum(srv.weight)*4096 must be below 2^31.

Test configurations and an example program used to develop the
tree will be added next.

Many changes have been brought to the weights computations and
variables in order to accomodate for the possiblity of a server to
be running but disabled from load balancing due to a null weight.
include/proto/backend.h
include/types/backend.h
include/types/proxy.h
include/types/server.h
src/backend.c
src/cfgparse.c
src/checks.c