Code RoomSocial comment consistency across replicas
HardPrep Room Coding #3323

Social comment consistency across replicas

System designDatabases & SQLSenior–Staff~45 min

Design the comment + reply system for a social network where a user must always see their own newly posted reply immediately, and must never see a reply to a comment before seeing the comment it replies to. Scale: 500M DAU, reads 100x writes, comments served from geo-distributed read replicas with replication lag up to several seconds. Strong global consistency is too expensive. Which consistency model do you pick, and how do you enforce it end to end?

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.