Quick revision
The short answer
A video platform has three paths. Uploads go in parts straight to object storage through pre-signed URLs, processing transcodes the file into a ladder of renditions cut into short segments with HLS or DASH manifests, and playback hands the player a signed manifest so it fetches segments from a CDN. Adaptive bitrate streaming keeps playback going because the player measures its throughput and buffer and switches to a lower rendition at the next segment boundary when bandwidth drops.
What to remember
In this answer, we designed the three paths of a video platform. Uploads go in resumable parts straight to object storage through pre-signed URLs while the video moves from UPLOADING to PROCESSING. Processing transcodes a ladder of renditions, cuts aligned segments, writes HLS or DASH manifests and thumbnails, and marks the video READY. The database holds videos and renditions, segments live in object storage, and busy counters live in their own stores. Playback returns a signed manifest, and adaptive bitrate streaming lets the player step down a rendition at the next segment boundary when bandwidth drops, while immutable segments let the CDN do almost all the serving.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
A video platform has three paths. Uploads go in parts straight to object storage through pre-signed URLs, processing transcodes the file into a ladder of renditions cut into short segments with HLS or DASH manifests, and playback hands the player a signed manifest so it fetches segments from a CDN. Adaptive bitrate streaming keeps playback going because the player measures its throughput and buffer and switches to a lower rendition at the next segment boundary when bandwidth drops.
Why this question is asked
Video is the classic system design question because it forces us to separate three very different workloads: a few large, slow uploads, heavy batch processing, and an enormous read path that must work on a train with a weak signal. Interviewers want to see that we keep the big bytes away from our application servers and that we understand why a video is never sent as one file. In this answer, we will size the problem, walk through the upload path and its states, the processing pipeline, the data model, the playback API, and finally how adaptive bitrate streaming survives a bandwidth drop.
1Requirements and Rough Numbers
Viewers expect playback to start in about two seconds and never to stall, and reads dwarf writes: a popular video is uploaded once and watched millions of times.
Suppose 100 million views a day, each about 20 minutes at an average of 3 Mbps. One view is 20 x 60 x 3 = 3,600 megabits, about 450 MB, so the day adds up to roughly 45 PB of video sent to viewers. Spread over 86,400 seconds that is about 4 Tbps on average and two or three times that at the evening peak. No set of application servers should carry that, which is why almost every byte of viewing traffic comes from a content delivery network (CDN), a fleet of caching servers placed close to viewers. Our own systems mostly handle metadata and the small number of requests the CDN cannot answer.
2The Upload Path
A two-hour 4K file can be 50 GB. Sending it through our API servers would tie up their connections and memory for hours, and a dropped connection would restart everything. So the client first opens an upload session with a small API call. The server creates a video row in the UPLOADING state and answers with a list of pre-signed URLs, each one a temporary, signed permission to write one part directly into object storage such as Amazon S3 or Google Cloud Storage.
The client then sends the file in parts of, say, 16 MB, in parallel, straight to object storage. If the network drops at part 900 of 3,000, the client asks which parts arrived and resends only the missing ones, so uploads are resumable. When every part is there, the client calls complete, the server asks the storage service to join the parts, moves the video to PROCESSING and puts a processing job on a queue.
Notice that our API never touches the video bytes. It only signs permissions and records states, so a handful of servers can coordinate thousands of uploads at once.
3Processing: From One File to a Ladder of Segments
A player cannot use the uploaded file as it is. It may be a huge camera format, and it has only one quality. Processing turns it into what players need. A worker first probes the file for its duration, resolution and codecs. It then transcodes it into a ladder of renditions, each a version at one resolution and bitrate, for example 240p at 400 kbps up to 1080p at 5 Mbps, or 4K at around 15 Mbps for sources that have it.
Each rendition is then cut into segments of a few seconds, commonly 2 to 6, and the worker writes manifests. A manifest is a small text file listing the segments; HLS (used by Apple devices and most players) calls it a playlist with the .m3u8 extension, and MPEG-DASH uses an XML file called an MPD. A master manifest lists the renditions with their bandwidth, and each rendition has its own playlist of segments. The worker also extracts thumbnails, then marks the video READY so the API starts offering it.
- Probe the sourceduration, resolution, codecs
- Transcode the ladder240p, 360p, 480p, 720p, 1080p, each at its bitrate
- Cut into segmentsa few seconds each, aligned across renditions
- Write manifestsmaster manifest plus one playlist per rendition
- Extract thumbnailsposter image and preview frames
- Mark the video READYnow playable
6 steps in order. Play them, or step through them one at a time.
The segments of all renditions start and end at the same moments in the video. That alignment is what later lets a player jump from one quality to another between two segments without a glitch.
4The Data Model
Metadata is small and relational, so PostgreSQL or MySQL is a sensible home. The video bytes live in object storage under predictable keys, and the database only stores where to find them.
There is no segments table: the playlist already lists them, so segments are simply objects under video/rendition/segment keys.
View counts and watch progress are kept out of these tables on purpose. They are written constantly, every few seconds per active viewer for progress, so they go to stores built for many small writes, such as a counter service fed by Kafka events and a key-value store like Cassandra or Redis keyed by user and video. Keeping them separate means a viral video's view counter cannot slow down the metadata database.
5The Playback Path
When a viewer presses play, the app calls GET /videos/{id}/playback. The API checks that the video is READY and that this viewer may watch it, then returns a signed manifest URL: a CDN address with a signature and an expiry time, so the link cannot be shared forever. The player downloads the master manifest, picks a starting rendition, downloads that rendition's playlist, and starts fetching segments from the CDN.
8 messages in order. Play them, or step through them one at a time.
The API answers one small call; every byte of video comes from the CDN.
6How Adaptive Bitrate Streaming Survives a Bandwidth Drop
Adaptive bitrate streaming (ABR) means the player, not the server, chooses the quality of each segment. While it downloads, it measures two things: the throughput of recent segments and how many seconds of video are already in its buffer. Suppose the viewer is watching 1080p at 5 Mbps with 20 seconds buffered, and the train enters a tunnel where throughput falls to 1.5 Mbps. Downloading a 4-second 1080p segment would now take about 13 seconds, longer than the 4 seconds it plays for, so the buffer would drain.
The player notices the throughput drop and the shrinking buffer, and for the next segment it requests the 480p rendition at about 1.2 Mbps instead. Because all renditions are cut at the same boundaries, segment 43 at 480p follows segment 42 at 1080p seamlessly. The picture becomes softer, but it keeps moving, and the 20 seconds of buffer give the player time to react before anything stalls. When throughput recovers, the player climbs back up one rung at a time, usually more cautiously than it came down, so it does not bounce between qualities.
| Rendition | Bitrate | Chosen when |
|---|---|---|
| 240p | 400 kbps | very weak signal, buffer almost empty |
| 480p | 1.2 Mbps | throughput around 1.5 to 2 Mbps |
| 720p | 2.8 Mbps | throughput around 4 Mbps |
| 1080p | 5 Mbps | throughput steady above about 7 Mbps, buffer healthy |
7Why the CDN Can Cache Segments So Well
Once written, a segment never changes. If we re-encode a video, we write new segments under new keys. That immutability lets the CDN cache segments with very long lifetimes, such as a Cache-Control max-age of a year, without any risk of serving stale content. For a popular video, the first viewer in a city causes one fetch from origin storage and the next million viewers are served from the edge. The origin therefore serves only cache misses, mostly the long tail of rarely watched videos, and its load stays a small fraction of the 4 Tbps that viewers receive.
8Follow-up questions
Why not stream the whole MP4 file with HTTP range requests?
Progressive download of one MP4 works for a single quality, but it cannot switch quality when bandwidth changes, so a weak connection stalls instead of degrading. Segments with manifests let the player change rendition every few seconds, and small fixed objects are also far easier for a CDN to cache than ranges of a large file.
9Conclusion
In this answer, we designed the three paths of a video platform. Uploads go in resumable parts straight to object storage through pre-signed URLs while the video moves from UPLOADING to PROCESSING. Processing transcodes a ladder of renditions, cuts aligned segments, writes HLS or DASH manifests and thumbnails, and marks the video READY. The database holds videos and renditions, segments live in object storage, and busy counters live in their own stores. Playback returns a signed manifest, and adaptive bitrate streaming lets the player step down a rendition at the next segment boundary when bandwidth drops, while immutable segments let the CDN do almost all the serving.
Open with
I would split the system into upload, processing and playback. For upload, the client opens an upload session, the API creates the video in the UPLOADING state and returns pre-signed URLs, and the client sends the file in parts directly to object storage like S3, so it is resumable and our servers never carry the bytes.
Then, if they want more
On complete, the video goes to PROCESSING and a job is queued. Processing probes the file, transcodes a ladder of renditions, say 240p to 1080p at several bitrates, cuts each into segments of a few seconds aligned across renditions, writes HLS or DASH manifests and thumbnails, and marks the video READY.
The data model is a videos table with owner, title, status and duration, a renditions table with resolution, bitrate, codec and manifest path, and segments stored as objects under video, rendition, segment keys. View counts and watch progress go to separate high-write stores.
For playback, GET /videos/{id}/playback returns a signed manifest URL; the player reads the master manifest and fetches segments from the CDN. Adaptive bitrate works because the player measures throughput and buffer level, and when bandwidth drops it requests a lower rendition at the next segment boundary, using the buffer as a cushion.
Segments are immutable, so the CDN caches them for a long time and the origin only sees misses.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Describe the upload, processing and playback paths of a video streaming platform with...": https://scrivio-interview-library.netlify.app/architecture/system-design-problems/0f402d9304/