CONCEPT Cited by 1 source
Gossip protocol¶
What it is¶
A gossip protocol (a.k.a. epidemic protocol) is a class of distributed-systems communication primitives where nodes periodically exchange state with a random subset of peers. Over logarithmic-in-N rounds, information reaches every node. Two classic use-shapes:
- Membership — which nodes are alive? (SWIM, Serf.)
- State reconciliation — which updates does each node have? (anti-entropy, Dynamo-style, Corrosion.)
Why it works¶
- Scalable: per-round cost at a node is O(fanout), not O(N).
- Robust to partial failure: any one message loss is absorbed by the next round's random-peer choice.
- No leader, no quorum — gossip converges without distributed consensus.
Trade-offs¶
- Eventually-consistent only. No linearizability guarantee. Needs CRDT-style conflict resolution (or last-write-wins + logical timestamps) to handle concurrent writes — see systems/cr-sqlite and concepts/last-write-wins.
- Bandwidth cost scales with update rate, not with read volume — a misbehaving producer (e.g. retry-loop uplink saturation) can melt the cluster.
- Schema changes on gossiped data can amplify — concepts/nullable-column-backfill-amplification.
Canonical wiki instance — Fly.io Corrosion¶
Fly.io's Corrosion combines SWIM for membership with QUIC for update broadcast and cr-sqlite CRDT conflict resolution on a shared SQLite database. Convergence in seconds across thousands of workers worldwide, with no central servers, no leader elections, no distributed consensus. See sources/2025-10-22-flyio-corrosion for the full architectural argument. Architectural inspiration: link-state routing protocols like OSPF.
Seen in¶
- sources/2025-10-22-flyio-corrosion — canonical primary source. "SWIM converges on global membership very quickly." Fly.io describes gossip as "efficient" given their pre-existing fully-connected WireGuard mesh.
Related¶
- systems/corrosion-swim — canonical instance.
- concepts/link-state-routing-protocol — architectural ancestor.
- concepts/no-distributed-consensus — the design choice gossip enables.
- concepts/crdt — the conflict-resolution half.
- systems/consul — uses SWIM (via Serf) for its membership layer.