Sub topic 1
Clarifying requirements and scope
Prerequisites
This chapter assumes you know basic web architecture (clients, APIs, databases), how HTTP and caching work, and what object storage and message queues do. You do not need video knowledge yet. Later chapters introduce codecs, containers and bitrate.
Why start with requirements
A video platform can mean many things. A short-clip app, a film library and a live sports service have different costs and different bottlenecks. Before you draw any boxes, decide what you are building. Every later choice, from the bitrate ladder to the CDN contract, follows from these answers.
A good habit is to write down the scope, state your assumptions, and get them confirmed. If an assumption is wrong, you find out before it is built into the design.
Functional requirements
Functional requirements describe what users can do. For this tutorial, the platform is an on-demand service, similar to a video library. The scope is:
- Creators or operators upload source videos.
- The system processes each upload into formats that play on phones, browsers and TVs.
- Viewers browse or search a catalog and play a video.
- Playback adapts to the viewer's network speed.
- Viewers can pause, seek and resume where they left off.
Some items are out of scope for now: live streaming, comments, and payments. Live streaming returns in a later chapter as an extension. Naming what you leave out is part of the requirements.
Non-functional requirements
Non-functional requirements describe how well the system must work. They drive the design more than the feature list does. Give each one a number where you can.
| Requirement | Example target | Design area it affects |
|---|---|---|
| Start-up time | Video starts in under 2 seconds at the 95th percentile | CDN, segment size |
| Rebuffering | Under 1% of watch time spent stalled | Bitrate ladder, ABR logic |
| Availability | 99.9% for playback | Replication, origin design |
| Durability | Source files are never lost | Storage choice |
| Processing time | Upload is playable within 30 minutes | Transcoding capacity |
| Cost | Bounded cost per hour watched | Codec choice, CDN usage |
Note that playback and upload have different targets. Playback is the hot path and must be highly available. Upload and processing can be slower and can retry, because a delay there affects one creator, not every viewer.
Read-heavy by design
Video platforms are extremely read-heavy. A video is uploaded once and watched many times. This shapes the architecture: you optimize the read path (caching, CDN) and accept that the write path (upload, transcoding) is asynchronous and queue-based.
Capturing assumptions
Write assumptions as explicit numbers so you can check them later. The snippet below records a set of example assumptions and derives one value from them.
assumptions = {
"daily_active_viewers": 2_000_000,
"avg_minutes_watched_per_viewer": 45,
"uploads_per_day": 5_000,
"avg_upload_minutes": 10,
}
hours_watched_per_day = (
assumptions["daily_active_viewers"]
* assumptions["avg_minutes_watched_per_viewer"]
/ 60
)
hours_uploaded_per_day = (
assumptions["uploads_per_day"] * assumptions["avg_upload_minutes"] / 60
)
print(f"Watched per day: {hours_watched_per_day:,.0f} hours")
print(f"Uploaded per day: {hours_uploaded_per_day:,.0f} hours")
print(f"Watch-to-upload ratio: {hours_watched_per_day / hours_uploaded_per_day:,.0f}:1")With these numbers, viewers watch 1,500,000 hours per day while creators upload about 833 hours. The ratio of roughly 1,800 to 1 confirms that the read path dominates.
Common errors
- Starting with technology ("we will use Kubernetes") before agreeing on goals.
- Writing vague targets such as "fast" or "scalable" with no number.
- Treating upload and playback as one workload with one set of targets.
- Leaving scope open, so features like live streaming quietly expand the design.
Exercise
A stakeholder says the platform must be "fast and reliable." Rewrite this as two measurable non-functional requirements, and say which part of the system each one mainly affects.
Show answer
Example: "Playback starts in under 2 seconds at the 95th percentile" mainly affects CDN and segment design. "Playback is available 99.9% of the time" mainly affects replication and origin design. Any measurable targets with a matching design area are acceptable.