]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: log/balance: rename "log-sticky" to "sticky"
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Nov 2023 17:19:41 +0000 (18:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Nov 2023 17:21:31 +0000 (18:21 +0100)
After giving it some thought, it could pretty well happen that other
protocols benefit from the sticky algorithm that some used to emulate
using a "stick-on int(0)" or things like this previously. So better
rename it to "sticky" right now instead of having to keep that "log-"
prefix forever. It's still limited to logs, of course, only the algo
is renamed in the config.

doc/configuration.txt
reg-tests/log/log_backend.vtc
src/backend.c

index 20fb01e0eec01225e32da09638471ecba797c872..269d75738004f8e0371a94ce209535df7a58c893 100644 (file)
@@ -4932,12 +4932,13 @@ balance url_param <param> [check_post]
                   This algorithm is only usable for backends in LOG mode, for
                   others, please use "hash" instead.
 
-      log-sticky  Tries to stick to the same server as much as possible. The
+      sticky      Tries to stick to the same server as much as possible. The
                   first server in the list of available servers receives all
                   the log messages. When the server goes DOWN, the next server
                   in the list takes its place. When a previously DOWN server
                   goes back UP it is added at the end of the list so that the
-                  sticky server doesn't change until it becomes DOWN.
+                  sticky server doesn't change until it becomes DOWN. This
+                  algorithm is only usable for backends in LOG mode.
 
     <arguments> is an optional list of arguments which may be needed by some
                 algorithms. Right now, only "url_param", "uri" and "log-hash"
index eb38a28019ec915c8641ee28781fd93b8283ca9f..a9223ee01a7ebdf739ab27aed24ad9af9766d690 100644 (file)
@@ -79,7 +79,7 @@ haproxy h1 -conf {
 
         backend mylog-failover
                 mode log
-               balance log-sticky
+                balance sticky
 
                 server s1 udp@${Slg21_addr}:${Slg21_port}        # only receives "GET /srv1" request
                 server s2 udp@${Slg22_addr}:${Slg22_port}        # only receives "GET /srv2" request
index 647682c5cd7a0a7a64161906dbf195373fe59fd6..f4f714bc82feafacf6903fc668b0750d99cd9d32 100644 (file)
@@ -2834,12 +2834,12 @@ int backend_parse_balance(const char **args, char **err, struct proxy *curproxy)
                ha_free(&curproxy->lbprm.arg_str);
                curproxy->lbprm.arg_str = strdup(args[1]);
        }
-       else if (strcmp(args[0], "log-sticky") == 0) {
+       else if (strcmp(args[0], "sticky") == 0) {
                curproxy->lbprm.algo &= ~BE_LB_ALGO;
                curproxy->lbprm.algo |= BE_LB_ALGO_LS;
        }
        else {
-               memprintf(err, "only supports 'roundrobin', 'static-rr', 'leastconn', 'source', 'uri', 'url_param', 'hash', 'hdr(name)', 'rdp-cookie(name)', 'log-hash' and 'log-sticky' options.");
+               memprintf(err, "only supports 'roundrobin', 'static-rr', 'leastconn', 'source', 'uri', 'url_param', 'hash', 'hdr(name)', 'rdp-cookie(name)', 'log-hash' and 'sticky' options.");
                return -1;
        }
        return 0;