Build an Ad Impression and Click Counting Pipeline for Yahoo DSP
Last updated: November 29, 2026
Quick Overview
Design the pipeline that ingests ad impression and click events from Yahoo's demand-side platform and publisher sites, and produces near real-time campaign metrics for advertiser dashboards plus exact daily numbers for billing.
Yahoo
November 29, 20260
0
0 solved
Design the pipeline that ingests ad impression and click events from Yahoo's demand-side platform and publisher sites, and produces near real-time campaign metrics for advertiser dashboards plus exact daily numbers for billing.
Yahoo's advertising business depends on accurate event counting for both pacing dashboards and invoices. Interviewers want to see a streaming plus batch design, deduplication, late data handling, and invalid traffic filtering.
What the Interviewer Expects
- Estimate event volume in the millions per second at peak
- Use a durable log as the source of truth for raw events
- Run streaming aggregation for dashboards with windows and watermarks
- Run batch reconciliation for billing-grade exact numbers
- Deduplicate by event id and filter invalid traffic
- Explain how dashboard numbers converge to billed numbers
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 attribute a click to the impression that caused it?
- What happens if a region's collectors are down for 20 minutes and then replay?
- How would you support ad-hoc slicing by geo, device, and creative?
- How do you prevent a bot farm from inflating clicks on a publisher site?
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: count impressions, clicks, and spend per campaign, line item, creative, and publisher; dashboards within about a minute; daily billing totals that are exact and auditable. Non-functional: ...
High-Level Design
- Collectors (pixel and click redirect endpoints) assign a unique event id, add server timestamp, and write to a partitioned log (Kafka), keyed by campaign.
- Stream processor (Flink-style) ...