</> MAANG.io
system design · 101

Foundations

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/81 solved 0% complete

What Happens When You Press Play on a Video?

maang.io System Design Series


What is this?

You're on the couch, phone in hand. You tap the play button on a 4K trailer, and in well under a second it starts — crisp, full resolution, no spinning wheel. A minute in, someone fires up the microwave and your wifi staggers. The picture softens for a beat, then sharpens back up. You barely notice. You certainly never see a frozen frame and a loading ring.

That tiny moment — tap to first frame, and then staying smooth through a network hiccup — is one of the most beautifully engineered experiences on the internet, and almost none of it is what a beginner would guess. There is no single giant video file being downloaded. The video doesn't even come from wherever the streaming company's servers live. And the quality you're watching was chosen for you, segment by segment, by your own player, in real time.

This scenario ties together a cluster of 101 building blocks — DNS, the CDN, HTTP, Caching, the Load Balancer, and TCP/UDP — into one story whose two main characters are the CDN (which brings the video physically close to you) and adaptive streaming (which keeps it from ever stalling). Let's trace your tap from the screen all the way to the pixels.

The one-line idea: pressing play doesn't fetch one big file — it fetches a manifest that describes the video as many small segments at several bitrates, then your player streams those segments one at a time from a nearby CDN edge, constantly re-choosing the quality to match your current bandwidth. Proximity (CDN) makes it start fast; adaptation (ABR) makes it never freeze.

The two ideas reinforce each other. The CDN answers "where does the data come from?" with "a server a few miles away, not an ocean away." Adaptive bitrate answers "how much data, right now?" with "exactly as much as your connection can carry this second." Get both right and a 4K stream feels instant and unbreakable. Let's walk it.


Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.