扩展sidekiq网络架构:并发与流程 [英] Scaling sidekiq network archetecture: concurrency vs processes

查看:75
本文介绍了扩展sidekiq网络架构:并发与流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在服务器上有效扩展sidekiq。

I'm wondering how to efficiently scale sidekiq on my server.

作者说,他使用6个sidekiq进程,每个进程的并发设置为25。他还建议如果您的I / O繁重,则尝试并发50。

The author says he uses 6 sidekiq processes, each with concurrency set to 25. He also suggests trying concurrency of 50 if you have heavy I/O.

添加更多进程之间有什么区别或增加并发性?哪个更好的方法可以帮助我的应用更快地处理更多工作?

What's the difference between adding more processes or increasing concurrency? Which is better for helping my app process more jobs faster?

推荐答案

我已经测试了高达300的并发性您开始在MRI中遇到麻烦。 Mike,作者,不建议每个sidekiq实例的并发性高于50个线程

I've tested with concurrency as high as 300 but at that level you start to run into trouble with the MRI. Mike, the author, doesn't recommend concurrency higher than 50 threads per instance of sidekiq.

我的理解是,其他实例将使您的sidekiq作业得到更快的处理,因为它们不会受到Ruby的MRI的阻碍。其他实例的唯一缺点是每个实例都有一定的内存开销。

My understanding is that additional instances will allow your sidekiq jobs to be processed faster as they aren't getting held up by Ruby's MRI. The only downside with additional instances would be a certain amount of memory overhead for each instance.

这篇关于扩展sidekiq网络架构:并发与流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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