PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Meta

Design a Top-K trending items service

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competency in large-scale system design, real-time streaming ingestion, distributed aggregation, and trade-offs between exact and approximate Top-K approaches within the System Design domain.

  • medium
  • Meta
  • System Design
  • Software Engineer

Design a Top-K trending items service

Company: Meta

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a system that returns the **Top K** items (e.g., videos/posts/products) by popularity. ### Requirements - API to fetch: `GET /topk?window=10m&k=100` returning the top 100 items in the last 10 minutes. - Support multiple windows (e.g., 1m, 10m, 1h, 24h). - Near real-time updates (freshness target e.g. < 5 seconds). - Read QPS is high (e.g., 10k–100k QPS); write events can be much higher (e.g., millions/minute). - Popularity is driven by events (views/clicks/likes). Event stream may include duplicates and out-of-order delivery. ### Non-functional - Low latency for reads (e.g., p99 < 100 ms). - Fault tolerant, scalable, and cost-aware. - Discuss exact vs approximate Top-K and trade-offs. Produce an end-to-end design: ingestion, storage/compute, APIs, data model, and operations/monitoring.

Quick Answer: This question evaluates competency in large-scale system design, real-time streaming ingestion, distributed aggregation, and trade-offs between exact and approximate Top-K approaches within the System Design domain.

Related Interview Questions

  • Design Top-K, Crawler, and Chess Systems - Meta (hard)
  • Design Search And Web Crawling Systems - Meta (medium)
  • Design an Instagram-Style Social Feed - Meta (medium)
  • Design an Online Game Leaderboard - Meta (hard)
  • Design an On-Demand Delivery Platform - Meta (medium)
Meta logo
Meta
Feb 11, 2026, 12:00 AM
Software Engineer
Onsite
System Design
6
0
Loading...

Design a system that returns the Top K items (e.g., videos/posts/products) by popularity.

Requirements

  • API to fetch: GET /topk?window=10m&k=100 returning the top 100 items in the last 10 minutes.
  • Support multiple windows (e.g., 1m, 10m, 1h, 24h).
  • Near real-time updates (freshness target e.g. < 5 seconds).
  • Read QPS is high (e.g., 10k–100k QPS); write events can be much higher (e.g., millions/minute).
  • Popularity is driven by events (views/clicks/likes). Event stream may include duplicates and out-of-order delivery.

Non-functional

  • Low latency for reads (e.g., p99 < 100 ms).
  • Fault tolerant, scalable, and cost-aware.
  • Discuss exact vs approximate Top-K and trade-offs.

Produce an end-to-end design: ingestion, storage/compute, APIs, data model, and operations/monitoring.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Meta•More Software Engineer•Meta Software Engineer•Meta 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.