隔离见证_云见证–一种使我们的生活更轻松的新功能

隔离见证

In order to have a well-configured cluster we need to setup the quorum properly, but there’s more…Here is where the Cloud Witness comes to help.

为了拥有一个配置良好的集群,我们需要正确设置仲裁,但是还有更多……这里是Cloud Witness可以提供帮助的地方。

In this article, I’m going to present something that would be very useful if was already been released, but no, I need to anxiously wait for the next version of Windows Server to be released, in order to start implementing this. Even though, I’m going to share with you, SQL Shack reader, why I’m so excited with that small and simple feature.

在本文中,我将介绍如果已经发布的话将非常有用的东西,但是不,我需要焦急地等待下一个Windows Server版本的发布,以便开始实现这一点。 即使,我将与您分享,SQL Shack读者,为什么我对这个小而简单的功能感到如此兴奋。

I’m talking about the new Cloud Witness capability. Yes, the Windows Server is not supporting this yet (we are currently on Windows Server 2012 R2), and yes this is coming in the new release, probably called Windows Server 2016.

我说的是新的Cloud Witness功能。 是的,Windows Server尚不支持此功能(我们目前在Windows Server 2012 R2上),是的,这是在新版本(可能称为Windows Server 2016)中提供的。

Following our hybrid deployments series, I will be showing the benefits and how to implement this new feature that I already tested.

在我们的混合部署系列之后,我将展示其好处以及如何实施已经测试过的新功能。

但是,这样做的动机是什么? (But, what’s the motivation of this?)

Do you remember my previous article, about how to build a low-cost disaster recovery solution? This feature could be integrated on that article, as this is going not only to improve the Windows’ capabilities, but also to enlarge the number of options that you have to configure a cluster Quorum in a way that better fits your strategy and your budget!

您还记得我上一篇关于如何构建低成本灾难恢复解决方案的文章吗? 该功能可以集成到该文章中,因为这不仅可以改善Windows的功能,而且可以扩大配置群集仲裁所需的选项数量,从而更好地适合您的策略和预算!

You should be asking now: “what the heck is this related to SQL Server?” The answer is simple, and comes in the form of other questions…

您现在应该问:“这与SQL Server有何关系?” 答案很简单,并且以其他问题的形式出现……

  • Do you have clustered instances?

    您是否有集群实例?
  • Is there any availability groups deployed in your environment?

    您的环境中是否部署了任何可用性组?
  • Do you have a Disaster Recovery solution sit in an AlwaysOn Failover Cluster?

    AlwaysOn故障转移群集中是否有灾难恢复解决方案?

If you answered yes to one of those questions, this is for you.

如果您对其中一个问题的回答为“是”,那么这是给您的。

What is the benefit of having a cloud witness?

拥有云见证有什么好处?

There is nothing better than the real story, to show its benefit…

为了证明它的好处,没有什么比真实的故事更好了……

Basically, I had an experience with the following configuration:

基本上,我对以下配置有经验:

    • Two nodes in a datacenter Chicago

      芝加哥数据中心中的两个节点
    • Two nodes in a datacenter Las Vegas

      拉斯维加斯数据中心中的两个节点
    • The cluster witness was a fileshare in the Chicago’s datacenter

      集群见证人是芝加哥数据中心的文件共享
  • The quorum is configured as “Node and File Share Majority”

    仲裁配置为“多数节点和文件共享”

An image is worth a thousand words…

一幅图像值得一千个单词…

On this scenario, we have five voting components, the 4 nodes + the fileshare. This way, we need to have three votes to keep the cluster up and running.

在这种情况下,我们有五个投票组件,四个节点+文件共享。 这样,我们需要获得三票才能保持集群正常运行。

What would happen if the entire Chicago datacenter goes down, for example, because of a power outage?

例如,由于断电,整个芝加哥数据中心宕机了怎么办?

If you said “the cluster will become offline”, you are right! As we lost two nodes and the fileshare witness, we lost 3 votes… so we cannot have the three votes to keep the cluster up…

如果您说“群集将脱机”,那是对的! 由于我们失去了两个节点和文件共享见证者,我们失去了3票……因此我们无法获得3票来保持集群正常运转……

In order to avoid this situation, we could do the following:

为了避免这种情况,我们可以执行以下操作:

  • Arrange a fileshare in a third location (another datacenter)

    在第三个位置(另一个数据中心)安排文件共享
  • Use this fileshare as witness.

    将此文件共享用作见证人。

Let’s say that this new fileshare will be in Austin. The cluster representation would be the following:

假设这个新文件共享将在奥斯汀。 群集表示如下:

Having this, even if either the whole Chicago or Las Vegas datacenter go down again, you will still have the minimum number of votes to keep the cluster working. The only way to take the cluster down is to have both Austin and either Chicago or Las Vegas down (and it’s obvious that having Las Vegas and Chicago down nothing would work).

这样一来,即使整个芝加哥或拉斯维加斯数据中心再次宕机,您仍将具有保持该群集正常运行所需的最少票数。 降低集群的唯一方法是同时关闭奥斯汀和芝加哥,或者关闭拉斯维加斯(很明显,关闭拉斯维加斯和芝加哥都行不通)。

The problem can be solved in this way, but let’s think… In order to just have a simple fileshare in another location, I had to involve another datacenter! This is not that simple and, even less, that cheap. For a big corporation, this could be arranged with a simple request, but what if you are a startup? What would be the option?

可以用这种方法解决问题,但让我们想想……为了在另一个位置仅进行简单的文件共享,我不得不使用另一个数据中心! 这不是那么简单,甚至更便宜。 对于大公司,可以通过一个简单的请求来安排,但是如果您是一家初创公司,该怎么办? 有什么选择?

Now we can introduce the Cloud Witness, a new kind of cluster witness, which comes in the Windows Server vNext (probably 2016).

现在,我们可以介绍Windows Server vNext(可能是2016年)中提供的新型群集见证程序Cloud Witness。

The Cloud Witness takes an advantage of Azure and its Blob Storage service. By the way, do you remember the number of things that the Azure Blob Storage is capable to address? This single server can provide an alternative way to do backups, to save your database files, to extend the table partitioning… If you take a look on my previous articles you will be a witness of the Azure Blob Storage power

Cloud Witness利用Azure及其Blob存储服务的优势。 顺便说一句,您还记得Azure Blob存储能够处理的事情数量吗? 该单个服务器可以提供一种替代方法来执行备份,保存数据库文件,扩展表分区……如果您看一下我以前的文章,您将见证Azure Blob存储的强大功能

The big advantage of this feature is that you won’t need a third datacenter. Another good point is that this service is very low-cost as just few read and write operations will be done.

此功能的最大优点是您不需要第三个数据中心。 另一个好处是,该服务的成本非常低,因为只需执行很少的读取和写入操作。

If we start using the Cloud Witness in the environment that we were talking at the beginning of the article, this would be as follows, resolving the voting problem with a simple configuration and a minimum amount of money:

如果我们在本文开头所讨论的环境中开始使用Cloud Witness,则将如下所示,以简单的配置和最少的金额解决投票问题:

回到这里重要的事情……我如何开始呢? (Going back to what matters here… How can I start with this?)

You can already test this feature, by downloading the Windows Server 2016 preview. An Azure account is also needed. If you don’t have it, you can create a trial one.

通过下载Windows Server 2016预览版,您已经可以测试此功能。 还需要一个Azure帐户。 如果没有,您可以创建一个试用版。

Having Windows Server installed and the Azure account ready, you will need to create an Azure Blob Storage Account. Just click the “New” icon in the bottom-left corner of the portal, and follow the steps shown in the image bellow:

安装Windows Server并准备好Azure帐户后,您将需要创建一个Azure Blob存储帐户。 只需单击门户网站左下角的“新建”图标,然后按照下面的图像中显示的步骤进行操作:

The same Storage Account can be used for multiple Windows failover clusters, as one blob file will be created per cluster.

同一存储帐户可用于多个Windows故障转移群集,因为将为每个群集创建一个Blob文件。

On the Windows side go to the Cluster Quorum configuration:

在Windows上,转到Cluster Quorum配置:

Chose the option “Select the quorum witness”:

选择选项“选择仲裁见证”:

You will find the “Configure a Cloud Witness” option:

您将找到“配置云见证”选项:

Following the wizard, you will need to fill your account name, storage account key and the service endpoint:

在向导之后,您将需要填写您的帐户名,存储帐户密钥和服务端点:

That was the last step! If everything is good, you will be able to find the Cloud Witness icon in your cluster properties, as you can see in the image below:

那是最后一步! 如果一切顺利,您将可以在群集属性中找到“ Cloud Witness”图标,如下图所示:

And that’s it… Azure is bringing more and more tools to make our lives easier and options to reach a good result spending less money than before. As said, I’m eager to have my customers with the new Windows version in production, so I will be able to use this solution in order to improve the availability of their environments.

就是这样…Azure带来了越来越多的工具,使我们的生活更轻松,并且可以选择花费比以前更少的钱来获得良好的结果。 如前所述,我渴望让客户使用新的Windows版本,因此我将能够使用此解决方案来提高他们环境的可用性。

I hope you liked and keep tuned for more articles!

希望您喜欢并继续关注更多文章!

翻译自: https://www.sqlshack.com/cloud-witness-a-new-feature-to-make-our-lives-easier/

隔离见证

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值