Deployment Strategy

1. In-Place Update

In-place means that it does not require extra servers during the update.

Pros:

you don't need extra serve

Cons:

the traffic capacity will be reduced during the update


1. All-At-Once

All At Once strategy is the basic one. You stop all the servers, and update all of your servers, and restart your service.

Fatal disadvantage is, the service should be completely shut down during the update.

2. Rolling Update

Rolling Update means you update your server one-by-one. 

Let's suppose you have 4 servers running software ver 1.0. When you try to update those to 2.0,

1.0 1.0 1.0 1.0 -> 1.0 1.0 1.0 2.0 -> 1.0 1.0 2.0 2.0 -> 1.0 2.0 2.0 2.0 -> 2.0 2.0 2.0 2.0


2. Blue/Green Update

Blue/Green Update maintains server running the sw of current version(Blue) and starts the new server that runs the sw of next version(Green). When the Green servers are able to handle all the traffics properly, and the Blue servers are killed.

1. All At Once

Blue/Green Update also has an All-At-Once strategy. Unlike the In-Place All-At-Once, it does not have any downtime because blue servers are not down for the update; New sw are installed on the Green servers.


2. Canary(Two-Step Canary)

In this strategy, a small percentage of the traffic(which is called 'Canary group', usually 5 to 10%) is handled by the Green servers, while the rest traffics are still handled by the Blue servers: Step 1. After a period of time, the rest traffics are also handled by the Green servers and the Blue servers are killed: Step 2.

The key is that you can test and monitor during the Step 1 whether the Green server is running properly. If not, you can take actions like stopping the update, or rollback the changes done by Green servers.


3. Linear(Linear Canary)

This is similar to the Canary(Two-Step Canary), but the difference is that while the Two-Step Canary shifts a small Canary Group at first and shifts all of the rest later(e.g. 10% -> 100%), Linear strategy shifts the traffic gradually by fixed time interval(e.g. 10% -> 20% -> .... 100%)



Q1. What are the advantages of Blue/Green Update over Rolling Update?

One difference is that B/G Update can hold the full traffic while update. However, another key difference is that there is no environment isolation in Rolling Update because new sw are installed in the existing server. This also means that Rolling Update carries increased risks and complicated process of rollback if a deployment fails.

댓글

이 블로그의 인기 게시물

Interface of Java

Data Analytics Overview(OLTP vs OLAP)

Leetcode