Back-of-the-envelope

Sizing is the part of a design interview people skip, and it is the part that decides every later answer. Put the scale in, and the numbers that follow tell you which component breaks first.

Estimates

231

Writes/sec (avg)

694

Writes/sec (peak)

3× average

23K

Reads/sec (avg)

69K

Reads/sec (peak)

38 GB

New data per day

41 TB

Total stored

365d × 3 copies

3.8 Mbps

Write bandwidth

379.3 Mbps

Read bandwidth

2.7 TB

Cache for hot 20%

single copy

These are order-of-magnitude numbers, which is all they need to be. The point of the exercise is to find the component that breaks first: at 69K reads/sec you are past what one relational primary serves, and at 41 TB you are past one machine.

Latency numbers worth memorising

L1 cache reference~1 ns
Main memory reference~100 ns
Compress 1KB~2 µs
SSD random read~100 µs
Read 1MB sequentially from memory~100 µs
Round trip within a datacenter~500 µs
Read 1MB sequentially from SSD~1 ms
Disk seek (spinning)~10 ms
Round trip CA → Netherlands~150 ms