MINOR: log/balance: support for the "random" lb algorithm
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 4 Oct 2023 15:30:02 +0000 (17:30 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Oct 2023 08:05:06 +0000 (10:05 +0200)
commite0b46600150ceb67d3051cc6ed1150708f0ae7a1
treea4ea3a7fd063981b9783a27d5855d30d0ed5c3c4
parent26f73dbcbb7ed87157c532f08d3a4bccea526834
MINOR: log/balance: support for the "random" lb algorithm

In this patch we add basic support for the random algorithm:

random algorithm picks a random server using the result of the
statistical_prng() function as if it was a hash key to then compute the
related server ID.

There is no support for the <draw> parameter (which is implemented for
tcp/http load-balancing), because we don't have the required metrics to
evaluate server's load in log backends for the moment. Plus it would add
more complexity to the __do_send_log_backend() function so we'll keep it
this way for now but this might be needed in the future.
doc/configuration.txt
src/backend.c
src/log.c