Cassandra medium
A Cassandra cluster has a Replication Factor (RF) of 3. To achieve 'Strong Consistency' (ensuring a Read-Your-Writes guarantee), what is the minimum combined requirement for Read (R) and Write (W) consistency levels?
- A W = ALL + R = ONE: Sacrificing write availability for absolute read speed.
- B W = ONE + R = ALL: Sacrificing read availability for absolute write speed.
- C Any combination where R + W > RF (e.g., W = QUORUM and R = QUORUM).
- D W = TWO + R = ONE: This only works if the cluster has exactly 3 nodes and no network partitions.
Answer: C. Any combination where R + W > RF (e.g., W = QUORUM and R = QUORUM).
The fundamental formula for strong consistency in distributed systems (Dynamo-style) is `R + W > RF`. With RF=3, a Quorum of 2 on both Read and Write ensures that at least one node in the Read set is guaranteed to have the latest data from the Write set. Using `LOCAL_QUORUM` is most common to avoid inter-datacenter latency.
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?