jitter-backoff 11.2.0

Zero-dependency exponential backoff, full/equal/decorrelated jitter, deadline retry budgets, Retry-After header parsing, and synchronous retry execution.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/// Jitter strategy applied to exponential backoff intervals to prevent thundering herds.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum JitterMode {
    /// Deterministic exponential backoff with no randomization.
    None,
    /// Full jitter: uniformly chosen in `[0, cap_delay]`.
    #[default]
    Full,
    /// Equal jitter: `cap_delay / 2 + uniform(0, cap_delay / 2)`.
    Equal,
    /// Decorrelated jitter: `min(max_delay, uniform(base, prev_delay * 3))`.
    Decorrelated,
}