Tunable Consistency Levels
What you'll learn: How to choose consistency levels in wide-column stores to control the trade-off between data consistency and system availability.
The Core Idea
In distributed wide-column stores like Cassandra, you don't get just one consistency model—you get to choose your consistency level for each read or write operation. This "tunable consistency" lets you decide how many replica nodes must respond before considering an operation successful.
The three most common levels are:
- ONE: Only one replica must acknowledge the operation (fastest, least consistent)
- QUORUM: A majority of replicas must acknowledge (balanced middle ground)
- ALL: All replicas must acknowledge (slowest, most consistent)
Remember from lesson 365 that quorum reads and writes work with replication factors. If your replication factor is 3, QUORUM means 2 nodes must respond (since 2 is a majority of 3).
Balancing the Trade-off
ONE maximizes availability—your operation succeeds even if most replicas are down, but you might read stale data or miss recent writes.
ALL maximizes consistency—you're guaranteed the latest data, but if even one replica is unavailable, your operation fails.
QUORUM strikes a balance—you get strong consistency (reads overlap with writes) while tolerating some node failures. This is the most commonly used level in production.
Think of it like group decision-making: ONE is "anyone can approve," ALL is "everyone must agree," and QUORUM is "majority rules."
You can even mix levels: write at QUORUM for durability, but read at ONE for speed when stale data is acceptable (like view counters).
Key Takeaway: Tunable consistency levels let you choose per-operation how many replicas must respond, giving you fine-grained control over the availability-consistency trade-off based on your application's specific needs.