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

Azure 负载均衡器标准版概述(预览版)Azure Load Balancer Standard overview (preview)

将 Azure 负载均衡器标准 SKU 和公共 IP 标准 SKU 结合使用,可以构建高度可缩放且可靠的体系结构。The Azure Load Balancer Standard SKU and Public IP Standard SKU together enable you to build highly scalable and reliable architectures. 使用负载均衡器标准版的应用程序可以利用新的功能。Applications that use Load Balancer Standard can take advantage of new capabilities. 针对所有 TCP 和 UDP 应用程序的数百万个流提供低延迟、高吞吐量和缩放功能。Low latency, high throughput, and scale are available for millions of flows for all TCP and UDP applications.

备注

负载均衡器标准版 SKU 目前以预览版提供。The Load Balancer Standard SKU is currently in preview. 在预览期,该功能的可用性和可靠性级别可能与正式版不同。During preview, the feature might not have the same level of availability and reliability as features that are in general availability release. 有关详细信息,请参阅 Microsoft Azure 预览版 Microsoft Azure 补充使用条款For more information, see Microsoft Azure Supplemental Terms of Use for Microsoft Azure Previews. 请将正式版负载均衡器基本 SKU 用于生产服务。Use the generally available Load Balancer Basic SKU for your production services. 若要将可用性区域预览版与此预览版配合使用,需要进行单独注册,并且还需要注册负载均衡器标准预览版To use Availability Zones Preview with this Preview requires a separate sign-up, in addition to signing up for Load Balancer Standard preview.

为何使用负载均衡器标准版?Why use Load Balancer Standard?

可对各种规模的数据中心使用负载均衡器标准版。You can use Load Balancer Standard for the full range of virtual data centers. 从小规模部署到大型复杂的多区域体系结构,都可以使用负载均衡器标准版来充分利用以下功能:From small scale deployments to large and complex multi-zone architectures, use Load Balancer Standard to take advantage of the following capabilities:

  • 可以使用负载均衡器标准版实现企业级缩放Enterprise scale can be achieved with Load Balancer Standard. 可对虚拟网络中的最多 1000 个任何虚拟机 (VM) 实例使用此功能。This feature can be used with any virtual machine (VM) instance within a virtual network, up to 1,000 VM instances.

  • 提供新的诊断见解,帮助你了解、管理虚拟数据中心的这个重要组件并对其进行故障排除。New diagnostic insights are available to help you understand, manage, and troubleshoot this vital component of your virtual data center. 使用 Azure Monitor(预览版)显示、筛选新的多维指标并对其进行分组,以便持续度量数据路径运行状况。Use Azure Monitor (preview) to show, filter, and group new multi-dimensional metrics for continuous data path health measurements. 监视从前端到 VM、终结点运行状况探测、TCP 连接尝试再到出站连接的数据。Monitor your data from front-end to VM, endpoint health probes, for TCP connection attempts, and to outbound connections.

  • 网络安全组对于与负载均衡器标准版 SKU 或公共 IP 标准版 SKU 关联的任何 VM 实例现在都是必需的。Network Security Groups are now required for any VM instance that is associated with Load Balancer Standard SKUs or Public IP Standard SKUs. 网络安全组 (NSG) 可为方案提供增强的安全性。Network Security Groups (NSGs) provide enhanced security for your scenario.

  • 高可用性 (HA) 端口提供较高的可靠性,并可针对网络虚拟设备 (NVA) 和其他应用程序方案进行缩放。High Availability (HA) Ports provide high reliability and scale for network virtual appliances (NVAs) and other application scenarios. HA 端口可将 Azure 内部负载均衡器 (ILB) 前端中的所有端口负载均衡到 VM 实例池。HA Ports load balance all ports on an Azure Internal Load Balancer (ILB) front-end to a pool of VM instances.

  • 出站连接现在使用新的源网络地址转换 (SNAT) 端口分配模型,提供更高的复原能力和缩放性。Outbound connections now use a new Source Network Address Translation (SNAT) port allocation model that provides greater resiliency and scale.

  • 包含可用性区域的负载均衡器标准版可用于构建区域冗余的体系结构和区域体系结构。Load Balancer Standard with Availability Zones can be used to construct zone-redundant and zonal architectures. 这两种体系结构都具有跨区域负载均衡功能。Both of these architectures can include cross-zone load balancing. 可以在不依赖于 DNS 记录的情况下实现区域冗余。You can achieve zone-redundancy without dependency on DNS records. 默认情况下,单个 IP 地址是区域冗余的。A single IP address is zone-redundant by default. 单个 IP 地址可在一个跨所有可用性区域的区域中访问虚拟网络中的任何 VM。A single IP address can reach any VM in a virtual network within a region that is across all Availability Zones.

可以在支持以下基本方案的公共或内部配置中使用负载均衡器标准版:You can use Load Balancer Standard either in a public or internal configuration to support the following fundamental scenarios:

  • 将入站流量负载均衡到正常的后端实例。Load balance inbound traffic to healthy back-end instances.
  • 以端口转发的形式将入站流量传送到单个后端实例。Port forward inbound traffic to a single back-end instance.
  • 转换从虚拟网络中的专用 IP 地址发往公共 IP 地址的出站流量。Translate outbound traffic from a private IP address within the virtual network to a Public IP address.

企业级缩放Enterprise scale

使用负载均衡器标准版,设计高性能的虚拟数据中心和支持任何 TCP 或 UDP 应用程序。Use Load Balancer Standard to design your high-performance virtual data center and support any TCP or UDP application. 在后端池中使用独立的 VM 实例或最多 1,000 个虚拟机规模集的实例。Use standalone VM instances, or up to 1,000 instances of virtual machine scale sets in a back-end pool. 仍可使用较低的转发延迟、较高的吞吐量性能,并可针对完全托管的 Azure 服务的数百万个流进行缩放。Continue to use low forwarding latency, high throughput performance, and scale to millions of flows on a fully managed Azure service.

负载均衡器标准版可将流量转发到区域虚拟网络中的任何 VM 实例。Load Balancer Standard can forward traffic to any VM instance in a virtual network in a region. 后端池大小最高可达 1,000 个实例,其中可以采用以下 VM 方案的任意组合:Back-end pool sizes can be up to 1,000 instances with any combination of the following VM scenarios:

  • 无可用性集的独立 VMStandalone VMs without availability sets
  • 有可用性集的独立 VMStandalone VMs with availability sets
  • 最多包含 1,000 个实例的虚拟机规模集Virtual machine scale sets, up to 1,000 instances
  • 多个虚拟机规模集Multiple virtual machine scale sets
  • VM 与虚拟机规模集的混合Blends of VMs and virtual machine scale sets

可用性集不再有任何要求。There no longer is a requirement for availability sets. 可以选择使用可用性集,以利用它们提供的其他好处。You can choose to use availability sets for the other benefits that they provide.

诊断见解Diagnostic insights

负载均衡器标准版为公共和内部负载均衡器配置提供新的多维诊断功能。Load Balancer Standard provides new multi-dimensional diagnostic capabilities for public and internal Load Balancer configurations. 这些新指标通过 Azure Monitor(预览版)提供,并利用所有相关功能,包括与下游使用者集成的功能。These new metrics are provided through Azure Monitor (preview) and utilize all of the related capabilities, including the ability to integrate with downstream consumers.

指标Metric 说明Description
VIP 可用性VIP availability 负载均衡器标准版持续运用从区域内部到负载均衡器前端,直到支持 VM 的 SDN 堆栈的数据路径。Load Balancer Standard continuously exercises the data path from within a region to the Load Balancer front-end all the way to the SDN stack that supports your VM. 只要保留正常实例,这种度量就会遵循应用程序负载均衡的流量所用的相同路径。As long as healthy instances remain, the measurement follows the same path as your application's load-balanced traffic. 此外,还会验证客户使用的数据路径。The data path that is used by your customers is also validated. 度量对于应用程序不可见,且不会干扰其他操作。The measurement is invisible to your application and does not interfere with other operations.
DIP 可用性DIP availability 负载均衡器标准版使用分布式运行状况探测服务,根据配置设置监视应用程序终结点的运行状况。Load Balancer Standard uses a distributed health probing service that monitors your application endpoint's health according to your configuration settings. 此指标提供负载均衡器池中每个实例终结点的聚合视图或按终结点筛选的视图。This metric provides an aggregate or per endpoint filtered-view of each individual instance endpoint in the Load Balancer pool. 可以查看负载均衡器如何根据运行状况探测配置的指示了解应用程序的运行状况。You can see how Load Balancer views the health of your application as indicated by your health probe configuration.
SYN 数据包SYN packets 负载均衡器标准版不会终止 TCP 连接,也不会与 TCP 或 UDP 数据包流交互。Load Balancer Standard does not terminate TCP connections or interact with TCP or UDP packet flows. 流及其握手始终位于源和 VM 实例之间。Flows and their handshakes are always between the source and the VM instance. 若要更好地排查 TCP 协议方案的问题,可以使用 SYN 数据包计数器了解进行了多少次 TCP 连接尝试。To better troubleshoot your TCP protocol scenarios, you can make use of SYN packets counters to understand how many TCP connection attempts are made. 该指标将报告接收到的 TCP SYN 数据包数目。The metric reports the number of TCP SYN packets that were received.
SNAT 连接SNAT connections 负载均衡器标准版报告公共 IP 地址前端上伪装的出站流数。Load Balancer Standard reports the number of outbound flows that are masqueraded to the Public IP address front-end. SNAT 端口是可耗竭性资源。SNAT ports are an exhaustible resource. 此指标可以指出应用程序依赖于 SNAT 获取出站发起流的程度有多高。This metric can give an indication of how heavily your application is relying on SNAT for outbound originated flows. 将报告成功和失败的出站 SNAT 流的计数器,可使用这些计数器排查和了解出站流的运行状况。Counters for successful and failed outbound SNAT flows are reported and can be used to troubleshoot and understand the health of your outbound flows.
字节计数器Byte counters 负载均衡器标准版按前端报告处理的数据。Load Balancer Standard reports the data processed per front-end.
数据包计数器Packet counters 负载均衡器标准版按前端报告处理的数据包。Load Balancer Standard reports the packets processed per front-end.

高可靠性High reliability

配置负载均衡规则可让应用程序具有缩放性,并且变得高度可靠。Configure load balancing rules to make your application scale and be highly reliable. 可以针对单个端口配置规则,或者使用 HA 端口均衡所有流量,而不管 TCP 或 UDP 端口号是什么。You can configure rules for individual ports, or you can use HA Ports to balance all traffic irrespective of the TCP or UDP port number.

可以使用新的 HA 端口功能来解锁各种方案(包括高可用性)以及针对内部 NVA 进行缩放。You can use the new HA Ports feature to unlock a variety of scenarios, including high availability and scale for internal NVAs. 该功能对无法或不需要指定单个端口的其他方案也很有用。The feature is useful for other scenarios where it is impractical or undesirable to specify individual ports. HA 端口允许任意数目的实例,因此可以提供冗余和缩放性。HA Ports provide redundancy and scale by allowing as many instances as you need. 配置不再局限于主动/被动方案。Your configuration is no longer restricted to active/passive scenarios. 运行状况探测配置通过将流量仅转发到正常实例来保护服务。Your health probe configurations protect your service by forwarding traffic only to healthy instances.

NVA 供应商可为客户提供享有全面供应商支持的弹性方案。NVA vendors can provide fully vendor-supported, resilient scenarios for their customers. 已删除单一故障点,并支持多个活动实例进行缩放。The single point of failure is removed and multiple active instances are supported for scale. 可缩放到两个或多个实例,具体取决于设备的功能。You can scale to two or more instances, depending on the capabilities of your appliance. 有关这些方案的其他指导,请联系 NVA 供应商。Contact your NVA vendor for additional guidance for these scenarios.

可用性区域Availability zones

备注

Azure 可用性区域处于预览状态,已准备好在开发和测试方案中使用。Azure Availability Zones is in preview and is ready for your development and test scenarios. 仅针对经挑选的一些 Azure 资源、区域和大小系列提供此支持。Support is available for select Azure resources, regions, and size families. 有关如何开始使用以及可以使用可用性区域尝试哪些 Azure 资源、区域和大小系列的详细信息,请参阅可用性区域概述For more information on how to get started, and which Azure resources, regions, and size families you can try with Availability Zones, see Overview of Availability Zones. 可以在 Azure 网站上提供反馈You can provide feedback on the Azure website. 若需支持,请联系 StackOverflow创建 Azure 支持票证For support, contact StackOverflow or open an Azure support ticket.

使用受支持区域中的可用性区域进一步提升应用程序的复原能力。Advance your application's resiliency with the use of Availability Zones in supported regions. 可用性区域目前在特定的区域以预览版提供,需要额外选用。Availability Zones are currently in preview in specific regions and require additional opt-in.

自动区域冗余Automatic zone-redundancy

可以针对每个应用程序,选择负载均衡器是要提供区域冗余的前端还是区域前端。You can choose whether Load Balancer should provide a zone-redundant or zonal front-end for each of your applications. 使用负载均衡器标准版可以轻松创建区域冗余。It's easy to create zone-redundancy with Load Balancer Standard. 单个前端 IP 地址已自动实现区域冗余。A single front-end IP address is automatically zone-redundant. 区域冗余的前端由区域中的所有可用性区域同时提供服务。A zone-redundant front-end is served by all availability zones in a region simultaneously. 可为入站和出站连接创建区域冗余的数据路径。A zone-redundant data path is created for inbound and outbound connections. Azure 中的区域冗余不需要多个 IP 地址和 DNS 记录。Zone-redundancy in Azure does not require multiple IP addresses and DNS records.

区域冗余适用于公共或内部前端。Zone-redundancy is available for public or internal front-ends. 公共 IP 地址和内部负载均衡器的前端专用 IP 可以实现区域冗余。Your Public IP address and front-end private IP for your internal Load Balancer can be zone-redundant.

使用以下脚本为内部负载均衡器创建区域冗余的公共 IP 地址。Use the following script to create a zone-redundant Public IP address for your internal Load Balancer. 如果在配置中使用现有的资源管理器模板,请将 sku 部分添加到这些模板中。If you're using existing Resource Manager templates in your configuration, add the sku section to these templates.

            "apiVersion": "2017-08-01",
            "type": "Microsoft.Network/publicIPAddresses",
            "name": "public_ip_standard",
            "location": "region",
            "sku":
            {
                "name": "Standard"
            },

使用以下脚本为内部负载均衡器创建区域冗余的前端 IP。Use the following script to create a zone-redundant front-end IP for your internal Load Balancer. 如果在配置中使用现有的资源管理器模板,请将 sku 部分添加到这些模板中。If you're using existing Resource Manager templates in your configuration, add the sku section to these templates.

            "apiVersion": "2017-08-01",
            "type": "Microsoft.Network/loadBalancers",
            "name": "load_balancer_standard",
            "location": "region",
            "sku":
            {
                "name": "Standard"
            },
            "properties": {
                "frontendIPConfigurations": [
                    {
                        "name": "zone_redundant_frontend",
                        "properties": {
                            "subnet": {
                                "Id": "[variables('subnetRef')]"
                            },
                            "privateIPAddress": "10.0.0.6",
                            "privateIPAllocationMethod": "Static"
                        }
                    },
                ],

如果公共 IP 前端是区域冗余的,则从 VM 实例发起的出站连接会自动实现区域冗余。If your Public IP front-end is zone-redundant, outbound connections that are made from VM instances automatically become zone-redundant. 前端在发生区域故障时可受到保护。The front-end is protected from zone failure. SNAT 端口分配在发生区域故障时也能幸存。Your SNAT port allocation also survives zone failure.

跨区域负载均衡Cross-zone load balancing

可在区域中针对后端池使用跨区域负载均衡,为 VM 实例提供最大的灵活性。Cross-zone load balancing is available within a region for the back-end pool and offers maximum flexibility for your VM instances. 前端将流量传送到虚拟网络中的任何 VM,而不管 VM 实例的可用性区域是什么。A front-end delivers flows to any VM in the virtual network, irrespective of the Availability Zone of the VM instance.

也可为前端和后端实例指定一个特定的区域,使数据路径和资源与特定的区域相符。You can also specify a particular zone for your front-end and back-end instances, to align your data path and resources with a specific zone.

虚拟网络和子网从不受区域限制。Virtual networks and subnets are never constrained by a zone. 只需使用所需的 VM 实例定义后端池,即可完成配置。Just define a back-end pool with your desired VM instances and your configuration is complete.

区域部署Zonal deployments

可以选择通过定义区域前端,将负载均衡器前端与特定区域对齐。As an option, you can align your load balancer front-end to a specific zone by defining a zonal front-end. 区域前端仅由指定的单个可用性区域提供服务。A zonal front-end is served by the designated single Availability Zone only. 前端与区域 VM 实例相结合时,可将资源与特定区域对齐。When the front-end is combined with zonal VM instances, you can align resources to specific zones.

在特定区域中创建的公共 IP 地址始终仅存在于该区域中。A Public IP address that is created in a specific zone always exists only in that zone. 不能更改公共 IP 地址的区域。It is not possible to change the zone of a Public IP address. 对于可附加到多个区域中的资源的公共 IP 地址,请改为创建区域冗余的公共 IP。For a Public IP address that can be attached to resources in multiple zones, create a zone-redundant Public IP instead.

使用以下脚本在可用性区域 1 中创建区域性公共 IP 地址。Use the following script to create a zonal Public IP address in Availability Zone 1. 如果在配置中使用现有的资源管理器模板,请将 sku 部分添加到这些模板中。If you're using existing Resource Manager templates in your configuration, add the sku section to these templates.

            "apiVersion": "2017-08-01",
            "type": "Microsoft.Network/publicIPAddresses",
            "name": "public_ip_standard",
            "location": "region",
            "zones": [ "1" ],
            "sku":
            {
                "name": "Standard"
            },

使用以下脚本在可用性区域 1 中创建内部负载均衡器前端。Use the following script to create an internal Load Balancer front-end into Availability Zone 1.

如果在配置中使用现有的资源管理器模板,请将 sku 部分添加到这些模板中。If you're using existing Resource Manager templates in your configuration, add the sku section to these templates. 此外,在子资源的前端 IP 配置中定义 zones 属性。Also, define the zones property in the front-end IP configuration for the child resource.

            "apiVersion": "2017-08-01",
            "type": "Microsoft.Network/loadBalancers",
            "name": "load_balancer_standard",
            "location": "region",
            "sku":
            {
                "name": "Standard"
            },
            "properties": {
                "frontendIPConfigurations": [
                    {
                        "name": "zonal_frontend_in_az1",
                        "zones": [ "1" ],
                        "properties": {
                            "subnet": {
                                "Id": "[variables('subnetRef')]"
                            },
                            "privateIPAddress": "10.0.0.6",
                            "privateIPAllocationMethod": "Static"
                        }
                    },
                ],

通过将虚拟网络中的 VM 实例放入后端池,为该后端池添加跨区域负载均衡。Add cross-zone load balancing for your back-end pool by putting your VM instances that are in a virtual network into the pool.

在支持可用性区域的位置,负载均衡器标准版资源始终是大区域 (region) 和局部区域 (zone) 冗余的。The Load Balancer Standard resource is always regional and zone-redundant where Availability Zones are supported. 可将公共 IP 地址或未分配有局部区域的内部负载均衡器前端部署在任何大区域中。You can deploy a Public IP address or internal Load Balancer front-end that doesn't have an assigned zone in any region. 对可用性区域的支持不会影响部署功能。Support for Availability Zones doesn't impact the deployment capability. 如果大区域后来获得了可用性区域,之前部署的公共 IP 或内部负载均衡器前端会自动实现区域冗余。If a region later gains Availability Zones, previously deployed Public IPs or internal Load Balancer front-ends automatically become zone-redundant. 区域冗余的数据路径并不意味着数据包完全不会丢失。A zone-redundant data path does not imply 0% packet loss.

网络安全组Network Security Groups

负载均衡器标准版和公共 IP 标准版会完全进入虚拟网络,这需要使用网络安全组 (NSG)。Load Balancer Standard and Public IP Standard fully onboard to the virtual network, which requires the use of Network Security Groups (NSGs). NSG 可将通信流加入允许列表。NSGs make it possible to whitelist traffic flow. 可以使用 NSG 获得对部署流量的完全控制。You can use NSGs to gain full control over traffic to your deployment. 无需再等待其他通信流完成。You no longer have to wait for other traffic flows to complete.

将 NSG 与子网或后端池中 VM 实例的网络接口 (NIC) 关联。Associate NSGs with subnets or the network interfaces (NICs) of VM instances in the back-end pool. 此配置适用于负载均衡器标准版,以及用作实例层级公共 IP 的公共 IP 标准版。Use this configuration with Load Balancer Standard, and Public IP Standard when it is used as an instance-level Public IP. NSG 必须将要允许的流量显式加入允许列表,才能传送该流量。The NSG must explicitly whitelist the traffic that you want to permit, in order for that traffic to flow.

若要详细了解 NSG 以及如何将其应用于自己的方案,请参阅网络安全组To learn more about NSGs and how to apply them for your scenario, see Network Security Groups.

出站连接Outbound connections

负载均衡器使用端口伪装的 SNAT 时,负载均衡器标准版可为该虚拟网络内的 VM 提供出站连接。Load Balancer Standard provides outbound connections for VMs that are inside the virtual network when a load balancer uses port-masquerading SNAT. 端口伪装 SNAT 算法提供更高的可靠性和缩放性。The port-masquerading SNAT algorithm provides increased robustness and scale.

公共负载均衡器资源与 VM 实例相关联时,将重写每个出站连接源。When a public Load Balancer resource is associated with VM instances, each outbound connection source is rewritten. 出站连接源从虚拟网络专用 IP 地址空间重新写入负载均衡器的前端公共 IP 地址。The source is rewritten from the virtual network private IP address space to the front-end Public IP address of the load balancer.

与区域冗余的前端结合使用时,出站连接也能实现区域冗余,发生区域故障时,SNAT 端口分配可以幸存。When outbound connections are used with a zone-redundant front-end, the connections are also zone-redundant and SNAT port allocations survive zone failure.

负载均衡器标准版中的新算法可向每个 VM 的 NIC 预先分配 SNAT 端口。The new algorithm in Load Balancer Standard preallocates SNAT ports to the NIC of each VM. 将 NIC 添加到该池后,将根据池大小预先分配 SNAT 端口。When a NIC is added to the pool, the SNAT ports are preallocated based on the pool size. 下表显示了针对六层后端池大小的端口预分配:The following table shows the port preallocations for six tiers of back-end pool sizes:

池大小(VM 实例)Pool size (VM instances) 预分配的 SNAT 端口数Preallocated number of SNAT ports
1 - 501 - 50 10241024
51 - 10051 - 100 512512
101 - 200101 - 200 256256
201 - 400201 - 400 128128
401 - 800401 - 800 6464
801 - 1,000801 - 1,000 3232

SNAT 端口数并不直接表示出站连接数。SNAT ports don't directly translate to the number of outbound connections. 可以针对多个唯一目标重用一个 SNAT 端口。A SNAT port can be reused for multiple unique destinations. 有关详细信息,请查看出站连接一文。For details, review the Outbound connections article.

如果后端池增大并转换到更高层级,则会回收一半的分配端口。If the back-end pool size increases and transitions into a higher tier, half of your allocated ports are reclaimed. 与回收端口关联的连接会超时,必须重新建立连接。Connections that are associated with a reclaimed port timeout and must be reestablished. 新的连接尝试会立即成功。New connection attempts succeed immediately. 如果后端池减小并转换到更低层级,可用的 SNAT 端口数会增多。If the back-end pool size decreases and transitions into a lower tier, the number of available SNAT ports increases. 在这种情况下,现有连接不受影响。In this case, existing connections are not affected.

负载均衡器标准版还有一个可基于规则的附加配置选项。Load Balancer Standard has an additional configuration option that can be used on a per-rule basis. 如果多个前端可用,则可控制哪个前端用于端口伪装 SNAT。You can control which front-end is used for port-masquerading SNAT when multiple front-ends are available.

如果只有负载均衡器标准版为 VM 实例提供服务,则 SNAT 出站连接不可用。When only Load Balancer Standard serves VM instances, outbound SNAT connections aren't available. 还可通过向公共负载均衡器分配 VM 实例来显式还原此功能。You can restore this ability explicitly by also assigning the VM instances to a public load balancer. 也可向每个 VM 实例直接分配作为实例层级公共 IP 的公共 IP。You can also directly assign Public IPs as instance-level Public IPs to each VM instance. 对于某些操作系统和应用程序方案,可能需要此配置选项。This configuration option might be required for some operating system and application scenarios.

端口转发Port forwarding

基本版和标准版负载均衡器提供配置入站 NAT 规则,以将前端端口映射到单个后端实例的功能。Basic and Standard Load Balancers provide the ability to configure inbound NAT rules to map a front-end port to an individual back-end instance. 通过配置这些规则,可以公开远程桌面协议终结点和 SSH 终结点,或执行其他应用程序方案。By configuring these rules, you can expose Remote Desktop Protocol endpoints and SSH endpoints, or perform other application scenarios.

负载均衡器标准版继续通过入站 NAT 规则提供端口转发功能。Load Balancer Standard continues to provide port-forwarding ability through inbound NAT rules. 与区域冗余的前端结合使用时,入站 NAT 规则可实现区域冗余,在发生区域故障时能够幸存。When used with zone-redundant front-ends, inbound NAT rules become zone-redundant and survive zone failure.

多个前端Multiple front-ends

应用程序需要公开多个独立 IP 地址时(例如 TLS 网站或 SQL AlwaysOn 可用性组终结点),可以配置多个前端来提高设计灵活性。Configure multiple front-ends for design flexibility when applications require multiple individual IP addresses to be exposed, such as TLS websites or SQL AlwaysOn Availability Group endpoints.

负载均衡器标准版继续提供多个前端,其中需要在唯一的 IP 地址上公开特定的应用程序终结点。Load Balancer Standard continues to provide multiple front-ends where you need to expose a specific application endpoint on a unique IP address.

若要深入了解如何配置多个前端 IP,请参阅多 IP 配置For more information about configuring multiple front-end IPs, see Multiple IP configuration.

关于 SKUAbout SKUs

SKU 仅在 Azure 资源管理器部署模型中可用。SKUs are only available in the Azure Resource Manager deployment model. 本预览版为负载均衡器和公共 IP 资源引入了两个 SKU:“基本”和“标准”。This preview introduces two SKUs for Load Balancer and Public IP resources: Basic and Standard. 这些 SKU 的功能、性能特征、限制和某些内在行为有所不同。The SKUs differ in abilities, performance characteristics, limitations, and some intrinsic behavior. 可在任一 SKU 中使用虚拟机。Virtual machines can be used with either SKU. 对于负载均衡器和公共 IP 资源,SKU 保留为可选属性。For both Load Balancer and Public IP resources, SKUs remain optional attributes. 如果在方案定义中省略 SKU,配置将默认为使用基本 SKU。When SKUs are omitted in a scenario definition, the configuration defaults to using the Basic SKU.

重要

资源的 SKU 不可变。The SKU of a resource is not mutable. 无法更改现有资源的 SKU。You may not change the SKU of an existing resource.

负载均衡器Load Balancer

现有的负载均衡器资源会变成基本 SKU 并保留正式版,且不可更改。The existing Load Balancer resource becomes the Basic SKU and remains generally available and unchanged.

负载均衡器标准 SKU 是新产品,目前以预览版提供。Load Balancer Standard SKU is new and currently in preview. 2017 年 8 月 1 日的 Microsoft.Network/loadBalancers API 版本向资源定义添加了 sku 属性:The August 1, 2017, API version for Microsoft.Network/loadBalancers adds the sku property to the resource definition:

            "apiVersion": "2017-08-01",
            "type": "Microsoft.Network/loadBalancers",
            "name": "load_balancer_standard",
            "location": "region",
            "sku":
            {
                "name": "Standard"
            },

负载均衡器标准版会在提供可用性区域的区域中自动获得区域弹性。Load Balancer Standard is automatically zone-resilient in regions that offer Availability Zones. 如果负载均衡器已声明为区域性,则不会自动获得区域弹性。If the Load Balancer has been declared zonal, then it is not automatically zone-resilient.

公共 IPPublic IP

现有的公共 IP 资源会变成基本 SKU,并保留正式版及其功能、性能特征和限制。The existing Public IP resource becomes the Basic SKU and remains generally available with all of its abilities, performance characteristics, and limitations.

公共 IP 标准 SKU 是新产品,目前以预览版提供。Public IP Standard SKU is new and currently in preview. 2017 年 8 月 1 日的 Microsoft.Network/publicIPAddresses API 版本向资源定义添加了 sku 属性:The August 1, 2017, API version for Microsoft.Network/publicIPAddresses adds the sku property to the resource definition:

            "apiVersion": "2017-08-01",
            "type": "Microsoft.Network/publicIPAddresses",
            "name": "public_ip_standard",
            "location": "region",
            "sku":
            {
                "name": "Standard"
            },

与提供多种分配方法的公共 IP 基本版不同,公共 IP 标准版始终使用静态分配。Unlike Public IP Basic, which offers multiple allocation methods, Public IP Standard always uses static allocation.

公共 IP 标准版会在提供可用性区域的区域中自动获得区域弹性。Public IP Standard is automatically zone-resilient in regions that offer Availability Zones. 如果公共 IP 已声明为区域性,则将不会自动获得区域弹性。If the Public IP has been declared zonal, then it is not automatically zone-resilient. 区域公共 IP 不能从一个区域更改为另一个区域。A zonal Public IP can't be changed from one zone to another.

SKU 之间的迁移Migration between SKUs

SKU 不可变。SKUs are not mutable. 按照本部分中的步骤从一个资源 SKU 移动到另一个资源 SKU。Follow the steps in this section to move from one resource SKU to another.

从基本 SKU 迁移到标准 SKUMigrate from Basic to Standard SKU

  1. 根据需要创建新的标准版资源(负载均衡器和公共 IP)。Create a new Standard resource (Load Balancer and Public IPs, as needed). 重新创建规则和探测定义。Recreate your rules and probe definitions.

  2. 如果适用,从所有 VM 实例中删除基本 SKU 资源(负载均衡器和公共 IP)。Remove the Basic SKU resources (Load Balancer and Public IPs, as applicable) from all VM instances. 确保还会删除可用性集的所有 VM 实例。Be sure to also remove all VM instances of an availability set.

  3. 将所有 VM 实例附加到新的标准 SKU 资源。Attach all VM instances to the new Standard SKU resources.

从标准 SKU 迁移到基本 SKUMigrate from Standard to Basic SKU

  1. 根据需要创建新的基本版资源(负载均衡器和公共 IP)。Create a new Basic resource (Load Balancer and Public IPs, as needed). 重新创建规则和探测定义。Recreate your rules and probe definitions.

  2. 如果适用,从所有 VM 实例中删除标准 SKU 资源(负载均衡器和公共 IP)。Remove the Standard SKU resources (Load Balancer and Public IPs, as applicable) from all VM instances. 确保还会删除可用性集的所有 VM 实例。Be sure to also remove all VM instances of an availability set.

  3. 将所有 VM 实例附加到新的基本 SKU 资源。Attach all VM instances to the new Basic SKU resources.

重要

使用基本 SKU 和标准 SKU 具有以下限制。There are limitations regarding use of the Basic and Standard SKUs.

标准 SKU 的 HA 端口和诊断只能在标准 SKU 中使用。HA Ports and Diagnostics of the Standard SKU are only available in the Standard SKU. 无法从标准 SKU 迁移到基本 SKU,并同时保留这些功能。You can't migrate from the Standard SKU to the Basic SKU and also retain these features.

必须对负载均衡器和公共 IP 资源使用匹配的 SKU。Matching SKUs must be used for Load Balancer and Public IP resources. 不能混合使用基本 SKU 资源和标准 SKU 资源。You can't have a mixture of Basic SKU resources and Standard SKU resources. 不能将 VM、可用性集中的 VM 或虚拟机规模集同时附加到这两类 SKU。You can't attach a VM, VMs in an Availability Set, or a virtual machine scale set to both SKUS simultaneously.

上市区域Region availability

负载均衡器标准版目前已在所有公有云区域推出。Load Balancer Standard is currently available in all public cloud regions.

重要

在短时间内,访问初始启动区域(美国东部 2、美国中部、北欧、美国中西部、西欧、东南亚)之外的区域需要注册其他订阅功能(AllowLBPreviewWave2 和AllowLBPreviewWave3)。For a short period of time, access to regions outside of the initial launch regions (East US 2, Central US, North Europe, West Central US, West Europe, Southeast Asia) requires the registration of additional subscription features (AllowLBPreviewWave2 and AllowLBPreviewWave3). 请执行以下步骤Please follow these steps. 请执行所有这些步骤,即使以前已注册了 AllowLBPreview 也是如此。Please execute all of them even if you have previously signed up for AllowLBPreview already. 未来几周中将删除此要求。This requirement will be removed in the coming weeks.

SKU 服务限制和功能SKU service limits and abilities

Azure 的网络服务限制根据区域和订阅实施。Azure Service Limits for Networking apply per region per subscription.

下表比较了负载均衡器基本和标准 SKU 的限制和功能:The following table compares the limits and abilities of the Load Balancer Basic and Standard SKUs:

负载均衡器Load Balancer 基本Basic 标准Standard
后端池大小Back-end pool size 最大 100up to 100 最大 1,000up to 1,000
后端池边界Back-end pool boundary 可用性集Availability Set 虚拟网络、区域virtual network, region
后端池设计Back-end pool design 可用性集中的 VM、可用性集中的虚拟机规模集VMs in Availability Set, virtual machine scale set in Availability Set 虚拟网络中的任何 VM 实例Any VM instance in the virtual network
HA 端口HA Ports 不支持Not supported 可用Available
诊断Diagnostics 受限,仅限公共 IPLimited, public only 可用Available
VIP 可用性VIP Availability 不支持Not supported 可用Available
快速 IP 移动性Fast IP Mobility 不支持Not supported 可用Available
可用性区域方案Availability Zones scenarios 仅限区域Zonal only 区域、区域冗余、跨区域负载均衡Zonal, Zone-redundant, Cross-zone load-balancing
出站 SNAT 算法Outbound SNAT algorithm 按需On-demand 预先分配Preallocated
出站 SNAT 前端选择Outbound SNAT front-end selection 不可配置,有多个候选项Not configurable, multiple candidates 可选配置,减少了候选项Optional configuration to reduce candidates
网络安全组Network Security Group 在 NIC/子网上可选Optional on NIC/subnet 必选Required

下表比较了公共 IP 基本和标准 SKU 的限制和功能:The following table compares the limits and abilities of the Public IP Basic and Standard SKUs:

公共 IPPublic IP 基本Basic 标准Standard
可用性区域方案Availability Zones scenarios 仅限区域Zonal only 区域冗余(默认)、区域(可选)Zone-redundant (default), zonal (optional)
快速 IP 移动性Fast IP Mobility 不支持Not supported 可用Available
VIP 可用性VIP Availability 不支持Not supported 可用Available
计数器Counters 不支持Not supported 可用Available
网络安全组Network Security Group 在 NIC 上可选Optional on NIC 必选Required

预览版注册Preview sign-up

若要参与负载均衡器标准 SKU 及其配套公共 IP 标准 SKU 的预览,请注册订阅。To participate in the preview for Load Balancer Standard SKU and the companion Public IP Standard SKU, register your subscription. 通过注册订阅,即可使用 PowerShell 或 Azure CLI 2.0 进行访问。Registering your subscription gives you access from PowerShell or Azure CLI 2.0. 若要进行注册,请执行以下步骤:To register, perform the following steps:

备注

注册负载均衡器标准版功能可能需要长达一小时才能在全局范围内生效。Registration of the Load Balancer Standard feature can take up to an hour to become effective globally. 如果要将负载均衡器标准版与可用性区域配合使用,需要对 AZ 预览版进行单独注册If you wish to use Load Balancer Standard with Availability Zones, a separate sign-up is required for the AZ Preview.

重要

在短时间内,访问初始启动区域(美国东部 2、美国中部、北欧、美国中西部、西欧、东南亚)之外的区域需要注册其他订阅功能(AllowLBPreviewWave2 和AllowLBPreviewWave3)。For a short period of time, access to regions outside of the initial launch regions (East US 2, Central US, North Europe, West Central US, West Europe, Southeast Asia) require the registration of additional subscription features (AllowLBPreviewWave2 and AllowLBPreviewWave3). 下面的步骤已被修改以启用其他订阅功能。The steps below have been modified to enable additional subscription features. 请执行所有这些步骤,即使以前已注册了 AllowLBPreview 也是如此。Please execute all of them even if you have previously signed up for AllowLBPreview already. 未来几周中将删除此要求。This requirement will be removed in the coming weeks.

使用 Azure CLI 2.0 注册Sign up by using Azure CLI 2.0

  1. 在提供程序中注册此功能:Register the feature with the provider:

    az feature register --name AllowLBPreview --namespace Microsoft.Network
    az feature register --name AllowLBPreviewWave2 --namespace Microsoft.Network
    az feature register --name AllowLBPreviewWave3 --namespace Microsoft.Network
    
  2. 此操作可能最多需要 10 分钟才能完成。The operation can take up to 10 minutes to complete. 可使用以下命令检查操作状态:You can check the status of the operation with the following command:

    az feature list --query "[?name=='Microsoft.Network/AllowLBPreview']" --output json
    az feature list --query "[?name=='Microsoft.Network/AllowLBPreviewWave2']" --output json
    az feature list --query "[?name=='Microsoft.Network/AllowLBPreviewWave3']" --output json
    

    对于上述每种注册功能,当功能注册状态返回“已注册”时,继续执行下一步。Proceed to the next step when the feature registration state returns 'Registered' for each of the above subscription features. 示例:Example:

    {
       "id": "/subscriptions/foo/providers/Microsoft.Features/providers/Microsoft.Network/features/AllowLBPreview",
       "name": "Microsoft.Network/AllowLBPreview",
       "properties": {
          "state": "Registered"
       },
       "type": "Microsoft.Features/providers/features"
    }
    
  3. 在资源提供程序中重新注册订阅,完成预览版注册:Complete the preview sign-up by re-registering your subscription with the resource provider:

    az provider register --namespace Microsoft.Network
    

使用 PowerShell 注册Sign up by using PowerShell

  1. 在提供程序中注册此功能:Register the feature with the provider:

    Register-AzureRmProviderFeature -FeatureName AllowLBPreview -ProviderNamespace Microsoft.Network
    Register-AzureRmProviderFeature -FeatureName AllowLBPreviewWave2 -ProviderNamespace Microsoft.Network
    Register-AzureRmProviderFeature -FeatureName AllowLBPreviewWave3 -ProviderNamespace Microsoft.Network
    
  2. 此操作可能最多需要 10 分钟才能完成。The operation can take up to 10 minutes to complete. 可使用以下命令检查操作状态:You can check the status of the operation with the following command:

    Get-AzureRmProviderFeature -FeatureName AllowLBPreview -ProviderNamespace Microsoft.Network
    Get-AzureRmProviderFeature -FeatureName AllowLBPreviewWave2 -ProviderNamespace Microsoft.Network
    Get-AzureRmProviderFeature -FeatureName AllowLBPreviewWave3 -ProviderNamespace Microsoft.Network
    

    对于上述每种注册功能,当功能注册状态返回“已注册”时,继续执行下一步。Proceed to the next step when the feature registration state returns 'Registered' for each of the above subscription features. 示例:Example:

    FeatureName      ProviderName        RegistrationState
    -----------      ------------        -----------------
    AllowLBPreview   Microsoft.Network   Registered
    
  3. 在资源提供程序中重新注册订阅,完成预览版注册:Complete the preview sign-up by re-registering your subscription with the resource provider:

    Register-AzureRmResourceProvider -ProviderNamespace Microsoft.Network
    

定价Pricing

负载均衡器标准 SKU 根据配置的规则和处理的数据计费。Load Balancer Standard SKU billing is based on configured rules and processed data. 在预览期不会产生任何费用。No charges are incurred during the preview period. 有关详细信息,请查看负载均衡器公共 IP 定价页。For more information, review the Load Balancer and Public IP pricing pages.

客户可以继续免费享用负载均衡器基本 SKU。Customers continue to enjoy Load Balancer Basic SKU at no charge.

限制Limitations

在预览期存在以下限制,这些限制随时可能发生变化:The following limitations apply at the time of preview and are subject to change:

  • 负载均衡器后端实例目前不能位于对等互连的虚拟网络中。Load Balancer back-end instances cannot be located in peered virtual networks at this time. 所有后端实例必须位于同一区域中。All back-end instances must be in the same region.
  • SKU 不可变。SKUs are not mutable. 无法更改现有资源的 SKU。You may not change the SKU of an existing resource.
  • 可在这两种 SKU 中使用某个独立的 VM、可用性集中的 VM 实例或虚拟机规模集。Both SKUs can be used with a standalone VM, VM instances in an Availability Set, or a virtual machine scale set. 不可以同时在这两种 SKU 中使用 VM 组合。VM combinations may not be used with both SKUs simultaneously. 不允许使用混合了这两种 SKU 的配置。A configuration that contains a mixture of SKUs is not permitted.
  • 对 VM 实例(或可用性集的任何组成部分)使用内部负载均衡器标准版会禁用默认的 SNAT 出站连接Using an internal Load Balancer Standard with a VM instance (or any part of an Availability Set) disables default SNAT outbound connections. 可对独立的 VM、可用性集中的 VM 实例或虚拟机规模集还原此功能。You can restore this ability to a standalone VM, VM instances in an Availability Set, or a virtual machine scale set. 还可还原此功能来建立出站连接。You can also restore the ability to make outbound connections. 若要还原这些功能,请将公共负载均衡器标准版或公共 IP 标准版(作为实例层级公共 IP)同时分配到同一个 VM 实例。To restore these abilities, simultaneously assign a public Load Balancer Standard, or Public IP Standard as an instance-level Public IP, to the same VM instance. 分配完成后,会再次提供公共 IP 地址的端口伪装 SNAT。After the assignment is complete, port-masquerading SNAT to a Public IP address is provided again.
  • 可能需要将 VM 实例分组到可用性集中才能实现完全的后端池缩放。VM instances might need to be grouped into availability sets to achieve full back-end pool scale. 在单个后端池中最多可以放置 150 个可用性集和独立 VM。Up to 150 availability sets and standalone VMs can be placed into a single back-end pool.
  • 不支持 IPv6。IPv6 is not supported.
  • 在可用性区域的上下文中,无法将前端从区域配置变成区域冗余配置,反之亦然。In the context of Availability Zones, a front-end is not mutable from zonal to zone-redundant, or vice versa. 将前端创建为区域冗余配置后,它将一直是区域冗余配置。After a front-end is created as zone-redundant, it remains zone-redundant. 将前端创建为区域配置后,它将一直是区域配置。After a front-end is created as zonal, it remains zonal.
  • 在可用性区域的上下文中,区域公共 IP 地址不能从一个区域转移到另一个区域。In the context of Availability Zones, a zonal Public IP address cannot be moved from one zone to another.
  • 目前不支持 Azure Monitor 警报Azure Monitor Alerts are not supported at this time.
  • 门户尚不支持扩展的预览区域。Portal does not yet support the expanded preview regions. 请使用模板、Azure CLI 2.0 或 PowerShell 等客户端工具作为解决方法。Please use client tools like templates, Azure CLI 2.0 or PowerShell as a workaround.

后续步骤Next steps