PingResponse

public enum PingResponse

Message sent in reply to a .ping.

The ack may be delivered directly in a request-response fashion between the probing and pinged members, or indirectly, as a result of a pingRequest message.

  • Declaration

    Swift

    case ack(target: SWIMPeer, incarnation: Incarnation, payload: GossipPayload, sequenceNumber: SWIM.SequenceNumber)

    Parameters

    target

    the target of the ping; On the remote “pinged” node which is about to send an ack back to the ping origin this should be filled with the myself peer.

    incarnation

    the incarnation of the peer sent in the target field

    payload

    additional gossip data to be carried with the message.

    sequenceNumber

    the sequenceNumber of the ping message this ack is a “reply” for; It is used on the ping origin to co-relate the reply with its handling code.

  • A .nack MAY ONLY be sent by an intermediary member which was received a pingRequest to perform a ping of some target member. It SHOULD NOT be sent by a peer that received a .ping directly.

    The nack allows the origin of the ping request to know if the k peers it asked to perform the indirect probes, are still responsive to it, or if perhaps that communication by itself is also breaking down. This information is used to adjust the localHealthMultiplier, which impacts probe and timeout intervals.

    Note that nack information DOES NOT directly cause unreachability or suspicions, it only adjusts the timeouts and intervals used by the swim instance in order to take into account the potential that our local node is potentially not healthy.

    See also

    Lifeguard IV.A. Local Health Aware Probe

    Declaration

    Swift

    case nack(target: SWIMPeer, sequenceNumber: SWIM.SequenceNumber)

    Parameters

    target

    the target of the ping; On the remote “pinged” node which is about to send an ack back to the ping origin this should be filled with the myself peer.

    target

    the target of the ping; On the remote “pinged” node which is about to send an ack back to the ping origin this should be filled with the myself peer.

    payload

    The gossip payload to be carried in this message.

  • This is a “pseudo-message”, in the sense that it is not transported over the wire, but should be triggered and fired into an implementation Shell when a ping has timed out.

    If a response for some reason produces a different error immediately rather than through a timeout, the shell should also emit a .timeout response and feed it into the SWIM.Instance as it is important for timeout adjustments that the instance makes. The instance does not need to know specifics about the reason of a response not arriving, thus they are all handled via the same timeout response rather than extra “error” responses.

    Declaration

    Swift

    case timeout(target: SWIMPeer, pingRequestOrigin: SWIMPingRequestOriginPeer?, timeout: DispatchTimeInterval, sequenceNumber: SWIM.SequenceNumber)

    Parameters

    target

    the target of the ping; On the remote “pinged” node which is about to send an ack back to the ping origin this should be filled with the myself peer.

    pingRequestOrigin

    if this response/timeout is in response to a ping that was caused by a pingRequest, pingRequestOrigin must contain the original peer which originated the ping request.

    timeout

    the timeout interval value that caused this message to be triggered; In case of “cancelled” operations or similar semantics it is allowed to use a placeholder value here.

    sequenceNumber

    the sequenceNumber of the ping message this ack is a “reply” for; It is used on the ping origin to co-relate the reply with its handling code.

  • Sequence number of the initial request this is a response to. Used to pair up responses to the requests which initially caused them.

    All ping responses are guaranteed to have a sequence number attached to them.

    Declaration

    Swift

    public var sequenceNumber: SWIM.SequenceNumber { get }