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
Rate limit w/ groupKey is not respecting groupKey limit #1322
Comments
@kylecannon do you have a complete test case that we can run? |
I don't unfortunately at the moment. |
Any update on the above? |
The limiter based on the group key has its days counted. The implementation is too complex and makes it impossible to implement other optimizations that we want to do on the global rate limiter. On the other hand, we have complete group support in the Pro version, where the rate limit and other features work really well: https://docs.bullmq.io/bullmq-pro/groups |
Here some background information: https://blog.taskforce.sh/bullmq-3-0-release/ |
I recently updated from BullMQ 1.54.1 to 2.4.0 (the latest 2.X) and the update introduced the issue described by @kylecannon above (large delays are being introduced that don't make sense given the limiting options). I see group-based limiting was explicitly removed in 3.0.0, but it appears at least somewhat broken in 2.X as well. My queue and worker options are slightly more simple: Queue options:
Worker options:
Reverting back to 1.91.1 (the latest 1.X) fixes the issue. |
@Kylok yes. The reason it was removed was precisely that the implementation was not solid enough. We are not going to spend time trying to fix the issues as there is no guarantee they can be fixed without a rewrite as we did on the Pro version. |
I have a queue that has a concurrency of 10 on the worker but when i have a rate limit with a groupKey of 1, I am only getting a concurrency of 1 and every single job is delayed by 10 seconds. I have verified that the rateLimitKey is unique as well.
Essentially doing the following config below limits concurrency to 1 for a worker with 10 concurrency. Not sure why this is happening.
EX:
queue options:
worker options:
The text was updated successfully, but these errors were encountered: