Consistent Hashing medium
In decentralized systems like Cassandra, how is the Consistent Hashing ring topology (Who owns what tokens) propagated?
- A Via a centralized high-availability Zookeeper cluster that maintains the authoritative source of truth for the entire cluster.
- B Through a dedicated DNS service that automatically updates its records whenever a node's token range is modified.
- C Using a decentralized Gossip Protocol, where nodes periodically exchange their view of the ring state with random peers.
- D By manually updating a static configuration file that is hardcoded into the deployment scripts of every server instance.
Answer: C. Using a decentralized Gossip Protocol, where nodes periodically exchange their view of the ring state with random peers.
In masterless systems (like Cassandra), there is no central authority for the ring topology. Instead, nodes use a Gossip Protocol (an 'epidemic' algorithm) to spread state changes—like a node joining, leaving, or moving. Within a few seconds, information propagates across the entire cluster, ensuring that all nodes eventually agree on who owns which part of the hash ring.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In a 'Smart Client' architecture (e.g., modern Cassandra drivers), how does the client find the right node?
- When a new node (Node X) joins the ring, where does it acquire its initial data from?
- Google's Maglev hashing algorithm (used in their Network Load Balancers) differs from standard Consistent Hashing rings. How does it generate the lookup table?
- Virtual Nodes improve balance but increase metadata size (Memory). How does 'Multi-Probe Consistent Hashing' achieve good balance without VNodes?
- In the Chord DHT protocol (a P2P consistent hashing implementation), naive lookups are O(N). How does Chord optimize this to O(log N)?
- Which of these systems is a famous user of Consistent Hashing?