Code Room
System designMedium
Question
Design an on-the-fly image thumbnail/derivative service for an image-heavy product (think Pinterest/Shopify) serving 100K image-derivative requests per second across hundreds of size/crop/format variants (WebP, AVIF, JPEG; smart-crop; DPR variants). Originals live in object storage. You cannot pre-generate every variant — the combinatorial space is huge — but cold-start latency must stay low. Design the request path, caching, and how you avoid the thundering-herd when a viral image's variant is first requested.
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.