← Questions

Design an A/B testing platform

0
AirbnbSystem designLast asked Apr 2026

A system design interview question asked in Airbnb's system design round, last asked Apr 2026. It tests experimentation, analytics and feature flags.

Design a platform that lets product teams define an experiment, assign eligible users consistently to control or treatment, serve the assigned variant, collect exposure and outcome events, and compute results they can trust. It runs many experiments at once with gradual ramp-ups.

Requirements

  • Functional: create and configure experiments (eligibility rules, allocation percentages, variants, metrics); assign users deterministically; log exposures and outcomes; compute primary and guardrail metrics with statistical tests; ramp traffic up and down; audit configuration changes.
  • Non-functional: variant assignment is on the request path and must be fast and highly available; the analysis path can be asynchronous; results must be reproducible. No cloud vendor or traffic number is fixed.

Clarifying questions

  • What is the unit of randomization: user, device, account or request?
  • Must experiments on the same surface be mutually exclusive?
  • How fresh must metrics be, and which decision rules are expected?
  • How should anonymous users, cross-device identity, bots and late events be handled?
  • What should happen when the configuration or assignment service is down?

What a strong answer covers

  • Assignment by hashing the unit ID with an experiment salt into buckets, so it is stable, unbiased and needs no stored state; SDKs that evaluate cached configuration locally.
  • Versioned configuration with validation, approvals, rollout and rollback, and the configuration version recorded on every exposure.
  • Exposure logging with deduplication, and outcomes attributed only after a valid exposure.
  • A batch or streaming pipeline that produces metrics from reproducible data; variance reduction; guarding against peeking.
  • Overlapping experiments with layers or namespaces; sample-ratio mismatch checks.
  • Monitoring for assignment failures, event loss, skew, stale configuration and metric regressions; privacy, retention and access control.

Follow-ups

  • How do you go from 1% to 50% allocation without moving users who were already assigned?
  • How do you detect and diagnose a sample-ratio mismatch?
  • How do you support mutually exclusive experiments on one surface?
  • An exposure event arrives twice, or after its outcome. What happens?

Where it's asked

What it tests

experimentation · analytics · feature flags

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing