Combating nginx 499 HTTP responses during flash traffic scenario

Tom Burns tom.burns at jadedpixel.com
Tue Oct 30 20:40:23 UTC 2012


On Mon, Oct 29, 2012 at 5:53 PM, Eric Wong <normalperson at yhbt.net> wrote:
> Maybe this gross hack can work for you guys.  It writes the first
> chunk of the HTTP response header out immediately after reading
> the request headers, and sends the rest once it gets the status...

I tested the patch today and it does what we want, dropping
connections before passing them to the rails app when the client has
already disconnected.

I also benchmarked the patch to see if it had a negligible performance
hit and it did not.  The cost was absorbed by the variation in speed
of the other components in the stack (nginx & rails).

I noticed on my computer applying the patch breaks
test_rack_lint_big_put in the unicorn test suite.  This may be just my
issue as the test suite does not run cleanly anyways if I checkout
origin/master.

We'd prefer to not have to fork unicorn for this change.  How do you
feel about merging this or a derivative thereof?  I can develop this
further if you can send me what you'd want.

Cheers,
Tom


More information about the mongrel-unicorn mailing list