Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an E-commerce Recommendation Event Pipeline

Design a high-throughput asynchronous pipeline that turns commerce actions into fresh item-to-item recommendation signals.

Problem statement

Design a high-throughput backend subsystem for asynchronous processing in an e-commerce recommendation and user-action platform, such as a ‘People who bought this also bought’ feature.

Decouple commerce services from recommendation processing, preserve enough event history to recover, maintain durable product-association aggregates, and serve fresh results efficiently.

One Amazon source names distributed caching, service synchronization, and partitioned message queues; a corroborating Amazon source describes order history flowing through order events, aggregation, a recommendation store, and an API, with precomputation, caching, and scalable NoSQL or Elastic storage.

Neither source supplies numeric targets, event schema, delivery guarantee, retention, or freshness goals; state those as assumptions.

What to build

  1. Commerce services can durably publish versioned purchase and user-action events without waiting for recommendation computation.
  2. The platform validates, partitions, and asynchronously processes events into product-association signals.
  3. Clients can retrieve a bounded list of related products with freshness and version metadata.
  4. Repeated delivery or producer retry does not double-count one logical commerce action.
  5. Operators can replay retained events to rebuild and validate derived recommendation state.

At scale

  • Source fact: the subsystem is described as high-throughput and asynchronous.
  • Source discussion areas: microservice synchronization, Redis clustering, and message-queue partitioning for decoupling.
  • Corroborating source fact: order history feeds order events through aggregation into a recommendation store and API, with precomputation, caching, and scalable NoSQL or Elastic storage.
  • No numeric throughput, freshness, retention, event schema, or delivery guarantee was supplied; candidates must state those assumptions.
  • Authoring assumption for practice: events may be delivered more than once, and derived effects must be idempotent and replayable.