Is it bad to have multiple instances of QueueScheduler running simultaneously? #404
-
I'm making an app with a pronounced delegator/worker hierarchy, and the delegator isn't going to be running 100% of the time, but I want the workers to keep processing delayed jobs even while the "main" process is asleep. I'd prefer if the workers were entirely independent for maximum lateral scalability, and they're the only pieces which will be running all the time. Thus my idea was to just have each worker have its own QueueScheduler, so I'm guaranteed to have at least one running while the workers are up. Would having more than one at a time like this cause any issues? The documentation is a bit sparse atm. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Please let me know if this documentation answers your question: https://docs.bullmq.io/guide/queuescheduler |
Beta Was this translation helpful? Give feedback.
-
@manast It does! That's what I figured, I just wanted to make sure they wouldn't step on each other's toes. |
Beta Was this translation helpful? Give feedback.
-
@manast How will it behave if we have multiple QueueScheduler (for the same Queue) with different values for maxStalledCount & stalledInterval ? I am running some trials, and cant deterministically say |
Beta Was this translation helpful? Give feedback.
-
@mannharleen for consistent results you should use the same values for all your QueueSchedulers for a given queue. |
Beta Was this translation helpful? Give feedback.
Please let me know if this documentation answers your question: https://docs.bullmq.io/guide/queuescheduler