Puma is a Ruby Web server built for concurrency. Puma is simple and fast for Ruby/Rack applications, Puma is a Ruby Web server built for concurrency. Puma is a simple, fast, multi-threaded, highly concurrent HTTP 1.1 server for Ruby/Rack applications. It is only applicable to running Rack applications. Multi thread, highly concurrent HTTP 1.1 server. It is only applicable to running Rack applications.
Designed for speed and concurrency
Puma uses C optimized Ragel extension (inherited from Mongrel) to process requests. This extension provides fast and accurate HTTP 1.1 protocol parsing in a portable way. Puma then uses the thread pool to process the request. Each request is processed in a separate thread, so the real concurrent Ruby implementation (JRuby, Rubinius) will use all available CPU cores.
Puma is designed as the preferred server for Rubinius, but it also works well with JRuby and MRI.
On MRI, there is a global VM lock (GVL) to ensure that only one thread can run Ruby code at a time. However, if you want to do a lot of blocking IO (such as HTTP calls to external APIs (such as Twitter)), Puma can still improve the throughput of MRI by allowing IO to wait for parallel processing.
Quick Start
$ gem install puma
$ puma
If there is no parameter, puma will look for a rackup (. ru) file in the working directory named config.ru.