E-commerce recommendation shelf

DesignMedium45 minAmazon style

Your task

Design a recommendation system for an e-commerce homepage serving 80M monthly active users and a catalog of 50M items. The 'recommended for you' shelf must return within a 150ms p99 budget at ~30k requests/sec, blend recency of browsing behavior with long-term preferences, and exclude already-purchased or out-of-stock items. Walk through retrieval, scoring, the data model for user/item signals, and how you keep recommendations fresh as the catalog and user behavior change.

It covers

  • Candidate generation
  • Ranking
  • Embeddings