backoffMs
function backoffMs( attempt, base?, cap?): number;Defined in: core/src/retry.ts:64
Full-jitter exponential backoff: a random delay in
[0, min(cap, base · 2^(attempt-1))].
The jitter is the point, not the exponent. Without it, every client that failed against the same overloaded upstream retries in the same instant and rebuilds the thundering herd that caused the failure.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
attempt |
number |
undefined |
base |
number |
DEFAULT_BASE_DELAY_MS |
cap |
number |
DEFAULT_MAX_DELAY_MS |
Returns
Section titled “Returns”number