Code Room
System designHard
Question
Design the real-time sync backend for a collaborative offline-first app (think a shared notes/whiteboard tool) where 10M users edit documents that must converge across devices, work offline, and merge without a central lock. Edits stream over WebSocket when online and queue locally when offline. You need <500 ms propagation between online collaborators on a doc and automatic conflict resolution. How do edits flow, and how do you guarantee convergence?
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.