Blue-Green Deployment is a strategy of deploying while maintaining two identical production environments. The environment currently receiving traffic is called 'blue,' and the idle environment where the new version will be deployed is called 'green.' After the new version is deployed and testing is complete, traffic is switched to green via the load balancer or DNS.
This technique was popularized in the 2010 book "Continuous Delivery" by Jez Humble and David Farley. Companies operating large-scale services such as Netflix, Amazon, and Facebook adopted it for zero-downtime deployment, and advances in Kubernetes and cloud services have made it easier to implement.
The core principle is simple. While the blue environment is live, you deploy the new version to the green environment and test it thoroughly. Once all verification is complete, you change only the load balancer configuration to switch traffic to green. If a problem occurs, switching traffic back to blue provides an instant rollback. The switch takes only a few seconds.
In practice, blue-green deployment is essential for services where high availability matters. However, it requires twice the infrastructure cost, and database schema changes need additional consideration. It is also widely used in AI model serving, where the common pattern is to deploy a new model version to the green environment and switch after A/B testing.
┌─────────────────────────────────────────────────────────┐
│ Load Balancer │
│ │ │
│ ┌────────────┴────────────┐ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ 🔵 BLUE │ │ 🟢 GREEN │ │
│ │ (v1.0) │ ──────▶ │ (v2.0) │ │
│ │ [ACTIVE] │ Switch │ [STANDBY] │ │
│ └──────────────┘ └──────────────┘ │
│ │
│ 배포 후 트래픽 전환: Blue → Green │
│ 롤백 필요시: Green → Blue (수 초 내 완료) │
└─────────────────────────────────────────────────────────┘