Last-write-wins (LWW)
Pick the value with the highest timestamp. Simple and dangerous:
- Clock skew picks the wrong winner
- Concurrent updates silently drop one write
Acceptable only when conflicts are impossible by domain rules or data is immutable.
Version vectors
Each replica tracks versions per replica ID. On read, compare vectors:
- Equal → no conflict
- One dominates → return newer
- Concurrent → conflict — merge in application or surface to user
Read repair — during read quorum, client or coordinator writes back missing newer versions to stale replicas.
Merge strategies (verbal level)
| Strategy | When |
|---|---|
| Application merge | Shopping cart, collaborative docs |
| Discard | Metrics where approximate is OK |
| Strong coordination | Avoid conflict via single leader |
CRDTs are the deep end — mention "conflict-free replicated data types" if asked; not required for most backend loops.
Interview scenario
"Two users edit the same cell concurrently on different replicas. How do you detect it? How do you resolve?" → vector clocks or equivalent, then product-specific merge or last-writer with user confirmation.