Skip to main content

Ad Click Aggregator

Difficulty: Hard

What It Tests

High-throughput event ingestion, windowed aggregation, deduplication, billing accuracy.

Topics Covered

Hello Interview Breakdown

Read the full Hello Interview breakdown →

Approach Hints

  • Ingest click events to Kafka partitioned by ad_id so all clicks for the same ad land on the same partition (ordered processing)
  • Flink consumes and aggregates in 1-minute tumbling windows; deduplicate within each window using a bloom filter per ad
  • Write windowed aggregates to a time-series DB; serve real-time dashboards from the stream layer and billing reports from the batch layer (Lambda architecture)
  • Nightly batch reconciliation job reprocesses raw events from Kafka for billing-accurate totals, correcting any approximation from the stream layer

Video Walkthroughs