Design a Multi-Device Photo Storage System
Design photo upload, download, multi-device synchronization, and hot/cold storage with metadata separated from immutable blobs.
Problem statement
Design a photo-storage product covering upload and download, separate metadata and blob storage, multi-device synchronization, and hot versus cold data.
For this exercise, assume immutable photo blobs, versioned metadata, resumable uploads, a per-user ordered change feed, deterministic metadata conflict handling, and a bounded hot/cold workload.
What to build
- Users can resumably upload original photos and download authorized originals or derived renditions.
- Users can update versioned captions, favorites, album membership, and deletion state separately from immutable bytes.
- A signed-in device can fetch an ordered change feed and recover every committed metadata or blob publication.
- Users can retrieve a photo while originals move between hot and cold tiers, and can restore a deleted photo during a bounded window before purge.
At scalePractice assumption
- Five million daily active users upload an average of five 20 MB photos per day.
- Metadata reads should complete within 300 ms at p95 and committed changes should reach another active device within five seconds.
- Originals are immutable; metadata changes use explicit versions and deterministic last-writer rules per field.
- Recent 30-day media stays hot while older originals may be asynchronously tiered and restored on demand.