Code RoomImage transformation CDN
MediumPrep Room Coding #3606

Image transformation CDN

System designStorage & CDNMid–Senior~35 min

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.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.