Design a file sync service
Hard45 minFree, no account
Chunking, deduplication, and sync as a conflict problem rather than a transfer problem.
The question
Design a Dropbox-like service: files in a folder on several devices stay in sync, and are available on the web.
Files are up to 50GB. Users have poor connections and edit offline.
Functional
- Upload, download, and keep a folder in sync across devices.
- Version history, and restoring an old version.
- Sharing a folder with another user.
Non-functional
- 500M users, 100M daily actives.
- A 50GB upload survives a dropped connection and resumes.
- A one-byte change in a large file must not re-upload the file.
- Two devices editing offline must not silently lose one of the edits.
45:00Commit to an answer before you open the solution. Reading it first teaches you to recognise good answers, which is not the skill being tested.
Stuck?
0 of 3 hints takenThe worked solution
written by a person · not a gradeScore yourself
0 of 5 marked- Chunked by content with a rolling hash and justified it against the one-byte case25
- Separated metadata from blocks and kept bytes out of the API tier25
- Gave a cursor-based sync protocol that survives long offline periods20
- Detected conflicts properly and refused to lose an edit20
- Modelled sharing as its own namespace10
We run no AI here and nothing on this page grades you. The score is yours, and the useful number is the one you get on the same problem a month from now, cold.
kept in this browser only