TOPIC DEVOPS
Feature Flags turning features on and off without deploying code
IN 10 SECONDS
Feature flags (aka feature toggles) are conditionals in your code that enable or disable functionality without a deployment. You wrap a new feature in `if (flags.isEnabled('new-checkout')) { ... }`. The flag service evaluates at runtime — flip a switch and the feature activates for all users, a beta group, or just internal testers.
GOTCHA Old flags left in code create technical debt. Dead code paths accumulate, making the codebase harder to read and test. Have a flag cleanup policy: once a flag is fully rolled out, remove the conditional and the old code path.
HOW A FEATURE FLAG EVALUATES
01 Developer merges code with a flag check: `if (flagService.isEnabled('dark-mode'))` — the new code is deployed but dormant.
02 Flag service LaunchDarkly, Split, or a custom API — holds the flag targeting rules in real-time.
03 Runtime when `isEnabled` is called, the SDK fetches the flag rules (cached locally) and evaluates against user attributes.
04 Operator flips the flag to 100% on — the feature activates instantly for all users. No deploy, no restart.
POKE IT YOURSELF
curl -s https://launchdarkly.com/sdk/flag/eval/my-flag --header "Authorization: $SDK_KEY" — evaluate a feature flag via API
git grep "featureFlag|isEnabled" -- '*.ts' '*.go' '*.py' | wc -l — count flag usage in codebase
Drill this topic →
~75 sec read