Intermediate LevelSystem Design & Architecture
What is the Gossip Protocol and how does it maintain cluster membership in Cassandra?
β Interview Prompt: Explain Gossip Protocol, decentralized peer-to-peer cluster state sharing, exponential convergence, and failure detection in Cassandra.
The Gossip Protocol is a decentralized peer-to-peer communication protocol used in distributed databases (Apache Cassandra) to maintain cluster membership and detect node failures:
How Gossip Works:
1
Every second, each cluster node selects a random neighbor node and exchanges state data.
2
State changes (node additions, crashes, schema updates) spread exponentially across the entire cluster in $O(\log N)$ time.
3
Failure Detector: Uses $\Phi$-Accrual Failure Detector to evaluate node responsiveness adaptively.
Code Implementation Example
json
{
"protocol": "Gossip Protocol",
"clusterState": "Peer-to-Peer (Decentralized)",
"gossipInterval": "1000ms",
"convergenceTime": "O(log N) rounds"
}π‘Gossip Protocol cluster configuration specification payload.
π― Interview Key Takeaway
Use the Gossip Protocol for decentralized peer-to-peer state propagation and failure detection in large database clusters.
#System Design#Gossip Protocol#Cassandra#Cluster Membership#Intermediate
Back to all System Design & Architecture Questionsβ