Experimentation Platforms and Infrastructure Questions
Infrastructure for A/B testing and experimentation: assignment/bucketing, metric pipelines for experiments, guardrail and variance-reduction plumbing, and experiment result storage. Covers building the platform that powers trustworthy online experiments at scale. Distinct from the statistics of experiment analysis.
Your product team reports unexpected metric contamination after several rapid rollouts and overlapping feature flags. Walk through the operational, step-by-step plan you would run to identify, quantify, and mitigate the contamination sources while minimizing disruption to the teams shipping features.
Sample Answer
Direct answer
Run a step-by-step operational response: first quantify the contamination's actual scope (which experiments, which time window, roughly how many users affected), then decide whether affected experiments need to pause, be re-analyzed with an explicit contamination adjustment, or be allowed to continue with the contamination noted as a caveat, and only after containment turn to the longer-term fix (a coordination policy or a traffic-layering change) that prevents the same class of collision from recurring.
Structured elaboration
- Scope the problem first, before acting: pull the actual user-overlap and timing data across the flags and rollouts implicated, rather than reacting to the qualitative complaint alone. Contamination reports are often vaguer than the actual data ("something feels off") and the first job is turning that into a specific, bounded claim.
- Triage by severity: an overlap that's small and unlikely to meaningfully bias either experiment's primary metric can often be left running with a documented caveat; a large, high-confidence contamination affecting a decision that's about to be made should pause the affected experiments immediately.
- Communicate to the teams whose experiments are affected: they need to know before they make a ship decision on data that might be compromised, not after.
- Fix the immediate cause: this is often an unplanned interaction between two independently-launched flags or a rollout schedule collision rather than a single experiment's fault, so the fix may involve coordinating a schedule change with a different team, not just editing one experiment's configuration.
- Address the systemic cause afterward: only once the immediate situation is contained does it make sense to invest in the longer-term prevention, whether that's an automated pre-launch overlap check, a shared calendar of high-traffic-surface launches, or a formal coordination/prioritization policy for a specific contested surface (a busy city, a shared page) where conflicts recur.
Worked example
Two rapid feature-flag rollouts on the same page overlap for four days before anyone notices, and a third team's active experiment shares that page too. Quantifying the actual overlap shows it affects roughly 12% of one experiment's traffic during a 4-day window out of its planned 14-day run. Given the size and duration, the team decides to exclude that 4-day window from the final analysis (using the remaining 10 days, which is still enough for the planned power) rather than pausing and restarting, which would have cost the experiment more total time than simply excluding the contaminated window.
Trade-offs and pitfalls
Reacting to every contamination report by immediately pausing everything involved is the safest but most disruptive option, and overusing it trains teams to under-report ambiguous cases to avoid the disruption; underreacting (dismissing reports without actually quantifying scope) risks shipping a decision based on genuinely compromised data. The resolution is making the FIRST step, quantifying actual scope, fast and cheap enough that a team doesn't have to choose between "ignore it" and "stop everything" before they even know how bad it is.
Design the self-service UI and guardrails for an experimentation platform that let product teams create and launch experiments without engineering help, while preventing misuse. Cover experiment templates, validation checks, a rollout wizard, an experiment catalog, and permission tiers, and sketch the user flow from idea to launch.
Sample Answer
Direct answer
Self-serve UI design for an experimentation platform means giving product teams the ability to create and launch an experiment without engineering help, while the platform itself enforces the guardrails a human reviewer used to provide manually: templates that start teams from a known-good configuration, validation checks that block an inconsistent launch, a rollout wizard that turns a risky all-at-once launch into a guided, gated ramp, and permission tiers that scale the amount of self-service allowed to the risk of what's being touched.
Structured elaboration
A typical creation flow: (1) pick an experiment template (a standard A/B test, a feature-flag rollout, a multi-variant test) rather than starting from a blank form, since templates encode good defaults and reduce the chance of a misconfigured experiment; (2) define the hypothesis and primary/guardrail metrics from a curated, searchable catalog rather than free text, so metric definitions stay consistent across teams; (3) set targeting and allocation, with real-time validation (does this targeting rule match a non-zero, non-suspicious population; do allocations sum to 1.0); (4) a rollout wizard step that replaces a single "launch to X%" field with a guided ramp schedule: the user picks a starting percentage (defaulting to a small value like 1-5% for anything not already proven safe), the wizard proposes subsequent stages (5%, 25%, 50%) each gated by a minimum soak time and passing the automated pre-launch and guardrail checks, and the user can accept the default schedule or customize it, with the platform visually showing "you are here" against the planned stages once the experiment is live; (5) a pre-launch checklist screen that surfaces anything the automated validity checks flag, which the user must acknowledge or fix before the launch button is enabled; (6) an experiment catalog view so anyone can see what's currently running on a given surface, which doubles as the interference-detection surface described elsewhere.
Permission tiers gate what a team can do unassisted: a low-risk experiment (UI copy, non-payment surface, traffic under a threshold) can go from creation to launch in minutes with no review, including using the rollout wizard's default ramp schedule unmodified; anything touching payments, a schema change, or traffic above a threshold requires an explicit approval step from a designated approver role, encoded as a workflow state rather than an out-of-band Slack message, and the wizard additionally requires that approver's sign-off before it will advance the ramp past its first stage.
Worked example
A growth team wants to test three variants of an onboarding screen. Starting from an "A/B/n test" template pre-fills the standard metric set (activation rate, day-1 retention as a guardrail) and standard allocation logic, so the team only has to specify the actual variants and targeting, cutting a configuration task that used to take a platform engineer half a day down to something a PM can complete in fifteen minutes, with the same validity checks running either way. When they reach the rollout wizard, the default 1% -> 10% -> 50% schedule is proposed automatically since the experiment is UI-only and under the platform's low-risk traffic threshold; the team accepts the default rather than customizing it, and the wizard automatically advances the ramp to the next stage once each stage's minimum soak time and guardrail checks pass, with no further manual clicks required.
Trade-offs and pitfalls
The design tension is discoverability versus power: a UI simple enough for a first-time user to configure alone tends to hide advanced options (custom stratification, non-standard traffic layers, a fully custom ramp schedule) that power users legitimately need. Most platforms resolve this with progressive disclosure (an "advanced settings" section collapsed by default, and a rollout wizard that proposes sensible default stages but allows a power user to edit them) rather than either a stripped-down UI that frustrates experienced teams or a fully-exposed UI that overwhelms new ones.
Design a set of automated daily validity checks for experiments: sample-size/power check, exposure-imbalance test, metric-instrumentation-drift detection, and SDK error-rate check. For each check, sketch the SQL or pseudocode that computes it and propose an alert threshold and a corrective action.
Sample Answer
Direct answer
Build four automated checks: a sample-size/power check comparing accumulated traffic against the planned minimum-detectable-effect target, an exposure-imbalance (SRM) test, a metric-instrumentation-drift check comparing current event volume against a recent historical baseline, and an SDK error-rate check, each computed in a scheduled daily job with a concrete alert threshold and a defined corrective action.
Structured elaboration
- Sample-size/power check (pseudocode):
current_n = count(exposed_users)
required_n = precomputed_required_sample_size(mde, baseline_rate, alpha, power)
if current_n < required_n * 0.5 AND days_elapsed > planned_duration * 0.7:
alert("underpowered: unlikely to reach target sample size on schedule")
- Exposure-imbalance (SRM) test (SQL sketch):
SELECT variant, COUNT(DISTINCT user_id) AS n
FROM exposures WHERE experiment_id = :exp_id
GROUP BY variant;
-- feed observed counts into a chi-square goodness-of-fit test against the
-- configured allocation; alert if p < 0.001
- Metric-instrumentation-drift check: compare today's event volume per event type against the trailing 7-day median, flagging a drop of more than roughly 20% (a threshold tuned per event type's normal day-to-day variance) as a likely instrumentation break rather than a real behavior change.
- SDK error-rate check: track the error rate reported by each SDK version calling the assignment or exposure-logging endpoints, alerting when any single version's error rate rises meaningfully above its own recent baseline, which isolates version-specific bugs rather than being swamped by normal background error noise.
Corrective actions: an underpowered flag should prompt either extending duration or explicitly labeling the eventual read-out as exploratory; an SRM alert should pause new exposure until root-caused; an instrumentation-drift alert should pause metric reporting (not the experiment itself) until the drift is understood, since the experiment may still be running fine while only the measurement is broken; an SDK error-rate spike should page the owning team for that specific client version.
Worked example
A daily job finds that exposure event volume for one client platform dropped 35% versus its 7-day median, while the other platform's volume is stable. Rather than a real behavior change (which would show up gradually, not as a sudden day-over-day cliff on one platform only), this pattern strongly suggests an instrumentation break specific to that platform's latest release, and the automated action is to flag metric reporting for that experiment as unreliable pending investigation, rather than letting a broken measurement silently continue to feed the dashboard.
Trade-offs and pitfalls
Setting drift thresholds too tight on inherently noisy event types (ones with genuine day-of-week seasonality) produces frequent false alarms; setting them too loose misses real breaks for days. The practical fix is tuning each threshold to that specific event type's own historical variance rather than using one global percentage across every metric, and separating weekday from weekend baselines where seasonality is strong enough to matter.
Beyond purchase conversion, what less obvious guardrail metrics should you monitor for a mobile commerce checkout funnel experiment? For each one, explain how you would instrument it, why it matters, and what unintended consequence of the experiment it could reveal.
Sample Answer
Direct answer
Beyond purchase conversion, a mobile commerce checkout funnel experiment should watch things like cart abandonment rate at each specific step, payment-retry rate, app crash or ANR rate during checkout, support-ticket rate tagged to checkout, and average order value, because a change that improves the headline conversion number can still be quietly making the experience worse in a way that shows up first in one of these.
Structured elaboration
- Step-level abandonment rate: instrument each funnel step (cart, shipping, payment, confirmation) separately, not just the funnel's overall conversion, because a redesign can improve overall conversion while making one specific step meaningfully worse, and that detail is invisible in an aggregate number.
- Payment-retry rate: a rise here often precedes a drop in completion and can reveal friction (a confusing new payment UI) before it fully shows up as lost conversions, since some users will retry successfully and never register as a failure even though their experience got worse.
- App stability during checkout: a crash or ANR (app-not-responding) rate spike specifically during the checkout flow is a guardrail that a pure conversion metric would never catch, since a crashed session simply looks like an abandoned one with no distinguishing signal unless stability is instrumented separately.
- Support-ticket rate: a genuinely confusing but not-quite-broken flow shows up here days before it would show up as a conversion dip, since some fraction of confused users will complete the purchase anyway but complain about the experience.
- Average order value: completion rate can rise while order value quietly falls (users are completing purchases faster but buying less), netting out to no real revenue gain even though the primary metric looks like a clear win.
Worked example
A checkout redesign shows a genuine +2% lift in completion rate. Average order value simultaneously drops 3%, which the completion-rate metric alone would never surface. Net revenue per session is roughly flat, meaning the redesign didn't actually create value, it just changed the shape of the funnel, which is exactly the kind of result a team celebrating the headline conversion number would misread as an unambiguous win.
Trade-offs and pitfalls
Instrumenting every possible guardrail sounds safe but creates its own cost: too many guardrails on one experiment both burdens the multiple-testing correction and can produce a false alarm on some metric almost by chance, simply because there are so many being watched. The practical approach is a short, curated list agreed on once for the checkout surface specifically (not reinvented per experiment), reserving genuinely novel guardrails for experiments that have a specific reason to expect a novel failure mode.
Design a compact experiment configuration schema (variants, allocations, targeting rules, rollout phases, metric definitions, kill switch). Provide an example configuration and explain which fields the SDK needs for evaluation versus which fields only offline analysis needs.
Sample Answer
Direct answer
A compact experiment configuration needs the pieces both the SDK and offline analysis depend on: an id, the variants and their allocation percentages, targeting rules, a rollout schedule (which phase is currently live), the metric definitions this experiment is measuring, and a kill switch, structured so an SDK can evaluate it in milliseconds and an analysis job can reconstruct exactly what configuration was live at any point in time.
Structured elaboration
{
"experiment_id": "checkout_redesign_v2",
"status": "running",
"variants": [
{ "key": "control", "allocation": 0.5 },
{ "key": "treatment", "allocation": 0.5 }
],
"targeting": { "country_in": ["US", "CA"], "app_version_gte": "4.2.0" },
"rollout_phases": [
{ "phase": 1, "traffic_pct": 5, "started_at": "2026-06-01T00:00:00Z" },
{ "phase": 2, "traffic_pct": 50, "started_at": "2026-06-05T00:00:00Z" }
],
"metrics": { "primary": "checkout_completion_rate", "guardrails": ["payment_failure_rate", "page_load_p95"] },
"kill_switch": false,
"config_version": 7
}
The SDK only strictly needs targeting, variants/allocations, the current rollout phase's traffic_pct, and kill_switch, since those are the fields that determine "does this user get evaluated at all, and into which bucket," and it needs them cached locally with low latency, since a request-time fetch to a central config store for every evaluation would be too slow at scale. Offline analysis additionally needs the metrics block (to know what to compute), the full rollout_phases history (to know what config was live at any past moment, not just now), and config_version (to detect that a mid-experiment configuration change happened, which the analysis has to account for or exclude).
Worked example
Six weeks into an experiment, someone asks "was this really running at 50% the whole time?" Because rollout_phases records each phase with its start timestamp rather than overwriting a single current_traffic_pct field, the answer is a direct lookup: 5% for the first four days, 50% after, which lets the analysis correctly exclude or separately model the low-traffic ramp period rather than assuming a constant allocation throughout.
Trade-offs and pitfalls
Making the schema too rich (embedding full statistical analysis parameters, verbose free-text descriptions) bloats what has to be fetched and cached by every SDK evaluation, most of which never needs those fields. Making it too thin (no config_version, no rollout_phases history, just a single current allocation) is cheap for the SDK but breaks reproducibility for analysis, since a config that only tracks "what's true now" cannot answer "what was true when this user was actually exposed."
Unlock Full Question Bank
Get access to all Experimentation Platforms and Infrastructure interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.