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)
41.3 What are the doors?
3 min read+10 XP
Step 3: API and data model (10 minutes)
GET /v1/matches/{id}/play (signed in; checks entitlement)
returns: { "playlist": "https://live.cdn…/m42/master.m3u8?token=…",
"score_url": "https://cdn…/m42/score.json", "ads": {...} }
GET <playlist> and <segments> (CDN; token checked at the edge)
GET <score_url> (CDN-cached for ~2 s)
returns: { "match_time": 5132, "text": "IND 126/2 (14.3)", "events": [ ... ] }
The playlist URL carries a short-lived signed token, so the edge can check entitlement without calling our servers for every segment.