How to Combine Feature Flags With Progressive Delivery
Deploy the artifact to all instances, then progressively expose the feature by widening a flag rollout.
Progressive delivery separates deploying an artifact from exposing behavior. CD rolls the build out fully; flags then widen the exposed audience step by step, decoupling infra rollout from feature rollout.
Steps
- Let CD deploy the artifact everywhere with the flag off.
- Advance the flag rollout in stages (1%, 10%, 50%, 100%).
- Gate each stage on healthy metrics before advancing.
Staged rollout
Terminal
# Terminal: advance exposure after each healthy stage
flagctl update new-checkout --rollout 1
flagctl update new-checkout --rollout 10
flagctl update new-checkout --rollout 50
flagctl update new-checkout --rollout 100Deploy stays full
.github/workflows/deploy.yml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: ./deploy.sh # artifact to all instances, flag controls exposureGotchas
- Advancing stages on a timer instead of metrics can roll a regression out fully.
- Keep the deploy itself boring; put the risk in the flag you can revert instantly.
Related guides
How to Do a Canary Rollout With Feature FlagsRoll out a feature to a small canary segment first using flag targeting, so a bad change hits only a fraction…
How to Do a Percentage Rollout With Feature FlagsEnable a feature for a growing percentage of users with a feature flag rollout, bucketing by a stable key so…