Section 3: Fifty Thousand In, One Hundred Fifty Million Out - Scale Estimation & Workload Analysis
Executive Summary: Derived from viewer behavior, writes come to 50,000 comments per second, an ordinary load. Deliveries come to 150 million per second over 50 million open connections, a 3,000× fan-out driven mostly by large streams. Large streams are also where a per-viewer cap of 10 comments per second keeps that load bounded. Without the cap, the five-million-viewer stream alone would need 25 billion deliveries per second.
The interviewer caps the marker. "Before any boxes. How big is this?" A strong answer sizes two workloads, three orders of magnitude apart, separately. The interviewer's inputs: 50M peak concurrent viewers, 1M concurrent broadcasts, and a largest stream of 5M viewers. That's Aria Vance's v_8812, where Maya and Tomás are watching.
The Write Side: An Ordinary Workload
Most viewers never type, and a few type a lot. Averaged over everyone, assume 1 comment per viewer per 1,000 seconds, about one every 17 minutes.
Peak writes: 50M viewers ÷ 1,000 s = 50K comments/s
Daily average: ≈ 1/3 of peak ≈ 16.7K comments/s
Daily volume: 16.7K/s × 86,400 s ≈ 1.44B comments/day
Mega stream: 5M viewers ÷ 1,000 s = 5,000 comments/s
Across a million videos, 50K appends a second is routine for a partitioned log. Watch the last line: Maya's "Play the acoustic version!!" is one of 5,000 comments per second on a single video.
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