什麼是 Azure Load Balancer?What is Azure Load Balancer?

「負載平衡」是指將負載 (傳入的網路流量) 平均地分散到一組後端資源或伺服器。Load balancing refers to evenly distributing load (incoming network traffic) across a group of backend resources or servers.

Azure Load Balancer 會在開放系統互相連線 (OSI) 模型的第4層運作。Azure Load Balancer operates at layer 4 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 的網際網路流量進行負載平衡。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 depicts both public and internal load balancers directing traffic to port 80 on multiple servers on a Web tier and port 443 on multiple servers on a business tier.

圖:使用公用和內部 Load Balancer 進行多層式應用程式的平衡Figure: Balancing multi-tier applications by using both public and internal Load Balancer

如需個別負載平衡器元件的詳細資訊,請參閱 Azure Load Balancer 元件For more information on the individual load balancer components, see Azure Load Balancer components.

注意

Azure 會為您的案例提供一套完整受控的負載平衡解決方案。Azure provides a suite of fully managed load-balancing solutions for your scenarios.

  • 如果您想要執行 DNS 型全域路由,而且 沒有 傳輸層安全性 (TLS) 通訊協定終止 (「SSL 卸載」)、每一 HTTP/HTTPS 要求或應用程式層的需求,請檢閱 流量管理員If you are looking to do DNS based global routing and do not have requirements for Transport Layer Security (TLS) protocol termination ("SSL offload"), per-HTTP/HTTPS request or application-layer processing, review Traffic Manager.
  • 如果您想要在應用層的區域中的伺服器之間進行負載平衡,請參閱 應用程式閘道If you want to load balance between your servers in a region at the application layer, review Application Gateway.
  • 如果您需要優化 web 流量的全域路由,並透過快速的全域容錯移轉來優化最上層終端使用者的效能和可靠性,請參閱 Front DoorIf you need to optimize global routing of your web traffic and optimize top-tier end-user performance and reliability through quick global failover, see Front Door.

視需要結合這些解決方案,可能有益於您的端對端案例。Your end-to-end scenarios may benefit from combining these solutions as needed. 如需 Azure 負載平衡選項的比較,請參閱 Azure 中的負載平衡選項概觀For an Azure load-balancing options comparison, see Overview of load-balancing options in Azure.

為什麼使用 Azure Load Balancer?Why use Azure Load Balancer?

您可以使用 Azure Load Balancer 調整您的應用程式,並建立具備高可用性的服務。With Azure 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.

您可以使用 Azure Standard Load Balancer 完成的主要案例包括:Key scenarios that you can accomplish using Azure Standard Load Balancer include:

預設保護Secure by default

  • 標準負載平衡器建置於零信任網路安全性模型上。Standard load balancer is built on the zero trust network security model.

  • Standard Load Balancer 受到預設的保護,而且是虛擬網路的一部分。Standard Load Balancer is secure by default and part of your virtual network. 虛擬網路是私人的隔離式網路。The virtual network is a private and isolated network.

  • 除非由網路安全性群組開啟,否則系統會關閉輸入連線的標準負載平衡器和標準公用 IP 位址。Standard load balancers and standard public IP addresses are closed to inbound connections unless opened by Network Security Groups. NSG 可用來明確准許允許的流量。NSGs are used to explicitly permit allowed traffic. 如果您的虛擬機器資源的子網或 NIC 上沒有 NSG,則不允許流量抵達此資源。If you don't have an NSG on a subnet or NIC of your virtual machine resource, traffic isn't allowed to reach this resource. 若要瞭解 Nsg 以及如何將它們套用至您的案例,請參閱 網路安全性群組To learn about NSGs and how to apply them to your scenario, see Network Security Groups.

  • 基本負載平衡器預設會開放至網際網路。Basic load balancer is open to the internet by default.

  • 負載平衡器不會儲存客戶資料。Load balancer doesn't store customer data.

價格和 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.

新功能What's new?

訂閱 RSS 摘要,並在 Azure 更新頁面上檢視最新的 Azure Load Balancer 功能更新。Subscribe to the RSS feed and view the latest Azure Load Balancer feature updates on the Azure Updates page.

後續步驟Next steps

請參閱建立公用 Standard Load Balancer 以開始使用 Load Balancer。See Create a public standard load balancer to get started with using a load balancer.

如需 Azure Load Balancer 限制和元件的詳細資訊,請參閱 Azure Load Balancer 元件Azure Load Balancer 概念For more information on Azure Load Balancer limitations and components, see Azure Load Balancer components and Azure Load Balancer concepts