Consistent Hashing hard
Ceph uses the CRUSH algorithm instead of a standard lookup table. What is its unique advantage?
- A It utilizes an internal Artificial Intelligence engine to predict future traffic patterns and move data shards before hotspots occur.
- B It calculates data placement deterministically using a hierarchical map of the cluster, allowing for sophisticated failure domain isolation.
- C It achieves O(1) direct lookup performance for all requests by maintaining a perfectly synchronized global state on every disk controller.
- D It implements a specialized transparent data compression layer that allows the cluster to store 5x more data on standard hardware nodes.
Answer: B. It calculates data placement deterministically using a hierarchical map of the cluster, allowing for sophisticated failure domain isolation.
CRUSH (Controlled Replication Under Scalable Hashing) is used by Ceph to solve the 'Placement Rules' problem. Unlike a flat ring, CRUSH understands your datacenter's hierarchy (Rows, Racks, Hosts). This allows you to define complex rules like 'Store 3 replicas, but ensure no two replicas share a Rack'. Because it's a deterministic calculation, it requires zero central metadata servers, enabling massive scale.
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?