Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Merchant Product Catalog Ingestion

Design a multi-tenant catalog pipeline for point and bulk product updates that converge into serving-ready merchant catalogs.

Problem statement

For this exercise, assume 50,000 merchants own one billion products used by downstream ad or pin selection. Products are keyed by merchant SKU and include price, inventory, description, image assets, source version, and lifecycle state.

Merchants can submit point upserts or deletes and immutable bulk files; aggregate write traffic varies from near zero to 100,000 product changes per second, read traffic sustains 100,000 requests per second, and about 100 bulk jobs may run concurrently.

Attribute payloads average 1 KB, while original images average 500 KB.

The platform must accept original images, durably bind the immutable original reference to the accepted product version, validate and scan the bytes, generate serving-sized derivatives on the server, and expose media readiness.

Once a point command or bulk row successfully passes validation and atomic compare-and-apply, any price or inventory change must become queryable within five seconds at p95.

A normally sized bulk job may take up to 30 minutes at p95 to admit and apply all rows and persist every terminal per-record outcome; lower-priority image derivatives may also complete within 30 minutes at p95.

Thus the bulk-job completion clock does not weaken the five-second projection clock for a row after that row is successfully applied. Point, bulk, and image work use separately managed capacity but converge on one authoritative merchant-product state.

Every accepted record must apply the newest merchant-supplied source version, so delayed or replayed older records never overwrite newer state; equal versions with different payloads are visible conflicts, and stale image work cannot attach to a newer product version.

A bulk job may partially succeed and exposes durable per-record outcomes.

Design the APIs, database and partitioning model, point and bulk ingestion, image upload and resizing pipeline, conflict handling, serving projections, prioritization, observability, and recovery.

Ad ranking, campaign budgets, bidding, checkout, order placement, inventory reservation, and merchant billing are outside scope.

What to build

  1. For this exercise, an authenticated merchant can idempotently upsert or delete one SKU with a source version and inspect the accepted, stale, invalid, or pending outcome.
  2. For this exercise, a merchant can upload and finalize an immutable bulk file, track its asynchronous job, and retrieve durable per-record outcomes.
  3. For this exercise, a merchant can upload an original product image, immediately bind its immutable reference to the accepted product version, and observe validated, resized, ready, or failed state; stale derivative work cannot attach to a newer product version.
  4. For this exercise, authorized downstream consumers can read or scan the newest accepted serving-ready product state within one merchant's catalog.
  5. For this exercise, every newly accepted product version emits one replayable change for downstream serving projections without exposing another merchant's data.

At scale

  • For this exercise, assume 50,000 merchants and one billion active product records, with highly skewed catalog sizes and update rates.
  • For this exercise, support aggregate write traffic from near zero to 100,000 product changes per second, a steady 100,000 read requests per second, and about 100 concurrent bulk jobs.
  • For this exercise, assume attribute payloads average 1 KB and original images average 500 KB; image validation and resizing use lower-priority capacity than price and inventory updates.
  • For this exercise, target 200 milliseconds p95 for healthy catalog reads; after atomic compare-and-apply, make every accepted point or bulk price and inventory record queryable within five seconds at p95; finish admission, application, and durable per-record outcomes for a normally sized bulk job within 30 minutes at p95; and finish image derivatives within 30 minutes at p95. Retain an audit trail for one year and make serving projections rebuildable after a single-zone failure.