How a System Handles 30 Million Simultaneous Video Views

The article breaks down how QuickTok supports 30 million concurrent video streams by calculating QPS, storage and bandwidth needs, then applying HDFS with HBase indexing and aggressive CDN pre‑warming to shrink traffic from 88 Tbps to under 4 Tbps.

Code Farming
Code Farming
Code Farming
How a System Handles 30 Million Simultaneous Video Views

At 1 a.m., a casual cat video triggers about 110 000 playback requests per second; QuickTok, serving 2 billion users with 30 million viewers online simultaneously, must scale to this load.

Step 1 – Quantify the load

With 1 billion daily active users each watching 10 videos, daily plays reach 100 billion, which translates to roughly 110 k QPS. Assuming an average 5‑minute watch time, about 30 million videos are streamed concurrently. This multiplication is the foundation for all subsequent design decisions.

Step 2 – Storage and bandwidth bottlenecks

Upload volume is 550 videos per second, each 100 MB, resulting in 1 700 PB of new video data per year. Because videos are stored with three replicas, annual storage climbs to 5 200 PB. Bandwidth demand is 110 k QPS × 100 MB × 8 bits ≈ 88 Tbps, a scale no single data center can sustain.

Step 3 – HDFS combined storage and HBase indexing

QuickTok chooses HDFS for its write‑once‑read‑many pattern and built‑in triple replication. To avoid the NameNode memory explosion caused by millions of tiny files, videos are concatenated into large HDFS files. An HBase index maps each video ID to its file path, offset, and size, enabling a single HBase lookup at playback time to read the correct segment directly from the large file.

Step 4 – CDN pre‑warming to shrink bandwidth

Instead of relying on the traditional "miss‑then‑origin" flow, QuickTok proactively warms CDN nodes. When a popular creator (over 100 k followers) uploads a video, the system calculates the active regions of the fans and pushes the video to CDN edge servers in those regions. Because short‑form videos have a completion rate below 30 %, only the first few chunks are cached. This strategy pushes 95 % of traffic to the CDN, leaving less than 4 Tbps for the data center.

The overall design forms a causal chain: quantify QPS, storage, and bandwidth → use HDFS with HBase to solve "cannot store" → employ CDN pre‑warming to solve "cannot transmit" → add streaming and thumbnail recommendation to improve user experience. The article concludes with interview advice: before drawing component diagrams, first calculate concurrency, storage, and bandwidth requirements.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

scalabilitySystem DesignCDNhigh concurrencyvideo streamingHDFS
Code Farming
Written by

Code Farming

Senior engineer at a top internet giant, sharing Java, AI, tech knowledge, growth insights, and interview experiences.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.