什么是 Azure 负载均衡器?What is Azure Load Balancer?

“负载均衡”是指在一组后端资源或服务器之间均衡地分配负载(传入网络流量)。 Load balancing refers to evenly distributing load (incoming network traffic) across a group of backend resources or servers.

Azure 负载均衡器在开放式系统互连 (OSI) 模型的第四层上运行。Azure Load Balancer operates at layer four of the Open Systems Interconnection (OSI) model. 它是客户端的单一联系点。It's the single point of contact for clients. 负载均衡器将抵达负载均衡器前端的入站流量分配到后端池实例。Load Balancer distributes inbound flows that arrive at the load balancer's front end to backend pool instances. 这些流取决于所配置的负载均衡规则和运行状况探测。These flows are according to configured load balancing rules and health probes. 后端池实例可以是 Azure 虚拟机,或虚拟机规模集中的实例。The backend pool instances can be Azure Virtual Machines or instances in a virtual machine scale set.

公共负载均衡器 可以为虚拟网络中的虚拟机 (VM) 提供出站连接。A public load balancer can provide outbound connections for virtual machines (VMs) inside your virtual network. 可以通过将专用 IP 地址转换为公共 IP 地址来实现这些连接。These connections are accomplished by translating their private IP addresses to public IP addresses. 公共负载均衡器用于对传入 VM 的 Internet 流量进行负载均衡。Public Load Balancers are used to load balance internet traffic to your VMs.

内部(或专用)负载平衡器 用于仅在前端需要专用 IP 的情况。An internal (or private) load balancer is used where private IPs are needed at the frontend only. 内部负载均衡器用于对虚拟网络内部的流量进行负载均衡。Internal load balancers are used to load balance traffic inside a virtual network. 负载均衡器前端可以在混合方案中从本地网络进行访问。A load balancer frontend can be accessed from an on-premises network in a hybrid scenario.

图:使用公共和内部负载均衡器对多层应用程序进行均衡Figure: Balancing multi-tier applications by using both public and internal Load Balancer

有关各个负载均衡器组件的详细信息,请参阅 Azure 负载均衡器组件和限制For more information on the individual load balancer components, see Azure Load Balancer components and limitations

备注

Azure 为方案提供了一套完全托管的负载均衡解决方案。Azure provides a suite of fully managed load-balancing solutions for your scenarios. 如需高性能、低延迟的 4 层负载均衡,请参阅什么是 Azure 负载均衡器?If you need high-performance, low-latency, Layer-4 load balancing, see What is Azure Load Balancer? 如果正在查找全局 DNS 负载均衡,请查看什么是流量管理器?If you're looking for global DNS load balancing, see What is Traffic Manager? 端到端场景可从结合这些解决方案中受益。Your end-to-end scenarios may benefit from combining these solutions.

有关 Azure 负载平衡选项的比较,请参阅 Overview of load-balancing options in Azure(Azure 中的负载平衡选项概述)。For an Azure load-balancing options comparison, see Overview of load-balancing options in Azure.

为什么使用 Azure 负载均衡器?Why use Azure Load Balancer?

使用标准负载均衡器,你可以缩放应用程序,并创建高度可用的服务。With Standard Load Balancer, you can scale your applications and create highly available services. 负载均衡器支持入站和出站方案。Load balancer supports both inbound and outbound scenarios. 负载均衡器提供低延迟和高吞吐量,以及为所有 TCP 和 UDP 应用程序纵向扩展到数以百万计的流。Load balancer provides low latency and high throughput, and scales up to millions of flows for all TCP and UDP applications.

可以使用标准负载均衡器完成的关键方案包括:Key scenarios that you can accomplish using Standard Load Balancer include:

默认保护Secure by default

标准负载均衡器的核心是零信任网络安全模型。Standard Load Balancer is built on the zero trust network security model at its core. 标准负载均衡器默认情况下保护你的虚拟网络并且是虚拟网络的一部分。Standard Load Balancer secure by default and is part of your virtual network. 虚拟网络是一个专用的隔离网络。The virtual network is a private and isolated network. 这意味着除非由网络安全组打开,否则,标准负载均衡器和标准公用 IP 地址将对入站流关闭。This means Standard Load Balancers and Standard Public IP addresses are closed to inbound flows unless opened by Network Security Groups. NSG 用来显式允许以及将允许的流量加入允许列表。NSGs are used to explicitly permit and whitelist allowed traffic. 如果虚拟机资源的子网或 NIC 上没有 NSG,禁止流量到达此资源。If you do not have an NSG on a subnet or NIC of your virtual machine resource, traffic is not allowed to reach this resource. 若要详细了解 NSG 以及如何将其应用于自己的方案,请参阅网络安全组To learn more about NSGs and how to apply them for your scenario, see Network Security Groups. 默认情况下,基本负载均衡器对 Internet 是开放的。Basic Load Balancer is open to the internet by default.

定价和 SLAPricing and SLA

有关标准负载均衡器的定价信息,请参阅负载均衡器定价For Standard Load Balancer pricing information, see Load Balancer pricing. 基本负载均衡器是免费提供的。Basic Load Balancer is offered at no charge. 请参阅负载均衡器的 SLASee SLA for Load Balancer. 基本负载均衡器没有 SLA。Basic Load Balancer has no SLA.

后续步骤Next steps

请参阅创建公共标准负载均衡器,开始使用负载均衡器。See Create a public Standard Load Balancer to get started with using a Load Balancer.

有关 Azure 负载均衡器限制和组件的详细信息,请参阅 Azure 负载均衡器的概念和限制For more information on Azure Load Balancer limitations and components, see Azure Load Balancer concepts and limitations