aws / aws-sdk-go-v2

AWS SDK for the Go programming language.
https://aws.github.io/aws-sdk-go-v2/docs/
Apache License 2.0
2.68k stars 650 forks source link

add jitter instead of scaling by jitter #2799

Closed nalbion closed 2 months ago

nalbion commented 2 months ago

It's possible for a series of random numbers to be all 0, more feasible for them to be all close to zero.

Multiplying by ri would yield:

To avoid this, jitter should be added:

lucix-aws commented 2 months ago

The calculation for delay here is standardized across SDKs in the "standard" retry strategy, it's not something we can change.