What makes Puma so fast is the careful use of a Ragel extension to provide fast, accurate HTTP 1.1 protocol parsing. This makes the server scream without too many portability issues.

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.

If you are not using Bundler , you can install Puma directly from the command line:

Puma History

Puma comes from a long line of ruby webservers derived from Zed Shaw's seminal work on Mongrel. The primary element that remains is Mongrel's great HTTP parser written in ragel and executed in either C or Java, depending on the ruby implementation.

Evan Phoenix looked at Mongrel and saw a chance to take the idea and move it forward to incorporate two elements absent from the original work. Firstly, the Ruby world has moved almost entirely to use Rack as the primary interface for web apps. Mongrel was written in a pre-Rack world, so the first thing Puma did was cut out all the unnecessary abstractions and support the Rack interface directly. Second, Puma is designed to be used on a Ruby implementation which provides true parallelism, such as Rubinius and JRuby. Tuning for the capability and patterns that these implementations provide meant rethinking how requests entered the system and were handled. Incorporating these ideas, Puma was born from Mongrel and began moving forward.

Today, Puma runs on all Ruby implementations, but will always run best on any implementation that provides true parallelism. It looks to provide a simple and high performance request/response pipeline to Rack apps, allowing it to be used by nearly all ruby web applications.

Created By

Puma was created by Evan Phoenix in late 2011 as a derivative of Mongrel. Now, most of the original Mongrel code has been rewritten except for the parser. The git history for the project provides a timeline of the evolution of the project.