advanced
Eventual consistency
Accept temporary divergence when convergence, reconciliation, UX messaging, and conflict handling are designed.
Eventual consistency allows replicas to diverge temporarily but guarantees convergence if writes stop. Suitable for social feeds, view counts, search indexes, and analytics where brief staleness is acceptable. Design reconciliation jobs, CRDTs, or last-write-wins with awareness of conflict semantics.
Communicate staleness in UX when users might notice — "post may take a moment to appear." Monitor lag metrics and set maximum acceptable divergence if business needs bounds.
On interviews: argue eventual consistency for timeline reads, describe convergence mechanism, and state when you would not use it.
Common pitfalls: last-write-wins losing legitimate updates; no monitoring of replication lag; eventual consistency chosen to hide bad architecture without UX plan.
The trade-off is flexibility versus complexity—know when the simpler path is enough.
Checklist:
- Confirm staleness is acceptable per use case.
- Define convergence or reconciliation path.
- Monitor replica lag and conflict rate.
- Set user messaging for delay visibility.