liveBook · Manning

One consistency level

As explained in ScyllaDB in Action

ONE is a ScyllaDB consistency level requiring a successful response from one replica for an operation.

ONE is a ScyllaDB consistency level that lets an operation succeed when a single replica for the requested key responds successfully. It favors availability: the operation can continue even when other replicas are unavailable, but the responding replica may not have the latest value. section 1.2.1 section 8.2.2

Reading restaurant reviews with ONE

In a three-node restaurant-review cluster, cqlsh uses ONE by default. With two healthy nodes, selecting Ernie's Eats reviews succeeds because one replica can respond. If the responding replica has not seen a previous write, the query can return inconsistent or stale data. section 2.4.2 section 8.2.2

Use ONE with its availability and consistency consequences in mind:

  • Prefer ONE when allowing a single available replica to serve the operation matters more than immediately consistent results. section 8.2.2
  • Expect weaker consistency during replica lag or a network partition; one responding replica may contain divergent data. section 2.4.2
  • Compare ONE with QUORUM when a majority response provides a stronger consistency and availability balance, or with ALL when every replica must respond. section 1.2.1
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 ONE with QUORUM and ALL by required replica responses and tolerated failures in a three-replica cluster. section 1.2.1

How ScyllaDB in Action covers it

How deep it goes
Explains the replica requirement, availability benefit, and stale-read risk, but does not detail the underlying replication protocol.
Examples
Demonstrates ONE through cqlsh's default setting and a restaurant-review read while one cluster node remains unavailable.
What it assumes
Assumes familiarity with replicas and queries while introducing consistency levels through a three-node ScyllaDB example.
What you can do after
Apply ONE to queries when availability matters and evaluate whether possible stale or divergent results are acceptable.
How it connects
Connects tunable consistency with replication, eventual consistency, network partitions, availability, QUORUM, and ALL.

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.