Spotify Architecture

Instant playback and personalised discovery for a global catalogue of audio.

On the roadmap:Software Architect · step 5: Learn from the giants

Overview

Spotify separates the data path (audio delivery through caches and CDNs) from the control path (catalogue, accounts, playlists), then feeds listening events into a streaming pipeline that powers recommendations and reporting. This summary is written from public engineering talks and blog posts; see the linked resources for the originals.

Architecture highlights

  • Audio is chunked and delivered from CDNs, with a peer-assisted fallback in early versions
  • Small autonomous squads own services; the backend grew into many microservices
  • Event streams feed analytics, recommendations and royalty reporting
  • Recommendations blend collaborative filtering with audio and text signals

Architecture diagram

Key components

  • Streaming and CDN layer

    Delivers audio chunks close to the listener so playback starts quickly

  • Metadata and catalogue services

    Serve track, album, artist and playlist data to every client

  • Event pipeline

    Collects listening events for analytics, billing and model training

  • Recommendation platform

    Builds playlists and home-screen suggestions from listening behaviour

Challenges and trade-offs

  • Start-up latency

    Playback must begin in a fraction of a second, so the first audio chunks are prefetched and cached near users.

  • Personalisation at scale

    Recommendations are recomputed for a huge user base, which needs batch pipelines plus fast online serving.

  • Team autonomy versus consistency

    Many independent services need shared standards for deployment, monitoring and data contracts.

Study: Spotify

Learn how Spotify is built from the people who explain it. Watch first for the picture, then read for the detail.

0 of 1 watched
34 min
Start here

Spotify ML Question - Design a Recommendation System (Full mock interview)

Aced (formerly Exponent) · 89K views