Nginx KeepAlive

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?

Sameer

Posted at Nginx Forum:

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

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;