A gossip protocol spreads information through repeated exchanges between peers. A node chooses another node, shares what it knows, and the recipient can pass that information along. It's similar to to how disease spreads during an epidemic.
A virus spreads through its neighbors
Uninfected + Infected
In Cassandra, a new node can introduce itself to a seed node, who will gossip to it's peers, introducing them to the new node.
Spreading membership news: “E has joined the cluster”
Existing cluster · A–D
Gossip in Cassandra
Cassandra’s gossip documentation explains that nodes exchange endpoint state: membership, heartbeats, and other cluster metadata. When a node joins, it contacts a seed node. Gossip then spreads that membership information to other peers.
In the code, GossipTask.run
starts a gossip exchange, and
sendGossip
chooses a peer to contact.