什麼是 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) 模型的第四層運作。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 的網際網路流量進行負載平衡。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.

圖:使用公用和內部 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 Load Balancer?Why use Azure Load Balancer?

您可以使用 Standard 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.

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

預設保護Secure by default

Standard Load Balancer 在本質上建置於零信任網路安全性模型上。Standard Load Balancer is built on the zero trust network security model at its core. Standard Load Balancer 受到預設的保護,而且是虛擬網路的一部分。Standard Load Balancer secure by default and is part of your virtual network. 虛擬網路是私人的隔離式網路。The virtual network is a private and isolated network. 這表示對於輸入流量會關閉 Standard Load Balancer 和標準公用 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 allowed traffic. 如果您沒有子網路的 NSG 或虛擬機器資源的 NIC,系統不會允許流量存取此資源。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. 依預設會對網際網路開放基本負載平衡器。Basic Load Balancer is open to the internet by default.

價格和 SLAPricing and SLA

如需 Standard Load Balancer 的定價資訊,請參閱 Load Balancer 定價For Standard Load Balancer pricing information, see Load Balancer pricing. 基本 Load Balancer 則是免費提供。Basic Load Balancer is offered at no charge. 請參閱負載平衡器的 SLASee SLA for Load Balancer. 基本負載平衡器沒有 SLA。Basic Load Balancer has no SLA.

後續步驟Next steps

請參閱升級 Basic Load Balancer,將 Basic Load Balancer 升級為 Standard Load Balancer。See Upgrade a Basic Load Balancer to upgrade Basic Load Balancer to Standard Load Balancer.

請參閱 建立公用 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

如需 Azure 負載平衡選項的比較,請參閱 Azure 中的負載平衡選項概觀For an Azure load balancing options comparison, see Overview of load-balancing options in Azure.