Advertisement
Advanced Node.js, Cloud & DevOps

What is a blue-green deployment, and how does it minimize downtime and risk when deploying a new version of a Node.js application?

Short answer

Blue-green deployment maintains two identical environments -- the new version is deployed and tested against 'green' while 'blue' serves all live traffic, and once verified, traffic is switched instantly, with blue kept running briefly as an instant rollback target.

Save Node.js mock interview
Advertisement
AModel answer
Blue-green deployment maintains two identical environments -- the new version is deployed and tested against 'green' while 'blue' serves all live traffic, and once verified, traffic is switched instantly, with blue kept running briefly as an instant rollback target.
aws elbv2 modify-listener \
  --listener-arn $LISTENER_ARN \
  --default-actions Type=forward,TargetGroupArn=$GREEN_TARGET_GROUP_ARN
Real-world example
A payments API deploys an update to a parallel green environment, smoke-tests it while blue serves real traffic, and switches the load balancer to green only after verification passes.
Likely follow-ups
  • How does blue-green deployment compare to canary release in terms of risk exposure?
  • What's the cost implication of running two full production environments simultaneously?
Related topics