Design a search ranking system: the system design interview walkthrough
Design a search ranking system: the system design interview walkthrough The request to design a search ranking system — or the recommendation ranker that decides what plays next — sounds like one machine-learning model with a score() method. Feed it a query and an item, get a relevance number, sort. The trap is scale: your catalog has millions of items, a good ranking model is far too expensive…
When faced with the task of designing a search ranking system, it's easy to be drawn to a straightforward solution: train a single machine-learning model on the entire catalog, compute relevance scores for every item based on the given query, and then return the sorted list. However, this approach is computationally infeasible given the scale of modern catalogs containing millions of items and the limited latency budget of a few hundred milliseconds per request.
The real challenge lies in designing a funnel that efficiently narrows down the vast catalog to a smaller subset of highly relevant items before spending computational resources on ranking them. This two-stage approach — retrieval followed by ranking — is the hallmark of production search and recommendation systems and is the central focus of a system design interview focused on search ranking.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.