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
