PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/LinkedIn

Design a Top-K search words service

Last updated: Mar 29, 2026

Quick Overview

The question evaluates understanding of scalable, low-latency analytics and search-event systems, including high-throughput event ingestion, Top-K aggregation across all-time and sliding windows, normalization/deduplication trade-offs, and multi-region consistency considerations.

  • medium
  • LinkedIn
  • System Design
  • Software Engineer

Design a Top-K search words service

Company: LinkedIn

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

## Scenario Design a service that tracks user search queries and returns the **Top-K most searched words/queries**. ## Requirements ### Functional - API to **record** a search query event (e.g., user searches "iphone 16"). - API to fetch **Top-K** queries. - Support a time window variant: - (a) all-time Top-K - (b) Top-K over the last **N minutes/hours** (trending) ### Non-functional - High write QPS (search events), low latency reads for Top-K. - Scalable horizontally. - Reasonable correctness (define whether exact or approximate is acceptable). ## Clarifications to address - What is a “word” vs “query” (full string)? - Case-folding, normalization, stop words, punctuation. - Deduping (e.g., multiple searches by same user) or count every event. - Multi-region and eventual consistency expectations.

Quick Answer: The question evaluates understanding of scalable, low-latency analytics and search-event systems, including high-throughput event ingestion, Top-K aggregation across all-time and sliding windows, normalization/deduplication trade-offs, and multi-region consistency considerations.

Related Interview Questions

  • Review a Web Application Architecture - LinkedIn (easy)
  • Scale a Distributed Randomized Multiset - LinkedIn (medium)
  • Design a Top-K Ranking Service - LinkedIn (easy)
  • Design a Global Calendar Service - LinkedIn (medium)
  • Design a malicious-URL checking service using an isMalicious API - LinkedIn (medium)
LinkedIn logo
LinkedIn
Oct 20, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
13
0

Scenario

Design a service that tracks user search queries and returns the Top-K most searched words/queries.

Requirements

Functional

  • API to record a search query event (e.g., user searches "iphone 16").
  • API to fetch Top-K queries.
  • Support a time window variant:
    • (a) all-time Top-K
    • (b) Top-K over the last N minutes/hours (trending)

Non-functional

  • High write QPS (search events), low latency reads for Top-K.
  • Scalable horizontally.
  • Reasonable correctness (define whether exact or approximate is acceptable).

Clarifications to address

  • What is a “word” vs “query” (full string)?
  • Case-folding, normalization, stop words, punctuation.
  • Deduping (e.g., multiple searches by same user) or count every event.
  • Multi-region and eventual consistency expectations.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More LinkedIn•More Software Engineer•LinkedIn Software Engineer•LinkedIn System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.