Design an ad content delivery system with A/B testing

Read the full interview experience this question came from →

Quick Overview

This question evaluates system-design and distributed-systems competency, specifically real-time ad serving, targeting and campaign data modeling, high-throughput event logging, and A/B testing/experimentation infrastructure including experiment assignment and metric computation.

Design an ad content delivery system with A/B testing

Company: Warner Bros Discovery

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design an **ad content delivery (ad serving) system** that selects and serves ads to users, and supports **A/B testing / experimentation**. ## Core scenario A client (web/mobile app) requests an ad for a placement (e.g., homepage banner). The system must choose an eligible ad and return creative metadata quickly. ## Requirements ### Functional - Create/manage campaigns and creatives (basic campaign metadata is enough). - Targeting (at least: country/device/app placement; optionally user segments). - Select an ad to serve for each request. - Impression and click tracking. - Basic delivery controls (at least one): pacing/budget, frequency capping, deduplication. - **A/B testing**: run experiments that change selection/ranking logic or creatives; assign users deterministically to variants; log outcomes. ### Non-functional - Very low latency for ad requests (typically tens of milliseconds). - High throughput (can assume millions of requests/day+). - High availability. - Accurate enough reporting (define what must be real-time vs eventually consistent). ## Deliverables - High-level architecture and key services. - Data model/storage choices for campaigns, targeting, and events. - Serving path (request → decision → response) including caching. - Event logging pipeline and metrics. - A/B test design: assignment, exposure logging, metric computation, and guardrails. - Key trade-offs and failure modes.

Overview: This question evaluates system-design and distributed-systems competency, specifically real-time ad serving, targeting and campaign data modeling, high-throughput event logging, and A/B testing/experimentation infrastructure including experiment assignment and metric computation.

Read the full Warner Bros Discovery Software Engineer interview experience this question came from

Warner Bros Discovery logo
Warner Bros Discovery
Nov 15, 2025
mediumSoftware EngineerTechnical ScreenSystem Design
18
0

Design an ad content delivery (ad serving) system that selects and serves ads to users, and supports A/B testing / experimentation.

Core scenario

A client (web/mobile app) requests an ad for a placement (e.g., homepage banner). The system must choose an eligible ad and return creative metadata quickly.

Requirements

Functional

  • Create/manage campaigns and creatives (basic campaign metadata is enough).
  • Targeting (at least: country/device/app placement; optionally user segments).
  • Select an ad to serve for each request.
  • Impression and click tracking.
  • Basic delivery controls (at least one): pacing/budget, frequency capping, deduplication.
  • A/B testing : run experiments that change selection/ranking logic or creatives; assign users deterministically to variants; log outcomes.

Non-functional

  • Very low latency for ad requests (typically tens of milliseconds).
  • High throughput (can assume millions of requests/day+).
  • High availability.
  • Accurate enough reporting (define what must be real-time vs eventually consistent).

Deliverables

  • High-level architecture and key services.
  • Data model/storage choices for campaigns, targeting, and events.
  • Serving path (request → decision → response) including caching.
  • Event logging pipeline and metrics.
  • A/B test design: assignment, exposure logging, metric computation, and guardrails.
  • Key trade-offs and failure modes.