Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] Add jitter parameter to MultiplierRetryStrategy #53328

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

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

rmikalkenas
Copy link
Contributor

@rmikalkenas rmikalkenas commented Dec 31, 2023

Q A
Branch? 7.1
Bug fix? no
New feature? yes
Deprecations? no
Issues -
License MIT

I'm seeing an interesting case, when multiple queue consumers causes failures in a downstream systems a.k.a. thundering herd effect.
Many jobs fail, they all get enqueued to try again in a static interval and bring down the downstream system yet again. This repeats until the retry limit is exhausted.
Introduced delay randomness prevents thundering herd effect. The randomness can be controlled via $jitter parameter.

Open question: I added $jitter parameter with a default value of 0.1 (as in http client's generic retry), but maybe it should be set as 0 to keep code in a BC fashion?

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with a default non-null jitter.

@rmikalkenas rmikalkenas force-pushed the messenger-retry-jitter branch from 96e3c84 to 9949684 Compare January 2, 2024 11:10
@fabpot
Copy link
Member

fabpot commented Jan 6, 2024

Thank you @rmikalkenas.

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

Successfully merging this pull request may close these issues.

4 participants