Can multiple sidekiq instances process the same queue

佐手、 提交于 2019-12-05 09:28:30

问题


I'm not familiar with the internals of Sidekiq and am wondering if it's okay to launch several Sidekiq instances with the same configuration (processing the same queues).

Is it possible that 2 or more Sidekiq instances will process the same message from a queue?

UPDATE:
I need to know if there is a possible conflict, when running Sidekiq on more than 1 machine


回答1:


Yes, sidekiq can absolutely run many processes against the same queue. Redis will just give the message to a random process.




回答2:


Nope, I've ran Sidekiqs in different machines with no issues.

Each of the Sidekiqs read from the same redis server, and redis is very robust in multi-threaded, and distributed scenarios.

In addition, if you look at the web interface for Sidekiq, it will show all the workers across all machines because all the workers are logged in the same redis server.

So no, no issues.



来源:https://stackoverflow.com/questions/13213499/can-multiple-sidekiq-instances-process-the-same-queue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!