Code Room
System designHardsd-g200
Subject Consistency modelsLevel Senior–Staff~45 minCommon in Databases & SQL interviewsIndustries Technology, Software development

Question

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.