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

Creating and sizing a new database


You're ready to set up a new Postgres database on Heroku. But how do you decide which plan is right for your situation? In this recipe, you will determine what database size and plan you will need for a new Heroku application. Rather than guessing, you can take some simple steps to properly size your database from the start.

How to do it…

When selecting a database, there are several choices we need to make to ensure we are on the right plan. We'll need to determine uptime requirements, as well as data size and how many connections our application needs. Once we have this information, it is rather easy to determine which plan is right for our application.

Selecting a tier

The first decision we need to make in choosing a database is picking which database tier our application needs:

  1. Heroku has four database tiers: hobby, standard, premium, and enterprise. For any production-level application, we have to be at least on the standard tier. Hobby tier databases are...