Book Image

Heroku Cloud Application Development

By : Anubhav Hanjura
Book Image

Heroku Cloud Application Development

By: Anubhav Hanjura

Overview of this book

Table of Contents (17 chapters)
Heroku Cloud Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Running anything


You can pretty much run anything on the Heroku platform. If you need additional features for your web app, you can use the supported add-ons and consume the add-on services from your app and provide newer capabilities such as monitoring (of the app) or data storage in your application. The possibilities are endless.

Let's say you want to swap the web server and worker system used for your Rails application and use Unicorn and Resque respectively instead.

You just need to change the Gemfile and Procfile, and that's it. You are ready to go!

The Gemfile changes are as follows:

gem 'unicorn'
gem 'resque'
gem 'resque-scheduler'

The Procfile changes are as follows:

web:     bundle exec unicorn -p $PORT -c ./config/unicorn.rb
worker:  bundle exec rake resque:work QUEUE=*
urgworker: bundle exec rake resque:work QUEUE=urgent

The urgworker is a new custom process type defined to signify tasks with an urgent QUEUE type. You get the flexibility of scaling these process types independent...