Gossip protocols spread information the way an epidemic spreads: periodically, each informed node contacts a small random fanout. Duplicate messages look wasteful, but randomness removes a central bottleneck and makes dissemination robust to individual loss.
Push, pull, and push-pull
- Push: informed nodes send updates.
- Pull: nodes ask peers what they missed.
- Push-pull: both exchange summaries and updates.
Push spreads new information quickly at first; pull is efficient near completion; hybrids perform well across both phases. With a constant fanout, dissemination typically reaches a large group in logarithmic rounds with high probability, not an absolute guarantee.
Membership is a changing view
A membership service tracks which processes are believed to be in the group. Every member cannot probe every other member at large scale, so gossip-style protocols disseminate joins, leaves, heartbeats, and suspicions.
Failure detection is fundamentally imperfect in an asynchronous network. A missing heartbeat may mean crash, congestion, delay, or a partition.
In plain terms: a failure detector does not detect death; it detects that a response missed a deadline.
Suspicion is better than immediate eviction
A practical detector moves through states:
alive → suspected → failed
│
└── refutation/heartbeat → alive
Indirect probing asks other nodes to contact an unresponsive target. This separates a bad path from a bad process and reduces false positives. Suspicion timeouts let contradictory evidence arrive before membership changes become final.
Evaluate more than detection speed
| Metric | Question |
|---|---|
| Detection time | How long until a real failure is suspected? |
| Mistake rate | How often is a live member suspected? |
| Mistake duration | How long does a false suspicion last? |
| Message load | How much traffic does detection generate? |
Tighter timeouts reduce detection time but increase mistakes. There is no universally best detector; tune it to network variance and the cost of a false eviction versus slow failover.
Review card
- Gossip trades duplicate messages for decentralization and robustness.
- Push is strong early; pull helps finish dissemination.
- Membership is a local, changing belief rather than instant global truth.
- Timeout cannot distinguish failure from delay.
- Suspicion and indirect probes reduce premature eviction.
- Tune detection using speed, mistakes, duration, and message cost.