EmbarkStudios / EmbarkStudios/tryhard
Add jitter option for backoff strategies
- Dominant language
- Rust
- Stars
- 248
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
When executing many requests with a fixed backoff strategy, it's possible that requests will timeout and be retried simultaneously. If the cause for the the timeout was due to "competition", it's likely that the requests will continue to compete and timeouts will continue to happen. To make this less likely, I would like to "spread" requests out over an interval instead.
I.e. I would like the ability to go from this:

To this:

**Describe the solution you'd like**
I would like to add the possibility of adding a jitter to backoff strategies, such that retries are less likely to occur at the same time.
The jitter would pick a random number between a backoff interval instead of picking a fixed duration.
**Additional context**
The figures above are from this blog post, which describes the problem in greater detail: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
Contributor guide
Assessment
This issue has not been assessed yet.