Sitemap
Models to Systems

Practical guides to machine learning, generative AI, and agentic systems — from fundamentals to production. Explore research insights, system design, hands-on coding, and interview preparation with Deepak Mishra.

System Design Interview Series:27/30

31 min read8 hours ago

--

[Case Study: Designing File Storage]

Parts 10 to 26 designed everything around the files of the file-sharing service: where their metadata lives, how it is partitioned, replicated, migrated, searched, and notified about. None of them stored a single byte of a file. This case study does. It is the storage system that holds the bytes: how a file is cut into chunks, how an upload survives a dropped connection, how identical data is stored once, how bytes are kept durable for years at a cost the business can pay, and how a deleted chunk is reclaimed without ever deleting one that someone still needs. It is also the Part where the bill is largest, because here the numbers are petabytes and each design choice moves millions of dollars a month.

Series: System Design Interview Series, Part 27 of 30

Press enter or click to view image in full size

The Problem

The file-sharing service has 100 million users and 100 billion entries. Metadata (Part 10) is 100 TB; the file contents are three or four thousand times larger. The first storage design was a plain object store with three full copies of every file. Five incidents show why it did not last.

  1. The files that went missing. A background cleanup job deleted chunks that no file referenced. At the same moment, a client uploading a new file asked the server “do…

--

--

Pragya
Pragya

Written by Pragya

How to make agent automated and tuned

Models to Systems
Models to Systems

Published in Models to Systems

Practical guides to machine learning, generative AI, and agentic systems — from fundamentals to production. Explore research insights, system design, hands-on coding, and interview preparation with Deepak Mishra.