All problems

Image Hosting

Host images at internet scale — the edge does the heavy lifting.

easy~12 min Pro Simulator · +80 ptsTheory +34 pts
The build

Serve a front-page image stampede from the edge while an API box dies and the object store slows down.

An image host lives and dies at the edge: a handful of hot images take almost all the traffic, and every byte you can serve from the CDN is a byte the origin never sees. The object store is durable but slow — if misses reach it in bulk, latency explodes long before it falls over.

Components in play

  • Image CDNServes hot images from the edge — the real product.
  • Image APIResolves image ids, permissions, and variants.
  • Metadata cacheKeeps image metadata in memory so lookups skip the store.
  • Object storeDurable home of the original image bytes.

Graded on these SLOs

  • ≥ 99.00%Images load
  • ≤ 100 msImage p99
  • ≥ 6.0k rpsSustain the views
  • ≤ 85%Origin headroom
  • ≤ 6Lean footprint
Base 6,000 rps45s run 3 scripted failures

The brief

Design an image host like Imgur. Users upload images and share links; a tiny set of hot images takes almost all the traffic. Image bytes are big and immutable, so the game is serving them from the edge — the origin and object store should only ever see the long tail.

Functional

  • Upload an image and get a shareable link
  • Serve the image bytes at that link
  • Serve resized variants (thumbnail, feed, full)

Non-functional

  • Extremely read-heavy with a hot-set skew — a few images dominate
  • Low-latency delivery worldwide
  • Durable storage — an uploaded image is never lost

Warm-up: design decisions

Optional theory to prime the calls a senior engineer would make before you build.

Pro

Solving is a Pro feature

Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.

  • AI design coach on your canvas — pins failure points & over-engineering
  • Honest AI design review on every run
  • All 12 problems + unlimited chaos simulator
  • Points, levels & leaderboard
Get started