Consistency Model in Distributed System (original) (raw)

Last Updated : 14 Oct, 2025

In distributed systems, consistency models define how data updates are shared and viewed across multiple nodes. They set the rules for synchronization, ensuring users and applications interpret data changes correctly. Depending on the approach, strict or relaxed systems balance reliability, availability, and performance.

what_are_consistency_models_in_distributed_systems_

Consistency Model in Distributed System

In distributed systems, consistency models come in a variety of forms. Every consistency model has advantages and disadvantages, and the system's particular requirements will determine which model is best.

Types of Consistency Models

**1. Strong Consistency

In a strongly consistent system, all nodes in the system agree on the order in which operations occurred. Reads will always return the most recent version of the data, when an update occurs on one server, this model makes sure every other server in the system reflects this change immediately. This model provides the highest level of consistency, but it can be slower and require more resources in a distributed environment since all servers must stay perfectly in sync.

Strong-Consistency

Strict Consistency Model in Distributed System

**2. Sequential Consistency Model

It is a consistency model in distributed systems that ensures all operations across processes appear in a single, unified order. In this model, every read and write operation from any process appears to happen in sequence, regardless of where it occurs in the system. Importantly, all processes observe this same sequence of operations, maintaining a sense of consistency and order across the system.

**3. Causal Consistency Model

The Causal Consistency Model is a type of consistency in distributed systems that ensures that related events happen in a logical order. In simpler terms, if two operations are causally related (like one action causing another), the system will make sure they are seen in that order by all users. However, if there’s no clear relationship between two operations, the system doesn’t enforce an order, meaning different users might see the operations in different sequences.

Causal-consistency-copy

Causal Consistency in Distributed Syste

**4. Weak Consistency Model

A weakly consistent system provides no guarantees about the ordering of operations or the state of the data at any given time. Clients may see different versions of the data depending on which node they connect to. This model provides the highest availability and scalability but at the cost of consistency.

5. Session Consistency

Session Consistency guarantees that all of the data and actions a user engages with within a single session remain consistent. Consider it similar to online shopping: session consistency ensures that an item will always be in your cart until you check out or log out, regardless of how you explore the page.

6. Monotonic Reads and Writes

Once a piece of data has been read or written, monotonic reads and writes guarantee that the data will always be viewed in a predictable and consistent order in subsequent reads or writes.

When to choose which Consistency Model?