categories.delivery-automation Intermediate

What are Feature Flags? How do they support continuous deployment and reduce release risk?

AI Practice

Feature Flags

Adding conditional logic in code that lets you dynamically enable or disable features without redeploying.

if (featureFlags.isEnabled('new-checkout-flow', userId)) { return newCheckoutFlow(); } else { return legacyCheckoutFlow(); }

Use Cases

Progressive rollout: Enable a feature for 1% of users first, confirm it's working, then gradually expand

Trunk-based development: Incomplete features can be merged to main but kept off, avoiding long-lived feature branches

Emergency kill switch: When a production issue is found, instantly disable the problematic feature without rolling back the deployment

A/B testing: Show different versions to different user groups to collect business metrics

Beta testing: Open new features only to specific users (internal employees or beta group)

Flag Types

Type Characteristics Lifespan
Release Flag Controls feature launch Short-lived (remove when feature is stable)
Experiment Flag A/B testing Short-lived (remove when experiment ends)
Ops Flag Emergency circuit breaker Long-lived
Permission Flag Based on user permissions Long-lived
  • Open source: Unleash, Flagsmith
  • Commercial SaaS: LaunchDarkly, Split.io

Technical Debt Warning

Feature flags are a source of technical debt. Every flag eventually needs to be removed — otherwise conditional branches accumulate in your codebase, increasing complexity and test burden. Establish a lifecycle management process for flags.

✦ AI Mock Interview

Type your answer and get instant AI feedback

Sign in to use AI scoring

Copyright © 2026 Wood All Rights Reserved · FE Interview Hub