Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an Advertiser Campaign Configuration Platform

Model hierarchical advertising campaigns, validate targeting edits, preserve immutable history, and publish consistent serving snapshots.

Problem statement

Design the data model and control-plane services for advertisers to create and edit campaign configurations. The hierarchy contains Advertiser, Campaign, AdGroup, Ad, and Creative entities. Ad groups carry audience-targeting rules, and every modification must remain attributable and reviewable in history.

For this exercise, edits occur in mutable drafts with optimistic versions; publishing validates the complete hierarchy and creates one immutable configuration snapshot that downstream serving systems may consume consistently.

The public control plane supports create, update, inspect, diff, publish, and rollback-to-a-new-version operations. Ad auctions, bidding algorithms, impression measurement, billing, creative rendering, and the internals of audience-segment computation are outside scope.

Numeric scale, availability, and latency values below are practice assumptions rather than source-reported facts.

What to build

  1. Authorized advertisers can create and edit Advertiser, Campaign, AdGroup, Ad, and Creative objects while preserving hierarchy and referential invariants.
  2. An ad group can carry a validated, versioned audience-targeting expression with an explainable normalized form.
  3. Every accepted modification records actor, request identity, prior and next versions, timestamp, and a reproducible field-level diff.
  4. Publishing validates the complete draft and atomically exposes one immutable configuration generation; rollback creates another audited generation.

At scalePractice assumption

  • Store 10 million advertisers, 500 million active hierarchy entities, and 20 billion retained audit events.
  • Accept 50,000 control-plane writes per second globally and serve 500,000 configuration reads per second to downstream consumers.
  • Acknowledge an edit within 500 milliseconds at p95 and propagate a published generation to 99.9 percent of serving readers within 60 seconds.
  • Preserve acknowledged edits through one availability-zone failure and retain modification history for seven years.