Book Image

Heroku Cookbook

By : Mike Coutermarsh
Book Image

Heroku Cookbook

By: Mike Coutermarsh

Overview of this book

Heroku is a Platform as a Service that enables developers to rapidly deploy and scale their web applications. Heroku is designed for developer happiness, freeing developers from doing system administrative tasks such as configuring servers and setting up load balancers. Developers are able to focus on what they do best, building web applications, while leaving the details of deployment and scaling to the experts at Heroku. This practical guide is packed with step-by-step solutions to problems faced by every production-level web application hosted on Heroku. You'll quickly get comfortable with managing your Heroku applications from the command line and then learn everything you need to know to deploy and administer production-level web applications.
Table of Contents (17 chapters)
Heroku Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


We have several great options to choose from when picking a web server to run our Ruby applications. Newer developers will typically start out using WEBrick, which is the default web server for Rails and Rack applications. WEBrick is great when developing or testing an application, but it falls short quickly when we need to serve real production traffic. The main problem with using WEBrick is its lack of concurrency. It's only able to process a single request at a time. This is very limiting and forces us to spin up multiple dynos to handle even a modest amount of traffic.

In this chapter, we will be introduced to Unicorn and Puma, two web servers that are great options to run production-level Ruby applications on Heroku. Each provides us with the concurrency we need to run a high-traffic web application. Depending on our application's memory footprint, both Unicorn and Puma will provide us with a performance boost over WEBrick; this boost will range from 2 to 4X. This results...