Skip to main content

backoff_full_jitter

Function backoff_full_jitter 

Source
pub fn backoff_full_jitter(
    base_ms: u64,
    attempt: u32,
    max_delay_ms: u64,
) -> Duration
Expand description

Full jitter: uniform(0..=min(base*2^attempt, max_delay)).

Entropy from monotonic Instant + thread id + stack marker (no rand dep). Not cryptographic; enough to desynchronize multi-agent thundering herds.