Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3.1.1 HTTP streaming with Apache + Passenger

In the Railscasts about HTTP streaming some commenters have confirmed that one can do http streaming with Apache + Passenger but strangely I can't find any instructions via Google.

Also the Rails doc did not provide any instructions. All detailed instructions everywhere refer to Unicorn. I must not be the only one wanted to do http streaming over Apache and Passenger. Help please.

like image 236
allesklar Avatar asked Oct 23 '11 16:10

allesklar


1 Answers

HTTP Streaming is more correctly known as Chunked Transfer Encoding.

These are the things I know about (there may be more requirements):

Ruby 1.9.x

Streaming requires the threading features of Ruby 1.9

Compatible middleware

Any middleware you have must not modify the HTTP response

Passenger

The passenger_buffer_response option must be turned off

Client Support

The client must advertise it uses HTTP 1.1 or send the TE request header.

I vaguely recall reading somewhere that nginx was needed, but I cannot find the reference anywhere.

I hope that helps.

like image 196
Richard Hulse Avatar answered Sep 28 '22 07:09

Richard Hulse