Eric Wong <[email protected]> wrote: > Is this nginx->haproxy->unicorn or haproxy->nginx->unicorn? > > Are persistent connections from nginx->unicorn enabled? > (I suggest keeping it disabled, the default as far as I recall) > > What else can you share about your nginx/haproxy version and > configuration?
(out-of-order) Ping? With my nginx (1.6.2 on Debian jessie) -> unicorn config on I can confirm nginx is sending 1.0 requests to backends, which ought to prevent Rack::Chunked from chunking, at least... Haven't looked at haproxy in a while... :x > Joe McIlvain <[email protected]> wrote: > > Sure enough, looking through the Unicorn source I see that the > > "HTTP/1.1" protocol is hard-coded in the response writing logic: > > https://github.com/defunkt/unicorn/blob/a72d2e7fbd13a6bfe64b79ae361c17ea568d4867/lib/unicorn/http_response.rb#L30 > > Right, it's certainly faster to avoid having an extra hash > lookup to get the correct string in the response. There's also several places where we assume "HTTP/1.1" that would involve deeper changes than merely taking the version string: the wacky[1] check_client_connection + response_start_sent logic So more work would be necessary to respond with HTTP/1.0... But I've been thinking about ways to cleanup and micro-optimize that a bit more, anyways... [1] https://bogomips.org/unicorn-public/?q=s:%22combating+nginx+499%22 (weirdest. feature. ever.) -- unsubscribe: [email protected] archive: https://bogomips.org/unicorn-public/
