Examples of read consistency levels

The following diagrams show examples of read requests using different consistency levels:

Rapid read protection diagram shows how the speculative retry table property affects consistency.

A single-datacenter cluster with a consistency level of QUORUM

In a single-datacenter cluster with a replication factor of 3 and a read consistency level of QUORUM, 2 of the 3 replicas ((3/2)+1 = 2) for the given row must respond to fulfill the read request. If the contacted replicas have different versions of the row, the replica with the most recent version will return the requested data. In the background, the third replica is checked for consistency with the first two, and if needed, a read repair is initiated for the out-of-date replicas.

dmlSingleDCConQuorum
DML single DCC on QUORUM
30

Coordinator node

30

Chosen node

30

Read response

30

Read repair

A single-datacenter cluster with a consistency level of ONE

In a single-datacenter cluster with a replication factor of 3 and a read consistency level of ONE, the closest replica for the given row is contacted to fulfill the read request.

dmlSingleDCConOne
DML single DCC on ONE
30

Coordinator node

30

Chosen node

30

Read response

30

Read repair

A two-datacenter cluster with a consistency level of QUORUM

In a two-datacenter cluster with a replication factor of 3 and a read consistency of QUORUM, 4 replicas for the given row must respond to fulfill the read request. The 4 replicas can be from any datacenter. In the background, the remaining replicas are checked for consistency with the first four. If needed, a read repair is initiated for the out-of-date replicas.

dmlMultipleDCConQuorum
DML Multiple DCC on QUORUM
30

Coordinator node

30

Chosen node

30

Read response

30

Read repair

A two-datacenter cluster with a consistency level of LOCAL_QUORUM

In a two-datacenter cluster with a replication factor of 3 and a read consistency of LOCAL_QUORUM, 2 replicas in the same datacenter as the coordinator node for the given row must respond to fulfill the read request. In the background, the remaining replicas are checked for consistency with the first 2. If needed, a read repair is initiated for the out-of-date replicas.

dmlMultipleDCConLocalQuorum
DML Multiple DCC on LOCAL_QUORUM
30

Coordinator node

30

Chosen node

30

Read response

30

Read repair

A two-datacenter cluster with a consistency level of ONE

In a two-datacenter cluster with a replication factor of 3, and a read consistency of ONE, the closest replica for the given row, regardless of datacenter, is contacted to fulfill the read request.

dmlMultipleDCConOne
DML Multiple DCC on ONE
30

Coordinator node

30

Chosen node

30

Read response

30

Read repair

A two-datacenter cluster with a consistency level of LOCAL_ONE

In a two-datacenter cluster with a replication factor of 3, and a read consistency of LOCAL_ONE, the closest replica for the given row in the same datacenter as the coordinator node is contacted to fulfill the read request.

dmlMultipleDCConLocalOne
DML Multiple DCC on LOCAL_ONE
30

Coordinator node

30

Chosen node

30

Read response

30

Read repair

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com