atom feed11 messages in ru.sysoev.nginxRe: HTTP load balancing algorithm
FromSent OnAttachments
Florian MunzJan 22, 2007 11:41 am 
Igor SysoevJan 22, 2007 12:28 pm 
Jonathan VanascoJan 22, 2007 12:43 pm 
Ezra ZygmuntowiczJan 22, 2007 1:01 pm 
Florian MunzJan 22, 2007 1:10 pm 
Igor SysoevJan 22, 2007 1:11 pm 
Igor SysoevJan 22, 2007 1:15 pm 
Ezra ZygmuntowiczJan 22, 2007 1:19 pm 
Bob IppolitoJan 22, 2007 1:21 pm 
Aleksandar LazicJan 22, 2007 11:22 pm 
Jure PečarJan 23, 2007 12:27 am 
Subject:Re: HTTP load balancing algorithm
From:Bob Ippolito (bob-@public.gmane.org)
Date:Jan 22, 2007 1:21:36 pm
List:ru.sysoev.nginx

On 1/22/07, Ezra Zygmuntowicz <ezmo@public.gmane.org>
wrote:

On Jan 22, 2007, at 12:43 PM, Jonathan Vanasco wrote:

On Jan 22, 2007, at 3:28 PM, Igor Sysoev wrote:

I do not know ROR and Mongrel, but as I understand you may try to route slow requests to the dedicated backends:

that's what I thought of too, and you can do that with any proxy ( though i prefer nginx )

i'd be deathly scared of running a loadbalancer that automagically handled slow/fast requests the way you expect. the configuration would be a nightmare, and it would be doing so much logging and profiling of request timings, it might negate the purpose of a load balancer to begin with.

// Jonathan Vanasco

The ideal way that nginx's proxy could work best for rails/mongrel backends would be an optional proxy setting for not sending a request to a backend until said backend returns from a request.

That's the same as having a connection limit of 1.

Optimal load balancing is a hard problem and is highly dependent on the application and what it does. Another solution would be to send out a barrage of "pings" (e.g. a HEAD request) to servers that have a connection already and see which ones respond and weight them according to that. Such a solution might also detect dead servers (and also find servers when they come back from the dead).

-bob