nginx KeepAlive

Igor Sysoev is at
Wed Sep 9 14:01:03 MSD 2009

On Wed, Sep 09, 2009 at 05:04:44AM -0400, sameer wrote:

> Hi,
> I am using nginx to proxy requests to Apache. In our current setup the request flow is as follows.
> Akamai -> Load Balancer(Layer4) ->nginx -> Apache
> I am in the process of converting a cluster to this setup. The issue is whenever an nginx machine is introduced in a cluster of non-nginx machines all the connections are redirected to nginx. The machine can handle the load but for resilience I want equal distribution of requests.
> Using nginx as a load balancer is not a feasible option because we often add and remove machines from the cluster for maintenance.  
> I suspect it being a KeepAlive issue. How can I disable keep alive in nginx?

Disable keepalive at all:

keepalive_timeout 0;

or up to 5 keepalive requests:

keepalive_requests 5;
keepalive_timeout  15;

Igor Sysoev

More information about the nginx mailing list