]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] introduce the "url_param" balance method
authorWilly Tarreau <w@1wt.eu>
Thu, 1 Nov 2007 21:48:15 +0000 (22:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 1 Nov 2007 22:05:09 +0000 (23:05 +0100)
commit0173280bfaae091b8ca5f046aad8ed4396facb5e
treef1ce9c9fa69947198b41d53b1a16aefb01cefc2d
parenta0cbda61a785fade1d5bbd3368e06ac25f9d62bf
[MEDIUM] introduce the "url_param" balance method

Some applications do not have a strict persistence requirement, yet
it is still desirable for performance considerations, due to local
caches on the servers. For some reasons, there are some applications
which cannot rely on cookies, and for which the last resort is to use
a parameter passed in the URL.

The new 'url_param' balance method is there to solve this issue. It
accepts a parameter name which is looked up from the URL and which
is then hashed to select a server. If the parameter is not found,
then the round robin algorithm is used in order to provide a normal
load balancing across the servers for the first requests. It would
have been possible to use a source IP hash instead, but since such
applications are generally buried behind multiple levels of
reverse-proxies, it would not provide a good balance.

The doc has been updated, and two regression testing configurations
have been added.
doc/haproxy-en.txt
doc/haproxy-fr.txt
include/types/backend.h
include/types/proxy.h
src/backend.c
src/cfgparse.c
src/haproxy.c
tests/test-balance.cfg [new file with mode: 0644]
tests/test-url-hash.cfg [new file with mode: 0644]