Code Room
System designHard
Question
Design the real-time multiplayer state-sync backend for a fast-paced online game: rooms of up to 64 players, each sending ~20 input updates/sec, where everyone must see a consistent, low-latency view of the shared world (player positions, projectiles) despite 50–150ms client RTTs and occasional packet loss. Requirements: cheating-resistant (a client can't teleport itself), the world stays consistent across players, and a single hot region shouldn't degrade. Walk through the architecture, the consistency model, and the network protocol choices.
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.