MEDIUM: backend: add the 'first' balancing algorithm
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Feb 2012 16:12:08 +0000 (17:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Feb 2012 21:27:27 +0000 (22:27 +0100)
commitf09c6603d38bc4d129c4f3bdd1e7063c82af0f65
tree96e0e485c4d7be0269c6f0a8a1943b180522c58f
parent3ebb1163ba7ac70bc24931d8af626196f6612618
MEDIUM: backend: add the 'first' balancing algorithm

The principle behind this load balancing algorithm was first imagined
and modeled by Steen Larsen then iteratively refined through several
work sessions until it would totally address its original goal.

The purpose of this algorithm is to always use the smallest number of
servers so that extra servers can be powered off during non-intensive
hours. Additional tools may be used to do that work, possibly by
locally monitoring the servers' activity.

The first server with available connection slots receives the connection.
The servers are choosen from the lowest numeric identifier to the highest
(see server parameter "id"), which defaults to the server's position in
the farm. Once a server reaches its maxconn value, the next server is used.
It does not make sense to use this algorithm without setting maxconn. Note
that it can however make sense to use minconn so that servers are not used
at full load before starting new servers, and so that introduction of new
servers requires a progressively increasing load (the number of servers
would more or less follow the square root of the load until maxconn is
reached). This algorithm ignores the server weight, and is more beneficial
to long sessions such as RDP or IMAP than HTTP, though it can be useful
there too.
Makefile
Makefile.bsd
Makefile.osx
doc/configuration.txt
include/proto/lb_fas.h [new file with mode: 0644]
include/types/backend.h
include/types/lb_fas.h [new file with mode: 0644]
include/types/server.h
src/backend.c
src/cfgparse.c
src/lb_fas.c [new file with mode: 0644]