Code RoomSession consistency across replicas
MediumPrep Room Coding #3569

Session consistency across replicas

System designDatabases & SQLMid–Senior~40 min

A social product writes to a single primary region and serves reads from async read-replicas in 4 regions to scale reads (reads are 50x writes). Users complain about two specific bugs: (1) after editing their profile bio, they refresh and see the OLD bio (replica lag), and (2) sometimes a refresh shows newer data than a previous refresh did, then older again (they hit different replicas with different lag). Without going to synchronous global replication, design the consistency guarantees that fix exactly these two complaints. Name the specific session-consistency properties involved, and explain the mechanism (tokens, routing, or versioning) that delivers each.

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.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.