pub struct SwimConfig {
pub probe_interval: Duration,
pub probe_timeout: Duration,
pub indirect_probes: u8,
pub suspicion_mult: u8,
pub min_suspicion: Duration,
pub initial_incarnation: Incarnation,
pub max_piggyback: usize,
pub fanout_lambda: u32,
}Expand description
Configuration for the SWIM failure detector.
All fields are validated at construction time via SwimConfig::validate;
an invalid config is a programmer error and returns a typed
SwimError::InvalidConfig rather than panicking.
Fields§
§probe_interval: DurationTime between probe rounds (T’ in the SWIM paper). One randomly-chosen alive peer is pinged per interval.
probe_timeout: DurationRound-trip deadline for a direct ping before falling back to k
indirect pings. Must be strictly less than probe_interval.
indirect_probes: u8Number of indirect probe helpers (k in the paper).
suspicion_mult: u8Multiplier on probe_interval used to compute the suspicion timeout
before a Suspect member is declared Dead. Lifeguard §3.1.
min_suspicion: DurationMinimum value for the suspicion timeout; protects small clusters from
sub-second suspicion windows. The effective timeout is
max(min_suspicion, suspicion_mult * log2(n) * probe_interval).
initial_incarnation: IncarnationSeed incarnation for a freshly-booted local node. Always 0 in
production; exposed for deterministic unit tests.
max_piggyback: usizeMaximum number of membership deltas to piggyback on a single outgoing SWIM datagram. Caps per-message bandwidth and bounds the encoded payload size below a UDP MTU.
fanout_lambda: u32Gossip fanout multiplier (lambda in Das §4.3). The
dissemination queue drops a rumour after it has been carried
on ceil(fanout_lambda * log2(n+1)) outgoing messages, which
with high probability reaches every member.
Implementations§
Source§impl SwimConfig
impl SwimConfig
Sourcepub fn production() -> Self
pub fn production() -> Self
Production defaults from Lifeguard, tuned for a ≤ 256-node cluster.
Trait Implementations§
Source§impl Clone for SwimConfig
impl Clone for SwimConfig
Source§fn clone(&self) -> SwimConfig
fn clone(&self) -> SwimConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SwimConfig
impl Debug for SwimConfig
Auto Trait Implementations§
impl Freeze for SwimConfig
impl RefUnwindSafe for SwimConfig
impl Send for SwimConfig
impl Sync for SwimConfig
impl Unpin for SwimConfig
impl UnsafeUnpin for SwimConfig
impl UnwindSafe for SwimConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.