Course map

Project 05

E-commerce product catalog

Data modeling, search, caching

Start after Part 6

Key topics 59, 64, 65, 83

Architecture Modular monolith (deliberate)

Brief

A catalog for 10M products: categories, variants (size, color), pricing, inventory display, full-text search with filters, and merchandiser admin tools.

Targets

5k read RPS peak, 50:1 read/write · product page p99 < 200 ms · search p99 < 400 ms · price updates visible within 1 minute.

Must cover

  • Full-text search using the database's built-in engine (→ 65).
  • Cache invalidation — one price update traced through every cache layer (→ 85).
  • Faceting — counts per filter value, within the database engine's limits (P).
  • Keeping the search index in sync by periodic reindex — the simple, honest approach at this scale (P).

Design challenges

  1. Variant modeling (→ 59, 61): product vs. SKU; attributes that vary by category — relational columns vs. JSON documents, with the query cost of each.
  2. Search, staged by rule 7: database full-text search (→ 65) with periodic reindex is the baseline — adequate here, and the simpler alternative made explicit. A dedicated engine (→ 209) is the extension, justified only by faceting depth or relevance tuning the database cannot do.
  3. Caching (→ 82–83, 85): product pages cached at CDN, application, and Redis layers; invalidation on price change traced end to end.
  4. Category tree storage and traversal options (→ 59).
  5. Write/read isolation: a merchandiser bulk import must not hurt browse latency (→ 153 — ahead, Part 9 — as a principle, applied inside a monolith).

Out of scope

Cart and checkout (Project 6); recommendations (→ 216).

Search the guide