How can I roll my own auto-scaling on heroku?

天大地大妈咪最大 提交于 2021-01-29 13:50:30

问题


Heroku doesn't offer auto-scaling for anything under the "performance tier" dynos ($250/mo).

Hirefire used to be a gem that you could configure to autoscale dynos, but they realized that their solution could make money so now it's a paid service.

What options are there (including rolling my own) for smaller apps to have intelligent scaling of dynos at no extra cost?


回答1:


The cheapest solution in term of money, but at the cost of time would be to use Heroku's Platform API. The formation endpoint will let you scale up and down the number of dynos.

Then, you "just" need to gather information on how many dynos you need. For example, with the log-runtime-metrics feature and a log drain, you could listen for the cpu and memory usage on your dynos and scale up/down based on that.



来源:https://stackoverflow.com/questions/53177060/how-can-i-roll-my-own-auto-scaling-on-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!