Video in progress
What is the difference between strong consistency and eventual consistency, and which one fits which feature?
With strong consistency, every read sees the new value the moment a write finishes. With eventual consistency, copies may differ for a while, but if no new writes arrive, they all end up in the same state.
📖 Answer
Strong consistency is expensive: a write waits until several copies confirm it, which raises latency, and if one copy is down, writes can stall. Eventual consistency is fast and resilient, but for a while there are "two truths".
Which goes where:
| Feature | Model | Why |
|---|---|---|
| Account balance, payment | Strong | The same money must never be spent twice |
| Last item in stock | Strong | Don't sell one item to two people |
| Like and view counts | Eventual | Showing 1,019 instead of 1,024 does no harm |
| Feed, recommendations | Eventual | A few seconds of delay goes unnoticed |
| Search index | Eventual | It's fine if a new product shows up a minute later |
Eventual consistency doesn't mean "sometime"; it's usually milliseconds or seconds. But you have to account for it in the design: say "saved, will show up shortly" in the UI, or show the user their own change locally.
A common mistake in interviews is demanding strong consistency for everything. That makes the system needlessly slow and fragile.
Sign up to mark studied questions and save your progress.