Gossip: each node periodically picks a random peer, exchanges state. In log(N) rounds, everyone knows everything. Scales beyond centralized approaches.

Node ANode BNode CNode DNode ERound 1A→CRound 1B→DRound 2C→ERound 2D→ARound 3E→Blog(N) rounds → full spreadSWIM: gossip + failure detectAnti-entropy: full state syncRumor mongering: recent gossipUsed by: Dynamo, Cassandra, Consul
Gossip: random peer exchange. log(N) rounds spreads updates cluster-wide
Advertisement

The mechanism

Every T seconds, each node picks K random peers, exchanges state. State converges. No central coordinator.

The mechanism

Every T seconds, each node picks K random peers, exchanges state. State converges. No central coordinator.

Advertisement

log(N) spread

Update spreads to all nodes in log(N) rounds. Fast at scale. Fault tolerant — even if messages drop, next round retries.

Anti-entropy vs rumor mongering

Anti-entropy: full state sync (correctness, expensive). Rumor mongering: only recent changes (efficiency). Combined for balance.

SWIM protocol

SWIM adds failure detection. Nodes exchange 'this node alive?' pings. Suspected failures gossip through. Used by Consul, Hashicorp Serf.

Eventual convergence

Under partitions or drops, may take longer but always converges when network heals. Perfect for eventual-consistency systems.

Random peer exchange. log(N) spread. Anti-entropy + rumor. Foundation of decentralized cluster protocols.