DevOps Intermediate
Progressive Delivery — Canary, Blue-Green and Feature Flags¶
Progressive DeliveryCanaryBlue-GreenFeature Flags 6 min read
Progressive delivery strategies. Canary with metrics, blue-green with rollback and feature flags.
Canary with Automated Analysis¶
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: api-server
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: api-server
analysis:
interval: 1m
threshold: 5
maxWeight: 50
stepWeight: 10
metrics:
- name: request-success-rate
thresholdRange:
min: 99
interval: 1m
- name: request-duration
thresholdRange:
max: 500
interval: 1m
Blue-Green with Argo Rollouts¶
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: api-server
spec:
replicas: 5
strategy:
blueGreen:
activeService: api-active
previewService: api-preview
autoPromotionEnabled: false
prePromotionAnalysis:
templates:
- templateName: smoke-tests
scaleDownDelaySeconds: 300
Feature Flags¶
from unleash_client import UnleashClient
client = UnleashClient("http://unleash:4242/api", "app")
client.initialize_client()
if client.is_enabled("new-checkout-flow", {"userId": user.id}):
return new_checkout(order)
else:
return legacy_checkout(order)
# Strategies:
# - Boolean toggle (on/off)
# - Percentage rollout (10% → 50% → 100%)
# - User segment (beta users, region)
# - A/B testing
When to Use What¶
- Canary — infrastructure changes, new service versions
- Blue-Green — database migrations, breaking changes
- Feature Flags — business logic, A/B tests, runtime control
- Combination — canary + feature flag = maximum control
Summary¶
Progressive delivery minimizes the blast radius of changes. Combine canary, blue-green and feature flags as needed.
Need Help with Implementation?¶
Our team has experience designing and implementing modern architectures. We’re happy to help.