Design a music streaming service similar to Spotify that supports on-demand playback, playlists, and personalized recommendations.
Scale requirements: - 200 million monthly active users, 50 million concurrent listeners at peak - 80 million song catalog - Average song: 3.5 minutes, 10 MB (high quality) - 99.99% playback availability - Gapless playback between tracks
Areas to cover: 1. Audio storage and delivery architecture 2. Playback and buffering strategy 3. Playlist and library management 4. Search and discovery 5. Royalty tracking and play count accuracy
Constraints: - Low latency song start (under 1 second) - Offline download support - Accurate play counts for royalty payments (financial correctness matters) - Handle geographic licensing restrictions
How to approach it
- Hint 1
Start with audio delivery: how do you store songs, what format and bitrate options exist, and how do you get audio to the client fast enough for near-instant playback? Think about pre-buffering the next track.
- Hint 2
Consider the play count system carefully: this drives royalty payments, so it must be accurate and auditable. How do you define a valid play, handle retries, and avoid double-counting?
- Hint 3
Think about the social and discovery layer: collaborative playlists, personalized recommendations (collaborative filtering vs content-based), and how your data model supports these features.
Ready to answer it out loud?
Record your answer in 1:30 and Preptile scores it 1–10 with specifics — what landed, what you skipped, and what to say next time.
Practising needs an invite code. Join the waitlist and we’ll send you one.