System Design Problem

Design a Recommendation System (Netflix / TikTok Style)

Commonly Asked By:NetflixByteDanceGoogleAmazon

  • Personalized recommendations: Show content tailored to each user's taste
  • Multiple surfaces: Home feed, "Because you watched X", "Trending", category pages
  • Real-time signals: Incorporate recent user actions (watch, like, skip) within minutes
  • Cold start handling: Recommendations for brand-new users with no history
  • Diversity: Avoid filter bubbles; expose users to varied content
  • Explainability: "Because you watched Stranger Things" or "Trending in your area"
Loading...

Three-Stage Pipeline

1. Candidate Generation (ANN search) — 3K candidates in ~30ms
   Two-Tower Model: user_embedding · item_embeddings → ANN (HNSW in Faiss)

2. Ranking (DNN) — 5K items scored in ~50ms via GPU batch inference
   Deep neural network with ~200 features per (user, item) pair

3. Re-ranking (Business Rules) — Apply diversity, freshness, filters in ~10ms