[ INFO ]category: System Design difficulty: hard freq: medium first seen: 2026-01-12
[HARD][SYSTEM DESIGN][MEDIUM]data_engineeringwebbackendmachine_learningSystem DesignPersonalizationRecommendationML System
$catproblem.md
Spotify's "Music Recommendation System" interview question focuses on designing a scalable ML system for personalized song and playlist recommendations, often tagged with data engineering, backend, web, machine learning, system design, personalization, and recommendation systems.[1][2]
Problem Statement
Design a scalable recommendation engine for Spotify (or similar music platform) that delivers personalized music recommendations to millions of users in real-time. The system must handle a massive, growing catalog of songs (billions of tracks), billions of daily user interactions (listens, skips, likes, adds to playlists), adapt to evolving tastes, ensure low latency (<100ms), high throughput, and balance freshness, diversity, fairness, and novelty while minimizing cold-start issues for new users/songs.[2][1]
Functional Requirements
Generate ranked lists of N songs/playlists (e.g., top 10-100) for home feed, search, "Made for You," radio, or Discover Weekly.
Support real-time updates from user actions (e.g., play/skip history).
Ranked list of songs with relevance scores (e.g., probability of listen/completion).
Explanations (e.g., "Because you liked Artist X").
Example: For user with history of hip-hop listens at 8 PM on mobile → Top 5: Song IDs , scores [0.95, 0.92], reasons ["Similar to recent plays", "High danceability"].[2]
Non-Functional Requirements & Constraints
Latency: <50ms retrieval, <200ms full ranking.
Throughput: 1M+ QPS, handle peaks.
Storage: Petabytes (feature store for embeddings, interaction logs).