Feature flag (ops)
A switch in the code that lets you turn a feature on or off at runtime — without deploying new code. It decouples "deploy the code" from "release the feature", and gives an instant "kill switch" if something goes wrong.
Mechanic: the feature is wrapped in a condition (if flag_enabled("new_checkout")) whose value is controlled externally (a config, a flag service like LaunchDarkly/Flagsmith/Unleash) and can be changed in real time. Use case: separate release from deploy (deploy code dark, turn it on when you want), gradual rollout (on for 5% of users, then more), A/B testing (different variants to different groups), and a kill switch (turn off a broken feature instantly without rolling back a deploy). Win: deploys become low-risk (code can sit out there inactive), and experiments/rollout are controlled without code changes. Trade-off: flags must be cleaned up (old "flag debt" leaves the code full of dead branches). A cornerstone of progressive delivery. Related to progressive delivery and canary deployment.