Skip to content
Preptima
hardDesignCase StudySeniorStaff

Design an experimentation and feature-flag platform: assignment, exposure logging and a kill switch.

Evaluate feature flags in an SDK from a cached ruleset, assign users by hashing a per-experiment salt with the user id so assignment is sticky, log exposure where the arms first diverge, gate readouts on an automated SRM check, and make the kill switch a top-precedence rule that works with the control plane down.

6 min readUpdated 2026-10-10

Answer

Short answer

An experimentation platform has three hard parts: deciding who sees what, recording who actually saw it, and turning something off fast. Feature flags are evaluated in process by an SDK holding a cached ruleset, so a check costs microseconds rather than a network round trip. Assignment comes from hashing a per-experiment salt with the user id, which makes it deterministic and sticky. Exposure is logged where the arms first diverge, every readout is gated on an automated sample ratio check, and the kill switch is a top-precedence rule backed by a safe coded default.

Was this answer helpful?

Likely follow-ups

  • A product manager wants to change a running test from 50/50 to 70/30. What happens to the users already assigned, and what do you tell them?
  • A user is assigned while logged out and then signs in on another device. How do you keep their variant stable?
  • How would you run two experiments on the same checkout page without one contaminating the other?
  • The kill switch was pressed but one service kept serving the variant for ten minutes. Where do you look?

Related questions