tezvyn:

What is eventual consistency?

AI-drafted, machine-checkedSource: interviewintermediate
WHAT IT TESTS

consistency-model tradeoffs.

OUTLINE

replicas converge to the same value if writes stop, allowing temporary staleness for higher availability and lower latency.

RED FLAG

claiming it means data is wrong or never converges.

WHAT THIS TESTS Whether you understand that consistency is a spectrum and can justify trading immediacy for availability based on the business cost of staleness.

A GOOD ANSWER COVERS Eventual consistency is a guarantee that if no new updates are made to an item, all replicas will eventually return the last updated value. It does not mean data is wrong or that updates are lost; it means there is a convergence window during which different replicas may briefly disagree. This model is favored in distributed systems because, per the CAP theorem, choosing availability and partition tolerance forces you to relax strong consistency. The payoff is lower write latency, the ability to keep serving during network partitions, and easier horizontal scaling.

COMMON WRONG ANSWERS Describing it as data corruption, claiming replicas never converge, or asserting it is always inferior to strong consistency rather than a deliberate tradeoff.

LIKELY FOLLOW-UPS Where is it unacceptable? Account balances, inventory decrement at checkout, and unique-constraint enforcement need stronger guarantees. How do you bound staleness? Read-your-writes and monotonic-read session guarantees.

ONE CONCRETE EXAMPLE A social feed showing a post's like count is a strong fit. If one user likes a post and another sees the count update half a second later, no harm results, and the system stays fast and available globally. Contrast this with a bank transfer, where reading a stale balance could let a user overdraw, so that path demands strong consistency and serialized writes.

Read the original → en.wikipedia.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.