Skip to content

Feature Flag

Easy — everyone uses thisBackend

ELI5 — The Vibe Check

A feature flag is a toggle that lets you turn features on or off without deploying new code. Ship the code dark (hidden behind a flag), enable it for 5% of users, check if it's working, then roll it out to everyone. Bug found? Flip the flag off. No rollback, no revert, no emergency deploy. It decouples deployment from release — you can deploy on Friday and release on Monday.

Real Talk

Feature flags (feature toggles) are conditional code paths controlled by external configuration that allow teams to enable or disable features at runtime. Types include release flags (gradual rollouts), experiment flags (A/B tests), ops flags (kill switches), and permission flags (entitlements). Managed services include LaunchDarkly, Unleash, and Flagsmith. Implementation ranges from simple boolean checks to sophisticated user-targeting rules with percentage rollouts.

Show Me The Code

// Simple feature flag check
if (featureFlags.isEnabled('new-checkout', { userId: user.id })) {
  return <NewCheckout />;
} else {
  return <LegacyCheckout />;
}

// Gradual rollout config
{
  "new-checkout": {
    "enabled": true,
    "rolloutPercentage": 25,
    "targeting": {
      "include": ["beta-users"],
      "exclude": ["enterprise-tier"]
    }
  }
}

When You'll Hear This

"Ship it behind a feature flag — we can enable it for beta users first." / "Kill switch the payment feature if we see error rates spike."

Made with passive-aggressive love by manoga.digital. Powered by Claude.