Design Tiered Photo Storage With Erasure-Coded Cold Copies
Last updated: November 29, 2026
Quick Overview
Design blob storage for photos uploaded to Facebook and Instagram that serves recent hot photos quickly and keeps years of rarely viewed photos durable at much lower cost.
Meta
November 29, 20260
0
0 solved
Design blob storage for photos uploaded to Facebook and Instagram that serves recent hot photos quickly and keeps years of rarely viewed photos durable at much lower cost.
Meta published its Haystack and f4 work on exactly this problem, and storage interviews revisit the ideas: reduce metadata lookups, and move cold data from replication to erasure coding. Interviewers check the cost math and the read path through CDN and cache.
What the Interviewer Expects
- Explain why one file per photo hurts at this scale
- Pack photos into large volumes with an in-memory index
- Separate hot (replicated) and warm (erasure-coded) tiers
- Do the storage overhead math
- Describe the read path through CDN and caches
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- What is the effective replication factor of your cold tier?
- How do you delete a photo from an append-only volume?
- How do you recover a lost disk in the erasure-coded tier?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: upload, read by photo ID at several sizes, delete.
Non-functional: hundreds of billions of photos; reads skew strongly to the last few weeks; 11 nines durability; minimize cost pe...
High-Level Design
- Upload goes to a web tier, which resizes into variants and writes each to the hot store.
- The hot store packs many photos into large append-only volume files (around 100 GB). Each storage...