Design a User–Item Recommendation System
Context
You are asked to design an end-to-end recommendation service that suggests items to users. The service should include choices for the recommendation model, the serving architecture with multiple application servers behind a reverse proxy, and a storage schema for users, items, and interactions.
Assume: millions of users and items, primarily implicit feedback (views, clicks, purchases), and a p95 online latency target under 150 ms for the recommendation endpoint.
Tasks
-
Model choice and approach
-
Explain a reasonable baseline (e.g., NMF/matrix factorization) and alternatives.
-
Discuss handling implicit vs. explicit feedback, cold start, and ranking.
-
Describe training cadence and evaluation.
-
Data fetching and serving architecture
-
Describe how multiple stateless servers behind a reverse proxy will serve recommendations.
-
Cover caching, timeouts/retries, fallbacks, and model/feature serving calls.
-
Data storage design
-
Propose schemas for user, item, and interaction data.
-
Include any derived tables (e.g., learned embeddings/factors) and indexing/partitioning choices.