System Design Masterclass
Storagefile-synccloud-storagechunkingdeduplicationconflict-resolutionadvanced

Design Dropbox / Google Drive

Design a cloud file storage and sync system

Billions of files, 500M+ users|Similar to Dropbox, Google, Microsoft, Apple, Box|50 min read

Summary

Cloud file storage systems like Dropbox and Google Drive must handle file uploads, downloads, and most critically - synchronization across multiple devices. The core challenges are efficient sync (only transfer changes), conflict resolution (when same file edited on multiple devices), and deduplication (same file uploaded by millions of users). This is a classic interview question that tests understanding of chunking, metadata management, and eventual consistency.

Key Takeaways

Core Problem

This is fundamentally a synchronization problem. How do you keep files consistent across devices when edits can happen anywhere, anytime, even offline?

The Hard Part

Conflict resolution when the same file is edited on multiple devices while offline. There is no perfect solution - you must choose between last-write-wins, branching, or manual merge.

Scaling Axis

Scale by separating metadata (small, needs consistency) from file content (large, can be eventually consistent). Metadata in database, content in object storage.

The Question: Design a cloud file storage and synchronization system like Dropbox or Google Drive.

The system must support: - File upload/download: Store files in the cloud, access from anywhere - Multi-device sync: Changes on one device appear on all devices - Offline support: Work without internet, sync when back online - Sharing: Share files/folders with other users - Version history: Recover previous versions of files

What to say first

Before I design, let me clarify the requirements. The sync functionality is the hard part here - not just storing files, but keeping them synchronized across devices efficiently. I want to understand the scale, consistency requirements, and how we handle conflicts.

Hidden requirements interviewers are testing: - Do you understand why chunking is essential (not just uploading whole files)? - Can you design efficient delta sync (only transfer what changed)? - How do you handle conflicts when same file edited on multiple devices? - Do you separate metadata from content (crucial for scalability)?

Premium Content

Sign in to access this content or upgrade for full access.