What is the difference between strong consistency and eventual consistency?
MediumConceptCAP, Consistency & Availability
Answer
Under strong consistency, once a write is acknowledged, every later read returns that value or a newer one, as if there were a single copy of the data. Under eventual consistency, replicas may return stale data for a while, but they converge to the same value once writes stop.
- Strong suits account balances, inventory and unique usernames; it costs latency because replicas must coordinate before acknowledging.
- Eventual suits likes, view counts, feeds and DNS; it gives lower latency and higher availability.
- Middle ground: read-your-writes (users always see their own updates), monotonic reads and causal consistency fix the most visible anomalies without full coordination.
- Decide per data type; most real systems mix both models.
More in CAP, Consistency & Availability
| # | Problem | Platform | Difficulty | Open | 1st1st Visit | 2nd2nd Visit | RevRevise |
|---|---|---|---|---|---|---|---|
| 1 | What is the CAP theorem? | Concept | Easy | Read the answer to What is the CAP theorem? | |||
| 2 | What is the difference between strong consistency and eventual consistency? | Concept | Medium | Read the answer to What is the difference between strong consistency and eventual consistency? | |||
| 3 | How is availability measured, and what do SLAs, SLOs and the 'nines' mean? | Concept | Medium | Read the answer to How is availability measured, and what do SLAs, SLOs and the 'nines' mean? | |||
| 4 | How do quorum reads and writes work, and why does R + W > N matter? | Concept | Hard | Read the answer to How do quorum reads and writes work, and why does R + W > N matter? |