Design Query Autosuggest for the Bing Search Box

Last updated: November 29, 2026

Quick Overview

Design the service that returns the top query completions for each keystroke typed into the Bing search box, personalized by market and freshness, in under 50 ms.

Microsoft
System Design
Software Engineer
Microsoft
November 29, 2026
Software Engineer
Technical Screen
System Design
Medium

0

0

0 solved


Design the service that returns the top query completions for each keystroke typed into the Bing search box, personalized by market and freshness, in under 50 ms.

Bing interviewers use autosuggest because it mixes data structures with large-scale serving and a nightly plus real-time data pipeline. They check prefix lookup design, how candidates are scored, and how trending queries and unsafe suggestions are handled.

What the Interviewer Expects
  • Builds suggestions offline from query logs with counts and decay
  • Serves prefix lookups from an in-memory trie or prefix table with precomputed top k
  • Adds a real-time path for trending queries
  • Filters offensive, private or legally restricted suggestions
  • Keeps latency low with edge caching and client debouncing
Key Topics to Cover
Trie with top-k
Query log aggregation
Trending detection
Content filtering
Edge caching
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you make a news event show up in suggestions within minutes?
  • How would you personalize without storing a trie per user?
  • How do you handle typos in the prefix?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Return up to 8 completions per prefix, per market (en-US, de-DE, and so on), in under 50 ms at the 99th percentile. Peak traffic is many times search traffic because every keystroke fires. Suggestions...

High-Level Design

Offline pipeline: daily job aggregates query logs per market into (query, score) where score is a time-decayed frequency with normalization and spam filtering. A builder produces a compact prefi...


Submit Your Answer
Markdown supported