当前位置:网站首页>What are blue-green deployment, Canary release and a/b test
What are blue-green deployment, Canary release and a/b test
2022-07-24 00:09:00 【=PNZ=BeijingL】

Blue and green deployment 、A/B test 、 Release of canary , And grayscale publishing 、 Flow segmentation, etc , Often confused with , Affect communication efficiency . The fundamental reason is that these nouns often appear , People are familiar with it and can talk about it skillfully , There is no agreement on the understanding of these terms .
Here's from Blue-green Deployments, A/B Testing, and Canary Releases The definitions sorted out in .
Blue and green deployment
The purpose of the blue-green deployment is Reduce the outage time when publishing 、 The ability to quickly retract releases .
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 and green deployment , There are two systems : One is the system that is providing services , Marked as “ green ”; The other is the system to be released , Marked as “ Blue ”. Both systems are fully functional , And the running system , Only the system version is different from the external service .
first , There's no system , There is no difference between blue and green .
then , The first system was developed , Go online directly , There is only one system for this process , There is no difference between blue and green .
later , Developed a new version , To replace the old online version with the new one , Outside of the online system , Build a new system using the new version of code . Now , There are two systems running , The old system that is providing services to the outside world is the green system , The newly deployed system is the blue system .

The blue system does not provide external services , What to do ?
For pre release testing , Any problems found during the test , It can be modified directly on the blue system , Do not interfere with the system the user is using .( Be careful , Only when the two systems are not coupled can they be guaranteed not to interfere )
The blue system has been tested over and over again 、 modify 、 verification , After confirming that the online standard is met , Switch users directly to the blue system :

For a period of time after switching , It's still blue and green , But the user has access to the blue system . Observe the blue system during this time ( New system ) Working state , If something goes wrong , Switch directly back to the green system .
When you are sure that the blue system for external services is working , When the green system that does not provide external services is no longer needed , The blue system has officially become an external service system , Become a new green system . The original green system can be destroyed , Release resources , To deploy the next Blue System .
Blue green deployment is just one of the online strategies , It's not a panacea for all situations . The premise that blue-green deployment can be implemented simply and quickly is that the target system is very cohesive , If the target system is quite complex , So how to switch 、 Whether the data of the two systems need to be synchronized and so on , You need to think about it .
BlueGreenDeployment The picture given in is particularly vivid :

Release of canary
Release of canary (Canary) It's also a publishing strategy , And what is often said at home Grayscale Publishing It's the same kind of strategy .
Blue and green deployment is to prepare two systems , Switching between two systems , The Canary strategy is that there's only one system , Gradually replace the system .

for example , The target system is a group of stateless Web The server , But it's a lot , Suppose there are 10000 .
Now , Blue and green deployment will not work , Because you can't apply for 10000 servers to deploy the blue system ( In the definition of blue-green deployment , The blue system needs to be able to take all the access ).
One way to think of it is :
Just a few servers , Deploy a new version of the system on it and test it . After passing the test , Worried about accidents , I don't dare to update all the servers immediately . First of all, we'll take 10 Update to the latest system , Then observe and verify . After confirming that there is no exception , Then update all the remaining servers .
This method is Release of canary .
More control can be done in practice , for example , For the original update 10 Set a lower weight for each server 、 Control is sent to this 10 Number of requests per server , Then gradually increase the weight 、 Increase the number of requests .
This control is called “ Flow segmentation ”, It can be used for Canary release , It can also be used in the back A/B test .
Blue green deployment and Canary release are two release strategies , Not everything . Sometimes both can be used , Sometimes only one of them can be used .
In the above example, you can use Canary , You can't use blue and green , So when can I use blue and green , You can't use canaries ? When there is only one server in the whole system .
A/B test
The first thing to be clear is ,A/B Testing and blue-green deployment and Canary , It's totally different .
Blue green deployment and Canary are release strategies , The goal is to ensure the stability of the new online system , It's about the new system BUG、 hidden danger .
A/B The test is the effect test , There are multiple versions of the service at the same time , These services are well tested , Services that meet online standards , There are differences, but there is no distinction between the old and the new ( They may have been deployed blue and green when they went online ).
A/B The test focuses on the actual effect of different versions of the service , For example, conversion rate 、 Orders, etc .
A/B When testing , Running multiple versions of the service online at the same time , These services usually have some differences in experience , For example, page styles 、 Color 、 The operation process is different . By analyzing the actual effect of each version of the service , Choose the best version .

stay A/B In the test , Need to be able to control the distribution of traffic , for example , by A Version allocation 10% Of traffic , by B Version allocation 10% Of traffic , by C Version allocation 80% Of traffic .
边栏推荐
- Ansible command auto completion
- kubernetes error
- OA项目之我的会议(查询)
- Data driven excel reading and writing
- Write all the code as soon as you change the test steps? Why not try yaml to realize data-driven?
- 云原生的概念
- [for loop if conditional statement] summary
- String function 1 of C language
- DGS's mutations
- Tencent will close the "magic core". Is there any resistance to the development of digital collections?
猜你喜欢

【微服务架构】分布式事务

Copy the customer service wechat, go to wechat to add, and make a call

L2TP的LAC自动拨号实验

太空射击 第07课: 添加图形

北大青鸟昌平校区:运维就业现状怎么样?技能要求高吗?

Linked list - 206. Reverse linked list (this question is very important)

Qt创建背景遮罩,弹出子窗口,父窗口背景变黑变暗

OpenFeign设置circuitbreaker=true后Feign的超时时间(readTimeout)失效

Deep learning 9 basic concepts of feedforward neural networks

logback
随机推荐
C语言详解系列——函数的认识(2)如何使用函数实现交换两个整型变量的值
Pushgateway+prometheus+grafana build Flink real-time monitoring
腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?
Multi table query_ External connection
一改测试步骤代码就全写?为什么不试试用 Yaml实现数据驱动?
My meeting of OA project (query)
盘点为下个牛市做准备的10个新Layer1
Analysis and resolution of slot conflict in solid delegatecall
Deep learning 9 basic concepts of feedforward neural networks
JMeter中的自动转义处理
子矩阵的和
北大青鸟昌平校区:运维就业现状怎么样?技能要求高吗?
Scheme for importing XMIND use cases into tapd (with code)
The world's smallest material ranking, Lingzi, Xianzi, quark
太空射击 第07课: 添加图形
Sentinel link mode flow control failure solution
单目标追踪——【相关滤波】MOSSE:Visual Object Tracking using Adaptive Correlation Filters
怎么开户买收益6%的理财产品呢?
【HCIP】MGRE环境下OSPF实验,含多进程双向重发布及OSPF特殊区域
进步成长的快乐