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.