Code Room
System designMediumsd-g494
Subject Image processingLevel Mid–Senior~35 minCommon in Storage & CDN interviewsIndustries Technology, Software development

Question

Design an image-transformation CDN where customers request derivatives via URL parameters (?w=800&fmt=avif&q=70&fit=cover&dpr=2) and the edge generates and caches them on demand. Unlike a fixed thumbnail service, transforms are open-ended and customer-controlled, which creates two problems: an enormous (potentially abusable) cache-key space, and the risk that anyone can hammer your origin with infinite distinct transform URLs. Scale: 200K req/s, hundreds of variants per source image, source images on customer origins.

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.