Engineering Practice
Feature flags: multiple-choice review
Six questions that cut across the whole unit. Each mirrors a call you make in a real release: not a definition to recite, but a tradeoff to weigh when the flag is live in production and traffic is on it.
Confirm you can connect deploy/release decoupling, the four flag types and their opposite lifecycles, sticky percentage rollout, the kill-switch, and flag debt — the synthesis the lesson built toward.
A team merges a half-finished feature to main behind an off-by-default release flag and deploys it. A teammate objects that shipping unfinished code to production is reckless. What is the senior framing?
During a cleanup sprint an engineer finds a boolean flag that has served the same value to everyone for months and proposes deleting it and its dead branch. Before merging that PR, what is the one thing they must check?
A 25% rollout reads error rate and latency as clean, but support reports users seeing the new UI flicker back to the old one between page loads. What is the defect?
Why do SDKs evaluate a flag as a local in-memory hash lookup with background sync, instead of asking the flag service per check?
Ten independent boolean flags are live in a service. A bug appears in production that QA never reproduced in staging. How does the flag count bear on this?
The Knight Capital incident lost ~$440M in 45 minutes in 2012. Reduced to a flag-lifecycle lesson, what actually went wrong?
The through-line: deploy and release are separate events, and a flag is the switch between them — ship dark, release by toggle. The four types (release, ops/kill-switch, experiment, permission) have opposite correct lifespans, so type is recorded, never guessed. Rollout must be sticky (hash a stable key into a fixed 0–99 bucket) or variants flicker and experiment data rots; evaluation is a local hash lookup so a flag-service outage degrades gracefully. And every live flag is a branch in production — N flags mean 2^N configurations — so the discipline is lifecycle: expire release flags, label kill-switches permanent, and delete stale flags before one becomes the next Knight Capital.