SWIMLifeguardSettings

public struct SWIMLifeguardSettings

Lifeguard is a set of extensions to SWIM that helps reducing false positive failure detections.

  • Create default settings.

    Declaration

    Swift

    public init()
  • Local health multiplier is a part of Lifeguard extensions to SWIM. It will increase local probe interval and probe timeout if the instance is not processing messages in timely manner. This property will define the upper limit to local health multiplier.

    Must be greater than 0. To effectively disable the LHM extension you may set this to 1.

    Declaration

    Swift

    public var maxLocalHealthMultiplier: Int { get set }
  • Suspicion timeouts are specified as number of probe intervals.

    E.g. a suspicionTimeoutMax = .seconds(10) means that a suspicious node will be escalated as .unreachable at most after approximately 10 seconds. Suspicion timeout will decay logarithmically to suspicionTimeoutMin with additional suspicions arriving. When no additional suspicions present, suspicion timeout will equal suspicionTimeoutMax

    Modification:

    We introduce an extra state of “unreachable” is introduced, which is signalled to a high-level membership implementation, which may then confirm it, then leading the SWIM membership to mark the given member as .dead. Unlike the original SWIM/Lifeguard implementations which proceed to .dead automatically. This separation allows running with SWIM failure detection in an “informational” mode.

    Once it is confirmed dead by the high-level membership (e.g. immediately, or after an additional grace period, or vote), it will be marked .dead in SWIM, and .down in the high-level membership.

    Declaration

    Swift

    public var suspicionTimeoutMax: DispatchTimeInterval { get set }
  • To ensure ping origin have time to process .nack, indirect ping timeout should always be shorter than originator’s timeout This property controls a multiplier that’s applied to pingTimeout when calculating indirect probe timeout. The default of 80% follows a proposal in the initial paper. The value should be between 0 and 1 (exclusive).

    See also

    pingTimeout

    Declaration

    Swift

    public var indirectPingTimeoutMultiplier: Double { get set }
  • Suspicion timeouts are specified as number of probe intervals.

    E.g. a suspicionTimeoutMin = .seconds(3) means that a suspicious node will be escalated as .unreachable at least after approximately 3 seconds. Suspicion timeout will decay logarithmically from suspicionTimeoutMax / with additional suspicions arriving. When number of suspicions reach maxIndependentSuspicions, suspicion timeout will equal suspicionTimeoutMin

    Modification:

    An extra state of “unreachable” is introduced, which is signalled to a high-level membership implementation, which may then confirm it, then leading the SWIM membership to mark the given member as .dead. Unlike the original SWIM/Lifeguard implementations which proceed to .dead automatically. This separation allows running with SWIM failure detection in an “informational” mode.

    Once it is confirmed dead by the high-level membership (e.g. immediately, or after an additional grace period, or vote), it will be marked .dead in swim, and .down in the high-level membership.

    Declaration

    Swift

    public var suspicionTimeoutMin: DispatchTimeInterval { get set }
  • A number of independent suspicions required for a suspicion timeout to fully decay to a minimal value.

    When set to 1 will effectively disable LHA-suspicion.

    Declaration

    Swift

    public var maxIndependentSuspicions: Int { get set }