10 messages in ru.sysoev.nginxRe: maxconn 1 in nginx
FromSent OnAttachments
Michał JaszczykOct 9, 2008 2:28 am 
Grzegorz NosekOct 9, 2008 2:38 am 
BenjaminOct 9, 2008 5:53 am 
Grzegorz NosekOct 9, 2008 6:08 am 
BenjaminOct 9, 2008 7:28 am 
Grzegorz NosekOct 9, 2008 8:48 am 
Ezra ZygmuntowiczOct 9, 2008 9:22 am 
Grzegorz NosekOct 9, 2008 10:18 am 
Cliff WellsOct 9, 2008 12:43 pm 
Dave PascoeNov 18, 2008 5:26 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: maxconn 1 in nginxActions...
From:Dave Pascoe (lis@ruby-forum.com)
Date:Nov 18, 2008 5:26:16 am
List:ru.sysoev.nginx

Ezra Zygmuntowicz wrote:

Grzegorz-

Yeah the haproxy behavior is what we really want for proxying to rails apps. I'd like nginx to only feed a request to mongrels that are not currently processing a request and any other requests will queue in nginx in the efficient event loop and only dole out the requests once a backend comes available or a timeout is hit.

This is the ideal load balancer situation for rails apps. I;ve been putting haproxy in between nginx and mongrels to do this but I would much rather see the fair balancer support this use case so I have less items in the chain .

This depends on whether the backend is actually hitting Rails or not. If you have a backend Mongrel cluster that doles out page-cached pages, for example, then maxconn can (and should) be set much higher.

Now if you hit Rails...we have done measurements that show noticeable increase in throughput with maxconn set to 2 instead. But you only want to do this if the behavior of your controller(s) is very predictable (and they're pretty fast).