Case Studies

Dropbox

Chunk-level diffing and content-addressed dedup, and how conflicting offline edits get surfaced instead of silently lost.

20 minHardPluscase-studystoragesync

Designing a service that stores a user's files and keeps them in sync across every device they own — widely known in interview prep as "the Dropbox problem," and a good vehicle for testing whether a candidate reaches for chunk-level diffing and dedup, or naively re-uploads a whole file on every edit.

Picture mailing someone an entire 500-page book every time you fix one typo on page 40 — that's what a sync client is doing if it re-uploads a whole file on every edit. What you actually want to send is the corrected page, not the book again.

What this lesson covers

Clients split files into content-defined chunks, hash each one, ask which hashes are new, and upload only those to content-addressed block storage. Conflicting offline edits surface as conflicts instead of silently losing one; unreferenced chunks are reclaimed by mark-and-sweep.

  • Re-uploading a 500MB file for a one-line edit is mailing the whole book to fix one typo; send the changed page instead.
  • Three things to design: what actually gets uploaded, how other devices learn of a change, and what happens on concurrent offline edits.
  • Chunk-level diffing and content-addressed dedup are the senior-level answer; naive fixed-size chunks break dedup on a small edit.
  • When two devices edit offline and reconnect, surface the conflict and keep both rather than silently picking a winner.
  • Data loss is the worst possible failure for a storage product, which shapes every durability trade-off in the design.

Included in Plus and Pro

Continue reading “Dropbox

The full lesson works the design through end to end — diagrams, trade-offs, and what interviewers expect at each level. About 20 minutes.

  1. Understanding the Problem
  2. Functional Requirements
  3. Non-Functional Requirements
  4. Capacity Estimation
  5. Core Entities
  6. API Interface
  7. High-Level Design
  8. Trade-offs
  9. Final Design
  10. Operations & Observability
  11. Level Expectations
  12. Follow-Up Questions
  13. Try It Yourself