39. Design File Storage and Sync (Google Drive / Dropbox)
1
The interview prompt2
39.1 What do you ask first?3
39.2 How big is this, really?4
39.3 What are the doors?5
39.4 What do we store?6
39.5 What does the whole system look like?7
39.6 How does chunking work?8
39.7 How does de-duplication work?9
39.8 How do sync and conflicts work?10
39.9 How is the metadata database designed?11
39.10 How do presigned uploads work?12
39.11 What would you say in the last five minutes?13
Score yourself14
Variations to practise15
Sources16
Code lab39. Design File Storage and Sync (Google Drive / Dropbox)
Variations to practise
3 min read+10 XP
Chapters used
Approach (1), Estimation (2), Blob storage and presigned URLs (11), Replication (14), Sharding (15), Transactions and optimistic locking (17), Polling vs push (21), APIs and idempotency (24), CDNs (26).
Try these variations
Each is a common follow-up. Answer in two minutes, then check the sketch.
- "Share a folder with 10,000 people." → The folder is its own namespace; members' devices sync its journal; ACL checks on every download URL; notifications fan out (Chapter 23).
- "Restore everything to yesterday after ransomware." → For each file, point the latest version back to yesterday's block list: a metadata-only operation.
- "Photos only, like Google Photos." → Same block storage, plus thumbnails and metadata extraction in a processing pipeline, and an index for search by date and place.
- "Edit Word documents together in real time." → A different design: an operation log per document with OT or CRDTs, a WebSocket per editor, and periodic snapshots into the file store.