-
Notifications
You must be signed in to change notification settings - Fork 297
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
feat(router): limit number of jobs with the same ordering key in worker's queue #3243
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3243 +/- ##
==========================================
+ Coverage 51.85% 51.91% +0.06%
==========================================
Files 322 322
Lines 53381 53411 +30
==========================================
+ Hits 27682 27730 +48
+ Misses 24042 24028 -14
+ Partials 1657 1653 -4
☔ View full report in Codecov by Sentry. |
atzoum
changed the title
[WIP] chore: limit the maximum number of jobs with the same ordering key in router
[WIP] chore: limit the maximum number of jobs with the same ordering key in router's worker queue
Apr 26, 2023
atzoum
force-pushed
the
chore.globalRouterLimiter
branch
3 times, most recently
from
April 28, 2023 06:10
a4c3117
to
3769417
Compare
atzoum
changed the title
[WIP] chore: limit the maximum number of jobs with the same ordering key in router's worker queue
feat: limit the maximum number of jobs with the same ordering key in router's worker queue
Apr 28, 2023
atzoum
force-pushed
the
chore.globalRouterLimiter
branch
from
April 28, 2023 06:27
cec5071
to
ff88def
Compare
atzoum
requested review from
fracasula,
cisse21,
saurav-malani,
BonapartePC,
Sidddddarth,
lvrach and
chandumlg
April 28, 2023 06:28
atzoum
changed the title
feat: limit the maximum number of jobs with the same ordering key in router's worker queue
feat(router): limit the maximum number of jobs with the same ordering key in worker's queue
Apr 28, 2023
atzoum
changed the title
feat(router): limit the maximum number of jobs with the same ordering key in worker's queue
feat(router): limit number of jobs with the same ordering key in worker's queue
Apr 28, 2023
atzoum
force-pushed
the
chore.globalRouterLimiter
branch
from
April 28, 2023 07:03
ff88def
to
7eb7931
Compare
atzoum
force-pushed
the
chore.globalRouterLimiter
branch
from
April 28, 2023 10:58
7eb7931
to
57d1b78
Compare
cisse21
approved these changes
May 2, 2023
fracasula
reviewed
May 2, 2023
atzoum
force-pushed
the
chore.globalRouterLimiter
branch
from
May 2, 2023 11:55
57d1b78
to
0886083
Compare
fracasula
approved these changes
May 2, 2023
Closed
Merged
This was referenced May 5, 2023
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Until now, a single concurrency limiter existed in router's barrier, i.e. our event ordering mechanism, which was there to ensure that when a failed job got drained (aborted), in the next router generator loop only a single job would be picked up by the router for the same ordering key. This happens so as not to flood the worker's queue with jobs which are most probably going to be marked as
waiting
later on.We are now introducing an additional concurrency limiter, which is responsible for limiting the overall maximum number of jobs that can enter the barrier for the same ordering key, regardless of failures. This barrier will protect us from a single "chatty" ordering key saturating the worker’s queue, so that jobs for other ordering keys can have a fair chance of being picked up by router.
The new concurrency limiter can be disabled by setting the limit to 0.
Notion Ticket
Link
Security