diff --git a/Makefile b/Makefile index ed8cb27c9..14586dcdb 100644 --- a/Makefile +++ b/Makefile @@ -459,7 +459,7 @@ OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \ src/time.o src/fd.o src/pipe.o src/regex.o src/cfgparse.o src/server.o \ src/checks.o src/queue.o src/client.o src/proxy.o src/proto_uxst.o \ src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \ - src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \ + src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \ src/stream_interface.o src/dumpstats.o src/proto_tcp.o \ src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \ src/acl.o src/memory.o src/freq_ctr.o \ diff --git a/Makefile.bsd b/Makefile.bsd index eb2b6b085..7957f9427 100644 --- a/Makefile.bsd +++ b/Makefile.bsd @@ -105,7 +105,7 @@ OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \ src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \ src/stream_interface.o src/dumpstats.o src/proto_tcp.o \ src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \ - src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \ + src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \ src/ev_poll.o src/ev_kqueue.o \ src/acl.o src/memory.o src/freq_ctr.o \ src/ebtree.o src/eb32tree.o diff --git a/Makefile.osx b/Makefile.osx index 9ba146b27..19fb72060 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -102,7 +102,7 @@ OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \ src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \ src/stream_interface.o src/dumpstats.o src/proto_tcp.o \ src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \ - src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \ + src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \ src/ev_poll.o \ src/acl.o src/memory.o src/freq_ctr.o \ src/ebtree.o src/eb32tree.o diff --git a/doc/configuration.txt b/doc/configuration.txt index 6fe6e958b..fecab814f 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -723,6 +723,7 @@ errorloc302 X X X X errorloc303 X X X X fullconn X - X X grace - X X X +hash-type X - X X http-check disable-on-404 X - X X id - X X X log X X X X @@ -956,8 +957,9 @@ balance url_param [check_post []] used in TCP mode where no cookie may be inserted. It may also be used on the Internet to provide a best-effort stickyness to clients which refuse session cookies. This algorithm is - static, which means that changing a server's weight on the - fly will have no effect. + static by default, which means that changing a server's + weight on the fly will have no effect, but this can be + changed using "hash-type". uri The left part of the URI (before the question mark) is hashed and divided by the total weight of the running servers. The @@ -966,9 +968,9 @@ balance url_param [check_post []] server as long as no server goes up or down. This is used with proxy caches and anti-virus proxies in order to maximize the cache hit rate. Note that this algorithm may only be used - in an HTTP backend. This algorithm is static, which means - that changing a server's weight on the fly will have no - effect. + in an HTTP backend. This algorithm is static by default, + which means that changing a server's weight on the fly will + have no effect, but this can be changed using "hash-type". This algorithm support two optional parameters "len" and "depth", both followed by a positive integer number. These @@ -1018,8 +1020,9 @@ balance url_param [check_post []] long as no server goes up or down. If no value is found or if the parameter is not found, then a round robin algorithm is applied. Note that this algorithm may only be used in an HTTP - backend. This algorithm is static, which means that changing a - server's weight on the fly will have no effect. + backend. This algorithm is static by default, which means + that changing a server's weight on the fly will have no + effect, but this can be changed using "hash-type". hdr(name) The HTTP header will be looked up in each HTTP request. Just as with the equivalent ACL 'hdr()' function, the header @@ -1032,6 +1035,10 @@ balance url_param [check_post []] specific headers such as 'Host'. For instance, in the Host value "haproxy.1wt.eu", only "1wt" will be considered. + This algorithm is static by default, which means that + changing a server's weight on the fly will have no effect, + but this can be changed using "hash-type". + rdp-cookie rdp-cookie(name) The RDP cookie (or "mstshash" if omitted) will be @@ -1048,6 +1055,10 @@ balance url_param [check_post []] you must use 'tcp-request content accept' rule combined with a 'req_rdp_cookie_cnt' ACL. + This algorithm is static by default, which means that + changing a server's weight on the fly will have no effect, + but this can be changed using "hash-type". + is an optional list of arguments which may be needed by some algorithms. Right now, only "url_param" and "uri" support an optional argument. @@ -1099,7 +1110,8 @@ balance url_param [check_post []] might be a URL parameter list. This is probably not a concern with SGML type message bodies. - See also : "dispatch", "cookie", "appsession", "transparent" and "http_proxy". + See also : "dispatch", "cookie", "appsession", "transparent", "hash-type" and + "http_proxy". bind [
]: [, ...] @@ -1729,6 +1741,40 @@ grace