From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: Rainbows! + Nginx
Date: Tue, 6 Dec 2011 00:51:04 +0000 [thread overview]
Message-ID: <20111206005104.GA20671@dcvr.yhbt.net> (raw)
In-Reply-To: <CAM4_PZdCVss61emzKwA_4Mg5x6vzeP9UY9OuhezTM3MYzdAuYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Danny Tran <danny.tran@digisynd.com> wrote:
> I'm trying to run a Rails app that utilizes HTTP streaming with
> Rainbows! behind Nginx.
> Here is my nginx.conf:https://gist.github.com/a749361acd09b6ae80e2
> Despite setting proxy_buffering off; it appears that nginx is still
> buffering the output because I do not get a streaming response. When
> I curl the app directly (port 3000) I get a proper streaming response,
> but when I curl nginx (which proxies to the Rails app) I do not get a
> streaming response.
> Any thoughts?
Does your Rack app actually set "X-Accel-Buffering: no" in a response
header? Your config mentions it:
# The Rack application may also set "X-Accel-Buffering (yes|no)"
# in the response headers do disable/enable buffering on a
# per-response basis.
proxy_buffering off;
proxy_pass_header X-Accel-Buffering;
I've mostly forgotten about Rails 3.1 streaming myself :x
I know current nginx versions only send HTTP/1.0 requests to the
backends, which means you need to force the response to stream
via "X-Accel-Buffering: no" since HTTP/1.0 doesn't have chunked
responses,
You should also try using "curl --http1.0" to better simulate nginx
behavior with HTTP/1.0 for testing.
_______________________________________________
Rainbows! mailing list - rainbows-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying
prev parent reply other threads:[~2011-12-06 0:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 23:42 Rainbows! + Nginx Danny Tran
[not found] ` <CAM4_PZdCVss61emzKwA_4Mg5x6vzeP9UY9OuhezTM3MYzdAuYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-06 0:51 ` 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: http://yhbt.net/rainbows/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111206005104.GA20671@dcvr.yhbt.net \
--to=normalperson-rmlxzr9ms24@public.gmane.org \
--cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.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
http://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).