Feature Toggles Backend
ELI5 — The Vibe Check
Feature toggles on the backend let you turn features on or off without redeploying. Ship the code to production, but keep it hidden behind a flag. Enable it for 5% of users to test, then gradually roll it out. If it breaks, flip the toggle off instantly. No deploy needed.
Real Talk
Backend feature toggles (feature flags) are conditional branches in code controlled by external configuration. They enable trunk-based development, gradual rollouts, A/B testing, and instant kill switches. Toggle state can be stored in databases, config files, or dedicated services (LaunchDarkly, Unleash). Types include release toggles, experiment toggles, ops toggles, and permission toggles.
Show Me The Code
async function getCheckoutFlow(req, res) {
const flags = await featureService.getFlags(req.user);
if (flags.isEnabled('new-payment-flow')) {
return newPaymentFlow(req, res);
}
return legacyPaymentFlow(req, res);
}
When You'll Hear This
"Enable the new pricing engine for 10% of users via feature toggle." / "Kill the toggle immediately — the new search is returning wrong results."
Related Terms
A/B Testing Backend
A/B testing backend is the server-side logic that splits users into groups and tracks which version performs better.
Canary Release
A Canary Release is when you quietly send your new code to only a tiny slice of users first — like a test audience of 1%.
Deployment
A deployment is the event of pushing your code live — it's both the action and the thing you deployed.
Feature Flag
A Feature Flag is an on/off switch for a feature in your app, controlled without redeploying. You ship the code but keep the feature hidden behind a flag.