← Questions

Design Dropbox: file sync and sharing across devices

0
DatabricksGoogleMicrosoft+4System designLast asked Jan 2026

Design a file sync service like Dropbox. Users' files stay in sync across their devices and in shared folders. Large files upload reliably over poor connections, only the changed parts of a file are transferred, and conflicting edits are handled without losing anyone's work.

Requirements

  • Functional: upload and download files of any size; sync changes to all of a user's devices; share folders with other users; version history and restore; offline edits that sync later; conflict handling.
  • Non-functional: many millions of users; files up to many gigabytes; uploads resume after interruption; changes appear on other devices within seconds; no data loss.

Clarifying questions

  • How many users, files per user and changes per day?
  • What file sizes, and how often do files change?
  • How should conflicts be shown: conflicted copies, or merging?
  • How long is version history kept?
  • Do we need real-time collaboration inside files, or only file-level sync?

What a strong answer covers

  • A client that watches the file system, splits files into chunks with content hashes, and uploads only chunks the server does not have.
  • Metadata service: files, versions, the list of chunks per version, and a per-user (or per-namespace) change journal with a cursor.
  • Block storage for chunks in object storage, with deduplication by hash.
  • Sync: clients long-poll or keep a connection to learn about new changes, then fetch the metadata and missing chunks.
  • Conflicts: detecting edits to the same base version, keeping both as a conflicted copy, and why.
  • Sharing and permissions, resumable uploads, bandwidth limits, and consistency of metadata vs blocks.

Follow-ups

  • A user edits the same file on two devices while offline.
  • A shared folder has 10,000 members and a file changes.
  • A user moves a folder with a million files.
  • Reduce storage cost for files that are rarely opened.
Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing