Code Room
System designHard
Question
Design the concurrency control for a collaborative document store where many users edit the same record/document and you must reconcile concurrent writes without a global write lock. Use optimistic concurrency control (OCC). Constraints: ~10k concurrent editors across thousands of docs, writes must not silently overwrite each other (lost-update protection), and the common case (no conflict) should be lock-free and fast. Describe the storage/versioning, how concurrent writers detect conflicts, and what happens on a conflict.
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.