Blue Green Deployment

Problem Statement

Microservice architecture structures an application as a set of loosely coupled microservices and each service should be developed independently in agile manner to enable continous delivery/deployment. When a large, complex application is to be built using microservice architecture, the major problem is how to design loosely coupled microservices or to break a large application into small loosely coupled services while keeping both the system in production.


We can define deploy newly development microservices using blue-green deployment. In this model, user traffic is diverted from old application to new microservice application gradually. One a microservice is available in production, the load balancer redirects the request targetted for old application to the new microservice.

  • Blue Environment − The old application running in the production is called blue environment.

  • Green Environment − The new services deployed which replicates the given part of old application is called the green environment.

So over the time of development, microservices increases and monolith shrinks with features moving out from monolith to microservices Application.


Consider an example of an Online Book Store. Initially we have only developed Book Catalog managment service and other services are supported in legacy monolith application. During the course of development, more and more services are developed and functionalities are moved away from a monolith.

Blue Green Deployment Design Pattern

This mode of deployment helps in reducing the downtime or even zero downtime while migrating from a monolith to microservices based application.

Kickstart Your Career

Get certified by completing the course

Get Started