使用多个 Delayed::Job 队列的经济方式
我有一个 Ruby on Rails 应用程序,需要同时处理许多后台作业:根据一天中的时间,每次处理 5-6 个作业到最多 50-60 个作业。现在我的应用程序正在 Heroku 上运行,每个工作人员每小时收费 0.05 美元,无论工作人员使用多少 CPU 或内存。这每月要花掉我一大笔钱……高达 1200 美元/月。是否有任何主机可以让我以便宜得多的价格完成我正在做的事情?
I have a Ruby on Rails app that needs process many background jobs simultaneously: anywhere from 5-6 at a time to up to 50-60 at a time depending on the time of day. Right now my app is running on Heroku, which charges $.05/hour per worker, regardless of how much CPU or memory the worker is using. This is costing me a boatload each month... up to $1200/mo. Are there any hosts that will allow me to do what I'm doing for significantly cheaper?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
迁移到我自己的服务器是正确的选择。我每月花费不到 300 美元购买一台可以轻松运行 40 名工人的机器。缺点是必须学习服务器管理,但这也不算太糟糕。
Moving to my own server was the way to go. I'm paying under $300/month for a machine that can run 40 workers easily. The downside is having to learn about server administration, but it's not too bad.
如果您想要一个只需按秒付费的大规模并行工作系统(因此您实际上只需为工作人员的工作时间付费),请查看 SimpleWorker,网址为 http://www.simpleworker.com 。我敢打赌,它的成本只是 Heroku 和你自己做的成本的一小部分。
我们还提供 Heroku 插件。
If you want a massively parallel worker system that you only pay for by the second (so you really only pay for the time your worker is working), check out SimpleWorker at http://www.simpleworker.com . I bet it would cost you a small fraction of what it cost on Heroku and doing it yourself.
We are also available as a Heroku add-on.