Skip to content

What are Feature Flags

Key idea:

Feature Flags (feature toggles) — mechanism for turning features on/off at runtime without deploy. Code: if (flags.isEnabled("new-checkout")) { ... }. Enables: gradual rollout, A/B testing, kill switch for broken features, targeted release (beta users only, RU segment). Tools: LaunchDarkly ($), GrowthBook (open-source), Unleash, ConfigCat, build-your-own feature service.

Below: details, example, related terms, FAQ.

Details

  • Release flags: progressive rollout %
  • Experiment flags: A/B test 50/50
  • Kill switch: emergency disable a feature
  • Permission flags: user/tenant-based access
  • Ops flags: on/off for infrastructure (circuit breaker)

Example

// LaunchDarkly example
import { LDClient } from 'launchdarkly-node-server-sdk'
const ld = LDClient.init(sdkKey)
if (await ld.variation('new-checkout', user, false)) {
  return renderNewCheckout()
}

Related Terms

Learn more

Frequently Asked Questions

Why need if we have canary?

Canary — deploy-time gradual. Feature flags — runtime toggle. Flags live longer (weeks): progressive rollout + experiments + kill switch.

Feature-flag debt — a problem?

Yes. Old flags clutter code. Best practice: TTL on a flag, auto-reminder in PR review after 30 days.

Open-source tools?

GrowthBook (free + paid), Unleash (free for 1 project), Flipt. LaunchDarkly — premium SaaS.