Back to sketch

SYSTEM DESIGN SKETCHBOOK / PRACTICE SHEET / NO. 54

Design parts compatibility for an e-commerce site

Intermediate · 35 min · Storage & data modeling

Shoppers on an auto parts site choose their car (year, make, model, trim, engine) and expect every product to say "Fits your 2016 Civic EX 1.5L" or "Does not fit". The catalog comes from hundreds of suppliers, each describing compatible vehicles in its own format and naming.

Requirements

  • Shoppers save a vehicle and see a fits, does not fit, or unknown badge on every product page and search result.
  • Browse and search a category filtered to parts that fit the selected vehicle, with price sorting and facets.
  • Ingest supplier fitment feeds (weekly full files and daily changes) and map their vehicle names to one canonical vehicle catalog.
  • Show the conditions behind an answer, for example "rear axle only" or "with disc brakes".

Constraints and assumptions

  • 150,000 canonical vehicle configurations; 20 million parts from 800 suppliers.
  • About 2 billion part-to-vehicle fitment pairs once supplier rules are expanded.
  • 20,000 product and search page views per second at peak; each needs fit answers for up to 48 parts, adding under 50 ms.
  • Full supplier files are up to 5 GB; corrected fitment must be live within 24 hours.
  • A wrong "fits" causes a costly return; "unknown" is acceptable when the data is unclear.

Out of scope for the first sketch

Checkout, pricing and stock levels · Decoding vehicle identification numbers (assume a service returns a vehicle configuration id) · Reviews · Recommending alternative parts

Draw your design

Rough math and notes

Done on paper? Compare with the worked approaches