File Storage System Design (Chunking, Metadata & Scale)

Design a file storage service like AWS S3 that allows users to upload, store, and retrieve files. The system should handle large files, provide high availability, and scale to store petabytes of data.

Constraints

Functional

Upload/download by ID or path, list with pagination, delete, metadata (name, size, type, date), private/public access, optional versioning

Non-functional

11 9's durability, 99.99% availability, petabytes scale, fast upload/download, cost-efficient storage and bandwidth

Scale

10M users, 1B files (~100 per user), ~5 MB avg → 5 PB; 10M uploads/day, peak ~200/s; 100M downloads/day, peak ~2K/s; 50 TB upload/day, 500 TB download/day

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs