SystemKit

Design a photo-sharing service

Bring the chapter together in one design, then revisit it when the requirements change.

The brief

People upload photos, browse the newest public photos, and open an image. Design the first version for one million registered users, with 100,000 active each day. Keep comments, followers, private albums, and video outside this exercise.

  • Each active user uploads 2 photos and views 100 images per day.
  • An original photo averages 3 MB; a delivered image averages 200 kB. Use decimal units and 86,400 seconds per day.
  • Peak traffic is 5 times the daily average. Estimate 30 days of new original-photo storage, before extra copies or renditions.
  • Uploads may process in the background. A photo appears in public lists only when its image is ready; an accepted upload must survive an application-process crash.
  • Aim for 300 ms p95 photo-list API reads for users near the origin. Treat this as a target to verify, not a guarantee from the architecture.

Reading a design isn’t the same as producing one under a clock. Try it timed: the requirement change stays hidden until partway through.

Loading your draft…

State your scope and assumptions. Estimate average and peak upload and image-read rates, plus 30 days of original-photo storage. Keep units visible.

0 / 4,000 characters

Name the components and what each stores or does. Trace one upload and one image view, including when metadata becomes visible. An arrow list is enough.

0 / 4,000 characters

Choose a likely bottleneck and the evidence that would justify scaling it. Explain how you recover from an application crash or repeated processing job without losing an accepted photo.

0 / 4,000 characters

Respond to the international-traffic change below. Separate slow image delivery from slow API reads, and explain one cost of your change.

The requirement changesHalf your active users now live in Europe and Asia, far from the original region. Images arrive quickly through the CDN, but photo lists feel slow. What would you measure and change? Name the new consistency or operational tradeoff.

0 / 4,000 characters

Write an initial response in all four sections to unlock the checklist and two worked approaches.