liveBook · Manning

Serial consistency

As explained in ScyllaDB in Action

SERIAL consistency is a ScyllaDB consistency level that provides linearizable reads by coordinating determination of the latest value.

SERIAL consistency is a ScyllaDB consistency level that guarantees a read observes the latest value. ScyllaDB uses Paxos to determine that value, giving reads linearizability: each read appears ordered according to when it occurred. section 8.2.2

Choose SERIAL consistency with these trade-offs in mind:

  • It provides stronger read guarantees than weaker consistency levels, which can return stale data. section 8.2.2
  • It is expensive because Paxos requires additional coordination, much like lightweight transactions. section 8.2.2
  • It favors consistency over availability: queries can fail when required replicas are unavailable. section 8.2.2
  • Using QUORUM for both writes and reads can provide the latest value without an LWT-based read. 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 SERIAL with consistency levels that require one replica, a quorum, or every replica to respond. section 8.2.2

How ScyllaDB in Action covers it

How deep it goes
Explains Paxos and linearizability, then stops short of detailing Paxos execution and cost mitigation.
Examples
Contrasts SERIAL with weaker levels and QUORUM reads and writes through replica-response behavior.
What it assumes
Assumes familiarity with replicas and consistency levels while introducing Paxos and linearizability through their read guarantees.
What you can do after
Evaluate when latest-value reads justify Paxos coordination or when QUORUM offers a less costly alternative.
How it connects
Connects SERIAL consistency with Paxos, linearizability, lightweight transactions, and QUORUM consistency.

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.