On Tue, Mar 04, 2014 at 07:50:04PM +0530, vijeesh vijayan wrote:
> This distribution happens only when server x and y has same number of open
> connections?

no, the distribution happens all the time. To make it simpler to understand,
imagine that you have weight=1 for all servers. Haproxy will then try to
balance the established connections so that all servers have the same number.
Now if one server has weight 2, haproxy will try to load it with twice the
number of connections as the first one. And so on... That's why leastconn
is normally used with long-lived connections (eg: RDP, LDAP, SQL, ...).

Willy


Reply via email to