Thanks. please check my last reply >> Thanks. Am talking about the weights , if one server (x) assigned with weight 125 and other server (y) with weight 12 ( added twice in the file) , we see x is getting half of the traffic compared to y. that means weigt has no affects here?
in this case , server x should be getting 5 folds of connections of y ideally. but something is preventing this . Am i right? in our case x is getting only 50 percent of y ( we are calculating the number of connections/sec) . how do we know how many connections haproxy keep it open for a particular server? On Tue, Mar 4, 2014 at 7:52 PM, Willy Tarreau <w...@1wt.eu> wrote: > 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 > > -- ========================= Vijeesh K "The temptation to quit will be greatest just before you are about to succeed"