talira

memberlist

Gossip-based cluster membership and failure detection for Go

open sourceMPL-2.0free

memberlist is a Go library from HashiCorp that manages cluster membership and detects member failures with a gossip protocol. It's based on SWIM, extended to propagate and converge faster and, with the Lifeguard extensions, to stay robust when message processing is slow. It's eventually consistent but converges quickly on average, and partially tolerates network partitions by trying to reach possibly dead nodes through several routes. Delegates receive events when members join or leave.

Problems it solves

  • keep track of which nodes are alive in my Go cluster without a central coordinator
  • detect when a node in my distributed service fails
  • let new instances of my Go service find and join the existing cluster

Features

  • SWIM-based gossip membership with Lifeguard extensions
  • member failure detection
  • join and leave events through delegates
  • tunable propagation and convergence
  • metrics through go-metrics

Limitations

  • Has many tuning knobs, and the default configuration favours convergence at the cost of higher bandwidth.1