Consistency as a Dial
Cassandra replicates each row to several nodes set by the replication factor. For each read or write you choose a consistency level, the number of replicas that must respond before the operation succeeds. This lets you tune per request rather than per cluster.
Common Levels
- ONE waits for a single replica, giving the lowest latency but the weakest guarantee.
- QUORUM waits for a majority of replicas.
- ALL waits for every replica, the strongest but most fragile.
The Quorum Overlap Rule
If the read level plus the write level exceeds the replication factor, then read and write replica sets always overlap by at least one node. That overlapping replica is guaranteed to hold the latest write, so the read sees it. This is the basis for strong consistency on a leaderless system.
Trade Off
Higher levels mean more nodes must be reachable, so availability drops if nodes fail. Lower levels stay available but may return stale data.
Key idea
Cassandra lets each request set how many replicas must respond, and choosing read and write levels that together exceed the replication factor gives strong consistency on a leaderless cluster.