SysPad › Examples › Design Google Drive
Design Google Drive
A Block Server chunks/compresses/encrypts files into Block Storage, a Metadata DB tracks file/block/version relationships separately, a Notification Service syncs other clients on change, and a scheduled job tiers cold blocks to archival storage.
Splitting block storage from metadata, change notification as its own async path, and cold-tiering as a scheduled background job.
- Throughput: 4,000 req/sec
- First to saturate: Nothing at this load
- Estimated cost: $235k/mo
How it works
- Block Server
- Splits a file into blocks, then compresses and encrypts each one. Only changed blocks are uploaded on a sync, which is what makes edits to a large file cheap.
- Metadata DB
- Tracks the file → block → version relationships separately from the blocks themselves, so a sync can diff versions and list blocks without touching object storage.
- Metadata Cache
- Clients poll for changes constantly, so the hot metadata (latest version per file) is cached to keep those checks off the metadata DB.
- Notification Queue
- A change is queued here so the sync fan-out to a user’s other devices happens asynchronously, never blocking the upload that caused it.
Request flows
Sync a file (upload)
- Client (Sync Agent)
- DNS
- API Servers
- Block Server
- Block Storage
- Metadata DB
- Notification Queue
Check for changes
- Client (Sync Agent)
- DNS
- API Servers
- Metadata Cache
- Metadata DB
Sync other devices
- Notification Queue
- Notification Service
Tier cold blocks
- Cold-Tier Schedule
- Block Storage
- Cold Backup