🗄️ Database Design / Normalization
Advanced
What is eventual consistency?
Answer
Eventual consistency is a consistency model used in distributed systems where, in the absence of new updates, all replicas will converge to the same value given enough time. It sacrifices strong consistency (all reads return the latest write immediately) for higher availability and lower latency. Used by: DynamoDB, Cassandra, Couchbase. Example: you post a comment on social media and a friend in another region does not see it for a few seconds. For many applications (shopping cart, social feeds, DNS) eventual consistency is acceptable. For financial transactions, it is not. The application must handle cases where it reads stale data and design conflict resolution strategies (last-write-wins, vector clocks).