unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Joe McIlvain <joe.eli.mac@gmail.com>
Cc: unicorn-public@bogomips.org
Subject: Re: Support for HTTP/1.0
Date: Fri, 11 Nov 2016 07:07:09 +0000	[thread overview]
Message-ID: <20161111070709.GA13984@whir> (raw)
In-Reply-To: <20161101181157.GA6516@dcvr>

Eric Wong <e@80x24.org> 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 <joe.eli.mac@gmail.com> 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.)

      reply	other threads:[~2016-11-11  7:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01 17:30 Support for HTTP/1.0 Joe McIlvain
2016-11-01 18:11 ` Eric Wong
2016-11-11  7:07   ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161111070709.GA13984@whir \
    --to=e@80x24.org \
    --cc=joe.eli.mac@gmail.com \
    --cc=unicorn-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).