Skip to content

Step 1 of 5 · Reading · ~1 min

Read

Why Gossip

Anti-Entropy

Every node tracks a small set of {key, value, version}. Two nodes meeting:

  1. Each side sends a digest (key → version).
  2. Each requests keys it has older versions of.
  3. Other side sends those updates.
python

Versions break ties — concurrent updates need conflict resolution. Common approaches:

  • Last-Write-Wins (LWW): timestamp-based. Simple; loses concurrent updates.
  • Vector clocks: per-node version counters. Detect concurrency, surface conflicts.
  • CRDTs (Conflict-free Replicated Data Types): merge automatically (sets, counters).

Cassandra uses LWW with timestamps. Riak supports vector clocks. SoundCloud's Roshi uses CRDTs.

Two flavors:

  • Push: I send my updates to a peer.
  • Pull: I ask a peer for their updates.
  • Push-pull: both. Most efficient.
Up nextMembership TrackingMembership Tracking

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…