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
November 29, 20260
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
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- 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 ProblemsSample 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
- Post service emits
post_createdevents with extracted hashtags and entity links. - Stream processor (Flink-style) keyed by
(country, tag)maintains sliding-window statistics. - A **Trend ...