您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

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.

可用性区域Availability zones

"可用性区域" 展开控制级别,你必须在 vm 上维护应用程序和数据的可用性。Availability zones expand the level of control you have to maintain the availability of the applications and data on your VMs. 可用性区域是 Azure 区域中物理上独立的区域。An Availability Zone is a physically separate zone, within an Azure region. 每个受支持的 Azure 区域有三个可用性区域。There are three Availability Zones per supported Azure region.

每个可用性区域有独立的电源、网络和散热设备。Each Availability Zone has a distinct power source, network, and cooling. 通过将解决方案构建为使用区域中复制的 VM,可以在数据中心服务中断时保护应用和数据。By architecting your solutions to use replicated VMs in zones, you can protect your apps and data from the loss of a datacenter. 如果一个区域发生故障,另一个区域会立即提供复制的应用和数据。If one zone is compromised, then replicated apps and data are instantly available in another zone.

可用性区域

详细了解如何在可用性区域中部署 WindowsLinux VM。Learn more about deploying a Windows or Linux VM in an Availability Zone.

容错域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. 规模集为应用程序提供高可用性,并允许你集中管理、配置和更新多个虚拟机。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 regions and fault domains to maximize availability and resilience to outages due to data center outages, and planned or unplanned maintenance events. 规模集中的虚拟机也可以部署到单个可用性区域或突破中。Virtual machines in a scale set can also be deployed into a single Availability zone, or regionally. 可用性区域部署选项可能因业务流程模式而异。Availability zone deployment options may differ based on the orchestration mode.

预览:业务流程模式预览Preview: Orchestration mode Preview

虚拟机规模集允许指定业务流程模式。Virtual machines scale sets allow you to specify orchestration mode. 利用虚拟机规模集业务流程模式(预览版),你现在可以选择规模集是否应协调在规模集配置模型外显式创建的虚拟机,或是否隐式创建的虚拟机实例基于配置模型。With the virtual machine scale set orchestration mode (preview), you can now choose whether the scale set should orchestrate virtual machines which are created explicitly outside of a scale set configuration model, or virtual machine instances created implicitly based on the configuration model. 选择 "业务流程" 模式: VM 业务流程模型允许您将显式定义的虚拟机组合到一个区域或某个可用性区域中。Choose the orchestration mode that VM orchestration model allows you group explicitly defined Virtual Machines together in a region or in an availability zone. 在可用性区域中部署的虚拟机为 Vm 提供了区域隔离,它们被绑定到可用性区域边界,而不是在区域的其他可用性区域中可能发生的任何故障。Virtual machines deployed in an Availability Zone provides zonal isolation to VMs are they are bound to the availability zone boundary and are not subjected to any failures that may occur in other availability zone in the region.

"orchestrationMode": "VM" (VirtualMachine)“orchestrationMode”: “VM” (VirtualMachine) "orchestrationMode": "ScaleSetVM" (VirtualMachineScaleSetVM)“orchestrationMode”: “ScaleSetVM” (VirtualMachineScaleSetVM)
VM 配置模型VM configuration model 无。None. 规模集模型中未定义 VirtualMachineProfile。VirtualMachineProfile is undefined in the scale set model. 必需。Required. VirtualMachineProfile 在规模集模型中填充。VirtualMachineProfile is populated in the scale set model.
向规模集添加新 VMAdding new VM to Scale Set 创建 VM 时,Vm 会显式添加到规模集。VMs are explicitly added to the scale set when the VM is created. Vm 基于 VM 配置模型、实例计数和自动缩放规则进行隐式创建并添加到规模集。VMs are implicitly created and added to the scale set based on the VM configuration model, instance count, and AutoScaling rules.
可用性区域Availability Zones 支持一个可用性区域中的区域部署或 VmSupports regional deployment or VMs in one Availability Zone 支持区域部署或多个可用性区域;可以定义区域平衡策略Supports regional deployment or multiple Availability Zones; Can define the zone balancing strategy
容错域Fault domains 可定义容错域计数。Can define fault domains count. 2或3,基于区域支持,5用于可用性区域。2 or 3 based on regional support and 5 for Availability zone. 已分配的 VM 容错域将保留 VM 生命周期,包括解除分配和重新启动。The assigned VM fault domain will persist with VM lifecycle, including deallocate and restart. 可为非区域性部署定义1、2或3个容错域,并为可用性区域部署定义5个。Can define 1, 2, or 3 fault domains for non-zonal deployments, and 5 for Availability zone deployments. 分配的 VM 容错域不会保留在 VM 的生命周期中,在分配时,会为虚拟机分配一个容错域。The assigned VM fault domain does not persist with VM lifecycle, virtual machines are assigned a fault domain at time of allocation.
更新域Update domains 不适用。N/A. 更新域会自动映射到容错域Update domains are automatically mapped to fault domains 不适用。N/A. 更新域会自动映射到容错域Update domains are automatically mapped to fault domains

容错域和更新域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. 请参阅每个区域的容错域的数量See Number of Fault Domains per region.

可用性集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.