Lesson 3 of 16
39. Design File Storage and Sync (Google Drive / Dropbox)

39.2 How big is this, really?

3 min read+10 XP

Step 2: Estimates (5 minutes)

Assume 4 MB blocks, 1,000 files per user on average, about 500 bytes of metadata per file, and 2 changed files of 1 MB per user a day.

WhatWorkingResult
Total stored (before de-duplication)100 million × 20 GB≈ 2 EB
New data a day100 million × 2 × 1 MB≈ 200 TB a day ≈ 2.3 GB/s
Blocks in a 1 GB video1 GB ÷ 4 MB250 blocks
File metadata rows100 million × 1,000100 billion
Metadata size100 billion × 500 bytes≈ 50 TB

What the numbers say, out loud:

  • "Exabytes of bytes belong in object storage (Chapter 11), deduplicated by content. Never in a database."
  • "100 billion metadata rows is big but structured: a sharded database, sharded by user (or by shared folder)."
  • "2.3 GB/s of uploads must go straight from clients to storage (presigned URLs), not through our app servers."

Interviewer pushback:

  • "How much does de-duplication save?" → It depends on the users: shared team files, the same installer or PDF in thousands of accounts. It's an assumption to measure, but every duplicate block is stored once, and unchanged blocks of edited files are never re-uploaded.

Memory code: "Exabytes in blocks, billions of rows in metadata, bytes never through our servers."