Tunable Consistency

Learn about tunable consistency in distributed systems.

One very popular and interesting consistency is tunable consistency. The name suggests the idea: we can tune our consistency to the type we would like to achieve in our system.

Databases such as Apache Cassandra have largely popularized this consistency model. Over the years, many NoSQL databases have adopted this strategy.

Let’s discuss tunable consistency and its associated concepts.

Press + to interact

Consistency level

Consistency level describes the number of nodes that must acknowledge a read or write before a request is marked as successful. We need to consider two types of consistency levels:

  • Read consistency level denotes the number of replica nodes that must respond to the read request with the latest data they have.
  • Write consistency level denotes how many replica nodes should acknowledge that the request has been processed on their side.

Coordinator node

In a distributed database cluster, the coordinator node is the node that receives clients’ requests and dispatches them to the correct nodes. The client can send its requests to any node in the cluster. It is the responsibility of the cluster to handle the request correctly.

We discussed the same concept in leaderless replication.

Parameters

Let’s define some parameters to help your understanding of tunable consistency.

  • RR: The number of minimum replica
...