PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Google

Design a Twitter hashtag metrics aggregator

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competency in designing scalable, low-latency real-time stream processing and aggregation systems, covering concepts such as windowing and stateful processing, data modeling, fault tolerance, hot-key handling, and API/query performance.

  • medium
  • Google
  • System Design
  • Software Engineer

Design a Twitter hashtag metrics aggregator

Company: Google

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

## System Design: Hashtag Metrics Aggregator Design a service that ingests a high-volume stream of social posts (like tweets) and produces **metrics/aggregations for hashtags** (similar to an ads click aggregator). ### Core use cases - Ingest events: each post has `post_id`, `user_id`, `timestamp`, `text`, and derived `hashtags[]`. - Query: - Get the **count of a given hashtag** over a time range (e.g., last 5 minutes, last 24 hours). - Get **top N hashtags** over a sliding window (e.g., top 100 in the last 1 minute). - (Optional) Breakdown by dimension such as `country/region`, `language`, or `platform`. ### Requirements to clarify - Latency SLOs for queries (e.g., p95 < 200 ms). - Freshness (e.g., results within 5–10 seconds of real-time). - Scale assumptions (events/sec, number of unique hashtags, query QPS). - Accuracy expectations: - Exactly-once vs at-least-once ingestion. - Handling duplicates, late events, out-of-order timestamps. ### Deliverables Describe: - High-level architecture. - Data model and storage choices (you may start with a simple SQL placeholder, then refine). - Stream processing and windowing strategy. - APIs. - How you handle backfill/reprocessing, failures, and hot hashtags. - Caching and concurrency considerations.

Quick Answer: This question evaluates competency in designing scalable, low-latency real-time stream processing and aggregation systems, covering concepts such as windowing and stateful processing, data modeling, fault tolerance, hot-key handling, and API/query performance.

Related Interview Questions

  • Design an Online Coding Judge Platform - Google (medium)
  • Design a pub-sub replay system - Google (hard)
  • How to host many domains on one IP? - Google (medium)
  • Design street-view image ingestion and storage system - Google (hard)
  • Design a global real-time notification system - Google (medium)
Google logo
Google
Dec 15, 2025, 12:00 AM
Software Engineer
Onsite
System Design
6
0
Loading...

System Design: Hashtag Metrics Aggregator

Design a service that ingests a high-volume stream of social posts (like tweets) and produces metrics/aggregations for hashtags (similar to an ads click aggregator).

Core use cases

  • Ingest events: each post has post_id , user_id , timestamp , text , and derived hashtags[] .
  • Query:
    • Get the count of a given hashtag over a time range (e.g., last 5 minutes, last 24 hours).
    • Get top N hashtags over a sliding window (e.g., top 100 in the last 1 minute).
    • (Optional) Breakdown by dimension such as country/region , language , or platform .

Requirements to clarify

  • Latency SLOs for queries (e.g., p95 < 200 ms).
  • Freshness (e.g., results within 5–10 seconds of real-time).
  • Scale assumptions (events/sec, number of unique hashtags, query QPS).
  • Accuracy expectations:
    • Exactly-once vs at-least-once ingestion.
    • Handling duplicates, late events, out-of-order timestamps.

Deliverables

Describe:

  • High-level architecture.
  • Data model and storage choices (you may start with a simple SQL placeholder, then refine).
  • Stream processing and windowing strategy.
  • APIs.
  • How you handle backfill/reprocessing, failures, and hot hashtags.
  • Caching and concurrency considerations.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Google•More Software Engineer•Google Software Engineer•Google System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ 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.