Skip to content
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

Balancing Parallel Jobs Across Workers in BullMQ Pro #2560

Open
NaCloudAI opened this issue May 9, 2024 · 1 comment
Open

Balancing Parallel Jobs Across Workers in BullMQ Pro #2560

NaCloudAI opened this issue May 9, 2024 · 1 comment

Comments

@NaCloudAI
Copy link

I am interested in the Pro version of BullMQ, but I don't see any documentation on how to balance parallel jobs across workers. For example, if there are 3 workers, each capable of handling up to 10 jobs, is it possible to ensure a distribution like [3, 3, 4]?

Furthermore, in a more advanced scenario where the performance of our workers in a cluster is uneven (e.g., having an RTX A6000 mixed with an H100 in the system), can we balance parallel jobs based on load percentages? For instance, worker A can handle 30 jobs, while worker B can handle 60 jobs, when there are 45 jobs coming in ,it is preferred to balance them at [15,30]

Additionally, I would like to know if the Pro version is also open-source and can be modified by us.

@manast
Copy link
Contributor

manast commented May 10, 2024

I am interested in the Pro version of BullMQ, but I don't see any documentation on how to balance parallel jobs across workers. For example, if there are 3 workers, each capable of handling up to 10 jobs, is it possible to ensure a distribution like [3, 3, 4]?

You chose the concurrency factor per worker, so you could choose it as you wrote in your example.

Furthermore, in a more advanced scenario where the performance of our workers in a cluster is uneven (e.g., having an RTX A6000 mixed with an H100 in the system), can we balance parallel jobs based on load percentages? For instance, worker A can handle 30 jobs, while worker B can handle 60 jobs, when 45 jobs are coming in, it is preferred to balance them at [15,30]

If the code that instantiates the Worker can somehow get info on the machine it is working on (via an env variable or something like that), then you could easily choose which concurrency factor you want for every worker.

Additionally, I would like to know if the Pro version is also open-source and can be modified by us.

It is for the moment closed source, we may consider providing the source with some special license though, but nothing we have decided yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants