pub enum Jitter {
None,
Equal,
Full,
}Expand description
Jitter policy applied to each delay sample.
Following AWS Architecture Blog’s “Exponential Backoff and Jitter” taxonomy:
- None — deterministic exponential; bad at scale because all clients retry at the same instant (“thundering herd”)
- Equal — half the delay is fixed, half is uniformly random; bounded but smoothed
- Full — delay is uniformly random in
[0, base]; AWS’s recommended default. Maximum spread.
See https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/.
Variants§
None
No jitter — deterministic delay schedule.
Equal
Half fixed, half random: delay = base/2 + uniform(0, base/2).
Full
Fully random: delay = uniform(0, base).
Trait Implementations§
impl Copy for Jitter
impl Eq for Jitter
impl StructuralPartialEq for Jitter
Auto Trait Implementations§
impl Freeze for Jitter
impl RefUnwindSafe for Jitter
impl Send for Jitter
impl Sync for Jitter
impl Unpin for Jitter
impl UnsafeUnpin for Jitter
impl UnwindSafe for Jitter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more