-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Implement proper retry backoff logic with jitter.
New retry logic takes a maximum percentage off the canonical backoff, ensure gradual predictable retries timings while still having a controlable amount of jitter (re-introducing the `max_jitter` parameter) to avoids swarming client retries. Fix regression introduced in 60366d2 where retry/backoff logic produced only whole second (integer) retry delays. This produced inadequate retries on first retry and would generally not work on fast network where sub miliseconds retries are desired. Additionally, with high `max_delay` setting, as the range was always spanning from 0 until the last delay, it would also produce extremely random results with short delays following longer ones which is contrary to the expected backoff logic.
- Loading branch information
1 parent
c7e8050
commit 0bb0659
Showing
1 changed file
with
17 additions
and
21 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