System design interview questionHardML / Personalization

Design a Recommendation System

Design a recommendation system: given a user, return personalized item suggestions quickly (feed/home/related).

Interview scope

Serve: Client → Gateway/LB → App → Cache (+ DB). Train/ingest: App → Message Queue → workers → DB/Object Storage. No Client → Queue/DB.

Functional requirements

  • Ingest user events (views, clicks, purchases) asynchronously.
  • Produce candidate recommendations offline/nearline.
  • Serve top-N recommendations with low latency.

Scale and quality goals

  • Serving path must be cache-friendly and fast.
  • Heavy model/feature work belongs off the request path (queue/workers).
  • User/item metadata needs durable storage.

Capacity assumption

Design for this scale

Assume ~100M recommendation requests/day (~1,160 RPS average) plus a large async event stream.

Practice more than a diagram

Place components on the Froquiz canvas, connect the data flow, and see which decisions the scenario-specific review finds missing. The full exercise and review unlock with Premium.

Explore Premium