Code RoomMulti-region comment consistency
HardPrep Room Coding #3163

Multi-region comment consistency

System designDatabases & SQLSenior–Staff~45 min

A multi-region social-comment system serves reads from the nearest region's replica (async cross-region replication, ~200ms lag) for low latency, but users complain: after posting a comment they sometimes don't see it on refresh, and a reply occasionally appears before the comment it replies to. The system is otherwise eventually consistent and you want to keep regional read locality. Design the consistency guarantees to fix both bugs without forcing global strong consistency, and explain the trade-off.

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.