mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
For active servers, this is the sum of the eweights of all active servers before this one in the backend, and [srv->cumulative_weight .. srv_cumulative_weight + srv_eweight) is a space occupied by this server in the range [0 .. lbprm.tot_wact), and likewise for backup servers with tot_wbck. This allows choosing a server or a range of servers proportional to their weight, by simple integer comparison. Signed-off-by: Andrew Rodland <andrewr@vimeo.com>