← Questions
Design Dropbox: file sync and sharing across devices
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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.
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. Free with an account: one full answer per company.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. Free with an account: one full answer per company.
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing


