Design a feature flag and A/B testing platform like LaunchDarkly or Statsig. Support millions of SDK clients evaluating flags at the edge in under 10ms, consistent user bucketing across sessions, streaming config updates, percentage rollouts with prerequisite flags and segments, billions of exposure events per day for experiment analysis, statistical significance calculation, guardrail metrics with automated rollback, and kill switches for incident response. Handle multi-environment promotion, flag lifecycle management, and compliance requirements.
Suggested time: 90 minutes
Loading the workspace...
Feature flag systems look deceptively simple — a key-value store saying "feature_X is on" — but the real problem is evaluating rules for the right user, in the right environment, on millions of clients, in under 10ms, with consistent bucketing across sessions and devices, while shipping exposure events to a warehouse for statistical analysis. That last bullet is why LaunchDarkly, Statsig, Optimizely, and Split exist as products rather than being an afternoon hack.
Dark launch
A/B test
Kill switch
Targeting
Design a Feature Flag and A/B Testing System: editorial solution
Community solutions for Design a Feature Flag and A/B Testing System
The building blocks this design relies on, each explained in its own lesson.
Design a Web Analytics Tool (medium)