DEV Community

Tyson Cung
Tyson Cung

Posted on

Feature Flags Aren't Optional — They're How Grown-Ups Ship Software

I watched a team lose an entire weekend rolling back a bad deployment last month. Three engineers, 14 hours of downtime, and a Slack channel full of panicked messages. The fix? A one-line config change.

If they'd had a feature flag, someone would have flipped a toggle and gone back to bed.

The Core Problem With Traditional Deployments

Most teams still treat deployment and release as the same event. You merge code, it goes to production, users get it. All of them. Immediately.

This is insane when you think about it. You're pushing untested-in-production code to 100% of your user base and hoping nothing breaks. Knight Capital learned this the hard way in 2012 — a botched deployment with a stale feature flag on one of eight servers cost them $440 million in 45 minutes. The company nearly ceased to exist.

Feature flags break this coupling. Deployment becomes a non-event. Code goes to production but stays dormant behind a flag. Release happens when you're ready, to the users you choose, at the pace you want.

What Feature Flags Actually Give You

Progressive rollout. Start with 1% of users. Watch your metrics. Bump to 10%. Still good? Go to 50%. Something weird? Roll it back instantly without touching a single line of code.

Kill switches. Cloudflare's November 2025 outage took down a chunk of the internet because a config change hit 100% of production with no gradual rollout. A proper feature flag with percentage-based targeting would have contained the blast radius to a fraction of their traffic.

Decoupled teams. Your backend team ships their changes Tuesday. Frontend ships Thursday. Product flips the flag Friday morning when marketing is ready. Nobody blocks anybody.

Better architecture. Flags force you to write code that handles both states cleanly — the feature existing and not existing. This sounds annoying, but it pushes you toward modular design. Code that works behind a flag tends to be cleaner code.

The Dirty Secret: Flag Debt

Here's what the "just use feature flags" crowd doesn't mention enough: stale flags will eat you alive.

Every flag you create is a branch in your codebase that needs to be resolved. Leave it long enough and nobody remembers what it does, why it exists, or whether it's safe to remove. I've seen codebases with 200+ flags where half of them were permanent on and nobody dared touch them.

The fix is boring but necessary: set expiration dates on every flag. Assign an owner. Run automated audits. If a flag has been 100% on for 30 days, delete the branch and remove the flag. No exceptions.

GrowthBook, LaunchDarkly, Flagsmith — every major platform now supports lifecycle management. Use it.

A Real Implementation Pattern

Here's how I'd structure flags for a new payment flow:

  1. Release flag (release-new-checkout-flow): Controls visibility. Start at 0%.
  2. Operational flag (ops-new-payment-provider): Lets ops switch payment providers without a deploy.
  3. Experiment flag (exp-checkout-upsell-variant): A/B test the upsell placement.

Three flags, three purposes, three owners. Each has a 90-day expiration. Each gets reviewed in sprint retros.

The Bottom Line

Feature flags aren't a nice-to-have. They're table stakes for any team shipping software to real users. The cost of not having them — extended rollbacks, all-or-nothing deployments, 3 AM pages — is always higher than the cost of implementing them.

If you're still deploying straight to 100% of production with no kill switch, you're not being brave. You're being reckless.

Start with a simple boolean flag on your next feature. See how it changes your relationship with deployments. I promise you won't go back.

Top comments (0)