HLDArena
HLD-235·Storage & Media
Medium · 1,000 pts

Cloud Photo Backup, Dedup & Timeline Album Service

Design Google Photos / iCloud Photos metadata timeline, SHA-256 content deduplication, and shared event album delivery across mobile devices.

Max p99
≤ 55 ms
Availability
≥ 99.5%
Budget
≤ $5,650

Functional Requirements

  • FR-1POST /photos/{user_id}/commit — Deduplicates blob hash, stores EXIF metadata, and appends timeline.
  • FR-2GET /photos/{user_id}/timeline — Serves chronological photo grid and shared album thumbnails.
  • FR-3PATCH & DELETE /photos/{user_id}/commit — Updates, cancels, or deletes user_id records and immediately invalidates or updates cached state (read-after-write).
  • FR-4Uploader must immediately see newly backed-up photos (read-after-write) and survive 6x storage brownouts.

Workload Profile

Steady Camera Sync32,000 Timeline Read RPS / 4,500 Backup Write RPS
Holiday Event Shared Albums94,000 Read RPS / 12,000 Write RPS
Active Working Set28 GB hot timeline indexes & thumbnail URLs
Traffic DistributionBurst reads on viral shared wedding/holiday album_id & user_id

Consistency Model

Read-after-write timeline metadata visibility; raw media blobs content-addressed and immutable.

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
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 110 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology