1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
A Ruby/Rack web server built for parallelism
Find a file
Evan Phoenix 8d0515e2c8 Disable Nageling on TCP clients
Nageling, due to the nature of keep-alive connections, slows them down
considerably, especially on Linux. On Linux, a 500ms delay is introduced
when sending back the last packet of a response over a persistent
connection.

This option was tested on OS X and showed minimal effect to performance.
2011-11-30 15:50:44 -08:00
bin Fix hoe/test + rake-compiler bug 2011-11-28 11:04:28 -08:00
examples Deprecated obsolete Windows service scripts. 2009-07-07 03:42:29 -03:00
ext/puma_http11 Fix use of "unsafeBytes" leading to offset errors and regen parser. 2011-11-22 16:23:34 -06:00
lib Disable Nageling on TCP clients 2011-11-30 15:50:44 -08:00
tasks Remove some old daemons gem cruft 2011-11-28 11:51:04 -08:00
test Send the proper headers to HTTP/1.0 in keep-alive 2011-11-30 15:07:23 -08:00
tools minor test cleanups 2007-10-21 02:54:53 +00:00
.gitignore Ignore rubinius compiled files. 2010-04-28 20:30:21 -03:00
.travis.yml Fix race conditions in tests, change travis rbx name 2011-11-22 16:32:35 -08:00
COPYING Ruby license applied to all files 2006-06-30 20:42:12 +00:00
Gemfile Add rdoc and rake-compiler as gems 2011-10-22 23:17:29 -07:00
History.txt That was too early, revert to 1.2.0.beta.1 instead. 2010-07-24 14:04:12 -03:00
LICENSE Update license 2011-09-23 20:27:54 -07:00
Manifest.txt Bump to version 0.8.2 2011-11-22 15:42:05 -08:00
puma.gemspec Fix hoe/test + rake-compiler bug 2011-11-28 11:04:28 -08:00
Rakefile Minor rake cleanup 2011-11-22 15:07:19 -08:00
README.md Add documentation for Rails/Sinatra/Rack usage 2011-10-25 14:29:38 -07:00
TODO oops... gems is quite necessary 2007-11-01 06:14:56 +00:00

Puma: A Ruby Web Server Built For Concurrency

Description

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.

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

License

Puma is copyright 2011 Evan Phoenix and contributors. It is licensed under the BSD license. See the include LICENSE file for details.

Quick Start

The easiest way to get started with Puma is to install it via RubyGems and then run a Ruby on Rails application. You can do this easily:

$ gem install puma

Now you should have the puma command available in your PATH, so just do the following:

$ puma app.ru

Install

$ gem install puma

Advanced Setup

Sinatra

You can run your Sinatra application with Puma from the command line like this:

$ ruby app.rb -s Puma

Or you can configure your application to always use Puma:

require 'sinatra'
configure { set :server, :puma }

If you use Bundler, make sure you add Puma to your Gemfile (see below).

Rails

First, make sure Puma is in your Gemfile:

gem 'puma'

Then start your server with the rails command:

$ rails s puma

Rackup

You can pass it as an option to rackup:

$ rackup -s puma

Alternatively, you can modify your config.ru to choose Puma by default, by adding the following as the first line:

#\ -s puma