Tunable consistency lets each ScyllaDB query choose how many nodes must acknowledge it before it succeeds. The choice trades availability against the chance of reading data that has not yet converged across replicas. section 1.2.1 section 8.2.2
At one extreme, ALL requires every replica and fails if any replica is unavailable. ONE needs one replica, so queries can continue through more failures but can return inconsistent data. QUORUM is the middle ground: a majority of replicas must respond; with three replicas, that means two and tolerates one failure. section 1.2.1 section 8.2.2
Table 8.1 Scylla supports many consistency-level choices for your queries to balance consistency and availability.
|
Consistency level
|
Required nodes to respond
|
|---|---|
|
ANY
|
Any node in the cluster can respond, even if it’s not a replica
|
|
ONE
|
A single replica
|
|
LOCAL_ONE
|
A single replica in the same datacenter
|
|
TWO
|
Two replicas
|
|
THREE
|
Three replicas
|
|
QUORUM
|
A majority of replicas
|
|
LOCAL_QUORUM
|
A majority of replicas in the same datacenter
|
|
EACH_QUORUM
|
A majority of replicas in every datacenter
|
|
SERIAL (used to get the latest data via Paxos)
|
A majority of replicas
|
|
LOCAL_SERIAL
|
A majority of replicas in the same datacenter
|
|
ALL
|
Every replica in the cluster
|
Compare the available levels by required responders. Datacenter-aware choices narrow acknowledgments to local or each datacenter, while SERIAL uses Paxos to obtain the latest value. section 8.2.2
Weaker levels favor serving traffic during failures, but a replica may not have seen a previous write. Using QUORUM for both reads and writes prevents stale reads. SERIAL provides linearizable reads by ordering them to reflect real-life ordering. section 8.2.2 section 8.2.2
ANY is more permissive than ONE: if replicas are unavailable, a nonreplica can acknowledge a write. The coordinator keeps that write locally and later sends it to the unavailable node through hinted handoff. section 8.2.2
This flexibility supports ScyllaDB’s availability-oriented query path. Unlike CP distributed relational databases that lose availability without a quorum, weaker levels such as ONE can preserve functionality during greater loss of availability. section 1.2.5 section 1.2.6
