Dropbox System Design (File Sync & Conflict Resolution)
Scenario
Users expect folders to stay in sync across laptops and phones: edits should converge, dedup should save money, and sharing should not turn into a permissions nightmare. The interview stress is metadata scale, conflict handling when two devices edit offline, and bandwidth—not “we store files in S3” without a sync story.
Design a cloud storage and file synchronization service like Dropbox that allows users to store files in the cloud and sync them across multiple devices. Users can share files and folders with others.
Constraints
Upload, auto-sync across devices, share files/folders, version history, offline access with local cache, multi-user edit, search by name/content, folders and organization
Sync within seconds, conflict resolution for simultaneous edits, millions of users and petabytes, 99.9% uptime, encryption in transit and at rest, fast upload/download
100M users, 20M DAU; 100B files (~1000/user), ~50 GB/user → 5 EB; 500M sync ops/day, peak ~10K/s; 10M shared, 100M share accesses/day; 50 TB upload/day, 500 TB download/day