liveBook · Manning

Gossip protocol

As explained in ScyllaDB in Action

A gossip protocol is a distributed communication protocol in which nodes periodically exchange state, membership, and failure information.

A gossip protocol spreads distributed-system state through repeated, selective exchanges. Each node sends newer information to randomly chosen peers, which update their local state and continue propagating it. section 8.2.4

In ScyllaDB, gossip operates continuously across the cluster:

  • Every second, each node selects one to three other nodes and shares cluster news, including node state, schema, version, and placement information. section 8.2.4
  • Recipients compare received application-state versions with local copies and retain newer information. section 8.2.4
  • The exchange uses a three-step SYN, ACK, and ACK2 process; the initial digest includes node generations and application-state versions. section 8.2.4

Adding a node with a seed

When a new ScyllaDB node joins an existing cluster, it contacts a configured seed node. The two nodes exchange cluster-membership information through gossip, after which other nodes stream the data assigned to the newcomer. A seed provides an initial point of contact rather than holding a special permanent role. section 2.1.3

Figure 8.7 Scylla nodes exchange information via its gossip protocol, where nodes randomly pick other nodes and exchange state.
figure

Use the figure to trace how randomly selected nodes exchange state and spread updates through the cluster. section 8.2.4

How ScyllaDB in Action covers it

How deep it goes
Explains randomized propagation and SYN/ACK/ACK2 exchange, including generations, version comparisons, and application-state contents.
Examples
Demonstrates node joining through a seed, membership exchange, data streaming, randomized gossip, and nodetool inspection.
What it assumes
Assumes nodes and clusters while defining gossip propagation and seed-based joining from first principles.
What you can do after
Operate/configure a ScyllaDB cluster by supplying seed nodes and inspect propagated state with nodetool.
How it connects
Connects to cluster membership, schema information, consistency, consensus, failure detection, and hash rings.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.