Web apps & software

What is eventual consistency?

Eventual consistency is a promise that if nobody changes a piece of data for a while, every copy of it will end up with the same value. In the meantime, one user may read a slightly older version than another.

What it looks like to a user

You change your profile photo, refresh the page, and the old photo appears for a few seconds because the request landed on a replica that had not yet received the update. A moment later it is correct. Nothing was lost; the copies were still syncing.

Why systems accept it

Keeping every copy identical at every instant forces servers to wait for each other, which slows writes and fails when a network link breaks. Spreading data across regions, caches and search indexes becomes much faster and more available if short disagreements are allowed. DNS, shopping-cart services and social feeds are classic examples.

How to design around it

  • Show the user's own change immediately in the interface, even before the server copy catches up.
  • Keep money, stock counts and bookings on a strongly consistent store, where the answer must be right the first time.
  • Make background handlers safe to run twice, because syncing mechanisms often retry.
  • Tell support staff that a lag of a few seconds is expected, so they do not chase phantom bugs.

Questions, answered

No. The data is stored; only the moment when every reader sees it is delayed.

Yes, and most do. Payments use a strict database while feeds, search and analytics tolerate lag.

By the Stegnor team · Updated