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.
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.
What practical anomaly-detection techniques would you use to catch a sudden divergence between treatment and control while an experiment is ramping (control charts, CUSUM, EWMA, changepoint detection, seasonal baselines)? How do you pick between them, set thresholds, and avoid drowning the team in false alarms from ordinary noise?
Sample Answer
Direct answer
Control charts and CUSUM are good defaults for catching a sustained shift once you have a stable baseline; EWMA weights recent data more heavily and reacts faster to a moderate, ongoing drift; changepoint detection is the right tool when you don't know in advance what kind of shift to expect and want the algorithm to find where the underlying process changed. Avoid false positives from ordinary noise by requiring a minimum warmup period to establish a trustworthy baseline variance, and by tuning the alert threshold against that metric's own historical noise rather than a one-size-fits-all number.
Structured elaboration
- Control charts (like a Shewhart chart) flag a single point that's an extreme outlier relative to a fixed baseline mean and standard deviation; simple and interpretable, but slow to catch a moderate, gradual shift because each point is judged independently.
- CUSUM (cumulative sum) accumulates small deviations over time, so it's specifically good at catching a persistent, moderate shift that no single point would trigger on its own, at the cost of needing a tuned "slack" parameter that trades detection speed against false-alarm rate.
- EWMA weights recent observations more than older ones (via a decay parameter alpha), giving a faster reaction to a real, ongoing change than a plain control chart while smoothing out single-point noise; the trade-off is a genuine subtlety worth being careful about: the variance estimate used for the threshold has to be built from PAST points only, or a real regression can inflate its own threshold and hide from the detector (a bug we caught and fixed in exactly this way while implementing an EWMA detector for this same problem).
- Changepoint detection looks for the point in a time series where the underlying distribution's parameters genuinely change, without assuming in advance what kind of shift (mean, variance, or both) to expect; it's more flexible but computationally heavier and harder to run cheaply on every metric, every hour.
Avoiding false positives specifically: require a warmup window (typically the first several intervals) before any check is allowed to fire, since the variance estimate is unreliable with too little history; and calibrate the threshold in units of that metric's own recent variability rather than an absolute number, since a metric that's naturally noisier day-to-day needs a wider band than a very stable one.
Any of these detectors improves over time if it's allowed to LEARN a baseline from history rather than using a fixed rule forever: modeling the metric's normal daily and weekly seasonality (a baseline model, not just a flat mean) and feeding confirmed false positives back into the baseline sharpens precision the longer the detector runs. Whatever detector is chosen also needs an explicit escalation path once it fires: a moderate flag pages an on-call owner for a judgment call, while a severe, high-confidence flag should be wired into the same automated pause-or-rollback machinery guardrail breaches use elsewhere, since an anomaly detector that only produces a dashboard entry with no downstream action is exactly as useful as no detector at all.
Worked example
An EWMA-based detector flagged a conversion-rate regression that turned out to be real (a login-flow bug), but the same detector, before a fix, occasionally fired on ordinary noise shortly after warmup because too little history had accumulated to estimate variance reliably yet. Extending the warmup window and using only PAST variance (never the current point's own deviation) to judge the current point resolved both the missed-detection risk and the early false-positive risk in the same fix.
Trade-offs and pitfalls
The core trade-off across all of these is detection speed versus false-alarm rate: a more sensitive detector (tighter threshold, shorter warmup) catches real regressions faster but fires more often on noise; a more conservative one is quieter but slower to react to a genuine problem. There's no threshold-free answer here; the right calibration depends on how costly a missed detection is (a payments regression warrants a more sensitive, noisier detector) versus how costly alert fatigue is for that team.
Design an analytics pipeline for product experimentation at scale that a product manager can self-serve from: near-real-time metrics, reliable attribution, and an interface a non-engineer can trust. Sketch the components, data flow, storage choices, and how you would validate the pipeline before PMs rely on it.
Sample Answer
Direct answer
A product-manager-facing analytics pipeline for experimentation needs the same correctness as an engineer-facing one, but it additionally has to be trustworthy and legible to someone who isn't going to read the underlying SQL: near-real-time metrics, reliable attribution back to the feature that caused them, and an interface that surfaces uncertainty honestly rather than a single confident-looking number.
Structured elaboration
flowchart LR
Client[Client/Server SDKs] --> Ingest[Ingestion + exposure-join]
Ingest --> Hot[(Hot store: pre-aggregated, minute-level)]
Ingest --> Cold[(Cold store: raw immutable events)]
Cold --> Batch[Daily batch: authoritative recompute + validity checks]
Hot --> Serving[PM-facing serving layer]
Batch --> Serving
Serving --> Dashboard[Self-serve dashboard: plain-language + drill-down]
Validity[SRM / guardrail engine] --> Serving
- Data flow: client and server SDKs fire exposure and outcome events; an ingestion layer joins each event to its experiment exposure and writes two paths in parallel: a hot, pre-aggregated path (per-variant counts and sums refreshed every few minutes) and a cold, raw immutable event log.
- Storage choices: the hot path lives in a low-latency, pre-aggregated store (a key-value or in-memory-cache-backed table keyed by experiment_id/variant/metric, sized for read-heavy dashboard traffic, not for arbitrary ad-hoc queries) so a PM's page load never triggers a full table scan. The cold path lives in a columnar, append-only store (a data warehouse table partitioned by event date) that a nightly batch job scans to produce the authoritative, fully-reconciled numbers; keeping raw events here, rather than only the aggregates, is what lets a later bug fix reprocess history instead of trusting the original aggregation forever.
- Reliable attribution: the join between "this user saw this experiment" and "this user did this business-relevant action" has to be validated, not assumed; a PM-facing dashboard that silently misattributes revenue to the wrong experiment because of an exposure-join bug is worse than no dashboard at all, because it looks authoritative.
- Interface for PMs specifically: a layer above the raw metric store translates statistical output (a confidence interval, a p-value) into a plain-language statement ("we are fairly confident this improved conversion by 2 to 4 percent") plus an explicit flag when the result is NOT yet reliable (too early, underpowered, or an active guardrail breach), because a PM without statistical training will otherwise read "not yet significant" as "no effect" or "still significant" past the point where continued exposure is even ethical.
- Validation before it's trusted: automated checks (the same SRM and guardrail machinery used elsewhere) gate what actually reaches the PM-facing view, and before general rollout the pipeline itself should be validated by running it against experiments with a KNOWN answer (a historical experiment whose result was already independently confirmed, or a synthetic A/A test) and confirming the self-serve numbers match, so PMs aren't the first people to discover a pipeline bug.
Worked example
A PM launches a checkout experiment and checks the dashboard three hours in, seeing "+8% conversion, not yet significant." Without an explicit power/significance-status indicator, that phrase alone invites either premature celebration or premature abandonment. Surfacing "based on current traffic, we expect to be able to detect a meaningful effect by day 5" alongside the raw number gives the PM the context to wait rather than act on noise. Meanwhile, because the hot path only holds minute-level aggregates rather than raw events, a suspicious number is always cross-checked against the cold-store recompute before anyone escalates it as a real anomaly.
Trade-offs and pitfalls
The tension is between simplicity (a PM wants one clear number) and honesty (the underlying uncertainty is real and shouldn't be hidden). Oversimplifying into a single green/red "winning/losing" badge trains PMs to stop-early on noisy wins; over-exposing raw statistical detail (bare p-values, confidence intervals with no interpretation) makes the tool unusable for its actual audience. On the storage side, keeping only pre-aggregated numbers is cheaper but makes a later bug unrecoverable (there's no raw data to reprocess); keeping full raw events is more expensive to store but is what makes the pipeline auditable and fixable after the fact. Most platforms land on a middle layer: a plain-language confidence statement backed by the real numbers one click away, sitting on top of a hot aggregate store for speed and a cold raw-event store for correctness.
As the head of the experimentation platform, create a 6-month plan to onboard 20 product teams onto a centralized platform while preserving statistical rigor and still letting teams move on their own schedule. Include the technical migration steps, training, templates, governance phases, success metrics for the rollout, and which platform features have to exist before you can onboard the first team.
Sample Answer
Direct answer
Sequence the 6-month onboarding so the platform's must-have features (self-serve config, automated validity checks, a shared metric catalog, and a set of standard templates) are proven with a small pilot group of teams before broad rollout, run technical migration and training in parallel tracks rather than serially, and measure success not just by "teams onboarded" but by whether those teams' experiments are actually meeting the statistical rigor bar, since onboarding a team that then runs sloppy experiments isn't real success.
Structured elaboration
- Months 1 to 2, pilot: onboard 3 to 4 representative teams (chosen to cover different risk profiles: a low-risk marketing team, a higher-risk payments-adjacent team) onto the platform, using this period to surface real gaps in the self-serve tooling, templates, and governance model before scaling to everyone.
- Templates: ship a small set of standardized, versioned templates so a team's onboarding lift is filling in a form, not inventing a process from scratch, an experiment-configuration template pre-wired to the shared metric catalog and default guardrails, a launch-readiness checklist template covering pre-registration and SRM setup, and a results-readout template that presents lift, confidence interval, and guardrail status in the platform's standard format. Teams that start from these templates inherit governance-compliant defaults automatically, which is a materially cheaper and more consistent onboarding path than each team rebuilding its own launch checklist and report format independently.
- Months 2 to 4, phased rollout: onboard the remaining teams in waves, each wave including migration of any existing homegrown experimentation the team was running (mapping their old ad hoc metrics into the shared catalog and their own launch process into the standard templates, not just their code), plus mandatory training on the platform's guardrails (why pre-registration matters, how to read a sequential-testing dashboard, how to fill out the launch-readiness template).
- Months 4 to 6, autonomy and governance maturity: shift from platform-team-assisted launches to genuine self-service for low-risk experiments using the standard templates, while the risk-tiered approval workflow (discussed elsewhere) takes over for anything higher-stakes, so the platform team's ongoing role becomes maintaining shared infrastructure and templates rather than hand-holding every launch.
- Required platform features before the FIRST team onboards: at minimum, self-serve configuration with pre-launch validation, SRM and basic guardrail monitoring, a shared metric catalog, and the experiment-configuration and launch-readiness templates; without these, the pilot teams would be testing an incomplete platform and the lessons learned wouldn't generalize.
- Success metrics: not just "number of teams onboarded" but the rate of properly pre-registered experiments, the rate of SRM-clean launches, template adoption rate (are teams actually using the standard templates or working around them), and (later) whether experiment velocity for onboarded teams actually increased versus their prior ad hoc process, since a slower but far more rigorous platform is a real trade-off worth being honest about, not something to hide behind a raw "teams onboarded" count.
Worked example
A team's existing homegrown pricing-experiment scripts define "conversion" slightly differently from the shared metric catalog. Migrating that team means more than pointing their launches at the new platform, it means an explicit reconciliation step where the team, together with the platform team, maps their historical definition to the standard one, documents where the two differ, and moves their launch process onto the standard experiment-configuration and results-readout templates, so historical experiment results and newly-onboarded ones remain comparable rather than silently using two different definitions of the same word and two different report formats.
Trade-offs and pitfalls
Rushing every team onto the platform in month one to hit an aggressive "teams onboarded" target risks skipping the reconciliation, training, and template-adoption work that actually makes the migration successful, producing teams that are nominally "onboarded" but still running experiments with the same rigor gaps they had before. The pilot-then-wave approach costs calendar time upfront but catches integration, governance, and template gaps while the blast radius is still small, which is cheaper than discovering them after all 20 teams have already migrated.
Design a scalable assignment algorithm for experiments that must support sticky assignment across a user's devices and sessions, deterministic bucketing, and fast evaluation from many microservices. What data would the assignment call need, and how would you keep it both low-latency and consistent across regions?
Sample Answer
Direct answer
The assignment call needs the user's stable identifier, the experiment id (or the set of active experiments to evaluate), and a locally cached copy of each experiment's current configuration, and it stays low-latency and consistent across microservices by pushing configuration to every service ahead of time rather than looking it up centrally on each request.
Structured elaboration
- Sticky assignment across devices and sessions requires a stable identity to hash on. When a user isn't logged in, this usually means falling back to a device or cookie identifier, with an explicit reconciliation step at login time to decide which identity's prior assignment "wins" if the two disagree, since inconsistent handling here is one of the most common sources of a user seeing both variants across sessions.
- Deterministic bucketing: hash(namespace, experiment_id, user_id) mapped into the allocation, computed identically wherever it's needed, which means the hashing algorithm and the exact input string format must be specified precisely enough that a Python implementation and a Java implementation produce byte-identical results.
- Fast evaluation from many microservices: each service holds its own local, periodically refreshed copy of the experiment configs (pushed via a lightweight pub/sub update or pulled on a short interval), so an assignment lookup never makes a network call to a central service in the hot path; the trade-off is a brief staleness window (typically seconds) between a config change and every service seeing it.
- Consistency across regions: configuration replication needs to be eventually consistent across regions with a bounded lag, and the hashing itself, being a pure deterministic function of inputs, is naturally region-agnostic as long as every region has the same config and the same hash implementation.
Worked example
A user starts a session logged out (assigned via a cookie id), then logs in mid-session. If the login-time reconciliation naively re-hashes on the newly available user id, the user can flip from control to treatment mid-session, which is exactly the kind of assignment instability that breaks the causal interpretation of the experiment. The fix is to persist the FIRST assignment decision (whichever identity made it) as authoritative for that user going forward, rather than recomputing whenever a "better" identifier becomes available.
Trade-offs and pitfalls
Pushing full configuration to every service ahead of time trades a small staleness window for much better latency and resilience (a service can still evaluate correctly even if the central config service is briefly unreachable); the alternative, a synchronous central lookup, is simpler to reason about but adds a single point of failure and latency to every request. Multi-region consistency for the assignment reconciliation table specifically (which identity was assigned first) is the harder problem and usually needs a conflict-resolution rule (first-write-wins, keyed by timestamp) rather than assuming perfect synchronous replication.
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.