A feature flag for controlled rollout
A feature flag is a switch in running code that decides at runtime whether a piece of functionality is active, for everyone, for a percentage of traffic, or for a named segment. It separates the act of deploying code from the act of releasing a featureFeatureProduct SpecificationA product capability or featureView reference →, which is the small mechanism that makes continuous delivery, gradual rollout, and instant rollback possible.
The pattern was popularised by Flickr. In 2009 Ross Harmes described their approach in Flipping Out on the Flickr developer blog: the team committed everything to a single trunk and pushed to production many times a day, so they needed a way to turn features off in production without reverting code. The flag was the answer, and dark launching, shipping a feature to production switched off so it could be exercised under real load before anyone saw it, came from the same lineage.
Martin Fowler's article Feature Toggles, written with Pete Hodgson, did the conceptual work of naming the categories that matter. It distinguished releaseReleaseProduct SpecificationA shipped version of the productView reference → toggles (short-lived, for managing in-progress work), experimentExperimentValidationA test designed to validate a hypothesisView reference → toggles (for A/B tests), ops toggles (for operational control such as circuit breakers), and permission toggles (for entitlements). The crucial insightInsightUser ResearchA synthesised finding from researchView reference → was that these have very different lifespans, and treating a permission flag like a release flag is how a codebase drowns in stale conditionals.
The field has since industrialised around managed platforms and a clear discipline: flags carry a cost, the conditional branches they create are technical debt, and short-lived flags must be removed once the rollout completes. The live tension is between the control flags give you and the complexity they accumulate if you never clean them up.
A team building a redesigned checkout wraps it in a flag, new-checkout, defaulted off, and deploys the code to production where it sits dormant. They enable it for internal staff, then 1 percent of traffic, watching the checkout error-rate monitor at each step. At 1 percent a payment edge case surfaces; they flip the flag off in seconds, no deploy, no rollback, and fix the bugBugProduct SpecificationA defect or unexpected behaviourView reference →.
Re-enabled, the rollout climbs to 5, then 25, then 100 percent over a week. Once it is fully on and stable, the flag and its dead else branch are deleted in the next sprint, because a release flag that outlives its release is a trap waiting for the next reader. The deploy happened once, early; the release happened gradually, under control.
In the Unified Product Graph, Feature FlagEngineeringA feature toggle for controlled rollout is a leaf in the Engineering and Platform region, anchored by the feature_flagServiceEngineeringA deployable service or microserviceView reference →, with serviceengineering as its home domain. The hierarchy edge ServicetogglesFeature Flaghierarchy ties the flag to the service whose behaviour it controls, and the cross-domain edge service_toggles_feature_flagFeature FlaggatesFeaturecross-domain reaches into Product and Delivery to connect the runtime switch to the user-facing capability it guards. Those two edges hold the whole idea in place: the flag belongs to engineering, the thing it gates belongs to product, and the edge between them is exactly the release-versus-deploy seam the concept exists to create.feature_flag_gates_feature
Type-specific fields on BaseNode
keystringRequired. Stable flag key used in code (e.g. "new-checkout-flow").
flag_statusstringActivation state. `on` = enabled for all. `off` = disabled for all. `rollout` = partial via targeting_rules.
rollout_pctnumberPercentage enabled (0–100). Meaningful when `flag_status === 'rollout'`.
targeting_rulesstringHuman-readable targeting rules. Full rule evaluation happens in the flag service.
ownerstringOwning person or team responsible for the flag's lifecycle.
flag_typestringLifecycle classification. `temporary` = should be removed after rollout (kill switch, gradual rollout). `permanent` = long-lived feature gate (entitlement flag). `experiment` = A/B test with a defined end condition.
expiry_datestringISO date after which this flag should be cleaned up. A temporary flag without an `expiry_date` is a code smell.
created_datestringCreation date. Useful for flag age and stale-flag detection.
idstringrequiredUnique identifier (UUID)
typeNodeTyperequiredDiscriminator for the entity type
titlestringrequiredDisplay name
descriptionstringOptional detailed description
statusstringLifecycle status
tagsstring[]Freeform tags for filtering
3 phases — initial: off
2 edge types connected to this entity.
service_toggles_feature_flagfeature_flag_gates_feature