Feature flags: code in production... turned off
Published on September 17, 2026
𝗙𝗲𝗮𝘁𝘂𝗿𝗲 𝗳𝗹𝗮𝗴𝘀: 𝗰𝗼𝗱𝗲 𝗶𝗻 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻... 𝘁𝘂𝗿𝗻𝗲𝗱 𝗼𝗳𝗳
What if I told you that you can ship new code to production today, without anyone seeing it work yet? 🔥
It's not magic, it's a flag. Literally. A condition in the code that decides whether that feature is 𝘁𝘂𝗿𝗻𝗲𝗱 𝗼𝗻 or 𝘁𝘂𝗿𝗻𝗲𝗱 𝗼𝗳𝗳, with no need for another deploy.
Here's how a 𝗳𝗲𝗮𝘁𝘂𝗿𝗲 𝗳𝗹𝗮𝗴 works 👇
🚀 You ship the new code turned off. The 𝗤𝗔 team can test it either in their own environment or directly in 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻 — limiting the flag to internal accounts or a test header — without exposing it to real users.
🐛 If something breaks, there's no need to revert a full deploy — you flip the flag off and the bug is contained instantly.
💪 It works both for new features and improvements to existing code, giving you full control over the risk.
🧹 It's also your best ally when you're about to 𝗿𝗲𝗺𝗼𝘃𝗲 𝗼𝗹𝗱 𝗰𝗼𝗱𝗲 and you're not 100% sure it won't break something else. You put the removal behind a flag: roll it out gradually and in a controlled way, and if something fails, flip the flag off and the old code responds instantly again — no emergency rollback.
⚙️ How do you implement them? Anything from simple 𝗲𝗻𝘃𝗶𝗿𝗼𝗻𝗺𝗲𝗻𝘁 𝘃𝗮𝗿𝗶𝗮𝗯𝗹𝗲𝘀, to 𝗥𝗲𝗱𝗶𝘀 𝗸𝗲𝘆𝘀 managed through endpoints — the latter lets you flip them on or off live, without touching code or restarting anything.
But here's what almost nobody tells you: flags have an expiration date. Once 𝘁𝘄𝗼 𝘀𝗽𝗿𝗶𝗻𝘁𝘀 have passed and the feature is stable, it's time to 𝗿𝗲𝗺𝗼𝘃𝗲 it from the code. That's why it's key to 𝗱𝗼𝗰𝘂𝗺𝗲𝗻𝘁 every active flag — what it does, since when it exists, and who owns it — so you know exactly when it's due to disappear. Without that, silent technical debt piles up 😅
And the golden rule: 𝗻𝗲𝘃𝗲𝗿 𝗻𝗲𝘀𝘁 𝗳𝗹𝗮𝗴𝘀. One condition inside another condition inside another... and three weeks later nobody on the team knows which combination is actually active in production.
Do you use feature flags in your day-to-day? Environment variables, Redis, or a tool like LaunchDarkly? Tell me 👇
Keep flying, Champions! ✈️