Design the Toutiao Article Ingestion and Near-Duplicate Detection Pipeline
Last updated: November 29, 2026
Quick Overview
Design the pipeline that ingests hundreds of thousands of new articles per hour from publishers and creators into Toutiao, cleans and enriches them, detects near-duplicate and rewritten content, and makes them available to recommendation within minutes.
ByteDance
November 29, 20260
0
0 solved
Design the pipeline that ingests hundreds of thousands of new articles per hour from publishers and creators into Toutiao, cleans and enriches them, detects near-duplicate and rewritten content, and makes them available to recommendation within minutes.
Toutiao built its business on aggregating news at massive scale, so ingestion freshness and duplicate suppression directly affect feed quality. The interviewer checks a staged streaming design, a scalable near-duplicate method such as SimHash or MinHash with LSH, and how storage serves both online and offline consumers.
What the Interviewer Expects
- Break the pipeline into ingest, parse, enrich, dedup and publish stages over a log
- Use idempotent processing keyed by content hash and source id
- Explain SimHash or MinHash with LSH for near-duplicate lookup
- Store raw and processed content separately for reprocessing
- Define freshness SLOs and backpressure
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 do you decide which duplicate becomes the canonical article?
- A rewritten article changes 30% of words: does your method still catch it?
- How do you reprocess a week of articles after a classifier update?
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: accept articles via publisher API, RSS-style feeds and the creator app; extract text and images; tag category, entities and quality; cluster near-duplicates; publish to the candidate pool....
High-Level Design
Sources write raw payloads to object storage and an event to Kafka. Stream jobs (Flink) parse HTML into text and images, normalize, then call enrichment services (language, category, NER, quality and ...