We use leastconn to work arond Java apps having to GC (so GCing machine gets less connections while full GC runs).
The "problem" with using it for HTTP is that it can be pretty uneven with a lot of short-lived connections, but so far that was not a problem for us, we usually use leastconn on app backends and round-robin on static/varnish backends On Thu, 15 Jan 2015 22:14:18 +0800, Alexey Zilber <[email protected]> wrote: > Hi Vivek, > > You're correct. I think the situation was that there was a huge influx > of traffic, and some servers went over their tipping point of how much they > can handle quickly. This caused connections to stack up as some servers > choked. Would leastconn give the same perfornance as roundrobin? I > noticed in the haproxy docs that it's not recommended for http, which is > what we're using. Would it be an issue to use leastconn for http? > > -Alex > > On Thu, Jan 15, 2015 at 9:41 PM, Vivek Malik <[email protected]> wrote: > > > I see roubdrobin working perfectly over here. Look at sessions total and > > see how they are same for every server. > > > > It seems that all your requests are not the same workload. Some servers or > > some requests are taking longer to fulfill and increasing load on servers. > > Have you tried using leastconn instead of round robin? > > > > That might give more fair distribution of load in this situation. > > > > Regards, > > Vivek > > On Jan 14, 2015 11:45 PM, "Alexey Zilber" <[email protected]> wrote: > > > >> Hi All, > >> > >> We got hit with a bit of traffic and we saw haproxy dump most of the > >> traffic to 3-4 app servers, sometimes even just one and driving load on > >> there to 90. We were running 1.5.9, I upgraded to 1.5.10 and the same > >> problem remained. Currently traffic is low so everything is load balanced > >> evenly, but we expect another spike in a few hours and I expect the issue > >> to return. > >> > >> > >> Here's what haproxy-status looked like: > >> > >> > >> > >> > >> Do I need to switch to maybe add a weight and tracking? We have 12 > >> frontend appservers load balancing to 28. All run haproxy and the app > >> server software. > >> > >> Thanks! > >> Alex > >> > >> > >> -- Mariusz Gronczewski, Administrator Efigence S. A. ul. WoĊoska 9a, 02-583 Warszawa T: [+48] 22 380 13 13 F: [+48] 22 380 13 14 E: [email protected] <mailto:[email protected]>
pgpmG2cNzUliT.pgp
Description: OpenPGP digital signature

