Consistency Models act as a contract between the system and the developer. They define the telemarketing data rules for how and when different nodes in a network see the same data after an update.
Think of it as a spectrum: on one end, you have "everyone sees everything perfectly right now," and on the other, you have "everyone will eventually agree, but don't hold your breath."
1. Strong Consistency
This is the gold standard but the hardest to achieve at scale. Once a write is acknowledged, every subsequent read will return that value, regardless of which node is queried.
Linearizability: The strictest form. It feels like there is only one copy of the data, and all operations happen instantaneously.
Pros: Easy for developers to reason about; no "stale" data.
Cons: High latency. If the network is partitioned, the system must shut down to avoid inconsistency (CP in the CAP theorem).
2. Eventual Consistency
The most "relaxed" model, popularized by systems like DNS and Amazon’s Dynamo. The system guarantees that if no new updates are made to a data item, eventually all accesses will return the last updated value.
Pros: Highly available and very fast.
Cons: Users might see old data (stale reads). Developers have to handle "conflicts" (e.g., two people editing the same doc at once).
3. Client-Centric Models
These models focus on the experience of a single user rather than the state of the entire global cluster.
Read-Your-Writes: A user will never see an older version of data they just updated. If you post a comment on a photo, you see it immediately, even if your friend in another country doesn't see it for five more seconds.
Monotonic Reads: Once you’ve seen a specific version of data, you will never see an older version later. No "time traveling" backwards.
4. Causal Consistency
This is a middle ground. It ensures that operations that are "causally related" are seen in the same order by everyone. If User A replies to User B’s post, everyone will see User B’s post before the reply. However, unrelated posts might appear in different orders for different people.
Comparison at a Glance
| Model | Speed | Complexity | Typical Use Case |
| Strong | Slow | Low (for Devs) | Banking, Stock Trading |
| Causal | Medium | Medium | Social Media Feeds, Comments |
| Eventual | Fast | High (for Devs) | Caching, DNS, Search Indexes |