Skip to content

Blue-Green Deployment

Blue-Green Deployment is a release strategy that minimizes downtime by running two identical production environments, referred to as "Blue" and "Green."^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]

Mechanism

Unlike strategies that replace instances incrementally, Blue-Green Deployment fully opens the new version of the service first.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md] Once the new version meets the necessary conditions for release, traffic is switched from the old version to the new version at the load balancer layer.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]

A key characteristic of this method is that, throughout the process, only one version is live and serving traffic at any given time.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]

Advantages

  • Zero Downtime: The service remains uninterrupted as the switch is nearly instantaneous.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]
  • Rapid Rollback: Because the old version remains running until the switch, rollbacks can be performed immediately by reversing the traffic flow.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]
  • Version Isolation: Since the old and new versions are never live simultaneously, conflicts between the two are avoided.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]

Disadvantages

  • Resource Costs: This method requires double the infrastructure resources, as both the old and new environments must be fully running during the deployment phase.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]
  • Idle Resources: If the new version fails testing, the old version must continue running until the new version is ready, potentially prolonging the period of high resource consumption.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]
  • Transaction Handling: Switching traffic instantaneously can cause issues for unfinished business transactions or long-running connections that were active at the moment of the switch.^[400-devops-06-kubernetes-k8s-ithelp-day12-readme.md]

Sources

  • 400-devops-06-kubernetes-k8s-ithelp-day12-readme.md