11 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 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: HTTP load balancing algorithmActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Jan 22, 2007 12:28:05 pm
List:ru.sysoev.nginx

On Mon, 22 Jan 2007, Florian Munz wrote:

I'm currently running mod_proxy_balancer proxying to two app servers running 6 mongrel processes each.

Unfortunately I have some slow requests in my application. Since apache doesn't distribute the requests very clever I am getting long loading times for some of the requests (apache sends a new requests to a mongrel process who is busy answering another request). The problem is described in more detail in the mongrel list:

http://rubyforge.org/pipermail/mongrel-users/2006-September/001653.html

I was wondering if nginx has a smarter way of distributing the httpd requests than apache and could help me here?

nginx can not presently limit number of simultaneous connections to backend (however, I plan it).

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

upstream fast { server localhost:9001; server localhost:9002; server localhost:9003; }

upstream slow { server localhost:9004; server localhost:9005; server localhost:9006; }

server { location / { proxy_pass http://fast; }

location /slow { proxy_pass http://slow; } }