Problems / Design a product, hard

Build Twitch live streaming

Design Twitch from an empty canvas: take in broadcasters’ live streams, transcode them, deliver them to viewers through a CDN and run real-time chat, at 2,000 requests a second.

Unlock it once for 25 credits; everything inside it is free (runs, changes, Submit, results, hints). Sign in with Google to start; new accounts get free credits.

What it must do

Scale

Request types to route: watch (75%, read), chat (20%, write), ingest (5%, write). Budget: $15,000 a month.

Estimate first

The test cases

You start from an empty canvas. When you run the tests, each one simulates your design with its own traffic and failures:

TestWhat it doesPasses when
Normal dayThe normal day: the traffic in the brief, nothing broken.Success ≥ 99%; p99 latency ≤ 400 ms (watch); Success ≥ 98% (chat); p99 latency ≤ 300 ms (chat); Success ≥ 99% (ingest)
A raidAt 5 s a big streamer raids another channel and goes on a live event: traffic triples for 8 s.Success ≥ 98%; p99 latency ≤ 600 ms (watch); Success ≥ 98% (ingest)
A server diesAt 4 s one server of the first app service on the request path dies for 10 s.Success ≥ 99%
Bot swarmAt 5 s 5,000 requests a second of bots traffic arrive for 10 s, alongside real users.Attack blocked ≥ 90%; Success ≥ 98% (chat); p99 latency ≤ 400 ms (watch)
Budget: $15,000/monthThe normal day's design must cost at most $15,000 a month.Cost ≤ $15,000/month

Must include

More design a product problems