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 like sending a canary into a coal mine — you deploy the new version to a tiny fraction of users first and watch closely.
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 a toggle that lets you turn features on or off without deploying new code.