Design an image hosting service similar to Imgur that allows users to upload, store, and share images with fast global delivery.
Scale requirements: - 100 million daily active users - 10 million image uploads per day - Average image size: 3 MB - Support thumbnails, resizing, and format conversion - Images must load in under 500ms globally
Areas to cover: 1. Image upload and processing pipeline 2. Storage strategy and cost optimization 3. CDN and caching architecture 4. Image transformation (resize, crop, format conversion) 5. URL scheme and sharing model
Constraints: - Support NSFW detection and content moderation - Handle viral images with sudden traffic spikes - Optimize storage costs for billions of images
How to approach it
- Hint 1
Start with the upload flow: how do you accept images, validate them, and where do you store originals vs processed variants? Think about what happens synchronously vs asynchronously.
- Hint 2
Consider on-the-fly image transformation vs pre-generating variants. What are the tradeoffs in storage cost, latency, and cache hit rates? Look at services like Imgproxy or Thumbor.
- Hint 3
Think about storage tiering: hot images accessed frequently vs cold images rarely viewed. How do you move between tiers, and how does this affect your CDN invalidation strategy?
Ready to answer it out loud?
Record your answer in 1:30 and Preptile scores it 1–10 with specifics — what landed, what you skipped, and what to say next time.
Practising needs an invite code. Join the waitlist and we’ll send you one.