Scope
Functional
- Stream live matches in multiple qualities and languages (commentary tracks).
- Viewers can join late, pause briefly and rewind up to a few hours (DVR window).
- Show a live viewer count; overlay score updates; insert ads in breaks.
Non-functional
- Peak concurrency: 25–50 million viewers for a final.
- Glass-to-glass latency under ~10–20 s (lower is better, but stability matters more).
- Startup time < 2 s; rebuffering ratio < 0.5%.
- Must not fail at the moment of peak interest (the last over).
Out of scope: video on demand catalogue, payments and subscriptions, recommendations.
Size
- 25M concurrent viewers × average 2.5 Mbps ≈ 62 Tbps of egress at peak. That is more than any single CDN node, data centre or even one provider comfortably serves; it needs multiple CDNs and ISP-embedded caches.
- Segments of 4 s at 5 renditions (240p to 1080p) × 3 commentary languages: each rendition produces 1 segment per 4 s, a tiny number of unique objects. The challenge is fan-out, not storage.
- Manifest requests: each player refreshes its playlist every segment duration → 25M / 4 s ≈ 6M manifest requests/s plus ~6M segment requests/s.
- Join spike: after a wicket or at the start of the chase, millions join within a minute.
Decision: almost all load must be absorbed by caches close to users. Origin should see each segment requested only a handful of times, no matter how many viewers.
The pipeline
- Contribution: the broadcast feed reaches ingest points over redundant, dedicated links (two independent paths, two sites).
- Encoding: live encoders produce an adaptive bitrate (ABR) ladder: the same picture at, say, 240p/400 kbps up to 1080p/6 Mbps, with aligned keyframes so players can switch between them.
- Packaging: the stream is cut into short segments (2–6 s) with a manifest (playlist) listing the latest segments, in HLS and/or DASH formats. Optionally DRM encryption.
- Origin and shield: segments are written to an origin store; a shield cache layer in front of it collapses requests from all CDN edges.
- Delivery: multiple CDNs plus caches embedded inside large ISPs serve players.
- Player: downloads the manifest, picks a rendition based on measured bandwidth, fetches segments, and adapts continuously.
The 30-second summary
"The stadium feed comes in over two independent paths, gets encoded into an ABR ladder by redundant encoders, and is packaged into 2–4-second HLS/DASH segments. Segments are immutable and cached for hours; manifests are cached for about a second. A shield plus regional tiers with request collapsing means the origin sees about one request per segment per rendition, while multiple CDNs and ISP caches serve tens of terabits per second, steered by real-time quality data. The control plane is pre-scaled for the join spike, with cached entitlements and a static fallback, so 'play' keeps working even if everything else degrades."
Follow-up questions the interviewer may ask
- How would you get latency under 5 seconds?
- How do you count unique viewers precisely?
- What if a CDN fails mid-over?
Model answers to each of these are in the book.