Consistency & Consistency Levels: Distributed Data Stores

PrerequisitesQuorum

Consistency in Distributed Systems ensure all replicas have the same data. Consistency Levels allow you to tune your consistency depending on the needs of your application. Tunable Consistency in Cassandra follows the same.

In this article, we are going to talk about consistency in distributed systems. Consistency in a distributed context is not the same as consistency in RDBMS(Single Server). Consistency in a traditional RDBMS is about ensuring data correctness through constraints. You can find out more about Consistency in RDBMS through this blog.

Coming back to Distributed Data Stores,

Consistency is about keeping the replica nodes in sync with the leader & other replica nodes in a distributed data store.

What If I Do Not Have A Consistent System

If you’re using a distributed data store, & you’re not having consistency guarantees, any write to the data store might be written to the leader, but since the replica nodes are not in sync with the leader, the subsequent reads might not show the latest write.

Similarly, if some replicas are in sync, but others are not, some users might see the latest write, while others would not. This too leads to Inconsistent behaviour from the system.

Consistency Levels(CL)

--

--

Pratik Pandey - https://pratikpandey.substack.com

Senior Engineer with experience in designing and architecting large scale distributed systems.