Load balancing
Least connections
A balancing policy that sends each new request to the backend with the fewest connections still open.
Round robin gives every backend its turn, so when requests cost unequal amounts a slow server's unfinished work
piles up. Least connections (HAProxy balance leastconn) counts the open connections instead, and steers new
requests away from a busy server without knowing why it is slow. Both respect weights: a backend with weight 2
gets twice the share, and a weight that does not match the hardware starves some servers and overloads others.