Design e-commerce browse/search evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
##### Question
Design the e-commerce functionality for category browsing and product search, including catalog structure, indexing, query processing, ranking, and integration with the overall order flow.
Quick Answer: Design e-commerce browse/search evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
System Design: Category Browsing and Product Search for an E‑commerce Platform
Context
You are designing the category browsing and product search functionality for a large consumer e‑commerce platform with millions of SKUs, product variants (size/color), a hierarchical category taxonomy, and global traffic. The system must support fast, relevant search and browsing, and integrate cleanly with the order flow (product detail, cart, checkout) while honoring inventory, pricing, and promotions.
Assume read-heavy workloads (search/browse) and frequent catalog updates (price, stock, promotions). Latency targets for search/browse are sub-200 ms at p95.
Requirements
Design the following end-to-end:
Catalog structure
How to model products, variants, attributes, categories, and facets.
Multi-region availability, pricing, and promotions.
Indexing
Index schema, analyzers, and faceting support.
Incremental and full reindex strategies; handling high-churn fields (inventory, price).
Query processing
Tokenization, spell correction, synonym handling, filters/facets, and query understanding.
Autocomplete/typeahead.
Ranking
Relevance signals (text), business signals (popularity, margin, inventory), personalization, and diversity.
How to tune, evaluate, and A/B test.
Category browsing
Faceted navigation, sorting, pagination, and caching.
SEO considerations and URL design.
Integration with order flow
Product detail page data needs; add-to-cart and checkout validation for price/inventory/promotions.
Reservation policies and consistency guarantees.
APIs and architecture
Service boundaries, data stores, and key API endpoints.
Scale, availability, and data freshness targets.
State assumptions where needed and justify trade-offs.
Constraints & Assumptions
Preserve the scope, facts, inputs, and requested outputs from the prompt above.
If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.
Clarifying Questions to Ask Guidance
Clarify users, core use cases, read/write patterns, scale, latency, availability, and data retention.
State explicit assumptions before making sizing or architecture decisions.
Prioritize the functional path first, then address reliability, security, observability, and rollout.
What a Strong Answer Covers Guidance
A scoped requirements summary with concrete non-goals and success metrics.
API, data model, architecture, consistency, capacity, and operations.
Reasoned trade-offs among simple and scalable designs, including bottlenecks and failure modes.
A validation, monitoring, migration, and launch plan appropriate for the risk level.
Follow-up Questions Guidance
What breaks first at 10x traffic or data volume?
How would you degrade gracefully during dependency failures?
What metrics and alerts would prove the design is healthy after launch?