Database / Apache Cassandra Intermediate and Advanced interview questions
What is the gossip protocol in Cassandra?
Gossip is the peer-to-peer protocol Cassandra uses to let nodes discover and track the state of every other node without any central coordinator.
- Every second, each node picks one to three other nodes at random and exchanges state information with them.
- The state includes things like heartbeat version, node status (up/down/joining/leaving), load, and schema version.
- Because the exchange is random and repeated constantly, information propagates through the whole cluster exponentially fast, even in clusters with hundreds of nodes.
- Seed nodes are just a bootstrap list new nodes contact first to join the gossip network; they hold no special ongoing authority afterward.
Gossip is also the transport for cluster membership and failure detection: version numbers let a node tell whether the information it just received is newer than what it already knows, so stale rumors don't overwrite fresh state.
This decentralized design is a core reason Cassandra has no single point of failure at the cluster-management layer — there is no master to elect or lose.
More Related questions...