Heroku Dyno/Worker 扩展
Heroku 允许您动态添加和删除测功机和工作人员,并根据每个使用次数按秒收费。是否可以设置我的应用程序,以便它可以根据其通过某种heroku api承受的负载添加/删除自身的dynos和worker?
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 via some sort of heroku api?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对于扩展worker dynos:
For scaling worker dynos:
查看
http://github.com/ddollar/heroku-autoscale
http://github.com/pedro/delayed_job/tree/autoscaling
Check out
http://github.com/ddollar/heroku-autoscale
http://github.com/pedro/delayed_job/tree/autoscaling
如果您不想包含 gem,可以使用一个插件:
https://addons.heroku.com/adept-scale
If you dont want to include a gem, there is an addon for this:
https://addons.heroku.com/adept-scale
截至 2018 年,唯一可自动缩放 Web dynos 和 Worker dynos 的附加组件似乎是 IronWorker。
我没试过,但看起来不错:
https://elements.heroku.com/addons/iron_worker
HireFire 似乎仍然可用,但不能直接作为 Heroku 平台的附加组件。
As of 2018, the only add-on available that autoscales for both web dynos and worker dynos seems to be IronWorker.
I haven't tried it, but looks good:
https://elements.heroku.com/addons/iron_worker
HireFire seems to be still available as well, but not directly as an add-on through Heroku's platform.