I've gotten our stack converted to Rails 4 (yea!)
and I'm looking to take advantage of the thread-safe code.
Puma works in getting up, stopping it appears to be a different problem :(
Is Puma the only multi-threaded rails?
Thin -> EventMachine Unicorn -> Forking Puma -> multi-threaded Mongrel -> don't care Webbrick -> don't care
Puma is a multi-threaded web server and our replacement for Unicorn. Unlike other Ruby Webservers, Puma was built for speed and parallelism. Puma is a small library that provides a very fast and concurrent HTTP 1.1 server for Ruby web applications. It is designed for running Rack apps only.
Puma is the default server for Rails, included in the generated Gemfile.
Puma is an HTTP web server derived from Mongrel and written by Evan Phoenix. It stresses speed and efficient use of memory.
Trinidad is nice. A very powerful server for jRuby development:
http://blog.jruby.org/2012/04/two-apps-one-trinidad/
http://railscasts.com/episodes/377-trinidad?view=comments
Here are some good benchmarks (the Trini server beats puma):
http://carlhoerberg.github.io/blog/2012/03/31/jruby-application-server-benchmarks/
A nice Trinidad Server setup tutorial:
http://blog.jruby.org/2012/04/two-apps-one-trinidad/
No. In alphabetical order:
Iodine
a HTTP / Websocket Server & EventMachine alternative (kqueue/epoll based)Net::HTTP::Server
, despite the lack of advertising, supports multithreading--threaded
or by setting threaded: true
in the appropriate configuration file (e.g. bundle exec thin start --threaded
)Rails::Server
to enable multi-threading Note that currently MRI Ruby runs only one thread runs at a time due to its global interpreter lock (GIL). You'll only be truly able to exploit multithreading by using a different Ruby runtime such as JRuby or Rubinius, which provide access to native threads. If you decide to go with JRuby, there are several JVM-dependent servers worth exploring.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With