Design a Cloud File Storage System
Design a Drive-like service for durable, chunked file storage, sharing, versions, and multi-device synchronization. Audit a first-letter photo placement plan and its database-cost drivers.
Problem statement
A reported Drive-like system-design interview focused on splitting a large file into chunks, keeping those chunks in a block-storage service, and maintaining file metadata separately.
For this complete practice scenario, design a cloud file storage system where users upload and download large files, organize folders, share files with permissions, retain versions, and synchronize changes across devices.
Explain how a committed file version maps its ordered chunks to durable block identifiers and how metadata publication prevents an incomplete upload from appearing as a finished file. Treat the stated traffic and product boundaries as practice assumptions rather than source facts.
A managed object store may serve as the block-storage tier.
A separate reported photo-sharing starting design accepts photo uploads and shareable links, places photos on 26 servers by the first character of the user name, and maps Sundar to server 19 for S. It asks what is wrong with that design and what parameters determine database cost.
Audit this starting placement while preserving the cloud-file capabilities above. The report does not provide a name distribution, traffic, photo sizes, replication, prices, rename rules or migration protocol.
For this exercise, keep the 26-letter rule as a plan to evaluate rather than a required production placement strategy. State how case and non-A–Z names are treated, distinguish file count from byte/request/transfer load, and test skew, hot users, unequal capacity and server failure.
Choose and justify stable-ID placement or an indirection alternative. If you change placement, verify copies before atomically switching the versioned placement mapping; preserve the prior read path and reference-safe cleanup while uploads and authorized downloads continue.
Do not derive a stored photo location from a mutable name after publication. Estimate metadata database cost separately from blob/block storage and delivery, using measured workload and unit prices with explicit units, retention, indexes, replicas and migration overhead; no quoted price is a source fact.
What to build
- For this practice scenario, users can upload, resume, download, and delete files, including large files split into durable chunks.
- For this practice scenario, users can organize files and folders and rename or move them.
- For this practice scenario, owners can share files or folders with viewer or editor permissions and revoke access.
- For this practice scenario, users can inspect and restore recent file versions.
- For this practice scenario, signed-in devices can discover remote changes and upload local edits.
- Audit the reported 26-server first-letter photo plan, justify a stable placement alternative and safe cutover, and estimate metadata database cost separately from blob storage and transfer using declared workload and price inputs.
At scale
- Source facts: reports named Drive-like file storage; one interview specifically emphasized splitting large files into chunks, storing chunks in a block server, and maintaining metadata separately.
- Practice assumption: 20 million daily active users and a read-to-write ratio near 5:1.
- Practice assumption: files may be as large as 10 GB and uploads must resume after interruption.
- Practice assumption: acknowledged file versions must be durable, while another device may observe metadata changes within 5 seconds.
- Practice assumption: start with one home region per account and support disaster recovery before active-active cross-region writes.
- Separate source facts: photo upload/share by link, 26 photo servers selected by user-name first character, Sundar mapped to server 19 for S, and a database-cost parameter follow-up. Distribution, physical capacity, workload, prices and migration behavior are unspecified. Keep the prior cloud-file practice scale; all audit workload/price/name-normalization and cutover rules are authored assumptions.