Consistency & Consistency Levels(II) — Distributed Data Stores

Before going into this article, I’d advise you to go through the following articles to get the complete context.

  1. Consistency & Consistency Levels
  2. Consistency Models — Strong Consistency Models
  3. Consistency Models — Session & Eventual Consistency Models

Now that we’re on the same page, we have seen before that we could define the application consistency based on different consistency models.

Consistency model is a contract between a (distributed)system and the applications that run on it. This model is a set of guarantees made by the distributed system so that the client can have expected consistency behaviour across read & write operations.

From a distributed systems perspective, we can also define consistency levels that also end up impacting the consistency guarantees that our application can make.

Consistency Level is the number of replica nodes that must acknowledge a read/write request to be successful for the entire request to be considered successful.

Replication Factor (RF) is equivalent to the number of nodes where any write is replicated. So, if I have a 5 node cluster and have set RF to 3, my writes are replicated to 3 of the 5 nodes always.

Let’s take different consistency levels and see the consistency guarantees that our application can offer -

  1. Read CL = ONE & Write

--

--

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

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