S30 Logo
S30 AI Labwww.thes30.com
Back
#66

Design Real-Time Recommendation System

Expert🏗️ System DesignW14 D1

Design Real-Time Recommendation System

Progress — 0/1 tasks

1Tasks
Python 3 — Notebook
0/1 solved
1
Dataset & Setup

Design Real-Time Recommendation System — Student Lab

Offline system design lab: build a real-time home feed recommender architecture with latency/freshness constraints.

Prompt

Design a real-time home feed recommender.

Constraints:

  • p95 end-to-end latency: 200ms
  • freshness: new content visible within minutes
  • candidate pool: millions
  • strict safety/policy filtering
  • avoid feedback loops and spammy optimization

0 — Requirements and Metrics

Fill:

  • primary objective metric
  • 4–8 guardrails
  • latency SLOs (p50/p95/p99)
  • online vs offline evaluation plan

1 — Data, Labels, and Feature Freshness

Specify:

  • events to log (impression/click/dwell/hide/report)
  • label definitions and delayed labels
  • feature tiers: realtime / nearline / batch
  • point-in-time correctness strategy

2 — Candidate Generation (Retrieval)

Design a candidate generation strategy that can return ~1k candidates in <50ms. Include:

  • ANN index or graph-based retrieval
  • freshness injection
  • safety/policy filtering stage

3 — Ranking and Serving Architecture

Design ranking that fits within the remaining latency budget. Include:

  • model family
  • feature fetch strategy (online store/cache)
  • caching strategy (candidates, features, scores)
  • fallbacks

4 — Experimentation, Monitoring, Rollback

5 — 5-minute summary

Loading editor...
Solution

Need help? Share feedback