HLD-237·Caching & Edge
Medium · 1,000 ptsPersonalized Music Home Shelf & Real-Time Skip Feedback
Design Spotify / YouTube Music’s personalized home shelf service combining precomputed collaborative-filtering candidates with real-time skip/play session signals.
Max p99
≤ 52 ms
Availability
≥ 99.5%
Budget
≤ $5,700
Functional Requirements
- FR-1GET /recommendations/{user_id} — Serves low-latency ranked shelves blended with recent session context.
- FR-2POST /events/playback — Ingests play/skip/like events to update short-term taste vectors.
- FR-3PATCH & DELETE /recommendations/{user_id} — Updates, revokes, or deletes user_id entries with bounded TTL or explicit cache/index invalidation.
- FR-4Must sustain morning commute spikes and survive 6x backing feature-store latency spikes.
Workload Profile
Steady Listening36,000 Shelf Read RPS / 7,500 Playback Event RPS
Commute & Friday Release Peak102,000 Read RPS / 20,000 Event RPS
Active Working Set28 GB user candidate shelves & track embeddings
Traffic DistributionActive listener user_id sessions + viral new album releases
Consistency Model
Bounded eventual taste-vector refresh (< 3s) acceptable; fallback to cached shelf on feature timeout.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words