Design Content-Addressed Storage So Reshared Videos Are Stored Only Once
Last updated: November 29, 2026
Quick Overview
Design a storage layer for Facebook and Instagram media where the same video uploaded or forwarded by many users is kept only once, while each user's post still has its own permissions and deletion semantics.
Meta
November 29, 20260
0
0 solved
Design a storage layer for Facebook and Instagram media where the same video uploaded or forwarded by many users is kept only once, while each user's post still has its own permissions and deletion semantics.
Viral videos get re-uploaded and forwarded millions of times, so deduplication saves a large amount of storage and processing at Meta's scale. The interviewer checks content hashing, reference counting or garbage collection, privacy separation between users, and what dedup means for processing.
What the Interviewer Expects
- Identify exact duplicates via content hashes
- Separate logical media objects from physical blobs
- Manage reference counts or mark-and-sweep garbage collection safely
- Keep permissions and deletion per logical object
- Skip re-transcoding for known content
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
- Would you dedup across users with different privacy settings?
- How do you handle deletion requests under privacy laws?
- Can a hash lookup leak whether some content exists?
- What about near-duplicates that differ by a few bytes?
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: on upload, if identical bytes already exist, reuse the stored blob and its processed renditions; each upload still creates its own media object owned by the uploader; deleting one user...
High-Level Design
- Hashing: client computes a SHA-256 of the file before upload; server recomputes on receipt to verify.
- Blob store keyed by content hash holds the original bytes and renditions.
- **Media ob...