LESSON 01 · Scope and demand

Define the file service

Separate storage, sharing, and cross-device sync before sizing the system.

SYSTEM VIEW

The file path

Diagram view
Peak uploads—
Peak data—
Per year—

Watch a file service sized from its daily uploads, then see which numbers mislead.

  1. A file service has five jobs: upload, download, sync, revision history and sharing. The Laptop uploads a file, the File API stores its bytes and its name, and the Phone syncs it. Sync treats files as opaque bytes and never merges keystrokes.

    Clarify
    size, offline edits, retention
    Separate problem
    collaborative editing

    What changed

    • Bytes in Object storage
    • Name and revision in Metadata DB
    • File synced to the Phone
  2. Size operations first. As an example, 6 million daily users upload three files each: about 18 million uploads a day, or 210 upload starts a second on average. If peak is twice the average, the File API sees about 420 a second.

    Daily users
    6 million
    Uploads
    3 each a day
    Average
    210/s

    What changed

    • Users in place of the devices
    • 18 million uploads a day
    • 210/s average, 420/s at peak
  3. Size bytes separately. At 800 KB a file, 18 million uploads add 14.4 TB of new originals to Object storage each day, before versions and replicas. At the 420/s peak, the File API carries about 330 MB of file data a second.

    Per file
    800 KB
    Per day
    14.4 TB
    At peak
    420 × 800 KB

    What changed

    • 14.4 TB of originals a day
    • 330 MB/s at peak
    • Before versions and replicas
  4. Over a year, 14.4 TB a day adds about 5.3 PB of originals to Object storage. With three full copies of every file, that is roughly 16 PB a year, still before keeping old versions.

    Originals
    5.3 PB
    3 full copies
    16 PB

    What changed

    • 5.3 PB of originals a year
    • 16 PB with 3 full copies
  5. Averages hide the tails. A 4 GB video from the Phone on a 20 Mbit/s uplink takes about 27 minutes, and its upload session stays open the whole time. The number of open sessions can matter more than starts per second.

    Video
    4 GB
    Uplink
    20 Mbit/s
    Upload
    about 27 min

    What changed

    • Phone uploads a 4 GB video
    • One session open 27 min
  6. Reserved quota is not occupied storage. 40 million accounts with 15 GB each promise 600 PB, a number in Metadata DB that says little about the 16 PB a year uploads write, copies included. Estimate from uploads, file sizes, versions, retention and copies.

    Accounts
    40 million
    Quota each
    15 GB
    Promised
    600 PB

    What changed

    • 600 PB of quota promised
    • Object storage gains 16 PB a year
    • Estimate from uploads, not quota
  7. Sync is the expensive part, with a change log and device state to run. If a product needs only upload and download, Object storage with signed URLs may be the whole system: Users upload and the Phone downloads straight from it.

    Without sync
    no change log or device state
    Access
    signed URLs

    What changed

    • No File API or Metadata DB
    • Signed URLs straight to Object storage

Space plays · ← → step · Home resets

THE IDEA

How it works

The core jobs are upload, download, cross-device sync, revision history, and sharing. Clarify file size, clients, offline edits, sync delay, retention, and deletion behavior. Real-time collaborative document editing is a separate problem: file sync treats a file as opaque bytes and does not merge simultaneous keystrokes, while an editor such as Google Docs models each keystroke as an operation.

Size operations and bytes separately. As an example, assume 6 million daily users, three uploads each per day, and 800 KB per file: about 18 million uploads and 14.4 TB of new originals each day before versions and replicas. That is roughly 210 average upload starts per second, or about 420 if peak is twice the average, carrying around 330 MB per second of file data. A year adds about 5.3 PB of originals, or roughly 16 PB with three full copies.

Averages hide the tails. A 4 GB video on a 20 Mbit/s uplink takes about 27 minutes, so the number of open upload sessions can matter more than starts per second. Reserved quota is not occupied storage either: 40 million accounts with 15 GB each promise 600 PB, which says little about what they actually store.

Sync is also the expensive part of this design. If a product needs only upload and download, object storage with signed URLs may be the whole system, with no change log or device state to run.

DECISION POINT

A teammate multiplies all accounts by their free quota and calls the result today’s storage use. What is wrong?

Write a sentence or two to unlock the guidance. Committing first is what makes it stick.

Keep in mind

  • Scope file sync and collaborative editing separately.
  • Estimate operation rate, occupied bytes, revisions, and peak bandwidth independently.
CHECK YOUR UNDERSTANDING

Put it into practice.

1 OF 2
RecallQUESTION 01

Which task is outside basic file synchronization?

Choose an answer. You’ll see the explanation once you get it right.

Next lesson

0 of 2 checkpoints answered correctly to complete this lesson.