</> MAANG.io

Expert

Design landmark systems in depth, from Dynamo, GFS, Bigtable and Kafka to payments and ads pipelines.

0 of 232 solved 0%

Section 3: The Arithmetic That Makes One Master Possible - Scale Estimation & Workload Analysis

Executive Summary: 30 PB of logical data in 64 MB chunks comes to 500 million chunks. At 64 B each, plus namespace and file lists, doubled for overhead, the master's entire metadata is ~80 GB, which fits a 256 GB machine with 3× headroom. Reads peak near 520 GB/s, but none of those bytes touch the master. Its load is **12,000 RPC/s** against a ~100,000/s in-memory budget, more than 8× headroom. A single master is the simplest correct design until about 2.2 years of growth or a small-file workload pushes metadata past ~192 GB. The resource that actually binds is each chunkserver's network card, at 42% of its NIC during the read peak.

The interviewer points at Section 2's contract. "Size it. Then tell me whether your single master survives the arithmetic." The second sentence is the real question.

The Hardware We Agreed On

You: "Assumptions first, so we argue about the same machines."

Ref Assumption
H1 Chunkserver: 12 HDDs × 10 TB = 120 TB raw; ~150 MB/s sequential per disk (1.8 GB/s per machine), ~10 ms random access; NIC 10 Gbps ≈ 1.25 GB/s; 128 GB RAM
H2 1,000 chunkservers in 40 racks × 25; rack uplinks oversubscribed ~1.5:1
H3 Master: one machine, 256 GB RAM, local SSD for the op log, 10 Gbps NIC; ~0.1 ms round trip per hop

You: "Note that the disks stream 1.8 GB/s but the NIC carries 1.25 GB/s. The network is the narrower pipe."

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.