HLD-202·Search & Indexing
Medium · 1,000 ptsProduct Catalog & Autocomplete Typeahead Search
Design an e-commerce prefix autocomplete and SKU lookup backend serving keystroke-by-keystroke suggestions within strict sub-40ms latency budgets during holiday sales.
Max p99
≤ 40 ms
Availability
≥ 99.5%
Budget
≤ $4,200
Functional Requirements
- FR-1GET /suggest?q={prefix} — Returns top-10 ranked query completions for every keystroke.
- FR-2POST /catalog/items — Updates product title, rank weight, or inventory visibility.
- FR-3PATCH & DELETE /suggest/{prefix} — Updates, revokes, or deletes prefix entries with bounded TTL or explicit cache/index invalidation.
- FR-4Must isolate slow storage brownouts so keystroke autocomplete never cascades into timeouts.
Workload Profile
Baseline Keystrokes40,000 Read RPS / 1,500 Catalog Update RPS
Holiday Peak115,000 Read RPS / 4,000 Update RPS
Active Working Set30 GB hot prefix trie & top SKU metadata
Traffic DistributionExtreme skew on short 1-3 character prefixes
Consistency Model
Eventual index freshness (< 30s) acceptable for prefix suggestions; catalog updates must persist durably.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words