Strong consistency vs. eventual consistency
What is the difference between strong consistency and eventual consistency? When would you choose one over the other?
what they're testing: The interviewer is probing whether you can turn a correctness requirement into an explicit trade-off among freshness, latency, and availability under failure.
Strong consistency, in this comparison, means linearizability: after a write completes successfully, a later read returns that value or a newer one. The replicated data behaves like one current copy. With eventual consistency, a read may reach a lagging replica and return stale data, even data older than the client saw before. If updates stop and replication can proceed, replicas converge, but there is no promised deadline.
Strong consistency requires enough coordination to keep operations in a safe order. A system might use a leader, quorums, or synchronous replication; it does not have to update every replica at the same instant. Coordination adds latency, and an operation may wait or fail during a partition when the system cannot establish the required order. Eventual designs can serve reachable replicas and reconcile changes later, although eventual consistency alone does not guarantee availability.
Choose from the business rule. Reserving the last item needs an atomic conditional write or transaction with strong guarantees, as does a distributed lock. Temporary staleness is often acceptable for like counts or a search index. Many systems mix guarantees by operation, so define the required freshness, its scope, and what should happen when coordination is unavailable.
Where people slip
the tempting wrong answer, and what's actually true
Strong consistency means every replica is updated at exactly the same instant.
Strong consistency constrains what operations can observe. A lagging replica can catch up, forward the read, or refuse to serve it as current.
Eventual consistency means replicas may disagree forever.
If updates stop and replication can proceed, eventual consistency requires replicas to converge. It does not set a fixed deadline for that convergence.
Eventual consistency means reads can return uncommitted writes.
Eventual consistency governs staleness, not transaction isolation. DynamoDB, for example, returns only committed values even for eventual reads, though a recent successful write may be missing.
A database must be either strongly consistent or eventually consistent for every operation.
Consistency can be scoped by operation or data path, and systems such as DynamoDB offer both read modes on supported resources.
If they push further
What happens to each model during a network partition?
A strongly consistent operation must wait or fail when it cannot coordinate safely. A system designed for availability may serve or accept work on reachable replicas, then reconcile it later, but that behavior is a separate design choice rather than an automatic property of eventual consistency.
How can you provide read-your-writes without making every read strongly consistent?
Use a session guarantee, a session token, or route that user's reads to a replica known to include the write. This narrows the guarantee to the client that needs it.
Is strong consistency the same as serializability?
No. Linearizability orders atomic operations on an object and respects real-time order. Serializability makes transactions behave as if they ran one at a time but need not respect real-time order. Strict serializability provides both; Spanner calls this external consistency.
Sources
- Amazon Web Services: DynamoDB read consistency ↗docs.aws.amazon.com
- Microsoft Learn: Consistency levels in Azure Cosmos DB ↗learn.microsoft.com
- Google Cloud: Spanner TrueTime and external consistency ↗docs.cloud.google.com
- Amazon Web Services: CAP theorem ↗docs.aws.amazon.com
Now answer it yourself.
Reading a strong answer is easy. Producing one under pressure is the skill the interview tests. Gapmap grades your answer against the same bar an interviewer would.
beta
The interviewer part is in the works.
The diagnostic, personal maps, and AI mock interviews are being finished right now. The notes stay free either way. Leave an email and you'll get the first-cohort invite, plus a month of Pro when it opens.