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

Global Concurrency #1635

Closed
adrian-goe opened this issue Jan 18, 2023 · 2 comments
Closed

Global Concurrency #1635

adrian-goe opened this issue Jan 18, 2023 · 2 comments

Comments

@adrian-goe
Copy link

Hey, so we use bull with nestJs and have multiple processors on this instance.

We want to maximise the usage of the available database connections. so I know, I can add concurrency per queue. But for the given example, this world not be a great fit:

  • Allowed DB connections: 20;
  • queue 1:
    • 100 fast jobs
  • queue 2:
    • 20 long running jobs

So currently I could say queue 2: concurrency 5; queue 1: concurrency 15.

If queue 2 is finished, it would optimal, to run queue 1 with 20 parallel jobs.

I guess, if there is a job in queue 2 again, they would be prioritise queue 2. Also, if a queue also has set a concurrency, the queue don't exceed this.

@marbemac
Copy link

Related: #2496

@roggervalf
Copy link
Collaborator

Global concurrency is available since v5.9.0

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

3 participants