Heroku Cookbook

Over 70 step-by-step recipes to solve the challenges of administering and scaling a real-world production web application on Heroku
Preview in Mapt
Code Files

Heroku Cookbook

Mike Coutermarsh

1 customer reviews
Over 70 step-by-step recipes to solve the challenges of administering and scaling a real-world production web application on Heroku
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $29.99
Save 66%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$49.99
$29.99 p/m after trial
RRP $29.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Heroku Cookbook Book Cover
Heroku Cookbook
$ 29.99
$ 10.00
Robot Operating System Cookbook Book Cover
Robot Operating System Cookbook
$ 39.99
$ 10.00
Buy 2 for $20.00
Save $49.98
Add to Cart

Book Details

ISBN 139781782177944
Paperback232 pages

Book Description

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

Chapter 1: Getting Started with Heroku
Introduction
Installing the Heroku Toolbelt
Introducing version control with Git
Deploying a Rails application to Heroku
Deploying a Node.js application to Heroku
Introducing dynos, workers, and scaling
Chapter 2: Managing Heroku from the Command Line
Introduction
Viewing application logs
Searching logs
Installing add-ons
Managing environment variables
Enabling the maintenance page
Managing releases and rolling back
Running one-off tasks and dynos
Managing SSH keys
Sharing and collaboration
Monitoring load average and memory usage
Chapter 3: Setting Up a Staging Environment
Introduction
Duplicating an existing application
Managing git remotes
Password protection for a Rails app
Deploying with Heroku labs – Pipeline
Deploying from tags
Continuous integration and deployment with Travis CI
Chapter 4: Production-ready with Heroku
Introduction
Managing domains from the command line
Configuring DNS with CloudFlare
Setting up SSL with CloudFlare
Enabling preboot for seamless deploys
Enabling custom maintenance and error pages
Setting up a status page
Setting up log draining with LogEntries
Chapter 5: Error Monitoring and Logging Tools
Introduction
Checking Heroku's status
Adjusting Rails's logging level
Storing historical logs with PaperTrail
Monitoring for 404 and 500 errors with PaperTrail
Logging slow queries with PaperTrail
Monitoring uptime with Pingdom
Logging errors with Rollbar
Chapter 6: Load Testing a Heroku Application
Introduction
Monitoring dyno performance with Librato
Monitoring application performance with New Relic
Learning to load test with Siege
Configuring complex load tests with Siege
Load testing from the cloud with Blitz.io
Testing real-user scenarios with Load Impact
Chapter 7: Optimizing Ruby Server Performance on Heroku
Introduction
Setting up and running Unicorn on Heroku
Monitoring and tuning Unicorn's memory usage
Tuning Unicorn's backlog for Heroku
Timing out long requests with Unicorn
Setting up and running Puma on Heroku
Running Puma with Rubinius for parallelism
Chapter 8: Optimizing a Rails Application on Heroku
Introduction
Setting up a sample blogging app
Using Heroku Deflater to gzip assets
Serving assets from Amazon Web Services (AWS) Cloudfront
Adding memcached to a Rails application
Adding Redis to a Rails application
Implementing low-level caching in Rails
Caching rendered views
Aborting long requests with Rack::Timeout
Using a follower for read-only DB queries
Chapter 9: Using and Administrating Heroku Postgres
Introduction
Creating and sizing a new database
Promoting a Heroku database
Connecting to Heroku Postgres from Navicat
Connecting to Heroku Postgres from psql
Creating a database backup
Restoring from a backup
Creating a read-only follower
Viewing and stopping database processes
Analyzing Heroku Postgres's performance
Chapter 10: The Heroku Platform API
Introduction
Making our first API request with HTTPie
Getting started with the Platform API gem
Scaling dynos and workers
Managing configuration variables
Adding and removing collaborators
Creating new Heroku applications

What You Will Learn

  • Administer and debug any Heroku application
  • Comfortably deploy any type of web application
  • Master the Heroku command-line interface (CLI)
  • Identify and eliminate bottlenecks from your apps' performance
  • Load test and monitor application performance
  • Take full advantage of the Heroku add-on marketplace
  • Set up a deployment pipeline to get applications from development to production quickly

Authors

Table of Contents

Chapter 1: Getting Started with Heroku
Introduction
Installing the Heroku Toolbelt
Introducing version control with Git
Deploying a Rails application to Heroku
Deploying a Node.js application to Heroku
Introducing dynos, workers, and scaling
Chapter 2: Managing Heroku from the Command Line
Introduction
Viewing application logs
Searching logs
Installing add-ons
Managing environment variables
Enabling the maintenance page
Managing releases and rolling back
Running one-off tasks and dynos
Managing SSH keys
Sharing and collaboration
Monitoring load average and memory usage
Chapter 3: Setting Up a Staging Environment
Introduction
Duplicating an existing application
Managing git remotes
Password protection for a Rails app
Deploying with Heroku labs – Pipeline
Deploying from tags
Continuous integration and deployment with Travis CI
Chapter 4: Production-ready with Heroku
Introduction
Managing domains from the command line
Configuring DNS with CloudFlare
Setting up SSL with CloudFlare
Enabling preboot for seamless deploys
Enabling custom maintenance and error pages
Setting up a status page
Setting up log draining with LogEntries
Chapter 5: Error Monitoring and Logging Tools
Introduction
Checking Heroku's status
Adjusting Rails's logging level
Storing historical logs with PaperTrail
Monitoring for 404 and 500 errors with PaperTrail
Logging slow queries with PaperTrail
Monitoring uptime with Pingdom
Logging errors with Rollbar
Chapter 6: Load Testing a Heroku Application
Introduction
Monitoring dyno performance with Librato
Monitoring application performance with New Relic
Learning to load test with Siege
Configuring complex load tests with Siege
Load testing from the cloud with Blitz.io
Testing real-user scenarios with Load Impact
Chapter 7: Optimizing Ruby Server Performance on Heroku
Introduction
Setting up and running Unicorn on Heroku
Monitoring and tuning Unicorn's memory usage
Tuning Unicorn's backlog for Heroku
Timing out long requests with Unicorn
Setting up and running Puma on Heroku
Running Puma with Rubinius for parallelism
Chapter 8: Optimizing a Rails Application on Heroku
Introduction
Setting up a sample blogging app
Using Heroku Deflater to gzip assets
Serving assets from Amazon Web Services (AWS) Cloudfront
Adding memcached to a Rails application
Adding Redis to a Rails application
Implementing low-level caching in Rails
Caching rendered views
Aborting long requests with Rack::Timeout
Using a follower for read-only DB queries
Chapter 9: Using and Administrating Heroku Postgres
Introduction
Creating and sizing a new database
Promoting a Heroku database
Connecting to Heroku Postgres from Navicat
Connecting to Heroku Postgres from psql
Creating a database backup
Restoring from a backup
Creating a read-only follower
Viewing and stopping database processes
Analyzing Heroku Postgres's performance
Chapter 10: The Heroku Platform API
Introduction
Making our first API request with HTTPie
Getting started with the Platform API gem
Scaling dynos and workers
Managing configuration variables
Adding and removing collaborators
Creating new Heroku applications

Book Details

ISBN 139781782177944
Paperback232 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Heroku Cloud Application Development Book Cover
Heroku Cloud Application Development
$ 32.99
$ 10.00
Modern JavaScript Applications Book Cover
Modern JavaScript Applications
$ 39.99
$ 10.00
Node.js Blueprints Book Cover
Node.js Blueprints
$ 32.99
$ 6.60
Mastering R for Quantitative Finance Book Cover
Mastering R for Quantitative Finance
$ 39.99
$ 10.00
WebSocket Essentials – Building Apps with HTML5 WebSockets Book Cover
WebSocket Essentials – Building Apps with HTML5 WebSockets
$ 23.99
$ 10.00
CoffeeScript Application Development Cookbook Book Cover
CoffeeScript Application Development Cookbook
$ 39.99
$ 10.00