Skip to main content
← PROBLEMS / SYSTEM-DESIGN
An end-to-end domain learning journey

Design a 10M Eval/sec Distributed
Feature Flag & Experimentation Platform.

Design a LaunchDarkly/Statsig-scale feature flag platform supporting 10M evaluations/sec, <500 ms global kill-switch propagation across 500k SDKs, and 100:1 deduplicated exposure analytics.
Start the journey2 stages· Last modified Dec 1, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

When scaling feature flags to 10M evals/sec, stream JSON-Patch deltas via SSE and deduplicate exposures 100:1 in SDKs.

TL;DR30-second simplified summary
▾

Delivers <500ms kill-switch convergence and protects ClickHouse from raw telemetry floods.

Before you begin · Building blocksAlready know these? Jump to Stage 01 ↓
Server-Sent Events (SSE) fan-out
Atomic snapshot pointer swaps
Chi-Square SRM & CUPED
Full walkthrough · 2 stages
01
Stage 1 • Hot Pathintermediate

0.01ms Atomic Snapshot Evaluation & LKG Fallback.

Why this matters: Eliminate network hops from application flag checks.

Application threads read an AtomicReference<RulesetSnapshot> with zero locks. If SSE disconnects on startup, the SDK loads a Last-Known-Good disk snapshot or safe default.

Control PlaneDelta CompilerRegional SSE RelaysSDK Atomic SnapshotKafkaClickHouseSRM/CUPED
02
Stage 2 • Telemetryadvanced

100:1 Exposure Deduplication & SRM Gate.

Why this matters: Protect analytics storage and detect biased experiment splits early.

An SDK-side LRU cache suppresses repeated (user_id, flag_key, variant) exposure logs within a 60s window, shrinking 10M evals/s to 100k events/s into Kafka and ClickHouse.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

Why do feature flag SDKs evaluate rules locally in memory instead of calling a central microservice?

Recommended Learning Flow