← 返回 instacart 的题目列表System Design: Product Catalog
类型:qbank
Senior system-design prompt around Instacart's product catalog. The central theme is consistency across retailer item feeds, customer-facing catalog pages, availability, and shopper substitutions.
Requirements
Functional requirements:
Store canonical products and retailer-specific SKUs.
Support search/browse by product name, category, brand, dietary attribute, and retailer/store.
Ingest retailer catalog feeds with price, availability, image, size, and substitution metadata.
Serve customer-facing product detail and search pages with low latency.
Support correction workflows when shopper/customer feedback identifies a bad image, duplicate item, or wrong size.
Scale / constraints:
Catalog reads are high-volume and latency-sensitive.
Feed ingestion and manual corrections are write-heavy in bursts.
Consistency matters most at checkout and substitution time; search/browse can tolerate short-lived staleness.
Key decisions:
Canonical product graph vs retailer-SKU-first model.
Search index freshness vs write amplification.
Strong consistency for price/availability at checkout vs cached catalog reads.
Deduplication and versioning for retailer feed conflicts.
Notes
A clean schema separates canonical_product, retailer_sku, store_item, price_snapshot, and catalog_event.
Use an event-driven ingestion pipeline: retailer feed -> validation/dedup -> catalog store -> search index update -> cache invalidation.
Customer browse can read from Elasticsearch/OpenSearch plus Redis/CDN cache. Checkout should revalidate price and availability against the authoritative store.
Catalog consistency is not one global setting. State which fields can be eventually consistent (images, description, category) and which must be rechecked (price, availability, substitution eligibility).
For duplicate products, keep a merge history so old SKU/product ids redirect rather than breaking carts or shopper workflows.
For corrections, preserve auditability: who changed what, source confidence, and rollback path.
Preparation
Prepare a data model that distinguishes product, SKU, store item, and inventory.
Practice explaining the freshness path from retailer feed to search result.
Have one consistency story for checkout revalidation and one for catalog correction/rollback.