A deployment strategy where two identical environments ("Blue" and "Green") are used to reduce downtime and risk during software releases.
In production systems, updating live applications can cause downtime or bugs. Blue-Green deployment avoids this by having two versions of the system running in paralle, only one of which serves users at a time.
Use it when you want zero-downtime deployments and the ability to roll back quickly in case of failure.
You need to know
Two environments (Blue and Green): One is live (serving traffic), and the other is idle and used for staging the new version - then you switch traffic to the new one.
Fast rollback: If something goes wrong after deployment, you can immediately redirect traffic back to the previous (stable) environment.
Infrastructure cost tradeoff: You need to maintain duplicate environments, which can be expensive if not managed properly (e.g., with containers or serverless).
Popular technologies
Kubernetes + Istio - Supports traffic shifting and routing between Blue and Green environments using service mesh.
AWS Elastic Beanstalk - Built-in support for Blue-Green deployments using environment swaps.
Spinnaker - A powerful deployment tool that supports Blue-Green and other advanced deployment strategies.