Ruby Default Web Server
Last updated 04 February 2015
The Ruby standard library comes with a default web server named WEBrick. As this library is installed on every machine that has Ruby, most frameworks such as Rails and Rack use WEBrick as a default development web server.
While WEBrick should be fine for development, it was not designed to handle a high concurrent workload that a Ruby app must serve in production. A production web server should be used instead.
Why not WEBrick
By default WEBrick is single threaded, single process. This means that if two requests come in at the same time, the second must wait for the first to finish.
If you do not specify a web server in your
Procfile, it is likely that you’re running WEBrick in production. If you continue to run WEBrick it is likely that requests will take a long time, possibly timeout, and you will need to use many more dynos than your application requires.
Rather than doing this, ensure you use a production web server.
Production web server
A production Ruby web server is capable of handling multiple request concurrently. We currently recommend using the Puma web server.
Please add it as a dependency to your
Gemfile, add a
Procfile that specifies your production web server, commit to git and deploy. For a detailed explanation read Deploying Rails Applications With Puma.