Can You Do Blue-Green Deploys on Existing VMs and WAS, Without Kubernetes?

Yes. You need to run the current and new versions side by side, send test traffic to the new one first, and switch the load balancer target. The capacity question behind splitting four VMs into Blue and Green, when to hold the cutover, scheduled jobs, and a rollback test that actually means something.

John Baek
John Baek
Founder, CollabOps
2 min read

Yes. The requirements are roughly the same on VMs as on Kubernetes. You need to run the current and the new version side by side for a while, you need to be able to send test requests to the new version first, and once it's ready you need to change where user requests go. AWS documents exactly this with EC2 instances split into two environments and a load balancer switching traffic, in its blue/green deployments whitepaper.

Blue-green deployment doesn't require Kubernetes. It requires two versions running at once, a test path that reaches only the new one, and a traffic switch you can reverse.

What should you check first when splitting four VMs into Blue and Green?

The first question is whether half the servers can carry the traffic during the deploy window. Say a business portal runs on four VMs. VMs 1 and 2 become Blue, VMs 3 and 4 become Green. While Blue serves users, you install the new WAR on Green, and for that whole stretch Blue's two servers take every user request. If you normally need all four to survive peak load, you lose your operating margin the moment you empty Green. (The server layout and deploy history here are illustrative.)

                            ┌──(before cutover · on rollback)──▶ Blue  : VM 1, VM 2
 User requests ──▶ Prod LB ─┤
                            └──(after cutover approval)────────▶ Green : VM 3, VM 4
                                                                   ▲
 Internal test requests ──(Green-only path)────────────────────────┘
                                                                   │
                          Check build number + business response ◀─┘
                                        │
                          Pass → approve LB cutover

You can hold the cutover even when the login page loads

Green's port is open and the login page renders. You log in with a test account, open the application history, and get an empty list. The data source wired into the new WAS is wrong. The basic health check passed, but a user can't actually finish their work. That's why, before approving the cutover, you send a request straight to Green and check the build number that answered and the result of one representative business transaction, together.

One more thing before moving traffic. When the application server starts, does it also start scheduled jobs like nightly aggregation or notification sending? If so, Green can run the business twice before it has served a single user. Decide which group owns scheduled jobs before you bring both environments up.

After cutover, how far should a rollback test go?

A rollback test shouldn't stop at logging in to Blue. It should go as far as opening, on Blue, an application that was just submitted on Green. After cutover, keep Blue around for a while. If business errors climb on Green, you can point new requests back at Blue. But applications already submitted on Green stay in the business data. If Blue can't read that application, the rollback becomes a new incident. Only once that works do you have a rollback plan you can use during business hours.

Whether the old version can read data the new version wrote gets harder when a database change is involved. That case gets its own post: the app is rolled back but the DB schema already changed. When to cut the long-lived connections still pinned to Blue after the switch is covered in when to shut down the old WAS.

  • #legacy-deploy
  • #blue-green
  • #vm
  • #was
  • #deployment
  • #load-balancer