ExponentialBackoffWithJitter
class ExponentialBackoffWithJitter(val config: ExponentialBackoffWithJitter.Config = Config.Default) : DelayProvider
A DelayProvider that implements exponential backoff with jitter (i.e., randomization of delay amount). When RetryContext.errorType is non-null, the delay provider uses it to select the base delay. When RetryContext.retryAfter is non-null, it is used to clamp the computed delay. When either field is null, the provider falls back to Config.initialDelay as the base and pure exponential backoff respectively.
The delay for a given attempt is calculated as:
delay = random(1 - jitter, 1) * min(base * scaleFactor^(attempt - 1), maxBackoff)Content copied to clipboard
Parameters
config
The configuration to use for this delayer.
Types
Link copied to clipboard
Link copied to clipboard
Configuration options for ExponentialBackoffWithJitter