如何在heroku上滚动自己的自动缩放比例? [英] How can I roll my own auto-scaling on heroku?

查看:59
本文介绍了如何在heroku上滚动自己的自动缩放比例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Heroku不为性能层级"测功机($ 250/mo)下的任何功能提供自动缩放功能.

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

Hirefire曾经是您可以配置为自动缩放测功机的宝石,但是他们意识到他们的解决方案可以赚钱,因此现在它是一项付费服务​​.

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.

对于较小的应用程序,有哪些选项(包括滚动我自己的选项)可以免费进行智能的dynos缩放?

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

推荐答案

就金钱而言,最便宜的解决方案是使用Heroku的Platform API,但这会浪费时间.形成端点可让您按比例放大和缩小测功机的数量

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.

然后,您只是"需要收集有关需要多少个测功的信息.例如,使用 log-runtime-metrics 功能和日志消耗,您可以在dynos上侦听cpu和内存使用情况,并基于放大/缩小对此.

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.

这篇关于如何在heroku上滚动自己的自动缩放比例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆