Back to glossary

Development

Feature Flags

What feature flags are and why they matter

Definition

Feature flags (also called feature toggles) are conditional switches in application code that control which features are enabled for specific users, user segments, or environments. They decouple code deployment from feature release, enabling practices like gradual rollouts, A/B testing, kill switches for problematic features, and beta testing with specific user groups - all without redeploying code.

How it works

Without feature flags, deploying code and releasing a feature are the same event. The moment code hits production, every user sees it. Feature flags separate these two events. You deploy the code (it is on the server) but the feature is hidden behind a flag that is turned off. When you are ready to release, you flip the flag - no deployment needed.

This enables powerful workflows. Gradual rollouts: enable the feature for 5% of users, monitor metrics, and increase to 100% if everything looks good. A/B testing: show version A to half the users and version B to the other half, measure which performs better. Kill switches: if a feature causes problems, turn it off instantly without rolling back a deployment.

The main risk with feature flags is accumulation. Every flag adds conditional logic to your code. If you never clean up old flags, you end up with a tangled web of if-statements that nobody fully understands. Discipline is required: when a feature is fully rolled out and stable, remove the flag from the code. We recommend a maximum lifecycle of 30 days for release flags.

How 1Raft uses Feature Flags

We use feature flags in every production application we build. LaunchDarkly or Flagsmith for larger projects; a simple database-backed flag system for MVPs. In a SaaS project, feature flags let us ship new pricing tiers to beta customers, validate the billing logic, and then roll out to the full user base - with the ability to roll back in seconds if anything breaks.

Related terms

Related services

Next Step

Need help with Feature Flags?

We apply this in production across industries. Tell us what you are building and we will show you how it fits.