Zero Downtime Deployment for Micro Service Architecture

I'm currently working on an application that will be based on the Micro Service architecture. As the main technologies, we planned to use Spring Boot and Docker for each Micro Service development. One goal is to provide users with zero downtime deployment capabilities.

I spent some time finding a solution and learning about Blue Green Deployment (BGD) , but some aspects are still not clear to me. The main issue is the state and compatibility of the DataBase version.

For example, if BGD used, how to transfer all data changes from the Circuit from green to blue after a successful deployment?

I found an interesting approach in Spring's article β€œZero Deployment Time with a Database” , but I find this approach too complex. Application Versions and Frees planning processes and backward compatibility requirements.

So, I want to ask the following questions:

  • Any suggestions on the concept of a zero-downtime deployment process based on real world experience using it?
  • Are there any window solutions (paid or free) that provide a zero-downtime deployment feature for relational database applications?

PS

I wonder how Zero Downtime Deployment works at StackOverflow.com, if any.

+5
source share
1 answer

From this article:

  • keep two copies of your production environment (blue and green)
  • Route all traffic to a blue environment by matching production URLs
  • Deploy and test any changes to the application in a green environment.
  • flip the switch by matching the URLs to green and unchecking them from blue.

In fact, it is not so difficult if you have the equipment and a good deployment process. If you set up your security mechanisms so that the user does not need to start a new session in a blue environment, the pain is almost entirely related to providing and ensures that the blue environment is in perfect condition as you want it to be. After that, you just need to go into the load balancing configuration and flip the settings to indicate the blue environment.

But once you have green and blue, you can flip back and forth. Ideally, as soon as blue is checked, immediately refresh the green color. Also, make sure that you are using database operations between two environments, so green can also be backup for blue if blue is not working.

Of course, my experience of planning and assisting with this was at Hadoop, where you often have a formal pipe for receiving data that can be easily configured to feed all new data into two completely separate environments.

+1
source

Source: https://habr.com/ru/post/1257843/


All Articles