TapCub is live — analytics, insights and live chat, free on one platform
Glossary

What is a kill switch? Meaning, types and a metric-trigger example

A kill switch turns a feature or system off quickly without a new release. How it differs from a feature flag, circuit breaker and rollback, a real 45-minute incident, a checklist and a worked metric trigger with the cost of delay.

Oliver Reed Reviewed by Emma Collins Also called kill-switch Last updated Nov 22, 2026 Glossary

Quick answer

A kill switch is a control that turns a feature, service or system off quickly, without deploying new code. In software it is a setting a running program checks, flipped by a person or by a rule on a metric such as error rate. Its quality is measured in minutes from harm to off.

Formula: Trip when error rate ≥ threshold in N consecutive windows and events ≥ minimum (example: ≥ 2.0% twice, 200+ views each)

What is a kill switch?

A kill switch is a control that lets people turn a feature, a service or a whole system off quickly, without deploying new code. The term comes from machinery, where a big red button cuts power in an emergency. In software it is usually a switch in configuration that a running program checks, so that flipping it takes effect in seconds rather than after a new release.

Pete Hodgson's widely cited article on feature toggles puts kill switches in the family of operational toggles: switches that control how the system behaves in production, used to disable or degrade a feature quickly if its performance is unclear. Most operational toggles are short-lived and are removed once the feature is trusted; a small number of long-lived ones stay as permanent kill switches. The article also notes that changing such a toggle through a new release would be too slow, so the setting has to be reconfigurable while the system runs.

The test of a kill switch is one question: how many minutes pass between "this is hurting users" and "it is off"? Everything else in this entry is about shortening that time without turning the switch itself into a hazard.

Kill switch, feature flag, circuit breaker and rollback

The four are related and often confused.

MechanismWhat it doesWho or what triggers itTypical lifetime
Kill switchTurns one feature or dependency offA person, or a rule on a metricLong-lived for risky features
Feature flagTurns a feature on for some usersProduct team, graduallyShort; removed after rollout
Circuit breakerStops calls to a failing dependency automaticallyCode, on repeated errorsPermanent in the code
RollbackReplaces the release with the previous oneA person, through the deploy systemOne-time

A kill switch is usually built from the same machinery as a feature flag, but with a different purpose: a flag is for releasing gradually, a kill switch is for stopping fast. A circuit breaker is a kill switch that the code pulls itself. Rollback is slower, because it redeploys, and it also removes good changes that shipped in the same release. For releasing in stages, see progressive delivery.

Manual and automatic kill switches

TypeTriggerStrengthRisk
ManualA person with permission flips itHuman judgement; no false alarmsDepends on someone noticing and being reachable
AutomaticA rule on a metric trips it (error rate, latency, failed payments)Acts in minutes, day or nightA badly set threshold switches off a healthy feature
Semi-automaticA rule alerts a person who confirmsBalance of speed and judgementStill depends on a person answering

Automatic switches deserve extra care. A network-wide switch that trips by itself can cause an outage when the rule is wrong, so start with alert-only, then manual, and automate only a narrow, well-tested case.

A real case: 45 minutes without a switch

On 1 August 2012 Knight Capital Americas deployed new code to its order router while an old, unused function remained callable on some servers. According to the U.S. Securities and Exchange Commission's 2013 order, the router then sent millions of child orders, producing 4 million executions in 154 stocks for more than 397 million shares in about 45 minutes. The firm ended up with unintended positions of roughly $3.5 billion long and $3.15 billion short, and lost more than $460 million.

The order concerns the firm's risk controls, but the lesson for any system is the time arithmetic: damage accumulated for about 45 minutes before the orders stopped. A tested way to disable the faulty path quickly, together with a metric that rings an alarm when behaviour is far from normal, shortens that exposure.

What makes a good kill switch: a checklist

PropertyWhat to checkWhy
Default stateIf the switch store is unreachable, the system falls back to the safe stateA fail-safe default
Reach timeA flip takes effect in seconds on every serverA switch that needs a redeploy is a rollback
ScopeTurns off one feature or dependency, not the whole productSmaller blast radius
Who can flipA named on-call group, with an audit logFast but accountable
TestedFlipped on and off in staging and in a periodic drillA switch nobody has tried may not work
VisibleThe state is shown on a dashboard and noted on chartsPeople know it is off
OwnedEach switch has an owner and a review dateAvoid a pile of forgotten switches
GracefulThe off state shows a clear fallback for usersNo broken pages

Worked example: a metric trigger for checkout

Sample data: a store's normal checkout error rate is 0.5% of checkout page views. The team sets this rule: trip the kill switch for the new payment widget if the error rate is at least 2.0% in two consecutive 5-minute windows, each with at least 200 checkout page views.

WindowCheckout viewsErrorsError rateAbove 2.0%?
14:00–14:051,20070.6%No
14:05–14:101,150131.1%No
14:10–14:151,200363.0%Yes (1st)
14:15–14:201,180403.4%Yes (2nd): trip at 14:20

Why 2.0%? In a 5-minute window of 1,200 views at a 0.5% base rate the expected count is 6 errors with a standard deviation of about 2.4 (the square root of 6). A threshold of 2.0% is 24 errors, (24 − 6) ÷ 2.45 = 7.3 standard deviations above normal, so a normal fluctuation will not trip it, while the real incident clears it by a wide margin.

What delay costs: assume 8 orders per minute are lost during the fault at $60 each. If the switch trips at 14:20 (10 minutes after the first bad window starts at 14:10), the loss is 10 × 8 × $60 = $4,800. If a person notices and flips it at 14:35, 25 minutes in, the loss is 25 × 8 × $60 = $12,000. The automatic rule saves $7,200 in this example, which pays for the work of building it after a single incident.

Common mistakes

  • Never testing it. A switch that has never been flipped may do nothing.
  • A threshold with no minimum volume. At 3 a.m. one error in 10 views is 10%; always require a minimum number of events.
  • Making it trip automatically before it is trusted. Start with alerts, then manual, then a narrow automatic rule.
  • Putting the switch behind the thing that is broken. If the switch store depends on the failing service, you cannot flip it.
  • Leaving old switches in place indefinitely. Retire short-lived ones; review long-lived ones.
  • No record. Without a note of when it was flipped, nobody can explain the dip in the chart.

How TapCub fits around a kill switch

TapCub does not provide kill switches or feature flags; it only measures. Use it for the "metric" half of the example above and for checking that the switch worked.

  1. Watch the metric. In Monitoring › Errors, the errors card shows error count, error rate (errors divided by pageviews), affected visitors and affected sessions, with groups by status.
  2. Set an alert for slow-burn problems. In All-platform analytics › Operations › Monitors, create a monitor on the built-in error_rate or errors metric. Monitors check on an hour, day, week or month grain, so they cannot trip a 5-minute rule like the example; they catch problems that build over hours. Use a dry run to see how many times the last 30 days would have fired. The same alert is not repeated for about 60 minutes by default and three hits in a row pause the rule.
  3. Let it notify, not act. Channels are email, WeCom, DingTalk, Feishu or a webhook. A monitor never changes anything itself; if you want a person or your own service to flip the switch, that decision is yours.
  4. Check the switch worked. Open Web analytics › Realtime after flipping, and compare the error rate in the hours before and after.
  5. Record the flip. Add a date annotation under Configuration › Annotations (for example "payment widget switched off, 14:20") so the dip is explained in every later chart.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Oliver Reed

Product Experience Specialist

Explores usability, user journeys, and feature adoption through practical examples of onboarding and everyday product use.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is a kill switch in software?

A setting a running program checks that lets people turn a feature or dependency off in seconds, without a new release. It is usually built like a feature flag but used for stopping fast rather than releasing gradually, and may be flipped by a person or a metric rule.

What is the difference between a kill switch and a feature flag?

A feature flag turns a feature on for some users during a gradual rollout and is usually removed afterwards. A kill switch turns a feature off in an emergency and may stay for years on risky features. The same machinery often serves both.

Should a kill switch trip automatically?

Only for narrow, well-tested cases. Start with alerts, then manual flips, then a rule with a minimum event count. In the example, two consecutive 5-minute windows at 2.0% or more with 200+ views each trip it, which saved $7,200 over a manual flip.

How do you test a kill switch?

Flip it off and on in staging, run a periodic drill in production at a quiet time, and check the state is visible, logged and takes effect within seconds on every server. Confirm the fallback screen users see when it is off.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics