The interview problem

Practice prompt

Design an experimentation platform serving 100,000 feature decisions per second. Keep users in stable variants, support gradual enrollment and emergency shutdowns, and produce trustworthy exposure and outcome data for hundreds of concurrent experiments.

Original system-design practice, not a reported interview. Scale and targets are hypothetical. Technical references retrieved September 27, 2026.

1. Define the unit and decision contract

Clarify the randomization unit: user, account, organization or another cluster. If coworkers share the same workflow, randomizing individual users may cause interference between variants. A request ID is unsuitable when one user must see a stable experience across visits. Specify behavior for anonymous users who later sign in and for cross-device identity changes.

Separate assignment from exposure and outcome. Assignment selects a variant; exposure means the product reached the defined point at which that variant could affect behavior; an outcome is a later observation such as purchase or latency. A background flag fetch is not automatically an exposure.

Assume ordinary decisions should add under five milliseconds locally, while experiment configuration can propagate within a separately measured bound. Critical shutdowns need their own mechanism and propagation objective. State what happens when configuration, identity or telemetry is unavailable rather than silently treating every failure as an ordinary control assignment.

2. Keep the hot path local and versioned

The control plane stores immutable experiment revisions: eligibility, randomization unit, enrollment fraction, variant allocations, metric definitions, owner and start/stop state. A validated configuration publisher distributes signed or authenticated snapshots to SDKs and edge services. SDKs evaluate decisions locally from a cached revision, avoiding a remote database call for every page component.

The data plane emits assignment/exposure/outcome events into a durable ingestion service, then a deduplication and validation pipeline, a warehouse and scorecards. Every event carries experiment ID, assignment epoch, configuration revision, randomization-unit ID, variant, event ID, event time and receipt time. Minimize identifiers and restrict access; analysis rarely needs raw personal details.

A missing configuration uses a documented product fallback and records an evaluation failure separately. Do not label an unassigned fallback response as experimental control. If a unit was already assigned treatment but execution fell back, retain that assignment and record the execution failure; dropping it from assignment-based analysis can introduce bias. Otherwise a failing treatment delivery path can change group composition while appearing to be a valid experiment.

3. Preserve assignment through enrollment changes

Use a well-distributed deterministic hash over a stable unit ID and experiment-specific salt. Define canonical identity encoding, hash algorithm and bucket conversion identically across SDKs. Use domain-separated hash inputs to create separate enrollment and variant streams, and validate their empirical balance. For example, map each stream to a value in [0, 1), enroll users with enrollment value below 0.10 and split enrolled users using a second value below 0.50 for control. Raising enrollment to 0.20 adds users without moving existing ones between variants.

Keep the assignment epoch and salt fixed during the experiment. Do not include every configuration revision in the hash input, because an unrelated configuration edit would reshuffle users. Store explicit enrollment/assignment records when eligibility is mutable or historical membership must be preserved. Recomputability from a hash is not a substitute for recording which decision actually ran.

Changing a 50/50 allocation to 90/10 can move previously assigned users if hash ranges simply change. Either preserve prior assignments and apply new allocations only to new entrants, or start a new analyzed epoch with an explicit carryover plan. The resulting cohort proportions may not equal the latest target immediately.

Use separate salts for unrelated experiments. For experiments that must not interact, assign a shared mutually exclusive layer before assigning a variant. Layers reduce available sample size. They cannot prevent interference through shared inventory, social networks or infrastructure unless the randomization design addresses those shared effects.

4. Make exposure logging match the treatment mechanism

Instrument the decision point where the feature can affect behavior, and define an equivalent trigger in control. Logging exposure only when a treatment-only button is clicked selects users based on an outcome affected by treatment. Retain assignment-level analysis and carefully validate any triggered analysis.

Generate durable event IDs at the event's origin and reuse them on retry. Deduplicate delivery attempts without collapsing genuinely repeated interactions. Compute unique experimental units separately from event volume. A user with 100 visits is not 100 independent randomized users.

Join outcomes using the stable unit, experiment epoch and a documented attribution window. Preserve event time and receipt time so late events can update provisional results. Track missing identities, dropped events and unmatched joins by variant. A treatment that crashes before client telemetry flushes can look artificially good if failed sessions disappear.

5. Size telemetry independently from decisions

At 100,000 decisions/second and 300 bytes per logged decision, logging every evaluation produces 30 MB/second, or 2.592 TB/day of payload. Three copies would be 7.776 TB/day before compression, indexes and metadata. At a true exposure rate of 10% of decisions, exposure payload alone falls to 259.2 GB/day, but outcomes and diagnostics add separate volume.

Reducing repeated flag-fetch telemetry is different from silently sampling away exposure evidence. If sampling is necessary, define its unit and probability, keep it independent of variant outcomes and make analysis sampling-aware. Preserve enough assignment and quality telemetry to diagnose losses.

A two-hour ingestion outage at 10,000 exposure events/second creates 72 million events. Recovery capacity of 30,000 events/second with 10,000 continuing arrivals drains the backlog at 20,000/second: one hour. Bound client buffers, prioritize essential records and label incomplete windows when recovery cannot restore all events.

6. Block interpretation when the data is suspect

Run A/A tests, SDK consistency checks and synthetic exposure traces before relying on business metrics. Check allocation among the appropriate eligible randomized units, not among all events. Sample ratio mismatch can indicate assignment, delivery, logging or analysis defects; it is not itself proof of which stage failed.

For a fixed 50/50 design with 10,000 independently randomized units, observing 5,500 in A and 4,500 in B gives a simple chi-square statistic of 500²/5,000 + 500²/5,000 = 100. That is strong evidence against ordinary allocation noise under this design. First inspect bucketing, unit IDs, fallback behavior and joins rather than interpreting an apparent treatment win.

The expected ratio must reflect the actual design. Gradual enrollment, preserved assignments and cluster randomization may require a different expected-count calculation or test. Repeated quality alarms also need a monitoring policy. A balanced ratio does not prove all other data-quality checks passed.

Predefine primary metrics, guardrails, analysis unit and stopping rules. Use an appropriate sequential method if decisions are made continuously; repeatedly inspecting a fixed-horizon p-value changes its error properties. Keep metric versions and data watermarks visible so a scorecard can be reproduced.

7. Separate emergency response from inference

A kill switch stops harmful behavior even when a statistically conclusive business result is unavailable. Propagate shutdown through a high-priority configuration path, monitor acknowledgements and enforce a maximum age for cached critical configuration. Old offline clients cannot be assumed to receive the switch immediately; server-side enforcement may be necessary for consequential operations.

Record the shutdown time and affected revisions. Do not retroactively relabel treated users as control. Ending an experiment early for harm changes what can be concluded, but preserving user safety takes precedence over waiting for the planned sample.

Roll out SDK and assignment changes through compatibility tests: the same identity, salt and epoch must yield identical results across languages. Audit configuration edits, mutual-exclusion rules and owner permissions. A control-plane outage should not erase the cached experiment state or manufacture a new randomization epoch.

8. Follow-ups and self-review

Foundation: explain assignment versus exposure. Senior: increase enrollment without changing existing variants. Staff: evaluate a shared-marketplace experiment where one user's treatment affects another user's outcome.

Score 0–2 each for randomization identity, stable allocation, unbiased logging, capacity/recovery and trustworthy analysis. Full credit requires explicit treatment of telemetry loss and configuration fallback. Continue with selection bias and uncertainty estimates.

Sources and next steps

The platform design, hashing contract and arithmetic are original practice. These references inform data-quality concerns and do not imply a company asked this question.

Continue your preparation

Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.