views:

54

answers:

2

Heroku allows you to add and remove dynos and workers on the fly and charges you per second that each is used. Is it possible to set up my app so that it can add/remove dynos and workers from itself depending on the load it's under?

This paragraph on Heroku.com mentions an API, but I can't find out much more about it.

+3  A: 

Yes. What you want is something like this:

require 'heroku'
Heroku::Client.new("username", "password").set_workers("appname", num_workers)
NudeCanalTroll
Thanks very much!
Kiwi
A: 

This will probably be quite interesting to you: http://github.com/ddollar/heroku-autoscale

tfe