In this chapter we will be outlining our Heroku best practices.

Setting up your heroku

  • Make the app in the right region, like: heroku create my-app --remote=staging --region=eu
  • Use the right remote names. staging for staging, production for production.
  • Use the parity gem for easy heroku access. Instead of running heroku --app my-app rake run [command] you can now do production rake
  • Use a load balancer to redirect your traffic, cache assets and serve error pages.
  • Use pingdom to keep your site responsive. Since Heroku dynos get bored and fall asleep, when no traffic.

Heroku addons

  • Heroku scheduler for periodic tasks
  • PG backups for backups
  • Mailchimp for mailing
  • Appsignal for rails error catching