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
System Design
Software Engineer
Yahoo
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

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
stream processing
Kafka
deduplication
lambda architecture
OLAP
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 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 Problems
Sample 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
  1. Collectors (pixel and click redirect endpoints) assign a unique event id, add server timestamp, and write to a partitioned log (Kafka), keyed by campaign.
  2. Stream processor (Flink-style) ...

Submit Your Answer
Markdown supported

Related Questions