Cosmos DB consistency levels — Strong, Bounded, Session, Consistent Prefix, Eventual
Five consistency levels, from strongest (and slowest, most expensive) to weakest.
| Level | Read sees writes from | Latency | RU cost | Default? |
|---|---|---|---|---|
| Strong | All committed writes globally | Highest | 2x | no |
| Bounded Staleness | Writes within K operations or T time | Medium-high | 2x | no |
| Session | Your own writes immediately; others eventually | Low | 1x | yes |
| Consistent Prefix | Writes in order, but possibly stale | Low | 1x | no |
| Eventual | Writes in any order, eventually | Lowest | 1x | no |
Strong
Linearizable reads — every read sees the most recent committed write across all regions. Only available with single write-region accounts.
Use when: financial balance, inventory count where over-sell is unacceptable.
Bounded Staleness
Reads lag the writes by at most K versions or T seconds. Useful when you need predictable staleness without the cost of Strong.
Use when: dashboards that tolerate up to N seconds of lag but need an upper bound.
Session (default)
The most useful default. A client sees its own writes immediately; sees other clients' writes eventually. Backed by a session token returned with every write.
var resp = await container.CreateItemAsync(item);
SessionToken token = resp.Headers.Session; // capture
// Later, on the same logical user session
var read = await container.ReadItemAsync<Item>(id, pk,
new ItemRequestOptions { SessionToken = token });
Use when: per-user UX (user reads their own data, others' data slightly stale is fine).
Consistent Prefix
Reads may be stale, but never see writes out of order. Good for "live feed" UX where order matters more than freshness.
Use when: notifications, log streams.
Eventual
No ordering, no staleness bound. Cheapest reads.
Use when: precomputed metrics, last-known-value caches where wrong-order does not matter.
Cost — the surprise
Strong and Bounded Staleness cost 2x RUs per read compared with Session/Eventual. On a busy collection this doubles your bill.
Region setup tradeoff
| Setup | Strongest level available |
|---|---|
| Single write region | Strong |
| Multi-region writes (active-active) | Session is the strongest you can get |
If you want Strong, you give up active-active. There is no free lunch on global distribution.
How to choose
- Start with Session. It is the default for a reason.
- Move stronger only when you have a concrete correctness story (Bounded Staleness for dashboards, Strong for balance/inventory).
- Move weaker (Eventual) only when reads are cheap-but-cold metrics and the cost saving is measurable.