diff --git a/doc/configuration.txt b/doc/configuration.txt index b88de47e5..a364d7e13 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -6010,7 +6010,7 @@ balance url_param [check_post] algorithms. Right now, only "url_param", "uri" and "log-hash" support an optional argument. - The load balancing algorithm of a backend is set to roundrobin when no other + The load balancing algorithm of a backend is set to "random" when no other algorithm, mode nor option have been set. The algorithm may only be set once for each backend. diff --git a/src/backend.c b/src/backend.c index 3b4aef681..aa5052936 100644 --- a/src/backend.c +++ b/src/backend.c @@ -3018,9 +3018,9 @@ const char *backend_lb_algo_str(int algo) { int backend_parse_balance(const char **args, char **err, struct proxy *curproxy) { if (!*(args[0])) { - /* if no option is set, use round-robin by default */ + /* if no option is set, use random by default */ curproxy->lbprm.algo &= ~BE_LB_ALGO; - curproxy->lbprm.algo |= BE_LB_ALGO_RR; + curproxy->lbprm.algo |= BE_LB_ALGO_RND; return 0; } diff --git a/src/cfgparse.c b/src/cfgparse.c index 3880549b8..e1b4933dc 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -3064,10 +3064,10 @@ init_proxies_list_stage1: else if (!(curproxy->options & (PR_O_TRANSP | PR_O_DISPATCH))) { /* If no LB algo is set in a backend, and we're not in * transparent mode, dispatch mode nor proxy mode, we - * want to use balance roundrobin by default. + * want to use balance random by default. */ curproxy->lbprm.algo &= ~BE_LB_ALGO; - curproxy->lbprm.algo |= BE_LB_ALGO_RR; + curproxy->lbprm.algo |= BE_LB_ALGO_RND; } }