Skip main navigation

Blue-Green Deployments


In the previous step we discussed the value of experimentation and creativity. In this step, we look at blue-green deployments. Blue-green deployments are based on two identical production environments. The key is to ensure that the two environments are truly identical, including the data that they manage.

Zero-downtime releases are achieved by deploying to the blue environment. After the new deployment is smoke tested, traffic is routed to the green environment, which then becomes the production environment.

Although blue-green deployments provide a simple and powerful way to test deployment before going into production, they might require production environments of similar size and capacity to perform capacity tests. This might not be an economically feasible option for large-scale services.

This process works for code only. The database is typically a single environment because having two matching databases in which the replica of the active one changes every time you switch requires a complicated setup. The single-database setup requires that the app modify the database on startup so that it works with either version. For more information on blue-green deployments with a single database, see Bozho’s Tech Blog.

Microsoft Azure Web Apps and its staging slots provide an out-of-the-box experience for blue-green deployments. Basically, two deployment slots that can be swapped are provided. In most scenarios, this is the default deployment strategy.

Remember to engage with peers and initiate a discussion where you can practice your understanding. Once you are happy with your contribution, click on Mark as done and we will move onto canary releasing which addresses the challenge of testing a new release.

This article is from the free online

Microsoft Future Ready: Fundamentals of DevOps and Azure Pipeline

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education