Design Google Search: crawling, indexing, and ranking
Google Search
Guided ModeQuery Processor and Scatter-Gather
Request Flow
Query Processor normalises the query
On cache miss, the API forwards the raw query to the Query Processor. It tokenises, corrects spelling, and stems words. This takes ~8ms and dramatically improves recall.
Search Coordinator scatter-gathers index shards
The Search Coordinator fans normalised tokens out to ALL index shards simultaneously. Each Search Index Shard returns its local top-K candidates within ~15ms. Shards that miss the 200ms deadline are dropped.
Ranking Service re-scores and caches
The Ranking Service applies 200+ signals (BM25 relevance, PageRank, CTR, personalisation) and returns the final ordered list. Results are written to cache. Total: under 200ms.
Key Insight
Total latency = max(shard latencies) + merge, NOT sum. Scatter-gather with a deadline lets Google query thousands of shards in the same time budget as a single serial lookup.
Step 2 of 4
