How to design a web search engine in a system design interview

A web search engine prompt is deliberately oversized, hiding three distinct systems: a crawler, an indexer, and a serving layer. Strong candidates scope the problem early and treat it as top-K retrieval rather than crawling. The core structure is an inverted index that maps each word to the documents containing it, turning queries into lookups. Because the index is too large for one machine, it is sharded by document and each query fans out to all shards, with results merged afterward. The rest of the interview covers how the index is built, how fan-out stays fast, and how matching pages are ranked.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in