SlideShare a Scribd company logo
DECODING SOFTWARE
ARCHITECTURE OF SPOTIFY:
HOW MICROSERVICES
EMPOWERS SPOTIFY
www.techaheadcorp.com
The success and popularity of Spotify have stunned
everyone - right from the music and entertainment
industry to the technology and business world.
Spotify was launched to counter the rising menace
of music piracy. It was estimated that 30-40% of
revenues generated by the music industry were
lost due to piracy, and artists who created original
music failed to get fairly compensated for their art.
Understanding these problems, Daniel Ek and
Martin Lorentzon from Sweden launched Spotify in
2006 and instantly became the world’s most
popular music streaming service.
With more than 422 million active users and 182 million paid
users, Spotify has topped the charts of the music streaming
industry and is right now one of the most preferred and popular
platforms for accessing all kinds of music, easily and seamlessly.
Spotify is available across 182 nations, hosts 82 million+ songs, and
is available to users in both free and freemium mode, with
revenues generated from advertisements, and paid subscriptions.
Spotify has an interesting revenue model, which is unlike the
traditional music industry, where the artists are paid based on
every song sold. With Spotify, record labels who own the rights to
the music are paid upto 70% royalty of the revenues generated,
and the artists get paid from these record labels directly.
In this blog, we will discuss the software architecture behind Spotify, and
understand how they are able to support billions of music streams,
concurrently for millions of users.
Decoding Software Architecture Of Spotify
Software architecture is the blueprint and the roadmap, based on which
the entire software is created, and every mobile/digital platform needs a
software architecture to start with.
There are basically two types of software architecture that companies
usually rely on: Monolithic Architecture and Microservices.
Spotify is based entirely on Microservices architecture, which has been
confirmed and explained by Kevin Goldsmith, who was the former CTO
at Spotify.
The software architecture of Spotify is heavily dependent on services,
and this is the reason microservices-based architecture was finalized
for Spotify, and it worked.
The backend of Spotify needs hundreds of services, most of them tiny
and simple, but they need to be served in run-time, without any delay.
In order to serve these hundreds of services, Spotify's technical team
deployed a microservices-based architecture, wherein it serves to
address one single service-need at a time: Be it song retrieval, sharing
recommendations, searching, or simply user verification (for free and
paid model).
API for User Personalization
Why Microservices Architecture At Spotify?
HOW DO SERVICES WORK & RESPOND?
Services are usually written in Python and/or Java language, with few
exceptions. And they communicate with one another via Hermes
protocol, which Spotify has developed from scratch using ZeroMQ and
Protobuf.
However, some older services created in the beginning still use HTTP
and XML/JSON for communication.
For database and storage-based services, PostgreSQL & Cassandra are
used by Spotify. Cassandra is preferred for content-based services
such as searching the songs or retrieving metadata of the songs, in
run-time.
There exists a highly specialized backend service called ‘accesspoint’, which is
constantly in touch with various clients, for swift and precise communication.
The protocol which enabled seamless communication between the clients and
the ‘accesspoint’ has also been built by Spotify engineers, and hasn’t been
made public.
Software infrastructure within Spotify is heavily dependent on Debian, while
open-source software is preferred for various activities.
Cross-Site Communication
The Secret Of Swift Music Streaming On Spotify
Now, we have an overview of how services work and respond, and we have
shared why Microservices-based software architecture has been deployed at
Spotify.
Now, here is a secret about why Spotify is able to swiftly retrieve songs for
the end-users, and why music streaming is so fast, and reliable.
Within the Microservices based architecture, there are hundreds of software
developers working concurrently, who are managing different types of
services and their communication.
Now, the secret is that each of these software developers is working in a
closed territory, with specific functionalities and missions. Every microservice
has just one responsibility and objective, and a majority of such
microservices have their own private database with their own logic, and they
cannot be intervened by other databases of other microservices.
PERSONAL SKILLS
This is the reason Spotify is so fast, and precise, and fulfills the end-user's
needs so promptly.
Once a request has been placed for any specific task, the application
responds swiftly, deploying different services across different machines,
and having personalized and customized performance parameters,
depending on the specific service being called.
Seamless Change Management Of Logic
Now, what if the software developer needs to change the logic of any feature?
There isn’t any issue of time lag or disruption of the entire application, because each
microservice has its own logic, and implementing changes is very easy.
The specific service which is connected with the feature needs to be worked
upon, the edits are made, and then only that service is tested, and then instantly
deployed.
Hence, that service is now changed, logic altered, and the feature will now have
new functionality. This service will start communicating with the application once
the deployment is done, and there is absolutely no need for the entire application
to be re-tested, and re-deployed.
This change management feature of microservices being used as the software
architecture of Spotify is one of the strongest and most powerful capabilities,
which makes Spotify fast and user-friendly.
Interestingly, the software architecture of Spotify has been developed in a way
that all the possible clients of the application: mobile, desktop/laptops, and
libspotify (Spotify’s embeddable library), all share a common codebase.
SOURCE:
Using this common code-base, the developers can modify or enhance the
client functionality and offer a unique user interface for the end users.
Since this common code-base is written in C++ language, changes and edits in
the main user interface are also easy and seamless. The specific platform
adoptions are written in platform-specific languages, for example, ObjC for
iOS.
If you are looking for audio streaming app development, then our team at
TechAhead can help you right away. Based on your specific requirements, we
can deploy Spotify-inspired software architecture for your mobile app, loaded
with powerful and scalable features.
Schedule an appointment with our Mobile App engineers right here.
https://bit.ly/3Qntt4q

More Related Content

Featured

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Decoding Software Architecture Of Spotify How Microservices Empowers Spotify (1).pdf

  • 1. DECODING SOFTWARE ARCHITECTURE OF SPOTIFY: HOW MICROSERVICES EMPOWERS SPOTIFY www.techaheadcorp.com
  • 2. The success and popularity of Spotify have stunned everyone - right from the music and entertainment industry to the technology and business world. Spotify was launched to counter the rising menace of music piracy. It was estimated that 30-40% of revenues generated by the music industry were lost due to piracy, and artists who created original music failed to get fairly compensated for their art. Understanding these problems, Daniel Ek and Martin Lorentzon from Sweden launched Spotify in 2006 and instantly became the world’s most popular music streaming service.
  • 3. With more than 422 million active users and 182 million paid users, Spotify has topped the charts of the music streaming industry and is right now one of the most preferred and popular platforms for accessing all kinds of music, easily and seamlessly. Spotify is available across 182 nations, hosts 82 million+ songs, and is available to users in both free and freemium mode, with revenues generated from advertisements, and paid subscriptions. Spotify has an interesting revenue model, which is unlike the traditional music industry, where the artists are paid based on every song sold. With Spotify, record labels who own the rights to the music are paid upto 70% royalty of the revenues generated, and the artists get paid from these record labels directly.
  • 4. In this blog, we will discuss the software architecture behind Spotify, and understand how they are able to support billions of music streams, concurrently for millions of users. Decoding Software Architecture Of Spotify Software architecture is the blueprint and the roadmap, based on which the entire software is created, and every mobile/digital platform needs a software architecture to start with. There are basically two types of software architecture that companies usually rely on: Monolithic Architecture and Microservices. Spotify is based entirely on Microservices architecture, which has been confirmed and explained by Kevin Goldsmith, who was the former CTO at Spotify.
  • 5. The software architecture of Spotify is heavily dependent on services, and this is the reason microservices-based architecture was finalized for Spotify, and it worked. The backend of Spotify needs hundreds of services, most of them tiny and simple, but they need to be served in run-time, without any delay. In order to serve these hundreds of services, Spotify's technical team deployed a microservices-based architecture, wherein it serves to address one single service-need at a time: Be it song retrieval, sharing recommendations, searching, or simply user verification (for free and paid model). API for User Personalization Why Microservices Architecture At Spotify?
  • 6. HOW DO SERVICES WORK & RESPOND? Services are usually written in Python and/or Java language, with few exceptions. And they communicate with one another via Hermes protocol, which Spotify has developed from scratch using ZeroMQ and Protobuf. However, some older services created in the beginning still use HTTP and XML/JSON for communication. For database and storage-based services, PostgreSQL & Cassandra are used by Spotify. Cassandra is preferred for content-based services such as searching the songs or retrieving metadata of the songs, in run-time.
  • 7. There exists a highly specialized backend service called ‘accesspoint’, which is constantly in touch with various clients, for swift and precise communication. The protocol which enabled seamless communication between the clients and the ‘accesspoint’ has also been built by Spotify engineers, and hasn’t been made public. Software infrastructure within Spotify is heavily dependent on Debian, while open-source software is preferred for various activities. Cross-Site Communication The Secret Of Swift Music Streaming On Spotify Now, we have an overview of how services work and respond, and we have shared why Microservices-based software architecture has been deployed at Spotify.
  • 8. Now, here is a secret about why Spotify is able to swiftly retrieve songs for the end-users, and why music streaming is so fast, and reliable. Within the Microservices based architecture, there are hundreds of software developers working concurrently, who are managing different types of services and their communication. Now, the secret is that each of these software developers is working in a closed territory, with specific functionalities and missions. Every microservice has just one responsibility and objective, and a majority of such microservices have their own private database with their own logic, and they cannot be intervened by other databases of other microservices.
  • 9. PERSONAL SKILLS This is the reason Spotify is so fast, and precise, and fulfills the end-user's needs so promptly. Once a request has been placed for any specific task, the application responds swiftly, deploying different services across different machines, and having personalized and customized performance parameters, depending on the specific service being called. Seamless Change Management Of Logic Now, what if the software developer needs to change the logic of any feature? There isn’t any issue of time lag or disruption of the entire application, because each microservice has its own logic, and implementing changes is very easy.
  • 10. The specific service which is connected with the feature needs to be worked upon, the edits are made, and then only that service is tested, and then instantly deployed. Hence, that service is now changed, logic altered, and the feature will now have new functionality. This service will start communicating with the application once the deployment is done, and there is absolutely no need for the entire application to be re-tested, and re-deployed. This change management feature of microservices being used as the software architecture of Spotify is one of the strongest and most powerful capabilities, which makes Spotify fast and user-friendly. Interestingly, the software architecture of Spotify has been developed in a way that all the possible clients of the application: mobile, desktop/laptops, and libspotify (Spotify’s embeddable library), all share a common codebase.
  • 11. SOURCE: Using this common code-base, the developers can modify or enhance the client functionality and offer a unique user interface for the end users. Since this common code-base is written in C++ language, changes and edits in the main user interface are also easy and seamless. The specific platform adoptions are written in platform-specific languages, for example, ObjC for iOS. If you are looking for audio streaming app development, then our team at TechAhead can help you right away. Based on your specific requirements, we can deploy Spotify-inspired software architecture for your mobile app, loaded with powerful and scalable features. Schedule an appointment with our Mobile App engineers right here. https://bit.ly/3Qntt4q