Apache Cassandra

Consistency Levels (ONE, QUORUM, ALL, LOCAL_QUORUM)

Understand how consistency levels let developers tune the trade-off between consistency, availability, and latency per query.

Cassandra implements tunable consistency, meaning the consistency guarantee for any individual read or write can be configured on a per-query basis via a consistency level (CL). This lets applications balance the classic CAP theorem trade-off differently depending on the criticality of each operation.

It's like requiring a certain number of witnesses to sign off before you trust a fact is true — ALL requires everyone in the room to agree, ONE just needs a single person's word, and QUORUM needs a majority vote.

Key Concepts

1
Common consistency levels include ONE (only one replica must acknowledge), QUORUM (a majority of replicas across all datacenters), ALL (every replica must acknowledge), and LOCAL_QUORUM (a majority of replicas within the local datacenter only, avoiding cross-DC latency).
ONEQUORUMALLLOCAL_QUORUM
2
The relationship between read and write consistency levels determines whether an application achieves strong consistency. A common rule of thumb is: if (read CL + write CL) > replication factor, reads are guaranteed to see the most recent write — this is often expressed as achieving quorum-based strong consistency, e.g., QUORUM reads with QUORUM writes.
strong consistency
3
Choosing lower consistency levels (like ONE) increases availability and reduces latency, since fewer replicas need to respond, but risks reading stale data if a replica hasn't yet received the latest write. Choosing ALL maximizes consistency but sacrifices availability, since the operation fails if even one replica is unreachable.