eventual consistency
A guarantee that copies of data will match once writes stop, even though a read straight after a write may briefly see an older value.
In more detail
Eventual consistency lets a replicated store stay fast and available across zones. Most applications tolerate a stale read of a second or less; design the few that cannot to use strongly consistent reads or a single source of truth.
Related terms
- strongly consistent read — A database read guaranteed to return the result of every write that finished before it, never an older copy.
- replication — Keeping copies of data in more than one place, updated automatically, so one failure does not lose or block it.
- Amazon DynamoDB — Amazon's fully managed key-value and document database, which stores items in tables without any servers for you to run.
- optimistic update — Showing the result of a user’s action on screen immediately, before the server confirms it, and undoing it if the server says no.
- cache invalidation — Marking cached copies as out of date, or deleting them, when the real data changes so the next read fetches fresh data.
- transactional outbox — Saving an event into an outbox table in the same database transaction as the business change, then having a separate worker publish it.
- staleness — How out of date a copy of data is compared with the latest write.
- convergence — The point at which all copies of some data reach the same value.
- reconciliation — Comparing copies of data with the source of truth and correcting any that have drifted.
Taught in
- NoSQL and DynamoDB — Cloud Infrastructure & Hyperscaler Architecture
- When to Pick Which Database — Cloud Infrastructure & Hyperscaler Architecture
- Optimistic UI Architecture: Cache & Rollback Protocols — Production Full-Stack Engineering
- Distributed Cache Invalidation: Redis & Tagged Purging — Production Full-Stack Engineering
- Asynchronous Event Processing: Outbox Pattern & Queues — Production Full-Stack Engineering
- Consistency, And The Truth About CAP — Scalable System Design & Distributed Architecture
- Eventual Consistency And What It Costs A Product — Scalable System Design & Distributed Architecture
- Worked Design One: Scaling The Ticket Booking System — Scalable System Design & Distributed Architecture