Spotify System Architecture

JIN on 2021-11-20

Please clap and share if you like this article

There are many music streaming platforms such as Spotify, Apple Music, Pandora, Soundcloud, and Tidal. Today, I will only explain more about Spotify. Spotify is an all-in-one streaming music service that allows access to millions of songs and other media from artists all over the world. I believe every one of the young men likes to listen to the different rhymes of music. To get the most features out of Spotify, I highly recommend subscribing to Spotify premium service, which allows for ad-free listening with no restrictions and downloading music and listening offline with high-quality audio. To be honest, I won’t receive any incentive from Spotify Platform if you are going to subscribe to any service from Spotify.

System Functional Requirements

  1. Download Music (up to 10,000 songs on a maximum of 5 devices under the same account)
  2. Discover Music (the system will provide a tailored playlist generated by their algorithm)
  3. Spotify Connect (provide a grant to play your music on different devices, you can use your mobile phone as a control for playing music on your PC under the same account)
  4. Discover Friend Activities, what music they like (allows you to see what your friends you follow are listening to in real-time, and also will have friend recommendations in your search lists when connected to other social media apps like Facebook, Instagram, etc.)
  5. Can share music with your friends through the other platform (Copy song links, embed code and Spotify URL, and share to your other social media apps)
  6. Provide the lyrics for most of the music (A collaboration between Spotify and Genius, music lyrics will be provided on a selection of songs)
  7. Create Playlists (You can make any of your playlists into a collaborative playlist with your friends which your friends can edit, add, remove and reorder songs)
  8. Private mode (your friends will not be able to see your listening activity)
  9. Is applicable for all of the device types (Mobile, tablet, PC, web player, TV, car audio, smartwatches, game console, smart display and etc)
  10. Daily Mixes (Playlists created on the basis of what you have listened to previously, and genres you likes = your taste of music)
  11. Spotify Radio
  12. Users can check their listening history
  13. Users can search the song which they want to listen to
  14. Shuffle play
  15. podcasts and shows
  16. sort and filter
  17. follow artists
  18. Autoplay
  19. concerts
  20. crossfade tracks
  21. Artist Fundraising pick
  22. Visualization with WinAmp
  23. Ad-free
  24. Unlimited Skip

System Non-Functional Requirements

  1. Usability
  2. Reliability
  3. Good Performance
  4. Low latency

The Scale Estimation

  1. The active user's bases =365 million
  2. The active premium users bases = 158 million
  3. the low quality = 3MB per song
  4. The high quality = 10MB per song
  5. Can download up to 10,000 songs
  6. 30+ language support
  7. 60,000+ songs are uploaded daily
  8. 8 million song creators yearly
  9. 8k active artists

System Component Design

The high-level diagram

The assumptions we made :

  1. Load balancer

What is Round Robin Load Balancing? Definition & FAQs | Avi Networks Learn the definition of Round Robin Load Balancing and get answers to FAQs regarding: What is Round Robin Load…

2. Publish/Subscribe

3. App Server Producer/App server Consumer

4. Data Warehouse

5. Payment Gateway

The Recommendation Algorithm

Latent variable model - Wikipedia A latent variable model is a statistical model that relates a set of observable variables (so-called manifest…

Model benchmarks A lot of people have asked me what models we use for recommendations at Spotify so I wanted to share some insights…

GitHub - spotify/annoy: Approximate Nearest Neighbors in C++/Python optimized for memory usage and… Annoy ( Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that…

GitHub - spotify/luigi: Luigi is a Python module that helps you build complex pipelines of batch… Luigi is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution…

Further Study

Spotify UX Analysis and Redesign

How to build an amazing music recommendation system. Using Spotify’s data to generate music

GitHub — AmolMavuduru/SpotifyRecommenderSystem: Building a music recommendation using Spotify’s… You can’t perform that action at this time. You signed in with another tab or window. You signed out in another tab or…

Scio, Spark and Scalding Check out the Beam Programming Guide first for a detailed explanation of the Beam programming model and concepts. Also…

GitHub — spotify/apollo: Java libraries for writing composable microservices ⚠️ Apollo is heavily used within Spotify, however, most of its development has recently been done internally leveraging…

GitHub — spotify/sparkey: Simple constant key/value storage library, for read-heavy systems with… Sparkey is a simple constant key/value storage library. It is mostly suited for read heavy systems with infrequent…


The Best Music Streaming Services | Digital Trends We all have opinions, right? From political leanings to how we take our coffee, humans aren’t shy when it comes to…

architecture Spotify's official technology

The Brilliance of Spotify Internal APIs to Mitigate Payments | Nordic APIs | Adding new layers of complexity within a digital service without sacrificing user experience is a difficult endeavor…

Key Spotify Statistics Driving Music Streaming Adoption in 2021 Spotify is more than a music streaming app, although that is where its lion share of revenue lies. With each passing…

Recommending music on Spotify with deep learning This summer, I'm interning at Spotify in New York City, where I'm working on content-based music recommendation using…

If you’ve found any of my articles helpful or useful then please consider throwing a coffee my way to help support my work or give me patronage😊, by using



Last but not least, if you are not a Medium Member yet and plan to become one, I kindly ask you to do so using the following link. I will receive a portion of your membership fee at no additional cost to you.

Join Medium with my referral link - JIN As a Medium member, a portion of your membership fee goes to writers you read, and you get full access to every story…