Skip to content

Consistency models

A consistency model says which orderings of reads and writes a system allows: in practice, whether a read sees the newest value, your own writes, or something older for a while. A strong design answer picks it per data path.

On this page

What it is

A consistency model is a rule about which sequences of reads and writes a system may produce. Jepsen's map describes each model as a set of allowed histories, and a stronger model allows fewer of them: strict serializability implies linearizability, which implies sequential consistency, which implies causal consistency, and causal in turn implies the smaller client-side promises such as read-your-writes. The same map notes that models at or above sequential consistency can't be fully available when the network splits, while weaker models tolerate it better, some fully and some as long as a client keeps talking to one server.

Linearizability is the usual meaning of "strong consistency" for one object. Each operation appears to happen at a single instant, and the order respects real time: if a write finishes before a read begins, the read reflects that write. It covers one object at a time (strict serializability extends it to transactions over many objects), and a system providing it has some or all nodes stop making progress during a network partition.

The weaker models are easiest to understand from the reader's side, which is how Werner Vogels laid them out. Eventual consistency promises that if writes to an item stop, all replicas end up returning the last one; the time before that is the inconsistency window. Read-your-writes promises that a process sees its own update from then on, and session consistency is the practical form, holding for the life of one client session. Monotonic reads promises a process won't be shown a value older than one it has already seen. Causal consistency promises that if A tells B about an update, B's next read reflects it. Monotonic reads plus read-your-writes are the two most worth having in a store that promises eventual consistency, and the client sometimes implements them itself, for example by sticking to one server.

Where staleness comes from. With N replicas, W of which must acknowledge a write and R of which answer a read, W + R > N means the read set overlaps the write set and the read sees the latest value; W + R ≤ N means it may not, and that is where eventual consistency comes from. Synchronous primary-backup replication is N=2, W=2, R=1; asynchronous replication with reads from the backup is N=2, W=1, R=1. Many read replicas with R=1 trade staleness for read throughput.

Product (docs read Nov 2026)What it offersDetail that matters in a design

DynamoDB (single region)

Default reads may lag a recent write; ConsistentRead=true returns the newest successful writes

Strong reads work on tables and local secondary indexes, not on global secondary indexes or streams; a default (eventual) read costs half a strong one

DynamoDB global tables

Two modes: multi-region eventual (MREC, default), replicating typically within a second, and multi-region strong (MRSC), which replicates synchronously to another region before the write returns

Under MREC, simultaneous edits to one item in two regions are resolved last-writer-wins by internal timestamp; under MRSC the second writer gets a conflict error and retries

Amazon S3

Strong read-after-write for PUT and DELETE in all regions; a read started after a successful PUT returns that data

Updates are atomic per key, with no atomic update across keys; two concurrent PUTs to one key resolve to the later timestamp

Spanner

External consistency by default, stricter than serializability: transactions behave as if run one after another

Offers stale reads as the cheaper read path, with much stronger promises than eventual consistency

Azure Cosmos DB

Five selectable levels: strong, bounded staleness, session, consistent prefix, eventual

Strong and bounded staleness read two of four replicas, so their read throughput per request unit is half that of the other three; session reads carry a session token

When to use it

Ask for a strong (linearizable) read or write where acting on a stale value is costly and hard to undo: claiming a unique name or code, moving money, taking the last seat, acquiring a lock. Say what the coordination costs on the path that pays it: in Cosmos DB, for instance, strong and bounded-staleness reads go to two replicas instead of one, which is why they cost twice the read throughput, and a strong write waits for a global majority.

Use eventual consistency on paths where a reader is not harmed by a value a moment old and where the volume is high or the readers are far away: a feed, a view counter, a lookup of a record created long ago. Replication that is asynchronous keeps the write fast and local, and some managed stores publish the lag: a global table, for example, emits a ReplicationLatency metric per region pair, so you can say in a design how you would watch the window rather than hope it is small.

Reach for session consistency, read-your-writes scoped to one client session, which can be combined with monotonic reads, wherever a person edits something and then looks at it. Vogels calls this user-perceived consistency: the inconsistency window just has to be shorter than the time until the person's next page load. The common ways to get it are routing that user's reads to the replica that took the write, or a session token the client carries so a replica knows the version it must have caught up to before answering.

When not to

Don't make the whole system linearizable because it sounds safer. A strong operation usually waits on some coordination, a leader or a quorum, and during a partition some nodes refuse to serve. The multi-region strong mode of a global table shows the price in concrete terms: a write is replicated synchronously to another region before it returns, and a write that collides with one in flight elsewhere fails and must be retried. The eventual mode is the one to pick when you want lower write latency and can accept a recovery point objective above zero.

Don't choose eventual consistency where a conflict destroys information. Under last-writer-wins, two regions that accept writes to the same item near the same time converge on the later timestamp, and the other write is overwritten. If the two writes were two users claiming the same short code, one user holds a link that points somewhere else. For uniqueness, keep the claim on a single owner (one home region, or a quorum) or give each region its own range of codes so a clash can't be produced in the first place; see Unique ID generation.

Don't present a consistency model as the same thing as a transaction isolation level. They are different axes: a store can offer read-committed isolation and still let you pick eventual or strong reads, as DynamoDB does. Keep the two apart in an answer; see Transactions and isolation levels.

And don't settle for "eventual" without a number. If replicas are usually caught up within a second but a region can be isolated for an hour, the design must say what a reader in the isolated region sees for that hour and what happens to the writes queued there when it returns; a global table, for one, keeps the pending writes and resumes replicating them once the region is back.

Compared

ModelWhat a read promisesWhat it costsWhen the weaker choice is right

Linearizable (strong)

The newest completed write, ordered by real time, for one object

Usually a coordination step such as a leader or a read quorum; some nodes stop serving in a partition

Most read paths: anything where a value a moment old does no harm

Bounded staleness

A value no more than K versions or T seconds behind

The store must track how far each replica lags and enforce the bound, for example by slowing writes until replicas catch up

When readers need freshness but no fixed bound, session or eventual is cheaper

Session / read-your-writes

Your own writes from this session; others may lag

Sticky routing or a session token on each request

Anonymous readers who wrote nothing need no session at all

Monotonic reads

No value older than one you have already seen

Sticky routing to one replica, or a version the client remembers

A one-shot read with no follow-up has nothing to go backwards from

Causal

If you learned of an update, your reads reflect it

Tracking dependencies between writes

Independent items with no reply-to or depends-on relation

Eventual

Replicas converge after writes stop; meanwhile a read may be stale

Allows the store to skip coordination on the read path; conflicts need a resolution rule and the application bears the stale reads

It is the weakest; the question is whether the path can bear a stale read and whatever rule the store uses to resolve conflicting writes

In a picture

write v2User, region AReplica A

Step 1 of 4

A write lands in one region

A user in region A writes version 2 of an item. The local replica accepts it and acknowledges.

How to say it in an interview

The common mistake

Quiz

A user saves a profile edit and reloads the page; reads can go to any replica. What is the weakest model that still shows them their edit?
Two regions each accept a write to the same item at about the same time, and the store resolves conflicts last-writer-wins. What happens?
Which path most needs a linearizable operation?
A reader sees a comment, refreshes, and the comment is gone, then refreshes again and it is back. Which promise was missing?

Questions that use this

Related

Sources

  1. Jepsen: Consistency Models
  2. Jepsen: Linearizability
  3. Werner Vogels: Eventually Consistent - Revisited
  4. Amazon DynamoDB Developer Guide: DynamoDB read consistency
  5. Amazon DynamoDB Developer Guide: How DynamoDB global tables work
  6. Amazon S3 User Guide: What is Amazon S3? (data consistency model)
  7. Spanner documentation: TrueTime and external consistency
  8. Azure Cosmos DB documentation: Consistency levels
Sign in to report a mistake