Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* Rainbows! + Nginx
@ 2011-12-05 23:42 Danny Tran
       [not found] ` <CAM4_PZdCVss61emzKwA_4Mg5x6vzeP9UY9OuhezTM3MYzdAuYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Tran @ 2011-12-05 23:42 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

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?
Thanks,Danny
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Rainbows! + Nginx
       [not found] ` <CAM4_PZdCVss61emzKwA_4Mg5x6vzeP9UY9OuhezTM3MYzdAuYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-12-06  0:51   ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2011-12-06  0:51 UTC (permalink / raw)
  To: Rainbows! list

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-06  0:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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).