liveBook · Manning

All consistency level

As explained in ScyllaDB in Action

The ALL consistency level requires every replica for a key to acknowledge an operation.

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

How ScyllaDB in Action covers it

How deep it goes
Explains required replica responses, failure tolerance, and cqlsh behavior, but does not detail internal coordination.
Examples
Uses cqlsh commands against restaurant food reviews while stopping scylla-3 to demonstrate failure and recovery.
What you can do after
Operate/configure cqlsh consistency levels and predict whether queries succeed when replicas are unavailable.
How it connects
Connects replication, eventual consistency, availability, QUORUM, ONE, and the CAP theorem.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.