Prevent conflicting experiments with layers
enforcing mutual exclusion via layered assignment.
group conflicting experiments into one layer so a user's per-layer bucket maps to at most one of them; orthogonal layers can overlap.
What's really being asked
This checks whether you can enforce mutual exclusion structurally rather than by convention. The interviewer wants the layers or domains concept and a clear mechanism that makes it impossible, not merely discouraged, for a user to land in two experiments that fight over the same UI.
The full answer
The core idea is a layer: a partition of the traffic space dedicated to a group of experiments. All experiments that modify the same surface, here the checkout page, are placed in a single layer. Within that layer, each user is deterministically hashed, using the layer id and user id, into one of many buckets, and those buckets are allocated across the experiments in the layer. Because a user maps to exactly one bucket per layer, they are enrolled in at most one experiment from that layer, guaranteeing mutual exclusion for the checkout surface. Experiments on unrelated surfaces live in different, orthogonal layers, and a user is hashed independently per layer, so those experiments can overlap freely and reclaim full traffic. Domains generalize this: a domain can contain multiple layers, letting you carve out a slice of traffic for a set of mutually exclusive experiments while the rest of traffic runs orthogonally. The system, not a human, enforces the exclusion at assignment time.
The mistakes people make
Relying on a spreadsheet or team agreement to avoid overlaps, which fails as scale grows. Placing conflicting checkout experiments in orthogonal layers, so users get both and results are confounded. Using a single global mutual-exclusion rule for every experiment, which starves the roadmap of traffic. Hashing all experiments with the same seed, correlating assignments.
What usually comes next
How do you decide which experiments share a layer? Group by the surface or metric they could jointly affect. How do domains let you mix exclusive and orthogonal tests? Carve traffic into domains, each with its own layers. What happens to traffic allocation when a layer fills up?
A concrete example
Two proposed checkout experiments, a new button layout and a new payment-step order, are both assigned to the checkout layer. A user is hashed within that layer into bucket 37, which belongs to the button-layout experiment, so they can only ever see that one; the payment-step experiment draws from different buckets. Meanwhile a search-results experiment sits in an orthogonal layer, so the same user can simultaneously and independently participate in it.
Interview question
Placing two checkout-modifying experiments in the same layer guarantees a user sees at most one. Why?
- a.Users are limited to one experiment across the entire platform at any time
- b.The two experiments take turns by time of day
- c.A user is hashed to a single bucket within the layer, and each bucket maps to at most one experimentCorrect
- d.The layer randomly disables one experiment whenever both would apply
Why? this is the answer
Within a layer, deterministic hashing places each user in exactly one bucket, and buckets partition the layer's experiments, so co-enrollment in two same-layer experiments is impossible. Orthogonal layers still let the user join unrelated experiments elsewhere.
Just read this? Test yourself on what you have been reading.
Read the original → research.google
- #experimentation
- #layers
- #mutual-exclusion
- #assignment
- #platform-design
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on experimentation — each one lists the topics its interview covers.
See open roles