Skip to content

ONE QUESTION. YOUR REASONING.

Design photo storage with dedup

Design a photo storage service that keeps identical photos only once, matched by their SHA-256 hash, and never deletes bytes another user still needs.

System designStorage, files and linksSenior

YOUR BRIEF

What to work through

Work through photo storage with dedup as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Upload photos from phones and computers
  • Browse a library and view photos at different sizes
  • Delete photos
  • Store byte-identical uploads only once, matched by SHA-256

BEFORE YOU START

Constraints to discuss

  • Content is never deleted while any photo record still points to it
  • A matching hash is verified on the server, never trusted from the client
  • Two identical uploads at the same moment store the bytes once
  • A deleted photo stops being viewable by its owner at once
Need a starting point?

Watch for these common gaps as you prepare:

  • One table for bytes and ownership, so a delete removes another user’s photo
  • Trusting a client-computed hash
  • Deleting bytes the moment a count reaches zero, racing a new upload
  • No answer for two identical uploads at the same moment
  • Calling a resized copy a duplicate: SHA-256 matches only identical bytes
Read: System design questions and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad click aggregator
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.