Search Engine
Query serving and continuous indexing, sharing an index without sharing a bottleneck.
Keep queries fast through a breaking-news storm while the index limps and a query node dies.
Query serving and continuous indexing both hit the same index cluster, but they can't share a bottleneck — indexing rides a queue so document bursts never touch query latency, and a cache in front of the index absorbs the read side so a slow index barely shows.
Components in play
- Edge LB — Splits traffic between query serving and document indexing.
- Query service — Runs searches against the index and ranks results.
- Results cache — Serves hot queries from memory so the index stays light.
- Index cluster — The inverted index — answers queries and absorbs new documents.
- Document queue — Buffers the crawl/update firehose before it reaches the index.
- Indexers — Drain the queue and write documents into the index cluster.
Graded on these SLOs
- ≥ 96.00%Queries answered
- ≤ 130 msQuery p99
- ≥ 18k rpsSustain the storm
- ≤ 90%Fleet headroom
- ≤ 14Lean footprint
The brief
Design the backend behind a search product: users type queries and get ranked results in milliseconds, while a stream of new and updated documents is being indexed continuously in the background. Both paths touch the same index cluster, but they must never compete for the same capacity — a slow indexing run can never be allowed to slow down a search.
Functional
- Answer a search query with ranked results
- Continuously ingest and index new or updated documents
- Keep the index reasonably fresh without blocking queries
Non-functional
- Query latency is the product — results must return in tens of milliseconds
- Indexing bursts (a crawl, a content push) must not degrade query serving
- High availability — a slow or partitioned index shouldn't break search
Warm-up: design decisions
Optional theory to prime the calls a senior engineer would make before you build.
Solving is a Pro feature
Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.
- AI design coach on your canvas — pins failure points & over-engineering
- Honest AI design review on every run
- All 12 problems + unlimited chaos simulator
- Points, levels & leaderboard