Challenge - 5 Problems
Spotify Architecture Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Architecture
intermediate2: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?
Attempts:
2 left
💡 Hint
Think about services that handle users, music data, recommendations, and playing songs.
✗ Incorrect
Spotify's microservices include User Service for user data, Music Catalog Service for music metadata, Recommendation Service for personalized suggestions, and Playback Service for streaming music.
❓ scaling
intermediate2: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?
Attempts:
2 left
💡 Hint
Think about distributing load and reducing latency for users worldwide.
✗ Incorrect
Deploying multiple Playback Service instances behind a load balancer allows handling many users. Using a CDN caches music close to users, reducing latency and load on origin servers.
❓ tradeoff
advanced2: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?
Attempts:
2 left
💡 Hint
Consider response time and system reliability.
✗ Incorrect
Synchronous communication waits for immediate responses, which can slow down if a service is slow or down. Asynchronous communication decouples services, improving resilience but making data handling more complex.
🧠 Conceptual
advanced2: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?
Attempts:
2 left
💡 Hint
Think about data structure and query patterns for each data type.
✗ Incorrect
User playlists are flexible and fit well in NoSQL for quick access. Music metadata is structured and fits relational databases. Playback history is time-based, so time-series databases are ideal.
❓ estimation
expert3: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.
Attempts:
2 left
💡 Hint
Calculate base size then add 20% overhead.
✗ Incorrect
Base size = 100 million songs * 5 MB = 500 million MB. Adding 20% overhead: 500 million * 1.2 = 600 million MB, which is 600 TB.