0
0
Microservicessystem_design~20 mins

Spotify architecture overview in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Spotify Architecture Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Identify the core components in Spotify's microservices architecture
Spotify uses a microservices architecture to handle music streaming, user management, and recommendations. Which of the following lists the main microservices correctly?
AUser Service, Music Catalog Service, Recommendation Service, Playback Service
BUser Interface Service, Payment Gateway, Music Storage Service, Analytics Service
CAuthentication Service, Video Streaming Service, Playlist Service, Notification Service
DSearch Service, Email Service, Social Media Service, Billing Service
Attempts:
2 left
💡 Hint
Think about services that handle users, music data, recommendations, and playing songs.
scaling
intermediate
2:00remaining
Scaling the Playback Service for millions of users
Spotify's Playback Service must handle millions of concurrent streams. Which approach best supports this scale?
AStore all music files in a single database and stream directly from it
BUse a single powerful server to handle all playback requests to reduce complexity
CDeploy multiple instances of Playback Service behind a load balancer and use CDN for content delivery
DSend playback requests to the User Service to manage streaming
Attempts:
2 left
💡 Hint
Think about distributing load and reducing latency for users worldwide.
tradeoff
advanced
2:00remaining
Choosing between synchronous and asynchronous communication
Spotify's Recommendation Service needs data from User Service and Music Catalog Service. What is a key tradeoff when choosing synchronous vs asynchronous communication between these services?
ASynchronous calls provide immediate data but can cause delays if services are slow; asynchronous calls improve resilience but add complexity
BAsynchronous calls require no error handling; synchronous calls require complex error handling
CSynchronous calls always improve performance; asynchronous calls always reduce data accuracy
DSynchronous calls are cheaper to implement; asynchronous calls require expensive hardware
Attempts:
2 left
💡 Hint
Consider response time and system reliability.
🧠 Conceptual
advanced
2:00remaining
Understanding data storage choices in Spotify architecture
Spotify stores user playlists, music metadata, and playback history. Which storage types best fit these data categories?
AUser playlists in cache only, music metadata in time-series database, playback history in NoSQL
BAll data stored in a single relational database for simplicity
CUser playlists in flat files, music metadata in NoSQL, playback history in relational database
DUser playlists in a NoSQL database, music metadata in a relational database, playback history in a time-series database
Attempts:
2 left
💡 Hint
Think about data structure and query patterns for each data type.
estimation
expert
3:00remaining
Estimating storage needs for Spotify's music catalog
Spotify has 100 million songs averaging 5 MB metadata each. Estimate the total storage needed for the music metadata database, considering 20% overhead for indexing and backups.
A500 million MB (500 TB)
B600 million MB (600 TB)
C400 million MB (400 TB)
D120 million MB (120 TB)
Attempts:
2 left
💡 Hint
Calculate base size then add 20% overhead.