Setting consistency levels

In a distributed system such as CQL, the most recent value of data is not necessarily on every node all the time. The client application configures the consistency level per request to manage response time versus data accuracy. By tracing activity on a five-node cluster, this tutorial shows the difference between these consistency levels and the number of replicas that participate to satisfy a request:

Consistency level Description

ONE

Returns data from the nearest replica.

QUORUM

Returns the most recent data from the majority of replicas.

ALL

Returns the most recent data from all replicas.

Follow instructions to set up five nodes on your local computer, trace reads at different consistency levels, and then compare the results.

Tunable Consistency and Consistency Levels

Data consistency and performance

Changing the consistency level can affect read performance. The tracing output shows that as you change the consistency level, performance is affected.

Testing performance impact using tracing

Running and tracing queries that read data at different consistency levels.

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