Katkat

Design an ad content delivery system with A/B testing

Warner Bros DiscoverySoftware Engineer · Technical Screen

Last updated

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 (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.