maxconn 1 in nginx

Dave Pascoe lists at ruby-forum.com
Tue Nov 18 16:26:39 MSK 2008


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).

-Dave Pascoe
 Ourstage.com
 http://www.ourstage.com

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list