Part VI β The Blueprint Β· Lesson 11.5
HLD β Video Streaming (Netflix)
In one lineAdaptive bitrate keeps the buffer full β every other decision serves that one goal.
Where you've seen itVideo quality softening for a few seconds in a tunnel, then recovering, without ever showing a spinner.
Diagram
1β2 Β· SCOPE AND SCALE
in scope browse rows Β· title page Β· player Β· continue watching
out recommendations ML Β· billing Β· downloads Β· profiles admin
scale 250M subscribers Β· 4K streams up to 25 Mbps
TV / laptop / phone Β· network varies mid-playback3 Β· ARCHITECTURE
ββββββββββ manifest (HLS/DASH) βββββββββββββββ
β Player ββββββββββββββββββββββββΊβ CDN edge β
βββββ¬βββββ 2β10s segments βββββββββββββββ
β β²
β metadata, rows, continue-watching β segments pre-positioned
βΌ β at edges worldwide
βββββββββββ ββββββββββββββββββββββββββββ
β BFF βββββββββΊβ catalog Β· playback Β· CDN β
βββββββββββ β auth (DRM licence) β
ββββββββββββββββββββββββββββ6a Β· DEEP DIVE β THE ABR LADDER
the same title, encoded many times
2160p 25 Mbps ββββββββββββββββββββββββ
1080p 5 Mbps ββββββ
720p 3 Mbps βββ
480p 1 Mbps β
240p 300 kbps β
each rendition is cut into 2β10s segments; the manifest lists them
every segment boundary, the player asks:
measured throughput + current buffer level
β
ββ buffer healthy & bandwidth up β step UP one rung
ββ buffer draining β step DOWN immediately
ββ never jump more than one rung up (avoids oscillation)6b Β· DEEP DIVE β BUFFER STATE MACHINE
[empty] ββfill 2sβββΊ [playable] ββfill 30sβββΊ [healthy]
β² β β
β β drains β drains
β βΌ βΌ
βββββββ [rebuffering] βββ drop bitrate βββ [low]
β² THE thing to avoid: users tolerate
lower quality far better than a stall
Startup: request the LOWEST rung first β playback begins in <1s,
then climb. Starting high looks better and feels worse.How it works
- HLS or DASH manifest lists renditions and segments; the player (hls.js / Shaka via Media Source Extensions) does the switching.
- Start low, climb fast β time-to-first-frame beats initial sharpness.
- Prefer dropping quality over stalling. Rebuffering is the metric that correlates with abandonment.
- Preload smartly: the next episode's first segments during the end credits; hover previews at the lowest rung only.
- Resume position synced to the server every ~10s and on
visibilitychange, so any device continues where you stopped.
Trade-offs
| Choice | Cost |
|---|---|
| Short segments (2s) | Faster adaptation, more requests |
| Long segments (10s) | Fewer requests, slower reaction |
| Large buffer | Resilient, wastes data if abandoned |
| Start at lowest rung | Fast start, first seconds look soft |
Cross-cutting: DRM licence acquisition before first frame, captions and audio-description tracks as accessibility requirements (8.1), and player telemetry β startup time, rebuffer ratio, average bitrate β as the core quality metrics (7.2).
Interview angle
"The video keeps stalling on mobile. What do you change?"
- Check the buffer policy first: the player should drop a rung on a draining buffer rather than defending quality.
- Shorten segment length so adaptation reacts faster, and cap the maximum rung on small screens where 4K is invisible anyway.
- Verify with rebuffer ratio in telemetry, not by watching it once on a good connection.
Recap
- Keep the buffer full; quality is the variable you trade to do it.
- Start at the lowest rung for a sub-second first frame, then climb.
- Rebuffer ratio, not resolution, is the metric users actually feel.