Combating nginx 499 HTTP responses during flash traffic scenario

Eric Wong normalperson at yhbt.net
Thu Nov 29 21:19:57 UTC 2012


Tom Burns <tom.burns at jadedpixel.com> wrote:
> +    if set[:check_client_connection]
> +      set[:listeners].each do |address|
> +        if set[:listener_opts][address][:tcp_nopush] == true
> +          raise ArgumentError,
> +            "check_client_connection is incompatible with tcp_nopush:true"
> +        end

Btw, were you using:

1) TCP over loopback (bound to 0.0.0.0, client comes from 127.0.0.1)
2) TCP over a LAN (separate client/server hosts)
3) Unix domain socket

I wonder if we can drop the below hunk for checking :tcp_nodelay,
and document that check_client_connection requires the client to
either be from a Unix domain socket or TCP loopback to work.

> +        if set[:listener_opts][address][:tcp_nodelay] == true
> +          raise ArgumentError,
> +            "check_client_connection is incompatible with tcp_nodelay:true"
> +        end

I couldn't get 2) to work with either value of tcp_nodelay.  My small
LAN at home only has ~0.100ms latency.

Happily, with TCP over loopback (on Linux 3.6), either value of
tcp_nodelay works, so the tcp_nodelay check seems unnecessary after
all.


More information about the mongrel-unicorn mailing list