Code RoomClock-skew-resistant conflict resolution
HardPrep Room Coding #3574

Clock-skew-resistant conflict resolution

System designDistributed systemsSenior–Staff~45 min

A multi-master, eventually-consistent NoSQL store resolves concurrent writes to the same key with last-writer-wins (LWW) using each node's wall-clock timestamp. In production, a node whose clock was 4 minutes ahead accepted a write; later legitimate writes from correctly-clocked nodes had EARLIER timestamps and were silently discarded by LWW as 'older', so users saw a value revert and stay reverted for minutes. Redesign the conflict-resolution / ordering so that (a) clock skew can't make a stale write win forever, and (b) you can still resolve concurrent writes deterministically across regions. Explain what replaces raw wall-clock timestamps and the precise guarantee you gain — and what LWW fundamentally cannot give you regardless.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify5:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.