Consistency

Learn about consistency in distributed systems.

When we were discussing replication, we learned it takes time for the data to propagate from the leader to the followers. Data travels over the network, and each follower node has to process the write-request on their side. So intuitively, we can say that there is a lag.

This lag, known as the replication lag, is responsible for consistency issues in distributed systems. Based on the needs of your business, you will have to choose from different consistency models.

Note that there are two levels of data consistency: the disk caching level and the database level. In the context of distributed systems, we will discuss consistency on the database level. Let’s begin.

Consistency models

Consistency is the property that denotes how “in-sync” data is among the storage nodes in a distributed system.

The definition might sound ...