System Design Problems
Design Dropbox
Dropbox serves 500M+ users with 2B+ files synced daily. This design covers file chunking, real-time synchronization, conflict resolution, and collaborative editing.
- Scale â 500M+ users, 2B+ files, 10M+ concurrent
- Sync â Real-time with < 1 second propagation
- Storage â Exabytes of user files with deduplication
Dropbox's core challenge is maintaining file consistency across millions of devices while handling conflicts gracefully.
Requirements Clarification
Functional Requirements
- Upload and download files
- Automatic file synchronization across devices
- File versioning and history
- Share files and folders with others
- Offline access with sync on reconnect
- Conflict detection and resolution
Non-Functional Requirements
- Availability: 99.99% uptime
- Durability: 99.999999999% (11 nines)
- Consistency: Strong for file metadata, eventual for content
- Scale: 500M users, 10M concurrent
Back-of-the-Envelope Estimation
High-Level Architecture
File Chunking and Deduplication
Synchronization Protocol
Conflict Resolution
Data Model
Practice Exercises
- Sync Design: How would you handle syncing a 10GB file where only 1 byte changed?
- Conflict: Design a conflict resolution system for collaborative document editing.
- Offline: How would you handle a user editing files offline for a week, then reconnecting?
- Storage: Design a deduplication system for 1 EB of user files.
What to Learn Next
-> Design Google Search Web-scale indexing and search.
-> Design WhatsApp Messaging and real-time delivery.
-> Idempotency Handling duplicate requests safely.
-> Outbox Pattern Reliable event publishing.
-> Strangler Fig Incremental migration strategies.
-> Retry Patterns Resilient retry mechanisms.