Index/Music Streaming / Spotify

Get Premium
Design43 min
Premium

Music Streaming / Spotify

Tap any song in a catalogue of well over a hundred million and hear it straight away, on a phone on the bus, a laptop or a plane with no signal, with the next song already waiting when this one ends.

What they’re really testing: A listener taps a song and expects sound before they notice any wait: about 200 ms, on a mobile network. Most of a catalogue of ~200M tracks is almost never played, so no cache near the listener holds it, and every file is encrypted, so starting a song needs a key as well as the bytes.

Premium

This design is on the Premium plan

Readers with Lifetime Access read it in full. Already bought it? Sign in from the top bar.

What’s inside

  • Primary concepts and the hard part
  • Requirements
  • API / Model
  • High-level architecture
  • Trade-offs and deep dives
  • Possible follow-up questions