Azure 中虚拟机的可用性选项Availability options for virtual machines in Azure

本文概述了 Azure 虚拟机 (VM) 的可用性功能。This article provides you with an overview of the availability features of Azure virtual machines (VMs).

高可用性High availability

工作负荷通常分布在不同的虚拟机上,以获得高吞吐量、高性能并实现冗余,防止 VM 因更新或其他事件而受影响。Workloads are typically spread across different virtual machines to gain high throughput, performance, and to create redundancy in case a VM is impacted due to an update or other event.

Azure 提供了几个选项来实现高可用性。There are few options that Azure provides to achieve High Availability. 首先,让我们谈一谈基本构造。First let's talk about basic constructs.

容错域Fault domains

容错域是共享公用电源和网络交换机的基础硬件逻辑组,类似于本地数据中心内的机架。A fault domain is a logical group of underlying hardware that share a common power source and network switch, similar to a rack within an on-premises datacenter.

更新域Update domains

更新域是可以同时维护或重新启动的基础硬件逻辑组。An update domain is a logical group of underlying hardware that can undergo maintenance or be rebooted at the same time.

Azure 平台进行定期维护时,此方法可确保至少有一个应用程序实例始终保持运行状态。This approach ensures that at least one instance of your application always remains running as the Azure platform undergoes periodic maintenance. 在维护期间,更新域的重启顺序可能不会按序进行,但一次只重启一个更新域。The order of update domains being rebooted may not proceed sequentially during maintenance, but only one update domain is rebooted at a time.

虚拟机规模集Virtual Machines Scale Sets

使用 Azure 虚拟机规模集可以创建并管理一组负载均衡的 VM。Azure virtual machine scale sets let you create and manage a group of load balanced VMs. 可以根据需求或定义的计划自动增减 VM 实例的数目。The number of VM instances can automatically increase or decrease in response to demand or a defined schedule. 规模集为应用程序提供高可用性,用于集中管理、配置和更新许多 VM。Scale sets provide high availability to your applications, and allow you to centrally manage, configure, and update many VMs. 建议在一个规模集内创建两个或多个 VM,使应用程序高度可用,并满足 99.95% Azure SLA 的要求。We recommended that two or more VMs are created within a scale set to provide for a highly available application and to meet the 99.95% Azure SLA. 规模集本身是免费的,你只需为创建的每个 VM 实例付费。There is no cost for the scale set itself, you only pay for each VM instance that you create. 当单个 VM 使用 Azure 高级 SSD 时,Azure SLA 适用于计划外维护事件。When a single VM is using Azure premium SSDs, the Azure SLA applies for unplanned maintenance events. 规模集内的虚拟机可以跨多个更新域和容错域部署,以最大程度地提高因数据中心中断、计划内或计划外维护事件而导致停机时的可用性和复原能力。Virtual machines in a scale set can be deployed across multiple update domains and fault domains to maximize availability and resilience to outages due to data center outages, and planned or unplanned maintenance events.

容错域和更新域Fault domains and update domains

虚拟机规模集通过协调容错域和更新域简化了高可用性设计。Virtual machine scale sets simplify designing for high availability by aligning fault domains and update domains. 只需为规模集定义容错域计数。You will only have to define fault domains count for the scale set. 规模集可用的容错域的数量可能因地区而异。The number of fault domains available to the scale sets may vary by region. 请参阅管理 Azure 中的虚拟机的可用性See Manage the availability of virtual machines in Azure.

可用性集Availability sets

可用性集是数据中心内的 VM 的逻辑分组,可让 Azure 了解应用程序的构建方式,以便提供冗余和可用性。An availability set is a logical grouping of VMs within a datacenter that allows Azure to understand how your application is built to provide for redundancy and availability. 建议在可用性集内创建两个或多个 VM,提供高度可用的应用程序,并满足 99.95% Azure SLA 的要求。We recommended that two or more VMs are created within an availability set to provide for a highly available application and to meet the 99.95% Azure SLA. 可用性集本身是免费的,只需为创建的每个 VM 实例付费。There is no cost for the Availability Set itself, you only pay for each VM instance that you create. 当单个 VM 使用 Azure 高级 SSD 时,Azure SLA 适用于计划外维护事件。When a single VM is using Azure premium SSDs, the Azure SLA applies for unplanned maintenance events.

在可用性集中,VM 自动分布到这些容错域中。In an availability set, VMs are automatically distributed across these fault domains. 此方法可限制潜在物理硬件故障、网络中断或断电的影响。This approach limits the impact of potential physical hardware failures, network outages, or power interruptions.

对于使用 Azure 托管磁盘的 VM,在使用托管可用性集时,VM 与托管磁盘容错域一致。For VMs using Azure Managed Disks, VMs are aligned with managed disk fault domains when using a managed availability set. 该一致性可确保附加到 VM 的所有托管磁盘都在同一托管磁盘容错域内。This alignment ensures that all the managed disks attached to a VM are within the same managed disk fault domain.

在托管可用性集中,只能创建带托管磁盘的 VM。Only VMs with managed disks can be created in a managed availability set. 托管磁盘容错域的数目因区域而异 - 每个区域两个或三个托管磁盘容错域。The number of managed disk fault domains varies by region - either two or three managed disk fault domains per region. 可以阅读有关这些适用于 Linux VMWindows VM 的托管磁盘容错域的详细信息。You can read more about these managed disk fault domains for Linux VMs or Windows VMs.

托管可用性集

可用性集中的 VM 也会自动分布到更新域中。VMs within an availability set are also automatically distributed across update domains.

可用性集

后续步骤Next steps

现在即可开始使用这些可用性和冗余功能构建 Azure 环境。You can now start to use these availability and redundancy features to build your Azure environment. 有关最佳实践的信息,请参阅 Azure 可用性的最佳实践For best practices information, see Azure availability best practices.