Code RoomServer-sent event fan-out
MediumPrep Room Coding #3808

Server-sent event fan-out

System designNetworking & APIsDistributed systemsMid–Senior~40 min

Design a server-push fan-out service using Server-Sent Events (with HTTP long-poll fallback for old proxies) that streams live updates — order status, scores, dashboard metrics — to 3M concurrently-connected browsers. Updates are one-directional server→client, must arrive within ~1 s, and clients must not miss events across reconnects. Why SSE over WebSockets here, and how do you fan out, hold connections, and handle reconnect gaps?

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.