Starling:如何加快队列速度
我今天推出了一个网站,该网站大量使用 Starling 和 Workling 来处理后台任务队列。
流量一直很大,虽然我的服务器 CPU/内存没有承受太大的压力,但作业队列严重备份。
我对 Starling 和 Workling 都缺乏经验,迫切需要了解如何加快队列速度。
这可能是一个非常简单的配置问题,但我们将非常感谢所有建议和想法。
如果您需要更多信息,请告诉我。
I've launched a website today which makes heavy use of Starling and Workling to handle the background task queue.
Traffic has been heavy and although my server CPU/memory has not been under too much strain, the job queue is seriously backing up.
I am inexperienced with both Starling and Workling and urgently need to understand how I can speed up the queue.
This is probably quite a simple configuration issue but all suggestions and thoughts would be very appreciated.
Please let me know if you need more information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我最终弄清楚了如何做到这一点,非常简单。 只需从命令行启动更多工作进程 - 有多少内存就可以运行多少个进程。 它们都将从一个或多个 Starling 实例中获取作业,如 workling.yml 中指定的那样。 请注意,
:multiple
必须是=> true
在script/workling_client
中才能正常工作。I worked out how to do this in the end, it's very simple. Just start up more workling processes from the command line - there can be as many running as there is memory for. They will all pick up jobs from one or more instances of Starling, as specified in workling.yml. Note that
:multiple
must be=> true
inscript/workling_client
for this to work.如果您有权访问另一台服务器,则可以在服务器之间分配任务。 您可能已经看过,但 Railscasts 有一个非常好的对 Starling 和 Workling 的介绍。
您还可以在 Google 图书上查看一本书,其中包含更多高级信息:
实用的 Rails 插件
If you have access to another server you can split the tasks up between the servers. You've probably seen it but Railscasts has a pretty good introduction to Starling and Workling.
There is also a book you can view on Google books with more advanced information:
Practical Rails Plugins