Skip to content
GabineteTools for thinking

No. 0819Workflow and delivery

Feature flag kill switch

Route of marbles with brass lever; the indicator crossed the red notch and the marbles return to the slate channel.

The table / Model card · No. 0819 · Workflow and delivery

Feature flag kill switch

Ship risky features behind a switch that can disable them instantly, and assign a named person to watch the first live usage.

The essentials

What it is

What it solves

How can a team release a high-risk feature without a full redeploy being the only way to undo it when something goes wrong?

When to use it

Payments, authentication, data migrations and other high-blast-radius changes. Features with unknown load or third-party dependencies. Launches where rollback by redeploy would take too long.

Where it comes from

Kill switches built on feature toggles became common in continuous-delivery and site-reliability practice in the 2010s. There is no single originator that I can name with confidence.

How it works

The new code path is wrapped in a runtime flag controlled outside the deployment, so turning it off restores the previous behaviour in seconds. Alongside the flag, the team defines what normal looks like, such as error rate, latency and conversion, and names a caretaker who watches those signals during the first hours or days. If an agreed trigger fires, the caretaker flips the switch without waiting for a meeting. The flag is removed once the feature is stable.

You need

A feature-flag mechanism, defined health metrics and alert thresholds, a named caretaker and a documented off-state.

You get

A flagged feature with a tested off-path, a monitoring plan and a rule for who can flip the switch and when.

Case

Illustrative case

Dockyard Retail is replacing its checkout payment provider. Engineers wrap the new integration in a flag defaulted to 5% of traffic. Maria, the named caretaker, watches payment success rate and p95 latency on a shared dashboard for the first 48 hours, with a rule: below 97% success for ten minutes, switch off. On day two success drops to 94% for one card type. Maria flips the flag; traffic returns to the old provider in under 30 seconds. The team fixes a tokenisation bug and relaunches the following week.

A fictional company used to explain the model.

Caution

When to avoid it

  • Changes that alter data irreversibly, such as destructive schema changes, where turning the flag off does not undo the damage.
  • Trivial changes where the flag adds clutter.

Common mistakes

  • Never testing the off-state.
  • Having a flag but no named owner with authority to use it.
  • Leaving old flags in the code for years.
  • Using a kill switch on changes that cannot be undone by switching off.

Known weaknesses

  • Does not undo irreversible data changes.
  • Accumulated flags create technical debt and testing combinations.
  • Depends on one person being available and alert.
  • The flag system itself becomes a critical dependency.

How to apply it in 6 steps

How to apply it

Feature flag kill switch

6 steps

Use the arrow keys to move between steps, Home and End for the first and last, and Enter to fold or unfold the booklet.

View all 6 steps
  1. Wrap the feature in a flag

    Put the new behaviour behind a runtime flag that can be changed without deploying.

  2. Test the off-path

    Verify that switching off fully restores the previous behaviour.

  3. Define health signals

    Agree the metrics and thresholds that count as a problem.

  4. Name a caretaker

    Assign one person authorised to flip the switch and watch the first usage.

  5. Release gradually

    Turn the flag on for a small share of users and widen as signals stay healthy.

  6. Retire the flag

    Remove the flag and old code path once the feature is stable.

Which decisions it helps with

Decision profile

Keyboard: Tab to the sheet, use the arrows to explore the assessments and their questions, and press Escape to close the note.

IIIResources required

  • TimeSeveral days
  • PeopleA small group (2 to 8)
  • DataData collected for the purpose
  • ExpertiseWorks best with a facilitator
  • Time horizonDays or weeks
  • ScopeOne team
  • FrequencyOccasionally
The team’s own knowledge is enough
View full profile

Preliminary assessment: few details on this model card have been verified.

IIdentity

Type of tool
Phased process
Decision stage
Plan the work, roles and deadlines
What it applies to
Processes and operationsalso: a product or service (37 %)
Discipline
Agile and software development
What it produces
A sequence of phases completed in order

IITen axes

The dot shows which end the model favours. A hollow dot means no clear preference.

  • DirectionExecution
  • Top-downBottom-up
  • PeopleProcesses
  • Generate optionsNarrow down options
  • Step-by-step analysisIntuition and experience
  • A strict sequence of stepsA flexible framework
  • Protect what we haveTake a risk
  • Improve what we haveFundamental change
  • Inside the organisationOutside the organisation
  • Understand firstAct now

IVUseful when

  • We make too many mistakes, or one mistake could be very costly
  • The future is uncertain, and our plans keep falling apart

Applicable traits

  • How it supports actionDecide what comes first
How was this profile calculated?

An automated system reads each model card and answers the same questions for every model. This profile has answers for 77 of 77. No answers are entered by hand.

A very high probability counts as “yes” and a very low one as “no”. Intermediate answers are hidden.

On the axes, mixed means the model favours neither end.

How it works →

Thinking space

Workflow and delivery

They organize and accelerate day-to-day delivery: Kanban, DevOps, development cycles, automation and work standards.

Membership: 27 % · also “Learning, coaching and goal setting” (16 %)

View in the atlas of spaces →

Each point is a model. Distance reflects answers to the decision questions. Light points share this model’s space.

Similar models

Sources

Use the arrow keys to move between sources.

Key development

  1. Harmes, R. (2009). Flipping Out. code.flickr.com.Posted 2 December 2009: early public description of feature flags and 'flippers' at Flickr, where everything ships from head and unfinished features are switched off by configuration.View source: Flipping Out (opens in a new tab) ↗
  2. Fowler, M. (2010). Feature Flag (originally 'FeatureToggle'). martinfowler.com bliki.Dated 29 October 2010: describes flags in a configuration file that the running application checks, and advises that release flags be a last resort.View source: Feature Flag (originally 'FeatureToggle') (opens in a new tab) ↗
  3. Hodgson, P. (2017). Feature Toggles (aka Feature Flags). martinfowler.com.Describes long-lived 'Kill Switches' that let operators disable non-vital functionality; the 2017 version of an article first published in 2016, not proven to be the originator.View source: Feature Toggles (aka Feature Flags) (opens in a new tab) ↗

Critique

  1. Rahman, M. T., Querel, L., Rigby, P. C. and Adams, B. (2016). Feature Toggles: Practitioner Practices and a Case Study. Proceedings of the 13th International Conference on Mining Software Repositories (MSR '16), pp. 201-211.Study of 39 Google Chrome releases: toggles let operators quickly disable a misbehaving feature, but 'they also introduce technical debt and additional maintenance for developers'.View source: Feature Toggles: Practitioner Practices and a Case Study (opens in a new tab) ↗

Practical guide

  1. contributors, W. (n.d.). Feature toggle. Wikipedia.States that toggles can act as operational controls: 'a kill switch lets operators disable a feature at runtime, for example to mitigate an incident or reduce load'.View source: Feature toggle (opens in a new tab) ↗