Design Netflix: adaptive streaming and CDN delivery
Netflix
Guided ModeThe Playback Request Flow
When a viewer hits Play, the first goal is simple: get a signed URL pointing at their video segments as fast as possible. The Playback Service owns this β it authenticates the session, checks entitlement, and returns the manifest URL. The client then fetches segments directly from the CDN.
Request Flow
Client β Load Balancer
The viewer's app sends a play request. The Load Balancer distributes the request across API Gateway instances β round-robin across availability zones. No sticky sessions here; the play request is stateless.
API Gateway β Playback Service
The API Gateway routes the play request to the Playback Service, which validates the DRM token, checks subscription entitlement, and generates a signed CDN manifest URL. Target latency: <15ms.
CDN delivers segments
The Playback Service returns a manifest URL. The client's player resolves it at the CDN edge closest to the viewer. Segments are fetched directly from the edge β the API Gateway is completely off the hot path for video bytes.
Key Insight
The API never touches video bytes. It returns a signed URL, then the client talks directly to the CDN. This is the single most important architectural decision in a video platform β your API cannot scale to handle 15% of global internet traffic.
Step 1 of 7
