MidSystem Design

Design an image upload and processing service for a marketplace app. Users upload photos from their phone, and we need thumbnails and a moderation check before the listing goes live. Walk me through it.

What they are really testing: They want to see whether you decouple the upload from the processing instead of doing everything inside one request handler. They are also checking if you ask for volume and latency numbers before you name any service.

A real interview question

Design an image upload and processing service for a marketplace app. Users upload photos from their phone, and we need thumbnails and a moderation check before the listing goes live. Walk me through it.

What most people say

drag me

I would use S3 for the images, Lambda to resize them, and maybe Rekognition for moderation. It is a pretty standard serverless pipeline.

It is a list of service names with no numbers, no failure story, and no trade off, so the interviewer cannot tell whether you have ever run this in production or only read the diagram.

The follow-ups they ask next

  • What if a single 4 GB file is uploaded and blows up your worker memory?

    Enforce the size and content type constraints inside the presigned URL policy itself, and stream the image rather than loading it fully into memory.

  • How do you stop the same image being processed twice?

    Make the worker idempotent by keying on the object version id and writing derivatives to a deterministic path, so a duplicate event overwrites the same result harmlessly.

What the interviewer is listening for

  • Asks for uploads per second, image size, and time to live before naming any service
  • Puts a queue between upload and processing and explains it as a shock absorber
  • Names the moderation call as the slow step rather than treating all work as equal
  • Ends by naming the sacrificed property, in this case instant feedback

What sinks the answer

  • Uploads the image through the application server instead of straight to object storage
  • Does all processing synchronously inside the HTTP request
  • Lists five managed services without a single number attached
  • No answer for what happens when the processing worker dies mid job

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

I have not built this exact pipeline, but here is how I would reason about it. First I would ask for uploads per second and image size, then I would separate the upload from the processing, then I would decide what happens when processing fails.

Keep going with system design

All 336 cloud engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free