Search, ranking and caching system design interview questions
Search and comparison companies ask how you answer fast from data that is huge, changing, or held by someone else.
There are usually two paths to design. The read path has a hard latency budget and leans on indexes and caches. The write path keeps the index fresh. Strong answers also say how you'd know the ranking got better.
Three problems to practise
The company version will be about their own product. These are the shapes it usually takes.
-
Problem 1 · Comparison sites for travel, insurance and energy
Search prices from hundreds of suppliers in a few seconds
What makes it hard
- Asking many slow suppliers at once and showing results as they come back
- Caching prices that go out of date within minutes
- Checking the price again before sending someone to buy
Follow-ups to expect
- “One supplier takes ten seconds. Do you wait?”
- “How long can a cached fare be shown, and how do you decide?”
-
Problem 2 · Marketplaces and listing sites
Search and rank millions of listings
What makes it hard
- An inverted index kept in step with the main database
- Ranking on text match plus quality, freshness and personal signals
- Filters and facets that stay fast
Follow-ups to expect
- “A seller edits a listing. How soon does search show it?”
- “How would you test a new ranking without hurting sales?”
-
Problem 3 · The search box on every big site
Suggestions as you type
What makes it hard
- Answering in tens of milliseconds, from a table built offline
- Keeping suggestions fresh and free of anything offensive
- Caching at the edge for the most common prefixes
Follow-ups to expect
- “How do you add a trending term within the hour?”
- “How much memory does the table need?”
Common mistakes
- Running search as a LIKE query on the main database at scale
- No answer for how the index catches up after a write
- Caching without saying how stale is acceptable
- No way to measure whether results got better
Companies with this kind of round
Each page has three problems close to what that company builds.
Practise your company's round out loud
The plan and prompts are free now. The paid part is planned: five timed mocks of their design round, by voice, on a whiteboard, with an interviewer who pushes back and scores you against the bar for your level. £19 / $24 / €22 per company, once, not a subscription.
Would you pay for it? Tell us on the waitlist.
Join the waitlistOne email when it opens. We keep only your email address and your answer.
Got an interview coming up?
Add the company you are interviewing at and get their stages, in their order, in about a minute.