Blue Green Deployment

This is idea behind setting up Parallel Run environment at one of my client. The fundamental idea is to have two easily switchable environments to switch between.

One of the challenges with automating deployment is the cut-over itself, taking software from the final stage of testing to live production. You usually need to do this quickly in order to minimize downtime. The blue-green deployment approach does this by ensuring you have two production environments, as identical as possible. At any time one of them, let’s say blue for the example, is live. As you prepare a new release of your software you do your final stage of testing in the green environment. Once the software is working in the green environment, you switch the router so that all incoming requests go to the green environment – the blue one is now idle.

Blue-green deployment also gives you a rapid way to rollback – if anything goes wrong you switch the router back to your blue environment. There’s still the issue of dealing with missed transactions while the green environment was live, but depending on your design you may be able to feed transactions to both environments in such a way as to keep the blue environment as a backup when the green is live. Or you may be able to put the application in read-only mode before cut-over, run it for a while in read-only mode, and then switch it to read-write mode. That may be enough to flush out many outstanding issues.

An advantage of this approach is that it’s the same basic mechanism as you need to get a hot-standby working. Hence this allows you to test your disaster-recovery procedure on every release.

[via Martin Fowler]

Posted in C#. 1 Comment »

One Response to “Blue Green Deployment”

  1. Despliegue Continuo (Continuous Delivery) « ::everac99 Says:

    […] uso de un “despliegue azul-verde” (Blue-Green Deployment): Primero se realiza un despliegue completo en un ambiente no productivo (ambiente azul) mientras […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: