Rainbows! Rack HTTP server user/dev discussion
 help / color / 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, back to index

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

Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror http://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git