Setting consistency levels

Set the consistency level to control the accuracy of the data returned by read request.

In a distributed system such as DataStax Enterprise, 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:
  • 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.