A text to understand the deployment of blue-green, rolling deployment, gray publish, publish canary

Description
blue-green deployment, A / B testing, canary release, release and gray, cut traffic classification, often confused, affect the efficiency of communication. The root cause is often these terms, people familiar with skilled at talking, understanding of these terms did not reach an agreement.

Here is, A / B Testing, and Canary Releases sorted out from the Blue-green Deployments defined.

Blue-green to deploy
in the purpose of the deployment is to reduce blue-green interruption time of publication, withdraw quickly released.

It's basically a technique for releasing your application in a predictable manner with an goal of reducing any downtime associated with a release. It's a quick way to prime your app before releasing, and also quickly roll back if you find issues.
Blue-green deployment, There are two systems: a system that is providing the service, labeled "green"; the other is preparing to release a set of systems, labeled as "blue." Both systems are fully functional, and the system is running, just different versions of the system and external services situation.

Initially, no system, no blue-green of the points.

Then, the first system developed directly on the line, and this is only one system, no blue-green points.

Later, the development of a new version, replace with a new version of the online version of the old, out of the system on-line, set up a new system with a new version of the code. At this time, a total of two systems in operation, is to provide services outside the old system, green system, the new system is deployed blue system.
Here Insert Picture Description
Blue system does not provide services for Zuosha?

Used for testing before release, any problems found during the test can be modified directly on the blue system, the system does not interfere with the user is using. (Note that there is no coupling of the two systems when they could not interfere with a 100% guarantee)

Blue system after repeated testing, modification, verification, after determining that the line to achieve the standard, the user directly switches to a blue system:

Some time after the switch is still blue-green two systems co-exist, but the user has access to the system is blue. Blue observation systems within this period of time (the new system) work state, if a problem occurs, switch directly back to the green system.

When the system is certain to provide services outside the blue work properly and not to provide services green system is no longer needed, the system became blue external services system, to become the new green system. The original green system can be destroyed, it will release resources for the next deployment of a blue system.

Blue-green deployment that only on-line strategy, it is not a universal program can cope with all situations. Premise deployment can be simple and quick implementation of blue-green on the assumption that the target system is very cohesive, if the target system is quite complicated, so how to switch, whether the data needs and how the two systems synchronized, would require careful consideration.

BlueGreenDeployment in particular the image of a map given by:

Here Insert Picture Description

Canary released
canary release (Canary) is also a release strategy, and often say gray domestic release is the same type of strategy.

Blue and green is ready to deploy the two systems, to switch between the two systems, canary strategy is only a system, gradually replacing the system.

Instance, the target system is a group of stateless Web server, but a very large number, assuming that there are a million units.

At this time, the blue-green deployment can not be used, because you can not apply for 10,000 units dedicated server to deploy the blue system (defined in the deployment of blue-green, the blue of the system to be able to undertake all access).

A method can think of is:

Ready only a few servers, deploy the new version of the system in the above test and verify. After the test is passed, worried about unexpected, not daring to update all servers immediately. 10,000 units in the server first line 10 is updated to the latest system, then observe the verification. After confirming no abnormalities, then the remaining update all servers.

This method is the canary release.

The actual operation can do more to control, say, 10 to update the server initially provided a lower weight, which controls the number of requests sent to the server 10, then increase the weight gradually, increase the number of requests.

This control is called "Flow segmentation" can be used either canary release, it may also be used in the subsequent A / B testing.

Blue-green and canary release deployment are two release strategy, not a panacea. Sometimes both can be used, and sometimes can only use one of them.

In the above example can be used canaries, can not use blue and green, so when you can use blue-green, canary can not use it? Only one server when the entire system.

A / B testing
first need to be clear that, A / B testing and deployment of blue-green and canary, is completely different.

Deployment is blue-green and canary release strategy, the goal is to ensure the stability of the new system on-line, is concerned that the new system BUG, ​​risks.

A / B testing is to test the effect, at the same time there are several versions of the service of foreign services that are to undergo sufficient testing, to achieve the standard on-line services, but there is no difference between the old and new points (may take a blue-green when they are on-line deployment of way).

A / B testing is concerned that the practical effect of different versions of the service, say the conversion rate, orders and so on.

When the A / B test, simultaneously run multiple versions of online services, which usually have some differences on the experience of, say, different page styles, colors, operational processes. Personnel by the actual results of the analysis of each version of the service, select the best-performing versions.
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/Tiger_lin1/article/details/92797848