conditionally disable keepalives

Cliff Wells cliff at develix.com
Fri Sep 17 20:34:22 MSD 2010


On Fri, 2010-09-17 at 11:27 -0500, Ryan Malayter wrote:
> Is it possible to conditionally disable keep-alives via some sort of
> configuration? I have a customer with a buggy proxy that they cannot
> fix short-term, but I do not want to disable keepalives entirely for
> every user. With keepalives enabled, they intermittently see "raw"
> HTTP streams in the browser, headers and all. Thousands of other
> customers have no issues, of course, as they aren't using this
> particular proxy (Trend Micro Viruswall 6).
> 
> The "keepalive_timeout" directive will not accept a variable value.
> 
> Right now I have a configuration that conditionally adds a
> "Connection: close" header based on $remote_addr, but that gets sent
> in addition to the "Connection: keepalive" header set by nginx. While
> it seems to work for this particular buggy proxy, sending multiple
> "Connection" headers is also an HTTP specification violation, I think.
> 
> The only other thing I can think of to do is a rewrite to a different
> server or location with "keepalive_timeout 0" specified, but will that
> even work, or are keepalives handled at the connection layer?
> 
> nginx 0.7.65 on Ubuntu 10.04

Or you could run a second Nginx instance between them and the main Nginx
instance.

Cliff

-- 




More information about the nginx mailing list