Feature Flags and Progressive Rollouts
Decouple deployment from release using feature flags, then expose new functionality gradually and kill it instantly if something goes wrong.
Feature Flags and Progressive Rollouts is a free DevOps Bootcamp lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Deploy vs Release
An important idea in advanced delivery: deploying code and releasing a feature are not the same thing.
Feature flags let you ship code to production but keep a feature switched off until you decide to turn it on, for some or all users.
What is a Feature Flag
A feature flag (or toggle) is a conditional in your code that checks a configuration value to decide whether a code path runs.
if (flags.isEnabled('new-checkout')) {
renderNewCheckout();
} else {
renderOldCheckout();
}Why Flags Beat Branching
Long-lived feature branches cause painful merges. Flags let you merge small changes to main continuously while the feature stays hidden.
- Smaller, safer pull requests
- Trunk-based development
- Instant on/off without a redeploy
Types of Flags
Flags serve different purposes:
- Release flags — hide unfinished work
- Ops flags — kill switches for risky systems
- Experiment flags — A/B tests
- Permission flags — entitle premium users
Knowing the type helps you decide its lifespan.
Targeting Rules
Flag platforms let you target who sees a feature: by user ID, group, region, or a percentage.
This is what enables a progressive rollout driven by configuration rather than by deploying new infrastructure.
Percentage Rollouts
A common pattern is to enable a flag for a small percentage of users first, then ramp up: 1%, then 10%, then 50%, then 100%.
Unlike a canary that splits traffic at the infrastructure layer, this is a logical rollout controlled in code config.
// Pseudo targeting config
flag: new-checkout
rollout:
percentage: 10
attribute: userIdKill Switches
The biggest operational benefit: if a flagged feature misbehaves, you flip it off instantly without a rollback deploy.
This dramatically shortens mean-time-to-recovery compared with reverting code and redeploying.
Flags in the Pipeline
You can integrate flag changes into CI/CD. For example, a workflow step can flip a flag to enabled after a successful deploy, or schedule a gradual ramp.
- name: Enable feature
run: |
curl -X PATCH https://flags.example.com/api/flags/new-checkout \
-H "Authorization: Bearer ${{ secrets.FLAG_TOKEN }}" \
-d '{"enabled": true}'Default Off and Safe
Always design flags to fail safe: if the flag service is unreachable, the code should fall back to the known-good default (usually off).
A feature flag should never become a single point of failure.
const enabled = flags.isEnabled('new-checkout', { default: false });Cleaning Up Flags
Flags create branching code paths. Stale flags become technical debt and confuse readers.
Once a release flag is fully rolled out and stable, remove it and delete the old code path. Track flag lifespans deliberately.
Flags Plus Deployment Patterns
Feature flags complement blue/green and canary deployments. Infrastructure patterns shift traffic; flags shift functionality.
Using both gives you the safest possible release: deploy quietly, then reveal gradually, then kill instantly if needed.
Quick Check
Test your understanding of feature flags.
Recap
You learned to separate deploy from release with feature flags.
- Flags hide code behind a config-driven conditional
- Targeting enables progressive percentage rollouts
- Kill switches give instant recovery without redeploy
- Design flags to fail safe and clean them up to avoid debt
Combined with blue/green and canary, flags complete your advanced delivery toolkit.
Frequently asked questions
Is the “Feature Flags and Progressive Rollouts” lesson free?
Yes — the full text of “Feature Flags and Progressive Rollouts” is free to read here on the web, and the DevOps Bootcamp course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the DevOps Bootcamp course, upgrade to CoddyKit PRO.
What will I learn in “Feature Flags and Progressive Rollouts”?
Decouple deployment from release using feature flags, then expose new functionality gradually and kill it instantly if something goes wrong. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start DevOps Bootcamp?
No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Feature Flags and Progressive Rollouts” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this DevOps Bootcamp lesson?
Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Blue/Green Deployments
- Canary Releases with Actions
- Rollbacks and Disaster Recovery
- Feature Flags and Progressive Rollouts