puma
TLDR
Start Puma server
$ puma
Start with config$ puma -C [config/puma.rb]
Start on specific port$ puma -p [3000]
Start with workers$ puma -w [4]
Start in daemon mode$ puma -d
SYNOPSIS
puma [options] [rackup file]
DESCRIPTION
Puma is a fast, concurrent Ruby/Rack web server. It uses threads and optional workers for parallelism, making it suitable for production Rails deployments.
PARAMETERS
-p, --port port
Listen port.-b, --bind uri
Bind URI.-C, --config file
Configuration file.-w, --workers n
Number of workers.-t, --threads min:max
Thread pool size.-d, --daemon
Daemonize process.-e, --environment env
Environment (development, production).
EXAMPLES
$ # Start on port 3000
puma -p 3000
# With workers and threads
puma -w 4 -t 8:32
# Bind to Unix socket
puma -b unix:///tmp/puma.sock
# Production mode
puma -e production -w 4
# With config file
puma -C config/puma.rb
puma -p 3000
# With workers and threads
puma -w 4 -t 8:32
# Bind to Unix socket
puma -b unix:///tmp/puma.sock
# Production mode
puma -e production -w 4
# With config file
puma -C config/puma.rb
CONFIGURATION (puma.rb)
$ workers 4
threads 4, 16
port 3000
environment 'production'
preload_app!
on_worker_boot do
ActiveRecord::Base.establish_connection
end
threads 4, 16
port 3000
environment 'production'
preload_app!
on_worker_boot do
ActiveRecord::Base.establish_connection
end
CAVEATS
Ruby/Rack required. Workers require copy-on-write. Use with reverse proxy in production.
HISTORY
Puma was created by Evan Phoenix in 2011 as a replacement for Mongrel, focusing on concurrent request handling.


