Consistency & Consistency Levels: Distributed Data Stores
Prerequisites — Quorum
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.