HTTP load balancing algorithm

Igor Sysoev is at
Mon Jan 22 23:28:28 MSK 2007

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:
> 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;

Igor Sysoev

More information about the nginx mailing list