Design Trending Hashtags for Threads Resistant to Spam Rings

Last updated: November 29, 2026

Quick Overview

Design a system that surfaces trending hashtags and topics on Threads in near real time, per country, while preventing coordinated accounts from manufacturing a trend.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design a system that surfaces trending hashtags and topics on Threads in near real time, per country, while preventing coordinated accounts from manufacturing a trend.

Trend detection mixes streaming aggregation with integrity, both core Meta concerns. The interviewer looks for velocity-based trend scoring (not raw counts), approximate data structures for the long tail, and a concrete defense against coordinated inauthentic behavior.

What the Interviewer Expects
  • Define trending as acceleration relative to a baseline, not top total volume
  • Use windowed streaming aggregation with approximate counting for the long tail
  • Count distinct authors rather than posts to resist spam
  • Segment by locale and support a global view
  • Add a review or safety filter before display
Key Topics to Cover
Stream processing
Count-Min Sketch
HyperLogLog
Anomaly scoring
Integrity
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 would you avoid evergreen tags like #love always trending?
  • How would you cluster different hashtags about the same event?
  • How would you backfill trends after a pipeline outage?
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

Functional: per country and global top 20 trending topics, refreshed every minute; clicking a trend shows posts. Non-functional: freshness under 2 minutes; robust to coordinated posting; no of...

High-Level Design
  1. Post service emits post_created events with extracted hashtags and entity links.
  2. Stream processor (Flink-style) keyed by (country, tag) maintains sliding-window statistics.
  3. A **Trend ...

Submit Your Answer
Markdown supported