Can a Heroku app add/remove dynos or workers to/fr

2019-04-03 02:03发布

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.

1条回答
神经病院院长
2楼-- · 2019-04-03 02:38

Yes. What you want is something like this:

require 'heroku'
Heroku::Client.new("username", "password").set_workers("appname", num_workers)
查看更多
登录 后发表回答