Connections, Not Requests
Easy · system design problem
A live final brings 3× the viewers online — and 15 seconds in, a zone drops half of the gateway fleet. CPU stays low the whole time.
The live-score app keeps a WebSocket open per viewer: 300,000 viewers today on 4 gateway instances (100,000 connections each), autoscaling on CPU. At T+25s the final starts and 3× as many viewers come online for ten minutes; at T+40s a zone fails and takes half of the gateway instances with it. Each viewer sends little traffic, so CPU stays moderate. New gateway instances take 15 s to boot.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.