We are trying to get better at deploying updates without downtime. Can we use a blue-green deployment model with Azure VMs? Does it require a load balancer in front of the servers? I would love to hear how other teams are managing CI/CD pipelines when their infrastructure is pure IaaS virtual machines.
Blue-green deployment for IaaS requires two identical sets of virtual machines behind an Azure Load Balancer or Application Gateway, where traffic is shifted by updating the backend pool configuration after verifying the new environment.
2 answers
Yes, you can certainly achieve blue-green deployments with pure IaaS by utilizing an Azure Load Balancer or Application Gateway as the traffic manager for two identical, isolated scale sets. The core requirement is maintaining configuration parity between environments while keeping them network-isolated until the switch is flipped at the ingress point. You will need a CI/CD pipeline that triggers image creation, deploys to the inactive environment, performs health checks, and then performs the backend pool update to redirect production traffic.
I recall managing a major migration for a financial client where we attempted this exact architectural pattern to minimize downtime during a critical patch cycle. We discovered that while the load balancer logic was sound, the true complexity lay in state synchronization, especially since our databases were not yet decoupled from the application layer.
We ultimately decided to maintain a strict separation of network security groups for the two environments, ensuring that the staging environment could be audited and hardened before traffic was ever introduced. It proved essential to have an automated rollback mechanism ready because our compliance requirements dictated that we could not maintain two active sets of data-processing nodes for longer than the necessary validation window.

