Design an image hosting service
Let users upload images, share them by link and view them in several sizes, like Imgur.
Functional requirements
- Upload an image and get a shareable link
- View images in several sizes
- Delete your own images
Non-functional requirements
- Images load fast worldwide
- Uploads never lose data
- Viral images don’t overload the origin
Scale
- 2M uploads per day, 2 MB on average
- 1B image views per day
- Most views hit the newest 5% of images
How you’ll be scored
10 checks covering your diagram and your notes, and any valid approach counts. Hints appear for anything you miss. Common mistakes, such as single points of failure or components you never explain, cost points. How grading works
What interviewers look for
- Clarify before you draw. State what is in and out of scope. For “Design an image hosting service”, that starts with: Upload an image and get a shareable link; View images in several sizes; Delete your own images. Interviewers notice candidates who pin the requirements down first.
- Turn the scale into numbers. The scale (2M uploads per day, 2 MB on average; 1B image views per day; Most views hit the newest 5% of images) should become requests per second, storage and bandwidth, and those figures should drive your choices. Estimates with units carry more weight than adjectives.
- Show how each quality is met. Your design should visibly deliver: Images load fast worldwide; Uploads never lose data; Viral images don’t overload the origin. Saying that it does isn’t enough; point to the part of the design that makes it true.
- Expect follow-ups on the hard parts. Interviewers usually probe object storage, cdn and uploads here. This is an easy problem, so interviewers expect the fundamentals done cleanly: a clear request path, the right kind of data store, and a reason for each component.
- Explain failure and trade-offs. Say what happens when a component fails, where a single point of failure would hurt, and what you chose not to build. Naming a trade-off is a stronger answer than claiming there isn’t one.