Design the Image Upload and Multi-Resolution Thumbnail Pipeline
Last updated: November 29, 2026
Quick Overview
Design how Pinterest accepts image uploads from web and mobile, stores originals durably, and generates the multiple resized and compressed variants needed across the masonry grid, closeup and email, while serving them through a CDN.
0
0
0 solved
Design how Pinterest accepts image uploads from web and mobile, stores originals durably, and generates the multiple resized and compressed variants needed across the masonry grid, closeup and email, while serving them through a CDN.
Every Pin is an image (or video) first, so ingest and image serving are core Pinterest infrastructure. Interviewers look for a direct-to-object-storage upload path, an asynchronous processing pipeline with idempotent workers, and a sensible strategy for which variants to precompute versus generate on demand.
What the Interviewer Expects
- Uses pre-signed URLs so uploads bypass application servers
- Processes variants asynchronously with a queue and idempotent workers
- Uses content-addressed storage for dedup and cache-friendly URLs
- Chooses between precomputed sizes and on-the-fly resizing with caching
- Covers safety scanning, EXIF stripping, and failure retries
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How would you support a new 'xl' size for every existing Pin?
- How would you add video transcoding to this pipeline?
- How do you keep the Pin from appearing broken while variants are still processing?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: upload images up to 20 MB from mobile and web; create a Pin as soon as possible; produce widths such as 236 px (grid), 474 px (retina grid), 736 px (closeup) and original; serve fast globa...
High-Level Design
- Client asks Upload API for an upload slot; API returns a pre-signed URL to object storage (S3) and an upload id.
- Client uploads directly, with multipart for large files and resume on flaky mobil...