The ALL consistency level requires every replica for a key to acknowledge a query before it succeeds. It provides the strongest consistency among the compared levels, but sacrifices availability: one unavailable replica can make the request fail. section 1.2.1 section 8.2.2
With three replicas, the consistency trade-off is direct:
- ALL requires three replicas and tolerates zero failures. section 1.2.1
- QUORUM requires a majority and can continue when one replica is unavailable. section 2.4.2
- ONE requires a single replica, improving availability but increasing the chance of inconsistent or stale results. section 1.2.1 section 8.2.2
A restaurant-review query with a failed replica
In cqlsh, setting CONSISTENCY ALL and querying initial.food_reviews for Ernie's Eats returns NoHostAvailable when scylla-3 is unavailable. Changing the level to QUORUM allows the same query to return the two reviews from the remaining healthy nodes. section 2.4.2
Table 1.1 Sample of consistency level options, assuming a cluster with three replicas
|
Consistency level
|
Description
|
Number required to succeed
|
Failures tolerated
|
|---|---|---|---|
ALL
|
Requires all replicas to succeed
|
3
|
0
|
QUORUM
|
Requires a majority of replicas to succeed
|
2
|
1
|
ONE
|
Requires a single replica to succeed
|
1
|
2
|
Compare ALL with QUORUM and ONE by required responses and tolerated failures in a three-replica cluster. section 1.2.1
