Skip to content
All problems

Design a file sync service (Dropbox-style)

breadth mode45 minsenior/staff

Setting

You're building the sync engine behind a cloud storage product: a user edits files in a local folder on multiple devices, and every device should converge to the same contents without the user thinking about it.

The ask

Design the system that detects a local file change, uploads it efficiently, and propagates it to the user's other devices — including handling two devices editing the same file while offline.

Constraints & scale

  • ~500M files synced across ~100M devices; average file is small, but some files are multi-GB
  • Only the changed portion of a large file should be re-uploaded/re-downloaded on an edit, not the whole file
  • A device that's been offline for weeks must catch up correctly without re-downloading everything from scratch
  • Two devices editing the same file while both offline is a real case — the system must not silently lose either version
  • Sync should feel near-instant for small edits on a good connection, and must not saturate a slow connection so badly the device becomes unusable

What a strong answer covers

Requirements → estimates → chunking/diffing approach → data model (file versions, device state) → high-level diagram (client watcher, sync protocol, storage) → 1–2 deep dives → trade-offs. Likely probes: block-level diffing for large files, conflict detection and resolution, and how a long-offline device resyncs efficiently.

Graded on

Every session — this problem included — is scored against the same 10-dimension senior/staff rubric:

Requirements & scopingEstimationAPI & data modelHigh-level architectureDeep diveScalability & performanceReliability & consistencyTrade-offsOperabilityCommunication & drive