Cassandra hard
During a `nodetool repair`, Cassandra generates Merkle Trees to compare data ranges between replicas. What is the technical advantage of this 'Hash Tree' approach in a multi-terabyte cluster?
- A It eliminates the need for any network transfer by using quantum entanglement to sync data.
- B Efficiency: By comparing the root hashes of sub-ranges (leaf nodes), Cassandra can identify divergent data blocks without streaming the entire dataset, only transferring the specific 'diff' segments.
- C It sorts the SSTables alphabetically to improve the speed of full-table scans.
- D It converts all data into a Merkle-compatible binary format that is 100x more compressed than standard Zstd.
Answer: B. Efficiency: By comparing the root hashes of sub-ranges (leaf nodes), Cassandra can identify divergent data blocks without streaming the entire dataset, only transferring the specific 'diff' segments.
Comparing 1TB of data byte-by-byte across a network is physically impossible in real-time. Merkle Trees allow nodes to determine 'if' they are out of sync by comparing a single root hash. If they differ, they traverse the tree to find exactly which leaf (data range) is inconsistent and stream only that specific missing data.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In a Cassandra Keyspace, what does a 'Replication Factor of 3' specifically guarantee for your data redundancy?
- Unlike a Leader-Follower architecture (like MySQL or Redis), how does Cassandra maintain high availability within its node cluster?
- Cassandra Query Language (CQL) looks similar to SQL. What is a fundamental SQL feature that CQL does NOT support to ensure distributed performance?
- What is the critical architectural function of the 'Partition Key' in a Cassandra table?
- Apache Cassandra is fundamentally designed as which architectural category of NoSQL database?
- An extreme financial trading application requires 'Batch' sync for the Commit Log. What is the fundamental throughput limitation introduced by this setting?