-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When bullmq was deployed to k8s, Concurrency was out of whack!!! #3075
Comments
hi @fifa334, |
hi @roggervalf ,
e.g: I have queueA and queueB that have workers on them, then I set workerA concurrency to 1 and workerB concurrency to 3.
I set the global-concurrency to 1 , Could you give me some idea? please. |
hey @fifa334, |
Hi @roggervalf , For case 2, When I set global concurrency to 1 on QueueA, the four consecutive jobs added should be active one after the other. I added four jobs in a row. Normally, Is the first job in active state and the other three in wait? |
@fifa334 could you please give us a code snippet that reproduces your issue? |
Hi @manast and @roggervalf ,
Could you give me some idea? please. |
@fifa334 I think you have some misconceptions on how workers and concurrency work in BullMQ, so your questions are not really making a lot of sense :) To summarise. 1 Worker instance (new Worker(...)) can process as many jobs concurrently as the concurrency you use for that worker. You can have as many worker instances as you want, every worker instance will process as many jobs at the same time as its concurrency setting. This is covered here: https://docs.bullmq.io/guide/workers/concurrency There is a special option though, called "global concurrency", where you can specify the max amount of jobs processed concurrently by ALL your workers. So if you set this value to 2 for example, then independently on how many workers and what concurrency setting you use, the workers will only process 2 jobs at the same time. https://docs.bullmq.io/guide/queues/global-concurrency |
Hi master,
When I deploy to k8s, create two pods and set Concurrency to 2. Normally, each pod can process two jobs concurrently, but in practice each pod can process four jobs concurrently, and it was found that the set number of Concurrency times the number of pods, which affects Concurrency,
Could you give me some idea? please.
The text was updated successfully, but these errors were encountered: