Gossip Protocol
maang.io System Design Series
A gossip protocol spreads information the way a rumor spreads through a crowd: each node periodically picks a few random peers and swaps state. In a handful of rounds — O(log N) — the whole cluster converges, with no central coordinator and no single point of failure. It's how Cassandra, DynamoDB, and Consul track membership and detect failures.
This deep dive comes in three parts:
- Foundations & Core Concepts — epidemic dissemination, push/pull, and anti-entropy.
- Internals — convergence math, failure detection (the phi-accrual detector), and membership, with worked numbers.
- Interview — Staff/Principal Q&A: convergence guarantees and where gossip fits vs consensus.