PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/OpenAI

Design an online ads serving system

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competency in large-scale, low-latency distributed system design, covering real-time ad selection and auction mechanics, API and data-model design, scaling, fault tolerance, near-real-time reporting, and privacy/compliance considerations.

  • hard
  • OpenAI
  • System Design
  • Software Engineer

Design an online ads serving system

Company: OpenAI

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design an online ads serving system that returns targeted ads within 100 ms end-to-end. Support campaign management, budgets, pacing, frequency capping, targeting (keywords, user segments, geo), ranking using predicted CTR/CVR and bid, real-time auctions, and near-real-time reporting. Specify APIs for ad request and response and define core data models. Outline the architecture (edge gateways, ad selector, feature store, model service, auctioneer, throttling and pacing service, caching, logging pipeline, offline analytics). Discuss auction choice and incentives, handling cold start, deduplication, A/B testing strategy, and privacy and compliance (e.g., GDPR/CCPA). Address scaling, storage and indexing choices, consistency guarantees, fault tolerance, backpressure, and capacity planning with back-of-the-envelope estimates.

Quick Answer: This question evaluates a candidate's competency in large-scale, low-latency distributed system design, covering real-time ad selection and auction mechanics, API and data-model design, scaling, fault tolerance, near-real-time reporting, and privacy/compliance considerations.

Related Interview Questions

  • Design an Instagram-like Feed System - OpenAI (medium)
  • Design Online Chess Matchmaking - OpenAI (hard)
  • Design a Distributed Crossword Solver - OpenAI (hard)
  • Design a Distributed Rate Limiter - OpenAI
  • Design a Distributed Crossword Solver - OpenAI (medium)
OpenAI logo
OpenAI
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
30
0

System Design: Low-Latency Targeted Ad Serving (≤100 ms E2E)

You are designing an online advertising serving system for web/app inventory with a strict end-to-end latency SLA of 100 ms (client request to ad response). Assume multi-region deployment and peak global load.

Functional Requirements

  • Real-time ad selection and auction within 100 ms end-to-end.
  • Targeting: keywords/context, user segments, and geography.
  • Campaign management: budgets (daily/total), pacing, schedules, frequency capping, creatives.
  • Ranking: combine advertiser bid with predicted CTR/CVR and quality signals.
  • Real-time auctions and pricing.
  • Near-real-time reporting for impressions, clicks, spend, basic conversions.

What to Deliver

  1. APIs
    • Define an ad request API (input fields) and ad response API (output fields).
  2. Core Data Models
    • Specify entities for campaign/line item, creative, targeting, budget/pacing, user segments, and event/log schemas.
  3. Architecture
    • Outline components and data flow: edge gateways, ad selector, feature store, model service, auctioneer, throttling/pacing, caching layers, logging/streaming pipeline, and offline analytics/warehouse.
  4. Auction Mechanics and Strategy
    • Choose an auction (e.g., first-price, second-price/GSP, VCG), explain incentives and trade-offs.
  5. Additional Topics
    • Handling cold start for new ads and new users.
    • Deduplication (impressions/clicks/events; creative dedupe within response).
    • A/B testing strategy and experiment bucketing.
    • Privacy and compliance (GDPR/CCPA, consent, data retention, DSAR).
  6. Non-Functional Requirements
    • Scaling approach, storage and indexing choices, consistency guarantees.
    • Fault tolerance, backpressure strategies.
    • Capacity planning with back-of-the-envelope estimates (traffic, CPU for scoring/auction, storage for logs/features, network bandwidth).

Constraints and Assumptions (you may refine)

  • 100 ms total E2E budget (assume ~50–70 ms server-side budget to account for network/client).
  • Peak traffic: choose and justify a realistic peak QPS (e.g., 20k–100k QPS globally); design should scale.
  • Near-real-time reporting: ≤5 minutes latency.
  • Availability target: ≥99.9% per region with graceful degradation.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More OpenAI•More Software Engineer•OpenAI Software Engineer•OpenAI System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.