Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Damian Janowski <jano@dimaion.com>
To: rainbows-public@bogomips.org
Subject: Slow response with HTTP 1.1?
Date: Fri, 4 Jul 2014 12:18:10 -0300	[thread overview]
Message-ID: <CABAijKGO+TN7=Ls+xsB+DW2B-jsFNMMx4iAtF0UO3ZCDP1coMQ@mail.gmail.com> (raw)

Hi,

I'm seeing very slow (or time outs, depending on the client) for
requests made over HTTP 1.1. If I force curl to use HTTP 1.0,
everything works quickly.

The behavior is consistent over curl or when using Rainbows behind Varnish.

Any ideas?

$ uname -a
Linux ip-10-187-40-71 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2
x86_64 GNU/Linux

$ ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]

$ rainbows -v
Rainbows! v4.6.2

$ time curl localhost:8080/ping -vv
* About to connect() to localhost port 8080 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /ping HTTP/1.1
> User-Agent: 'Mozilla/5.0'
> Host: localhost:8080
> Accept: */*
>
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Date: Fri, 04 Jul 2014 15:02:47 GMT
< Status: 200 OK
< Content-Type: text/plain; charset=UTF-8
< Connection: keep-alive
* no chunk, no close, no size. Assume close to signal end
<
* additional stuff not fine transfer.c:1037: 0 0
* additional stuff not fine transfer.c:1037: 0 0
* additional stuff not fine transfer.c:1037: 0 0
* additional stuff not fine transfer.c:1037: 0 0
* nread <= 0, server closed connection, bailing
* Closing connection #0
PONG
real    0m5.015s
user    0m0.000s
sys     0m0.008s

$ time curl localhost:8080/ping -vv -0
* About to connect() to localhost port 8080 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /ping HTTP/1.0
> User-Agent: 'Mozilla/5.0'
> Host: localhost:8080
> Accept: */*
>
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Date: Fri, 04 Jul 2014 15:04:48 GMT
< Status: 200 OK
< Content-Type: text/plain; charset=UTF-8
< Connection: close
<
* nread <= 0, server closed connection, bailing
* Closing connection #0
PONG
real    0m0.010s
user    0m0.012s
sys     0m0.000s

             reply	other threads:[~2014-07-04 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04 15:18 Damian Janowski [this message]
2014-07-04 19:50 ` Slow response with HTTP 1.1? Eric Wong
2014-07-06 17:02   ` Damian Janowski

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/rainbows/

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

  git send-email \
    --in-reply-to='CABAijKGO+TN7=Ls+xsB+DW2B-jsFNMMx4iAtF0UO3ZCDP1coMQ@mail.gmail.com' \
    --to=jano@dimaion.com \
    --cc=rainbows-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/rainbows.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).