English 中文(简体)
Blue Green Deployment
  • 时间:2025-02-05

Blue Green Deployment


Previous Page Next Page  

Problem Statement

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

Solution

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

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

    Green Environment − The new services deployed which reppcates the given part of old apppcation is called the green environment.

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

Example

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

Blue Green Deployment Design Pattern

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

Advertisements