Part VI — The Blueprint · Lesson 11.7
HLD – Live Commentary (CricInfo, Cricbuzz)
In one lineOne event fans out to millions of read-only clients — the design problem is broadcast, not interaction.
Where you've seen itA wicket in a World Cup final. Nobody is sending anything; everybody is receiving the same thing at once.
Diagram
| Step 1–2 | Scope and scale |
|---|---|
| In scope | live score · ball-by-ball commentary · scorecard |
| Out of scope | chat · betting · video · fantasy leagues |
| Scale | 10M concurrent at peak · 1 event every ~30s normally, bursts around wickets · traffic 50× baseline in minutes · READ-ONLY: clients never write |
Lessons in this diagram2.5 Server-Sent Events
6a · DEEP DIVE — TRANSPORT CHOICE AND FALLBACK
primary SSE one-way · plain HTTP · free reconnect
fallback short poll for proxies that block streaming (2.2)
10s interval + ETag → cheap 304s
degrade under extreme load:
normal push every event
spike coalesce: one update per 2s carrying the latest state
extreme fall back to polling a CDN-cached score.json (TTL 5s)
← survives ANY load, because it's just a cached fileHow it works
- SSE per client, terminated at edge PoPs so no single origin holds ten million connections.
- Send deltas, not the whole scorecard — a ball event is tiny; the full state is not.
- Include a monotonic event id so reconnects resume via
Last-Event-IDwith no gap (2.5). - Coalesce under load: batch to one update every second or two; nobody perceives the difference.
- CDN-cached JSON with a short TTL as the guaranteed fallback — it scales infinitely because it's a static file.
Trade-offs
| Choice | Cost |
|---|---|
| SSE | No client→server channel (not needed here) |
| WebSocket | Duplex you don't use, harder scaling |
| CDN-cached polling | Up to TTL seconds stale; infinitely scalable |
| Delta events | Client must hold and patch state correctly |
Interview angle
"Ten million concurrent viewers. WebSocket or SSE?"
- SSE: the traffic is entirely one-way, and reconnect plus replay come free, which is the expensive part of a WebSocket build.
- Terminate connections at edge PoPs fanning out from pub/sub, so the origin publishes once.
- Then name the degradation ladder: full push → coalesced push → CDN-cached JSON polling, so peak load has a floor.
Recap
- Read-only fan-out means SSE, not WebSocket.
- Send deltas with event ids; reconnect resumes automatically.
- Always have a CDN-cached polling fallback — it's the only mode that can't be overwhelmed.