HLDArena
HLD-105·Storage & Media
Easy · 500 pts

Image Upload & Multi-Resolution Thumbnail CDN

Design an image hosting and on-the-fly thumbnail delivery pipeline absorbing heavy storefront media reads while isolating slow origin object storage.

Max p99
≤ 45 ms
Availability
≥ 99.5%
Budget
≤ $2,100

Functional Requirements

  • FR-1POST /media/upload — Persists original image metadata/blob and triggers thumbnail generation.
  • FR-2GET /media/{image_id}?w=400 — Serves resized image bytes with low edge/cache latency.
  • FR-3PATCH & DELETE /media/upload/{image_id} — Updates, revokes, or deletes image_id entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must sustain read availability when origin storage latency degrades 5x.

Workload Profile

Baseline Media Traffic28,000 Read RPS / 900 Upload Write RPS
Campaign Peak85,000 Read RPS / 2,500 Upload Write RPS
Active Working Set20 GB hot thumbnails (40 TB object archive)
Traffic DistributionStrong Zipfian skew on featured hero image_id assets

Consistency Model

Immutable asset URLs with eventual edge/cache propagation (< 5s); uploaded originals must be durably stored.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
100 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 90 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology