Design an ad click aggregation service

Quick Overview

This question evaluates a candidate's ability to design scalable, fault-tolerant streaming data ingestion and aggregation systems, including handling high-throughput events, deduplication, late and out-of-order arrivals, and providing near-real-time and historical metrics.

Design an ad click aggregation service

Company: Meta

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a backend service that ingests ad impression and click events and provides aggregated metrics. Requirements: - Ingest a high-volume stream of events: {ad_id, campaign_id, user_id(optional), event_type(impression|click), timestamp}. - Provide near-real-time aggregates (e.g., last 1 min / 5 min / 1 hour) and historical daily aggregates. - Support queries like: clicks, impressions, CTR by ad_id/campaign_id over a time range. - Handle duplicate events and late/out-of-order events. - Be horizontally scalable and fault tolerant. Out of scope (optional): attribution across devices, fraud detection, complex segmentation.

Overview: This question evaluates a candidate's ability to design scalable, fault-tolerant streaming data ingestion and aggregation systems, including handling high-throughput events, deduplication, late and out-of-order arrivals, and providing near-real-time and historical metrics.

|Home/System Design/Meta
Meta logo
Meta
Feb 25, 2026
mediumSoftware EngineerOnsiteSystem Design
4
0

Design a backend service that ingests ad impression and click events and provides aggregated metrics.

Requirements:

  • Ingest a high-volume stream of events: {ad_id, campaign_id, user_id(optional), event_type(impression|click), timestamp}.
  • Provide near-real-time aggregates (e.g., last 1 min / 5 min / 1 hour) and historical daily aggregates.
  • Support queries like: clicks, impressions, CTR by ad_id/campaign_id over a time range.
  • Handle duplicate events and late/out-of-order events.
  • Be horizontally scalable and fault tolerant.

Out of scope (optional): attribution across devices, fraud detection, complex segmentation.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...