Nginx health checks

Alexander Staubo alex at
Wed Jun 11 04:05:41 MSD 2008

On Wed, Jun 11, 2008 at 12:02 AM, Barry Abrahamson <barry at> wrote:
> I am mostly interested in "3.) 3.1) Server monitoring" at this point.  The
> first one is already supported, and although the last one, in theory, would
> be nice, since we use round robin for most of our load distribution and have
> enough backends, the law of averages says that the probability of one
> backend becoming overloaded while the others are under-utilized is
> relatively small.  The fair proxy balancer patch for nginx may deal with
> this theoretical problem better than counting concurrent connections anyway
> -- I don't know though since I haven't tried it.

And the probability approaches 1.0 as the number of concurrent
requests approaches the number of backends. This is why HAProxy's
least-connections algorithm may work better on high-traffic sites.

In the case of Rails, which does not support parallelizing requests,
it make sense to use HAProxy's "maxconn" set to 1, which prevents the
proxy from ever sending more than one concurrent connection to a
backend; so if all backends are full, instead of queueing up
connections in the backend, you queue up connections in the proxy so
that it can immediately use the next backend that becomes idle.


More information about the nginx mailing list