# Eventual Consistency

URL: https://eoxlabs.dev/glossary/eventual-consistency
Last updated: 2026-11-26
Publisher: EOXLABS (https://eoxlabs.dev)

Section: [Glossary](https://eoxlabs.dev/glossary)

Eventual consistency is a guarantee that, if no new updates are made to a piece of data, every replica will eventually return the last written value. Until that happens, readers in different places may see different versions. The period between a write and the moment every reader sees it is called the inconsistency window.

## Where does the definition come from?

Werner Vogels set out the description most engineers use in [Eventually Consistent - Revisited](https://www.allthingsdistributed.com/2008/12/eventually_consistent.html) (December 2008): "the storage system guarantees that if no new updates are made to the object, eventually all accesses will return the last updated value." He also named the weaker and stronger variants engineers still use, including "read-your-writes consistency", where a process that updated an item "will never see an older value", and "monotonic read consistency", where a reader never goes back to an earlier value.

## Why does it matter in practice?

Inconsistency windows are often short, so the bugs tend to appear only under distance and timing. Cloudflare's [How KV works](https://developers.cloudflare.com/kv/concepts/how-kv-works/) states that changes "may take up to 60 seconds or more to be visible in other global network locations as their cached versions of the data time out." Lookups for keys that do not exist are cached too, so a newly created key can also appear late.

For a buyer, the risk is in what gets stored there. A feature flag that turns on a minute late in another region is harmless. An access revocation that takes a minute to reach every region is a security gap.

## How does EOXLABS choose a consistency model?

EOXLABS picks the model per piece of data, based on what a stale read would cost:

- **Read-heavy, rarely changed values**, such as configuration and feature flags, go in [Workers KV](https://eoxlabs.dev/stack/workers-kv), which is eventually consistent and fast to read.
- **State with concurrent writers**, such as a balance, a booking or a session, belongs in a Durable Object, whose storage is strongly consistent.
- **Relational data read around the world** can use [D1](https://eoxlabs.dev/stack/d1) read replicas. Cloudflare's [D1 read replication guide](https://developers.cloudflare.com/d1/best-practices/read-replication/) says replicas are updated asynchronously, and that the Sessions API "ensures sequential consistency for all queries in a session."
- **Security decisions**, such as revocations, are never left to a cache that may be stale; the check reads an authoritative source.

## What does read-your-writes look like on D1?

A user renames a project and the page reloads. The reload may hit a replica that has not received the change, and the old name reappears. With D1's Sessions API, the Worker returns a bookmark with the response, and the next request opens its session from that bookmark, so it reads a version at least as new as the write. The idea is the same as Vogels's read-your-writes guarantee.

## What is eventual consistency confused with?

- **"Usually instant."** Cloudflare notes changes are usually visible at once in the location where they were made, but "this is not guaranteed and therefore it is not advised to rely on this behaviour."
- **Safe concurrent writes.** Convergence does not mean every write survives. Cloudflare's guide to [writing KV pairs](https://developers.cloudflare.com/kv/api/write-key-value-pairs/) warns that "concurrent writes to the same key can end up overwriting one another" and that "the last write will take precedence."
- **A safe default for retries.** Duplicate checks, such as an idempotency key lookup, need a strongly consistent store, or two retries in different places can both pass.

For the strongly consistent option, see the [Durable Objects stack page](https://eoxlabs.dev/stack/durable-objects). More terms are in the [glossary](https://eoxlabs.dev/glossary).

## Related

- [Workers KV](https://eoxlabs.dev/stack/workers-kv): Workers KV serves configuration and published content from the edge cache, and EOXLABS designs around its eventual consistency with versioned keys and a single writer.
- [D1](https://eoxlabs.dev/stack/d1): D1 is the relational store EOXLABS reaches for first on Cloudflare, and its single-threaded design shapes schemas, replica sessions and the point where Postgres is the better choice.
- [Durable Objects](https://eoxlabs.dev/stack/durable-objects): Durable Objects give EOXLABS one single-threaded, authoritative home for each piece of shared state, with clear guarantees, hard limits and cases where another store is better.
- [Durable Object](https://eoxlabs.dev/glossary/durable-object): A Durable Object is a single-threaded Cloudflare Worker with a unique name and private, strongly consistent storage. It gives edge systems one place to coordinate each piece of state.

## More glossary

- [PHI (Protected Health Information)](https://eoxlabs.dev/glossary/phi)
- [Business Associate Agreement (BAA)](https://eoxlabs.dev/glossary/business-associate-agreement)
- [Retrieval-Augmented Generation (RAG)](https://eoxlabs.dev/glossary/retrieval-augmented-generation)
