Spectrum of Consistency Models
Learn about consistency models and see which model suits the requirements of our application.
What is consistency?
In distributed systems, consistency may mean many things. One is that each replica node has the same view of data at a given point in time. The other is that each read request gets the value of the recent write. These are not the only definitions of consistency, since there are many forms of consistency. Normally, consistency models provide us with abstractions to reason about the correctness of a distributed system doing concurrent data reads, writes, and mutations.
If we have to design or build an application in which we need a third-party storage system like S3 or Cassandra, we can look into the consistency guarantees provided by S3 to decide whether to use it or not. Let’s explore different types of consistency.
The two ends of the consistency spectrum are:
- Strongest consistency
- Weakest consistency
There are consistency models that lie between these two ends, some of which are shown in the following illustration: