How to get Rails 4 ActionController :: Live streaming with Thin and Ruby 2? And how do Tin and Puma scale live?

I work with Puma, but with Thin I do not get any thread, and I need to kill the server to stop it. I am testing using an initial endurance example that displays the current time:

http://tenderlovemaking.com/2012/07/30/is-it-live.html

A more general question for me: is this type of streaming practical in an application with any significant traffic? I assume that it can be easy to hand in, if not thousands of users connected to the stream immediately in such an application. How will Puma be here? I read that Puma uses 1 thread for each connection. Is it effective? What about Tin? Will all connections be in the same thread? Would it be more efficient?

Another problem, I mean, that even with Puma I only get one connection working locally. When I curl from the second terminal, I get no output ... Does anyone know why?

+7
source share
1 answer

If you change the internal development environment .rb:

/config/environments/development.rb

config.cache_classes = true config.eager_load = true 

You can get more than one connection with puma localy! The downside is that you have to restart every time you want to see any changes you made.

+1
source

All Articles