Cassandra medium
Why is 'Merkle Trees' used during the Cassandra `nodetool repair` process instead of just sending all the data over the network?
- A Merkle Trees are a type of compression that makes the data 100x smaller.
- B Efficiency: Merkle trees are 'Hash Trees' that allow two nodes to quickly find exactly *which* tiny segments of their data differ, streaming ONLY the missing data rather than the whole dataset.
- C Merkle Trees are required by law for GDPR compliance.
- D Merkle Trees are used to encrypt the data during transit over the Public Internet.
Answer: B. Efficiency: Merkle trees are 'Hash Trees' that allow two nodes to quickly find exactly *which* tiny segments of their data differ, streaming ONLY the missing data rather than the whole dataset.
This is 'Anti-Entropy'. Repairing a 1TB node can be very slow. By comparing hashes of data ranges (the branches of the Merkle tree), nodes can zoom in on the specific 1MB chunk that is out of sync. This minimizes the network impact of synchronization.
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?