Dropbox
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Design Dropbox / Google Drive: the 60-second story

    Design Dropbox / Google Drive

    Save a 2 GB wedding video in Pune. Minutes later, it’s in Toronto.

    Under that promise sit three hard problems: move few bytes, keep offline devices agreeing, store exabytes for years.

    280

    Gbps uploading at the weekday-morning peak

    Assume a billion commits a day, each adding 1 MB after dedup and compression. Bytes on that scale must bypass the application servers.

    Where do the bytes go?

    Bad: Through the API

    One drop restarts a 50 GB upload from zero.

    Good: Straight to a block store

    4 MB blocks named by SHA-256, uploaded in parallel. Commit the list last.

    Wi-Fi drops after 8,400 of 12,500 blocks. Start over?

    No. Commit again, and the server lists the 4,100 still missing. There’s no upload session; the stored blocks are the progress record.

    150 million devices are online at peak, and almost none has news.

    The trick

    A notifier says only “namespace 42 changed”. Devices pull journal rows after their cursor. Notifications are hints; the journal is the truth.

    Asha edits on a flight, Ravi at the office. Same file.

    Both began at revision 17, and Ravi’s commit made 18. Asha’s names stale parent 17, so hers becomes a conflicted copy.

    Never lose an edit

    1. Every commit names the revision it edited
    2. Stale parent? Keep a conflicted copy
    3. Never let device clocks decide
    4. Three trees, remote, local and synced, show which side changed

    Skip uploads anyone already stored. What could leak?

    A skipped upload means “someone has this file”. Try every “Salary: ₹X” in an offer-letter template. So dedup across users only on the server.

    5 EB

    of user data, mostly never read again

    Every 0.1× of storage overhead costs 500 PB of disk. Replicate fresh blocks; move cold ones to fragments across three regions.

    Remember

    Hashed blocks go straight to storage; a per-namespace journal orders every change. Devices wake on hints and pull after their cursor, and stale commits become conflicted copies.