Enterprise IT admin’s are a creative bunch, always looking for ways to to do more with less and automating or scripting routine tasks so they can focus on more exciting projects. Keeping production application systems up to date is one of more challenging tasks, especially if they are customer facing systems, it’s sometimes hard to find a window of time to makes updates.
Updates are usually done on weekends or outside of business hours, portion of systems or complete systems are brought offline and the service is unavailable, while updates are being made. There is a lot of inherent risk and downtime in this type of deployment. We typically rely on our backups to be 100% accurate in the event we need to rollback.
Blue Green deployments
Among the many deployment methods one has recently stood out for me, it’s called the “blue-green deployment” technique. It’s essentially running two identical production environments one identified as ‘blue’ and the other ‘green’. One of the environments is deemed ‘live’ and handling production traffic while the other is deemed ‘idle’.
In our example let’s say ‘green’ is live and ‘blue’ is currently idle.
Our dev teams would deploy the software in our ‘blue’ idle environment which is considered the final staging environment, and we begin system and application testing. Once we have confirmed the ‘blue’ system is good to go – we would make a routing change or load balancer change to point to the new ‘blue’ system and the current ‘green’ system would now become idle.
You can quickly see some immediate benefits with this model, one big benefit is the ability to rollback to the ‘green’ system with a quick routing or load balancer change with confidence. Teams can also decide to update the idle system which can provide some additional measure of confidence for disaster recovery testing.
Here is a video from Docker demonstrating a blue-green deployment:
Blue-green deployments are more common than you might think, many cloud providers talk about and have examples on how to build blue-green deployment models. One example is this Blue/Green Deployments on AWS white-paper. Also check out the AWS samples GitHub page for some more info.
Have you deployed a blue-green model? Do you have a success story to share? Are you using a different technique for deploying updates to your systems? Let me know on Twitter and thanks for reading.