Spotify Modernizes Client-Side Architecture to Accelerate Service on All Devices
Article Summary
Spotify lifted the 10,000 Liked Songs limit. But that simple feature request triggered a year-long architecture overhaul affecting 100,000 lines of code.
Engineer Carl Engström shares how his team modernized Spotify's client-side architecture to serve users on older devices and slower networks. What started as removing a limit became a fundamental rethink of how the app handles data at startup.
Key Takeaways
- Modified 100,000 lines of shared client code across iOS and Android
- Metadata now downloads in batches and pre-sorts on disk, not in RAM
- Startup times improved dramatically on less powerful smartphones
- Gradual rollout from 30 employees to 50% of users to catch edge cases
- Users with thousands of likes typically only listen to a few hundred
Critical Insight
By shifting from loading all metadata into RAM at startup to batch downloading and pre-sorting on disk, Spotify dramatically improved performance for users on older devices while removing the Liked Songs limit.