ad-click-aggregation

Design high-volume ad click aggregation with Kafka, Flink, Druid, and S3.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/hung-phan/system-skills --skill ad-click-aggregation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ad-click-aggregation
Source: https://github.com/hung-phan/system-skills/tree/main/skills/system-review/references/interview-templates/ad-click-aggregation
Command: npx skills add https://github.com/hung-phan/system-skills --skill ad-click-aggregation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires kafka, flink, druid, s3, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a comprehensive system design for accurately aggregating ad clicks at a massive scale, addressing challenges with real-time and batch processing, and ensuring exact-once semantics.

Core Features & Use Cases

  • Real-time Aggregation: Provides sub-second freshness for ad click counts in dashboards.
  • Batch Reconciliation: Ensures exact counts for billing and reconciliation with idempotent deduplication and watermarks for late events.
  • Use Case: Ideal for systems handling billions of ad clicks daily, where precise counting and reliable data integrity are crucial for billing and analytics.

Quick Start

To perform a system review of your ad click aggregation pipeline, use the command: /system-review review my_ad_pipeline_design.pdf

Frequently Asked Questions about ad-click-aggregation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ensure exactly-once semantics for high-volume ad click aggregation?

Exactly-once ad click aggregation is ensured by using Flink for stream processing with idempotent deduplication and watermarks to handle late events, reconciled with batch processing via S3.

What is the best way to handle late events in real-time ad click aggregation pipelines?

The best way to handle late events in ad click aggregation is using Flink watermarks, which allow the pipeline to wait for delayed data and ensure accurate counts during batch reconciliation.

Can I use Kafka and Flink together for sub-second ad click dashboard freshness?

Yes, Kafka and Flink work together to provide sub-second ad click freshness by leveraging Kafka for high-throughput ingestion and Flink for real-time stream processing and aggregation.

Does ad click aggregation at scale require batch reconciliation for accurate billing?

Yes, batch reconciliation is required for accurate billing in ad click aggregation, ensuring exact counts by reconciling real-time stream data with idempotent deduplication against S3 storage.

How do I use Druid for real-time analytics on aggregated ad clicks?

Druid is used for real-time analytics on aggregated ad clicks by serving sub-second queries to dashboards, ingesting the pre-aggregated streams processed by Flink and stored in S3.

Why does my ad click aggregation pipeline produce duplicate counts during batch processing?

Duplicate counts in ad click aggregation occur without idempotent deduplication; implementing exactly-once semantics in Flink and reconciling with batch processes in S3 prevents this.