Skip to main content

backoff

Function backoff 

Source
pub fn backoff(attempts: u32, max: Duration, jitter: u32) -> Duration
Expand description

How long a delivery that failed attempts times waits before the next.

1 s doubled per attempt, at most max, less up to a fifth of jitter (jitter out of JITTER_ONE), so retries of many rows that failed together do not arrive together. In whole nanoseconds, so it is exact.