maxconn 1 in nginx

Grzegorz Nosek grzegorz.nosek at
Thu Oct 9 17:09:11 MSD 2008

On Thu, Oct 09, 2008 at 02:54:09PM +0200, Benjamin wrote:
> It's definitly not the same thing. Nginx hasn't got yet the maxconn
> parameter.
> From haproxy documentation :
> "It's a per-server 'maxconn', associated with a per-server and a per-proxy
> queue. This transforms haproxy into a request buffer between the thousands
> of clients and the few servers. On many circumstances, lowering the maxconn
> value will increase the server's performance and decrease the overall
> response times because the servers will be less congested."

Thanks for the info. So, to make sure I understand: haproxy will keep
only 'maxconn' requests in flight to a server and sit on others until
the backends catch up, right?

upstream_fair (with weight-mode=peak) will only limit the number of
requests, causing Nginx to return 502 errors. It could be hacked to
never return a hard error (I think), so if that's the only difference
and the OP is willing to do some testing, I can implement that.

Best regards,
 Grzegorz Nosek

More information about the nginx mailing list