SWIM Protocol explained

The Scalable Weakly Consistent Infection-style Process Group Membership (SWIM) Protocol is a group membership protocol based on "outsourced heartbeats"[1] used in distributed systems, first introduced by Indranil Gupta in 2001.[2] [3] It is a hybrid algorithm which combines failure detection with group membership dissemination.

Protocol

The protocol has two components, the Failure Detector Component and the Dissemination Component.

The Failure Detector Component functions as follows:

  1. Every T time units, each node (

N1

) sends a ping to random other node (

N2

) in its membership list.
  1. If

N1

receives a response from

N2

,

N2

is decided to be healthy and N1 updates its "last heard from" timestamp for

N2

to be the current time.
  1. If

N1

does not receive a response,

N1

contacts k other nodes on its list (

\{N3,...,N3+k\}

), and requests that they ping

N2

.
  1. If after T units of time: if no successful response is received,

N1

marks

N2

as failed.

The Dissemination Component functions as follows:

N1

detecting a failed node

N2

,

N1

sends a multicast message to the rest of the nodes in its membership list, with information about the failed node.

Properties

The protocol provides the following guarantees:

T'
1
-qf
1-e
, where

T'

is the length of the protocol period, and

qf

is the fraction of non-faulty nodes in the group.

Extensions

The original SWIM paper lists the following extensions to make the protocol more robust:

See also

References

  1. Book: Petrov, Alex. Database Internals. O'Reilly Media. 2019.
  2. Book: Gupta. Indranil. Chandra. Tushar D.. Goldszmidt. Germán S.. Proceedings of the twentieth annual ACM symposium on Principles of distributed computing . On scalable and efficient distributed failure detectors . August 1, 2001. https://doi.org/10.1145/383962.384010. PODC '01. Newport, Rhode Island, US. Association for Computing Machinery. 170–179. 10.1145/383962.384010. 978-1-58113-383-7. 216594 .
  3. Book: Das. A.. Gupta. I.. Motivala. A.. Proceedings International Conference on Dependable Systems and Networks . SWIM: Scalable weakly-consistent infection-style process group membership protocol . June 23, 2002. https://ieeexplore.ieee.org/document/1028914. 303–312. 10.1109/DSN.2002.1028914. 0-7695-1597-5 . 11094028 .