An article that make all software released

High-performance organization and inefficient organization of magnitude differences in the efficiency of software delivery. Software delivery capability Technology Organization is a comprehensive ability, involving many sectors, particularly where the release is the important part. - Lu Xun

                                                                   

 

   Even as a non-development engineer, I believe many people have heard of "canary release", "rolling release" and "blue-green publishing" and other terms. A stable and controllable, flexible, good user experience publishing process is a more ideal state publishing process

  Old drivers want to share with you a text of several common publishing model that allows non-developers to develop or release a more clear and comprehensive understanding of the software, so that we can under the circumstances where their team on to the release strategy the correct practice, when necessary, participate in discussion (si) on the (bi).

  

1, canary release

 

Canary (Canary) test. From previously mined under former miners, to be put into a canary if there is toxic gas exploration, canary see whether survive, hence the name.

 

 

Canary simple test usually by manual testing to verify, canary complex testing needs a better system of monitoring infrastructure with, by monitoring indicators feedback, observe the health of the canary, as the basis for subsequent release or rolled back.

 

Canary publishing, general first released a new version of a cluster 1 to a single server, or a small-scale, mainly to do with the verification flow.

If the test passes Watkins, put all the remaining original version upgrade to the new version. If the canary test fails, the direct removal of traffic canary, announced the release failed.

    

Canary released, simple and controllable not rude! Start-up companies is more suitable.

 

2, a group of canary release

 

Single server cluster rolling release, the old driver gave a name called "a group of canary release."

Single server cluster rolling release further optimize based on the improvement in release canary, is a high degree of automation of publishing, the user experience is smooth, it is the mainstream publishing organization mature technology used.

Premise: rolling release publishing tools require more complex and intelligent LB, supports smooth flow and replace the version of the La Rula

 

Single server cluster rolling release practice it like this:

1. starting station 1, or a minor proportion, mainly to flow verification, is not like Canary (Canary) test;

2. When each release, the old version first removed from the traffic LB, remove the old version, new release, and then access the new version LB flow;

3. rolling release each operation is generally composed of several batches, each batch number is generally can preset (using the Publish template settings). For example: The first 2%, a second batch of 10%, 50% the third batch, fourth 100%. Batch on the line between the left observation interval, or by manual verification feedback monitoring to ensure that there is no problem, and then send the next batch. So overall rolling release process is controlled (the first of which will be longer than the time normally after batch);

4. fallback procedures: the new version removed from the traffic LB, remove the new version, replacing the old version is released, and then access the old version LB traffic. And publishing process as a fallback procedure is generally relatively controllable;

 

Scroll released study called  Rolling Update Deployment.

In the old driver seems, like to put a canary, and see no problem? Came alive again in 10 canaries, no problem? N only came alive again ... until the entire mine filled with canary ...

 

It says that rolling release a single server cluster, later speaking rolling release multi-server cluster.

 

    Above that are posted mode single-server cluster, here to talk about the release pattern of two-server cluster.

    

    Release of non-single cluster, we need to LB (Load Balance) for traffic guidance and regulation to achieve load balancing.

    LB mentioned below, just refer to the Load Balance (load balancing), do not have other association ...

3, blue-green release

 

Blue-green publish, assign two sets of servers for the first release, a group run existing old version, set to be running a new version on the line, and then complete the publication by LB switch traffic way, this is the so-called two-server publishing group, commonly known as "blue-green publishing."

 

Published in practice is blue-green, simple and crude!

1. The old version is called Blue Group, a new version called the Green Group, will flow when released by LB from a one-time switch blue group directly to the green group, canary and without rolling release;

2. problems rollback, direct traffic cut back by LB Blue Group;

After the release of initial success, the blue set of machines generally do not directly recovered, but remained to be seen a period, depending on the specific circumstances of the observation period of time may be longer or shorter, released after the observation period to confirm no problem, you can recycle blue set of machines.

 

Blue-green publishing, for simple and crude server Tyrant, after all, need to prepare double server / container resources.

Simple and crude, in fact, means that very clear to the user experience.

4, the function switch Published

 

If you have a local tyrant technology, you can make a fuss about the code level. So is another kind of publishing: function switch release.

A little bit popular parlance, the equivalent of doing a feature on if ... else ..., of course, this is much more complex than actual.

5, red and blue canary release

 

With canary release, allowing blue-green publishing is not so simple and crude, it can be more lean!

Red and blue canary release, is a simple optimization of the release of blue and green. 1 start the pull-in station group Green publishing canary, canary be verified by the total amount of recurrence. Contrast blue-green publishing, publishing the advantage is to have a production flow of canary verification process, can reduce the new version may have problems risks and impacts surface.

    Red and blue canary release, if there are problems fallback quickly, directly through the LB cut the flow back to the old version.

    After completing the release, the old version is generally observed just in case you want to keep, such as leaving 1 to 2 days, no problem after the old version of the server, the container resource recovery.

 

6, advanced publishing mode --A / B release

 

A / B released, with A / B tests similar to, similar to the upgraded version of the function switch release.

With LB, control the flow. A flow rate of the mobile terminal into the cluster, the flow rate into the B side of the PC cluster.

 

A / B issued in practice it in two ways:

1. Simple configuration:

Based on LB achieve pure A / B test, LB needs to be able to do traffic routed through conditions. For example: The client IP, device type, browser type, or even a custom HTTP Header or query string.

2. advanced customization:

Advanced A / B testing requires specialized platform support, these platforms can be fine-grained to do A / B testing for certain types of users. Column is not this on.

 

And publishing function switch A / B release looks similar, but the former is usually stateless, and the whole amount, and the A / B is generally released state, is able to track the state of affairs and user level can be achieved for a particular class of user.

 

In short, the switch function is released garments, A / B is released under high set.

 

7, technical operations to large coffee - the shadow of release

 

Imagine the following scenario:

• To the core business technology transformation, but the service can not stop;

• Key business transformation from .NET JAVA, service can not be stopped;

• Cash business background DB from Oracle to MySQL, the service can not be stopped;

……

To be sure, there is a big move called shadow testing, the use of more complex flow copy, playback and matching technology.

 

Shadow released, practice a little complicated:

Objective: To achieve the old legacy system migration services to upgrade to the new service;

Before the deployment started, legacy systems need to deploy a new service and service in a test environment, two copies of the production database to the test environment.

And a need to produce a request flow out, typically through a message queue can be collected, diversion. The goal is to produce diversion request log, replay copy, distribute to the test environment inside the legacy system services and new services.

Both services test environment, after receiving a response for comparison, if all responses than successful, it can be considered a legacy system services and new services are equivalent in function logic.

If there is a response comparison fails, the two are not considered functionally equivalent logic, a new environment in need of repair, and re-test the shadow, until all comparison is successful.

 

The system complexity and criticality of different, shorter than the time of the test may take several weeks, up to several months long.

 

Shadow released the biggest advantage, because the bypass in a separate test environment can be completely without impact on production flow.

To complete the shadow released, it must be development, testing, operation and maintenance of the three-way joint large coffee to finish.

 

8, issued the ultimate big move --LB

 

The ultimate, the most invincible, the most powerful, most effective, most no stroke win a trick ...... LB released, namely: the boss released!

The boss said how released, we will publish how ...

 

Guess you like

Origin www.cnblogs.com/z1201-x/p/11546745.html