HLD-246·Search & Indexing
Medium · 1,000 ptsAcoustic Spectrogram Hash & Song Recognition API
Design a Shazam-style real-time music recognition backend that matches noisy 5-second mobile constellation-map audio hashes against a 100M-track inverted time-offset index in under 50 ms.
Max p99
≤ 55 ms
Availability
≥ 99.6%
Budget
≤ $5,000
Functional Requirements
- FR-1POST /v1/recognize/fingerprint — Queries combinatorial spectrogram anchor-target hashes and scores time-coherent track matches.
- FR-2POST /v1/catalog/tracks/{track_id}/fingerprints — Indexes new studio/live release constellation hashes into partitioned posting lists.
- FR-3DELETE /v1/catalog/tracks/{track_id} — Removes rights-expired tracks from active recognition results and metadata caches.
- FR-4Must survive Super Bowl / concert simultaneous "what song is this?" recognition spikes within p99 <= 55 ms.
Workload Profile
Everyday Recognition38,000 Hash Lookup Read RPS / 800 Catalog Index Write RPS
Live Halftime Broadcast Spike104,000 Lookup Read RPS / 1,800 Write RPS
Active Working Set36 GB hot constellation hash posting lists & track metadata
Traffic DistributionMassive synchronized skew on currently airing commercial/concert hashes
Consistency Model
Eventual index segment publication (< 30s) for newly released tracks; read-optimized immutable posting shards.
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.
Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.
Design Write-up
Write under ### Architecture for Diagram to take that up directly
Compulsory section · if not written yet, Diagram reads from the start of your write-up.
Architecture: required·FRs mentioned: 0/4·0 boxes · 0 edges
0 words