Sync My Folder

Design a file sync service (Dropbox or Google Drive style) that keeps a chosen folder byte-identical across every device a user owns, and across the people they share it with.

Requirements

Functional:

  • Sync files and folders across desktop and mobile clients, including renames, moves, and deletes.
  • Upload efficiently: never re-send bytes the system already stores, and send only the changed part of a large file.
  • Edit while offline, then reconcile on reconnect without losing work.
  • Detect concurrent edits to the same path and resolve them deterministically.
  • Share a folder with other accounts at viewer or editor permission.

Non-functional:

  • Durability first: an acknowledged commit must never lose file content.
  • Commit acknowledgement p99 under 300 ms; a change lands on a second online device p95 under 3 s.
  • Read-heavy download path with hot shared content.
  • Per-device abuse controls and per-account quota.

Scale

  • 12M daily active users, about 3 devices each, roughly 15M devices connected at peak.
  • 60 changed files per active user per day (720M file changes/day, about 8.3k commits/s average and 25k/s peak).
  • Average 1.2 MB of changed content per file, so about 864 TB/day arrives before deduplication.
  • Average chunk 4 MB; existing corpus around 100 PB.
  • Metadata rows about 300 bytes each.

Out of scope

Real-time collaborative document editing (operational transform or CRDT text merge), search ranking, billing, and desktop installer or filesystem-driver work.