-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for jitter in retry delays
Jitter, or randomness in signals, is a common technique for avoiding calls that fail at the same time to retry at the same time. Therefore jitter can help avoid the thundering herd problem, where many instances of the same application all retry at the same time, causing a spike in load on the system. For example, if a service was down for some reason and comes back up, all queued events will hit at once and could cause the service to fail for most events. However, without jitter, the events will all retry at the same time, causing the same problem. Adding some jitter (or randomness) to the retry delays result in the events retrying at different times. In our implementation, the configuration says how much jitter is used based on the retry delay. For example, if `retry_jitter_ratio` is set to 0, no jitter will be applied and all events will retry after the usual retry delay. If it is set to 100, the retry delay will be a random number between 0 and the retry delay without jitter. If it is set to 20, the retry delay will be a random number between 80 and 100% of the retry delay without jitter.
- Loading branch information
1 parent
f901452
commit d3b80f7
Showing
9 changed files
with
141 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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