Design a File Storage Service
System Design Cases: lesson 7 of 20
Upload the paragraph that changed, not the ten gigabytes.
Lesson 7 of 20 · 7 min
Design a File Storage Service
Step 1 of 11
A ten-gigabyte document with one paragraph changed. Sending all of it is the answer to beat.
The Idea
Keep one folder identical on several devices and in the cloud. Assume 100 GB per user, files up to 10 GB, and the common case being an edit that changes a single paragraph of a very large document.
Real-World Example
A shared filing cabinet where you only ever swap the one page that changed. Any page already filed under its own label stays where it is, and nobody carries the whole folder across the office.
The Tradeoff
Splitting a file into chunks, hashing each and uploading only the unknown ones turns a 10 GB re-save into a few megabytes, and costs a chunk index plus a full hash on every save. Metadata belongs in a database and the bytes belong in blob storage; mixing them is what kills the database.
Your turn
Put the steps in the right order.
- Tell the user's other devices that a new version exists
- Split the file into chunks and hash each one
- Upload only the chunks the server has never seen
- Ask the metadata service which of those hashes it already holds
Mini quiz
1 / 3