41. Design Live Streaming at Scale (Live Cricket)
1
The interview prompt2
41.1 What do you ask first?3
41.2 How big is this, really?4
41.3 What are the doors?5
41.4 What do we store?6
41.5 What does the whole system look like?7
41.6 How do live ingest and segmenting work?8
41.7 How does the CDN cope at peak?9
41.8 How do you pre-scale for spikes?10
41.9 How does live score sync work?11
41.10 What would you say in the last five minutes?12
Score yourself13
Variations to practise14
Sources15
Code lab41. Design Live Streaming at Scale (Live Cricket)
Score yourself
3 min read+10 XP
Score yourself
Give yourself 0, 1 or 2 points per row.
| Area | 0 points | 1 point | 2 points |
|---|---|---|---|
| Requirements | Started drawing | Stream to many | Spike speed, latency target, no stalls, score sync and redundancy agreed |
| Estimates | None | Numbers, not used later | Egress, request rate, origin load and API spike drove the design |
| API and data | Skipped | Playlist only | Play API with entitlement + signed URL, rolling playlists, score with match time |
| High-level design | Servers stream video | Encoder + CDN | Redundant upstream, shields, ISP caches, API tier and score path walked |
| Deep dive | Hand-waved | One topic | Latency trade-offs, request collapsing, pre-scaling or spoiler-safe score done properly |
| Trade-offs | None named | Named when asked | Raised unprompted (segment length, bitrate caps, push vs poll, degrade features) |
| Communication | Long silences | Mostly clear | Thought out loud, checked in, managed time |
12 to 14: strong hire signal. 8 to 11: solid, polish the weak rows. Under 8: redo the round in a week, timer on.
The bar: fresher vs SDE-2
| Fresher | SDE-2 | |
|---|---|---|
| Video path | Encoder + CDN | Redundant ingest and encoders, packager, rolling playlists, shields |
| Latency | "Low latency" | Segment length vs buffer, LL-HLS trade-offs, numbers |
| Peak | "Autoscale" | Pre-scaling, load tests, warm caches, graceful degradation |
| CDN | "Use a CDN" | Request collapsing, multi-CDN, ISP caches, bitrate caps |
| Score | WebSocket push to all | CDN-cached polling or in-stream metadata, spoiler-safe by match time |
Common mistakes
- Relying on reactive autoscaling for a spike that arrives in minutes.
- Forgetting the API tier (sign-in, entitlement, home page) while designing only the video path.
- One encoder, one origin, for the biggest event of the year.
- Pushing every ball to every socket without considering cost.
- Showing the score ahead of the video.
Quick check
Five questions on this chapter. Pick an answer, then check it.
quiz