Blue-green deployment
Release without downtime by running a matching green environment alongside blue and switching traffic after validation.
Structure and behavior
Follow the arrows step by step.
Prepare both environments, then switch traffic. Assess database change compatibility separately.
Expected benefits
Fast routing rollback, environment-by-environment comparison, and no mixed versions after cutover.
Trade-offs
Duplicate infrastructure costs, plus complexity in state synchronization and identity management.
Irreversible changes, such as destructive migrations, invalidate the rollback guarantee; avoid them or proceed with care.
Operations and adoption guide
Synthesis, distinct from items backed by source excerpts. Validate before applying in production.
When to use
Suitable for web or API services that need zero-downtime releases and fast rollback, regular Kubernetes cluster upgrades, and cloud migration cutovers.
Scenario
A Korean e-commerce company serving millions of users deploys its order API twice a month. It requires no downtime, rollback within 5 minutes, and payment data consistency. Blue handles current traffic while the new version is deployed to green and passes smoke, performance, and SLO gates. Switch routing, monitor metrics, and revert immediately to blue if anomalies appear.
Placement principles
- Give blue and green identical application, configuration, and dependency setups
- Switch traffic at the routing layer, such as a load balancer, API gateway, or service mesh
- Use a forward- and backward-compatible database schema both versions can read and write
- Specify whether sessions, caches, and external integrations are shared or environment-specific and how state is synchronized
- Create and remove green as needed with IaC to control drift and cost.
On premises
Keep the source environment for a period to preserve rollback. Validate load balancer or DNS cutover and data migration compatibility beforehand, and manage configuration drift and resource costs of both environments through operating procedures.
Cloud
Provision blue and green as code using managed load balancing, DNS, and autoscaling. Automate validation gates and traffic switching in CI/CD, and monitor cost, SLOs, and rollback after cutover.
Kubernetes
Deploy the same workloads in separate namespaces or clusters. Switch traffic via Service, Ingress, or a service mesh. Check readiness, run smoke tests, and verify HPA and PDB before cutover; decommission the old environment after an observation period.
Incident response
Common incidents include misrouting, incompatible schemas, new-version performance problems or errors, and inconsistent data synchronization. Immediately route back to the earlier environment, revalidate its health and data integrity, then investigate and recover or redeploy as needed.
Evidence by criterion (14 total)
Evidence availability at the time of research. Assess source accuracy and currency separately.
Definition and overviewEvidence available
Release without downtime by running a matching green environment alongside blue and switching traffic after validation.
runs two identical production environments simultaneously to achieve zero-downtime deployments and enable fast rollbacksProblem addressedEvidence available
Reduces deployment downtime and the risk of prolonged recovery after failure, and enables fast rollback.
to achieve zero-downtime deployments and enable fast rollbacks.Key components and resourcesEvidence available
Two identical production environments and a mechanism to route and switch traffic between them.
Blue/green environments also have a mechanism to route traffic between them.Data and asset placementEvidence available
For stateful assets such as databases, configure a single database or schema to be forward and backward compatible with both environments.
configure a single database for backward and forward compatibility.Typical use casesEvidence available
Deploy and validate the new version in the idle environment, then switch traffic for a zero-downtime release.
The current release is always deployed to the idle environment and traffic is switched to it after deployment completes, with no downtime.Example scenarioEvidence available
When migrating from a source or on-premises environment to a new AKS cluster, roll back quickly to the source if problems occur.
I need rapid traffic rollback to the source if anything goes wrong after cutover.When to avoid and caveatsEvidence available
Irreversible changes, such as destructive migrations, invalidate the rollback guarantee; avoid them or proceed with care.
Irreversible changes break the rollback promise outright.On premises: development, deployment, and operationsEvidence available
When cutting over an on-premises or source cluster or VM to a new environment, retain the source as a rollback path.
migrating workloads from a source cluster, VM estate, or on-premises environment into a new AKS clusterCloud: development, deployment, and operationsEvidence available
In managed Kubernetes or the cloud, validate the new version, then change routing to switch user traffic.
Once the new version is validated, a routing change switches user traffic to it.Kubernetes: development, deployment, and operationsEvidence available
When upgrading a Kubernetes cluster such as EKS, create a second cluster, deploy and validate the app, and then switch.
we do a blue-green deployment, where we create a second cluster with the latest version of Amazon EKS and Istio.Incident responseEvidence available
After rollback or undo, revalidate the previous environment’s health and data integrity.
Re-validate old environment health and data integrity.BenefitsEvidence available
Fast routing rollback, environment-by-environment comparison, and no mixed versions after cutover.
fast routing rollback; - clean environment-level comparison; - no mixed application versions after cutoverDrawbacks and trade-offsEvidence available
Duplicate infrastructure costs, plus complexity in state synchronization and identity management.
near-double serving infrastructure during overlap; - state synchronization and identity complexityRepresentative tools and technologiesEvidence available
Cluster and service-mesh technologies such as Amazon EKS and Istio.
we create a second cluster with the latest version of Amazon EKS and Istio.Additional references (23)
- Untitled result ↗
- Selecting a deployment strategy - Engineering Guidance and Standards - Home Office ↗
- What Is Blue-Green Deployment? | IBM ↗
- Blue-green deployment of AKS clusters - Azure Architecture Center | Microsoft Learn ↗
- Using blue-green deployment to reduce downtime | Cloud Foundry Docs ↗
- Blue-green deployments: Zero-downtime deployments for software and database updates ↗
- Blue-Green Deployment in Azure Container Apps | Microsoft Learn ↗
- Deploy blue/green infrastructure for zero-downtime | Well-Architected Framework | HashiCorp Developer ↗
- Kubernetes cluster upgrade: the blue-green deployment strategy | Containers ↗
- Blue/Green Kubernetes upgrades for Amazon EKS Anywhere using Flux | Containers ↗
- Azure Kubernetes Service (AKS) production upgrade strategies - Azure Kubernetes Service | Microsoft Learn ↗
- Zero-Downtime Migration to Azure Kubernetes Service (AKS) - Azure Kubernetes Service | Microsoft Learn ↗
- Reference Architecture: GKE Enterprise hybrid environment - part 2 - Dec '24 - Google Docs ↗
- Deploy an app on Kubernetes ↗
- aws-samples/sample-eks-bg-upgrades ↗
- Recommendations for designing a deployment failure mitigation strategy - Power Platform | Microsoft Learn ↗
- OPS06-BP03 Employ safe deployment strategies ↗
- What Is Blue-Green Deployment? The Complete Guide ↗
- Progressive Delivery and Deployment Strategies | System Design Patterns ↗
- Blue-Green Deployment Strategy: Safe Releases, Fast Rollback, and Hidden Tradeoffs ↗
- Blue-Green Deployments: A Definition and Introductory Guide ↗
- Implement zero-downtime deployments with blue/green, canary, and rolling strategies | Well-Architected Framework | HashiCorp Developer ↗
- Architecture strategies for safe deployment practices - Microsoft Azure Well-Architected Framework | Microsoft Learn ↗