金丝雀发布策略与蓝/绿 [英] Canary release strategy vs. Blue/Green

本文介绍了金丝雀发布策略与蓝/绿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的理解是,它是部分发布到生产节点的一个子集,粘性会话已打开。这样,您可以控制并最大限度地减少受影响的用户/客户数量,如果您最终发布错误的错误。



我的理解蓝色/绿色版本是您有2个镜像生产环境(蓝色和绿色),您可以将更改一次推送到蓝色或绿色的所有节点,然后使用网络魔术来控制哪些环境用户通过DNS路由到。



所以,在我开始之前,如果我以前说过的任何东西是不正确的,请先纠正我!



假设我或多或少正轨,那么关于这两个策略的几个问题:




  • 有没有哪些金丝雀优先于蓝色/绿色,反之亦然?

  • 部署模式是否可以同时实施这两种策略?


解决方案

蓝绿释放更简单快捷。



ca如果您在测试环境中测试了新版本,并且非常确定新版本将在生产中正常运行,那么请执行蓝绿色版本。始终使用功能切换是增加您对新版本的信心的好方法,因为新版本的功能与旧版本完全相同直到有人翻转功能切换。将您的应用程序分解成小型,独立可释放的服务是另一个,因为测试较少,可以破坏。



您需要如果您不完全确定新版本在生产中正常运行,则可以使用金丝雀版本。即使你是一个彻底的测试者,互联网是一个庞大而复杂的地方,总是会遇到意想不到的挑战。即使您使用功能切换,也可能会执行不正确的操作。



部署自动化需要付出努力,所以大多数组织都会计划每次使用一个策略或其他策略。 p>

如果您致力于允许您有信心的做法,请执行蓝绿色部署。否则,发送金丝雀。



蓝绿色的本质是一次部署,金丝雀部署的精髓逐步部署,因此给予单个用户池我不能想到一个过程,我会描述为同时做这两个。如果您有多个独立的用户池,例如使用不同的区域数据中心,您可以在每个数据中心内做蓝绿色,并跨越数据中心。尽管如果您不需要在数据中心内部进行金丝雀部署,您可能不需要跨数据中心。


My understanding of a canary release is that it's a partial release to a subset of production nodes with sticky sessions turned on. That way you can control and minimize the number of users/customers that get impacted if you end up releasing a bad bug.

My understanding of a blue/green release is that you have 2 mirrored production environments ("blue" and "green"), and you push changes out to all the nodes of either blue or green at once, and then use networking magic to control which environment users are routed to via DNS.

So, before I begin, if anything I have said so far is incorrect, please begin by correcting me!

Assuming I'm more or less on track, then a couple of questions about the two strategies:

  • Are there scenarios where canary is preferred over blue/green, and vice versa?
  • Are there scenarios where a deployment model can implement both strategies at the same time?

解决方案

Blue-green releasing is simpler and faster.

You can do a blue-green release if you've tested the new version in a testing environment and are very certain that the new version will function correctly in production. Always using feature toggles is a good way to increase your confidence in a new version, since the new version functions exactly like the old until someone flips a feature toggle. Breaking your application into small, independently releaseable services is another, since there is less to test and less that can break.

You need to do a canary release if you're not completely certain that the new version will function correctly in production. Even if you are a thorough tester, the Internet is a large and complex place and is always coming up with unexpected challenges. Even if you use feature toggles, one might be implemented incorrectly.

Deployment automation takes effort, so most organizations will plan to use one strategy or the other every time.

So do blue-green deployment if you're committed to practices that allow you to be confident in doing so. Otherwise, send out the canary.

The essence of blue-green is deploying all at once and the essence of canary deployment is deploying incrementally, so given a single pool of users I can't think of a process that I would describe as doing both at the same time. If you had multiple independent pools of users, e.g. using different regional data centers, you could do blue-green within each data center and canary across data centers. Although if you didn't need canary deployment within a data center, you probably wouldn't need it across data centers.

这篇关于金丝雀发布策略与蓝/绿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆