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.
Design a system that returns the Top K items (e.g., videos/posts/products) by popularity.
GET /topk?window=10m&k=100
returning the top 100 items in the last 10 minutes.
Produce an end-to-end design: ingestion, storage/compute, APIs, data model, and operations/monitoring.