網路負載平衡Network Load Balancing

適用於:Windows Server(以每年次管道)、Windows Server 2016Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016

本主題提供的網路負載平衡 (NLB) 功能在 Windows Server 2016 概觀,並包含額外的指導方針建立、設定及管理 NLB 群集的相關的連結。This topic provides an overview of the Network Load Balancing (NLB) feature in Windows Server 2016, and includes links to additional guidance about creating, configuring, and managing NLB clusters.

您可以使用 NLB 做為單一 virtual 叢集管理兩個或更多的伺服器。You can use NLB to manage two or more servers as a single virtual cluster. NLB 美化的可用性和網際網路伺服器應用程式,例如 FTP 網頁上所使用的延展性、防火牆、proxy,virtual 私人網路 (VPN),以及其他重要 mission\ 的伺服器。NLB enhances the availability and scalability of Internet server applications such as those used on web, FTP, firewall, proxy, virtual private network (VPN), and other mission-critical servers.

注意

Windows Server 2016 包含新就 Azure-迫不及待軟體負載平衡器 (SLB) 元件的軟體定義網路 (SDN) 基礎結構。Windows Server 2016 includes a new Azure-inspired Software Load Balancer (SLB) as a component of the Software Defined Networking (SDN) infrastructure. 使用 SLB NLB 而如果您使用 SDN,使用非 Windows 工作負載,需要輸出網路位址轉譯 (NAT),或者需要層級 3 (L3) 或非 TCP 根據負載平衡。Use SLB instead of NLB if you are using SDN, are using non-Windows workloads, need outbound network address translation (NAT), or need Layer 3 (L3) or non-TCP based load balancing. 您可以繼續使用與 Windows Server 2016 NLB 非 SDN 部署。You can continue to use NLB with Windows Server 2016 for non-SDN deployments. 如需 SLB 的詳細資訊,請查看軟體負載平衡 (SLB) SDN 的For more information about SLB, see Software Load Balancing (SLB) for SDN.

流量分配數個伺服器、使用 TCP\ 日 IP 網路通訊協定網路負載平衡 (NLB) 功能。The Network Load Balancing (NLB) feature distributes traffic across several servers by using the TCP/IP networking protocol. 藉由組合兩個或更多的電腦正在執行的應用程式成單一的 virtual 叢集,NLB 提供的可靠性與 web 伺服器效能和其他 mission\ 重大伺服器。By combining two or more computers that are running applications into a single virtual cluster, NLB provides reliability and performance for web servers and other mission-critical servers.

在 NLB 叢集伺服器稱為主機,與每個主機執行獨立伺服器應用程式的複本。The servers in an NLB cluster are called hosts, and each host runs a separate copy of the server applications. NLB 分散叢集主機的收到 client 的要求。NLB distributes incoming client requests across the hosts in the cluster. 您可以設定為每個主機處理載入。You can configure the load that is to be handled by each host. 您也可以新增處理負載增加到叢集動態主機。You can also add hosts dynamically to the cluster to handle increased load. NLB 也可以直接所有的資料傳輸到指定的單一主機,稱為預設主機NLB can also direct all traffic to a designated single host, which is called the default host.

NLB 可讓所有電腦的 IP 位址,來處理叢集,並為每個主機保持的唯一、專用 IP 位址設定。NLB allows all of the computers in the cluster to be addressed by the same set of IP addresses, and it maintains a set of unique, dedicated IP addresses for each host. Load\ 平衡應用程式時主機失敗或進入] 載入是自動轉散發之間仍會運作的電腦。For load-balanced applications, when a host fails or goes offline, the load is automatically redistributed among the computers that are still operating. 準備好時,離線電腦無障礙重新叢集並重新允許的其他電腦中叢集處理較少的流量的工作負載的。When it is ready, the offline computer can transparently rejoin the cluster and regain its share of the workload, which allows the other computers in the cluster to handle less traffic.

實用的應用程式Practical applications

NLB 適合用來確保無應用程式,例如執行 (IIS) 的網頁伺服器可提供最少當機,並的延展性 \(透過新增額外的伺服器載入 increases\ 為)。NLB is useful for ensuring that stateless applications, such as web servers running Internet Information Services (IIS), are available with minimal downtime, and that they are scalable (by adding additional servers as the load increases). 下列章節描述 NLB 如何支援可用性、延展性及管理性執行這些應用程式的叢集伺服器。The following sections describe how NLB supports high availability, scalability, and manageability of the clustered servers that run these applications.

可用性High availability

可用性系統可靠地提供最少中斷與服務可接受層級。A high availability system reliably provides an acceptable level of service with minimal downtime. 為了提供可用性,NLB 包含 built\ 中的功能可自動:To provide high availability, NLB includes built-in features that can automatically:

  • 偵測叢集主機失敗或進入],然後進行復原。Detect a cluster host that fails or goes offline, and then recover.

  • 新增或移除主機時會網路負載平衡。Balance the network load when hosts are added or removed.

  • 復原,將套件轉工作負載中 10 秒。Recover and redistribute the workload within ten seconds.

擴充性Scalability

延展性是程度電腦、服務或應用程式可一起拓展符合增加效能要求評量。Scalability is the measure of how well a computer, service, or application can grow to meet increasing performance demands. 用於叢集 NLB,延展性是新增一或多個系統累加現有叢集時的整體負載叢集超過該功能的能力。For NLB clusters, scalability is the ability to incrementally add one or more systems to an existing cluster when the overall load of the cluster exceeds its capabilities. 若要支援延展性,您可以使用 NLB 下列:To support scalability, you can do the following with NLB:

  • 個人 TCP\ 日 IP 服務 NLB 叢集平衡載入要求。Balance load requests across the NLB cluster for individual TCP/IP services.

  • 在單一叢集支援最多 32 電腦。Support up to 32 computers in a single cluster.

  • 平衡多個伺服器載入要求 \(從相同 client 或數個 clients\)叢集在多部主機上。Balance multiple server load requests (from the same client or from several clients) across multiple hosts in the cluster.

  • 新增到 NLB 叢集主機載入增加,而失敗叢集。Add hosts to the NLB cluster as the load increases, without causing the cluster to fail.

  • 時降低載入移除叢集主機。Remove hosts from the cluster when the load decreases.

  • 讓高效能和透過完整管線實作低費用。Enable high performance and low overhead through a fully pipelined implementation. 管線允許要求傳送給 NLB 叢集而不想等待回應之前要求。Pipelining allows requests to be sent to the NLB cluster without waiting for a response to a previous request.

管理性Manageability

若要支援管理,您可以使用 NLB 下列:To support manageability, you can do the following with NLB:

  • 管理和使用 NLB 管理員設定多個 NLB 叢集和叢集主機從一部電腦或[Windows PowerShell 中的 網路負載平衡 (NLB) CmdletManage and configure multiple NLB clusters and the cluster hosts from a single computer by using NLB Manager or the Network Load Balancing (NLB) Cmdlets in Windows PowerShell.

  • 指定負載平衡行為單一 IP 連接埠或群組的連接埠使用連接埠管理規則。Specify the load balancing behavior for a single IP port or group of ports by using port management rules.

  • 定義網站,每個不同的連接埠的規則。Define different port rules for each website. 如果您使用多個應用程式或網站 load\ 平衡伺服器相同設定、連接埠規則為基礎的目的地 virtual IP 位址 (using virtual clusters)。If you use the same set of load-balanced servers for multiple applications or websites, port rules are based on the destination virtual IP address (using virtual clusters).

  • 直接存取所有的單一主機使用選擇性 client 請求、single\ 主機規則。Direct all client requests to a single host by using optional, single-host rules. 來執行特定應用程式的特定主機 NLB 路徑 client 要求。NLB routes client requests to a particular host that is running specific applications.

  • 封鎖不想要的網路存取特定 IP 連接埠。Block undesired network access to certain IP ports.

  • 讓 Internet 群組管理通訊協定 (IGMP) 支援控制切換連接埠流叢集主機 \(連入網路封包傳送到 switch\ 上所有的連接埠)時多點模式中的作業系統。Enable Internet Group Management Protocol (IGMP) support on the cluster hosts to control switch port flooding (where incoming network packets are sent to all ports on the switch) when operating in multicast mode.

  • [開始]、停止及使用 Windows PowerShell 命令或指令碼遠端控制 NLB 動作。Start, stop, and control NLB actions remotely by using Windows PowerShell commands or scripts.

  • 檢視檢查 NLB 事件 Windows 事件登入。View the Windows Event Log to check NLB events. NLB 登事件木頭中的所有動作和集群的變更。NLB logs all actions and cluster changes in the event log.

重要的功能Important functionality

安裝 NLB 為標準 Windows Server 網路驅動程式元件。NLB is installed as a standard Windows Server networking driver component. 其作業的透明網路 TCP\ 日 IP 堆疊。Its operations are transparent to the TCP/IP networking stack. 下圖顯示 NLB 和其他軟體元件之間的關係,一般設定中。The following figure shows the relationship between NLB and other software components in a typical configuration.

網路負載平衡和其他軟體元件

以下是主要 NLB 的功能。Following are the primary features of NLB.

  • 您不需要硬體變更執行。Requires no hardware changes to run.

  • 提供的網路負載平衡工具來設定及管理多個叢集與所有主機的遠端或本機一部電腦。Provides Network Load Balancing Tools to configure and manage multiple clusters and all of the hosts from a single remote or local computer.

  • 可透過單一的邏輯網際網路名稱及 virtual IP 位址,也就是叢集 IP 位址存取叢集戶端 \(保留 computer\ 每個人的名稱)。Enables clients to access the cluster by using a single, logical Internet name and virtual IP address, which is known as the cluster IP address (it retains individual names for each computer). NLB 多重主目錄伺服器允許多個 virtual IP 位址。NLB allows multiple virtual IP addresses for multihomed servers.

注意

當您部署 Vm virtual 叢集為時,NLB 不需要伺服器多重主目錄有多個 virtual IP 位址。When you deploy VMs as virtual clusters, NLB does not require servers to be multihomed to have multiple virtual IP addresses.

  • 可讓 NLB 結合多個網路介面卡,如此可讓您設定多個獨立叢集每個主機上。Enables NLB to be bound to multiple network adapters, which enables you to configure multiple independent clusters on each host. 多個網路介面卡的支援 mca virtual 叢集在於 virtual 叢集可讓您在單一網路介面卡設定多個叢集。Support for multiple network adapters differs from virtual clusters in that virtual clusters allow you to configure multiple clusters on a single network adapter.

  • 需要不修改伺服器應用程式,讓他們可以執行 NLB 叢集。Requires no modifications to server applications so that they can run in an NLB cluster.

  • 您可以設定自動新增到該叢集主機失敗,並會在接下來,如果叢集主機帶回上網。Can be configured to automatically add a host to the cluster if that cluster host fails and is subsequently brought back online. 新增的主機處理從新的伺服器要求就可以開始。The added host can start handling new server requests from clients.

  • 可讓您拍攝 offline 電腦的預防維護而不會影響其他主機上的叢集作業。Enables you to take computers offline for preventive maintenance without disturbing the cluster operations on the other hosts.

硬體需求Hardware requirements

以下是執行 NLB 叢集的硬體需求。Following are the hardware requirements to run an NLB cluster.

  • 相同子網路上,必須位於叢集在所有主機。All hosts in the cluster must reside on the same subnet.

  • 在每個主機網路介面卡的數目無限制,並不同的主機可以有許多不同的介面卡。There is no restriction on the number of network adapters on each host, and different hosts can have a different number of adapters.

  • 每個群集,在所有網路介面卡都必須多點傳送或單點。Within each cluster, all network adapters must be either multicast or unicast. NLB 不支援多點傳送與單單一叢集在混合的環境。NLB does not support a mixed environment of multicast and unicast within a single cluster.

  • 如果您使用的單模式,用來處理 client\ to\ 叢集流量的網路介面卡必須支援變更其媒體存取控制 (MAC) 位址。If you use the unicast mode, the network adapter that is used to handle client-to-cluster traffic must support changing its media access control (MAC) address.

軟體需求Software requirements

以下是執行 NLB 叢集軟體需求。Following are the software requirements to run an NLB cluster.

  • 僅限 TCP\ 日 IP 可以用於 NLB 讓每個主機上的顯示卡。Only TCP/IP can be used on the adapter for which NLB is enabled on each host. 無法新增任何其他通訊協定 \ (例如,IPX) 這個介面卡。Do not add any other protocols (for example, IPX) to this adapter.

  • 您必須靜態叢集伺服器的 IP 位址。The IP addresses of the servers in the cluster must be static.

注意

NLB 不支援動態主機設定通訊協定 (DHCP)。NLB does not support Dynamic Host Configuration Protocol (DHCP). NLB 停用該設定的每個介面上 DHCP。NLB disables DHCP on each interface that it configures.

安裝資訊Installation information

您可以藉由伺服器管理員或的 Windows PowerShell 命令 NLB 安裝 NLB。You can install NLB by using either Server Manager or the Windows PowerShell commands for NLB.

或者,您可以安裝網路負載平衡工具管理本機或遠端 NLB 叢集。Optionally you can install the Network Load Balancing Tools to manage a local or remote NLB cluster. 這些工具包含網路負載平衡管理員和 NLB Windows PowerShell 命令。The tools include Network Load Balancing Manager and the NLB Windows PowerShell commands.

安裝與伺服器管理員Installation with Server Manager

在伺服器管理員中,您可以使用 [新增角色與功能精靈新增網路負載平衡功能。In Server Manager, you can use the Add Roles and Features Wizard to add the Network Load Balancing feature. 當您完成精靈時,和 NLB 已安裝的您不需要重新開機。When you complete the wizard, NLB is installed, and you do not need to restart the computer.

使用 Windows PowerShell 安裝Installation with Windows PowerShell

若要使用 Windows PowerShell 來安裝 NLB,執行下列命令在已提升權限的 Windows PowerShell 命令提示字元在電腦上您想要安裝 NLB。To install NLB by using Windows PowerShell, run the following command at an elevated Windows PowerShell prompt on the computer where you want to install NLB.

Install-WindowsFeature NLB -IncludeManagementTools

安裝完成後的電腦不重新開機需要。After installation is complete, no restart of the computer is required.

如需詳細資訊,請查看安裝-WindowsFeatureFor more information, see Install-WindowsFeature.

網路負載平衡管理員Network Load Balancing Manager

若要打開網路負載平衡管理員在伺服器管理員中,按一下 [工具,然後按網路負載平衡管理員To open Network Load Balancing Manager in Server Manager, click Tools, and then click Network Load Balancing Manager.

其他資源Additional Resources

下表提供 NLB」功能的其他資訊連結。The following table provides links to additional information about the NLB feature.

內容類型Content type 資訊尋找參考資料References
部署Deployment 網路負載平衡部署指南和 #124;設定網路負載平衡終端服務Network Load Balancing Deployment Guide | Configuring Network Load Balancing with Terminal Services
作業Operations 管理網路負載平衡叢集和 #124;[設定網路負載平衡參數和 #124;控制網路負載平衡叢集上的主機Managing Network Load Balancing Clusters | Setting Network Load Balancing Parameters | Controlling Hosts on Network Load Balancing Clusters
疑難排解Troubleshooting 疑難排解網路負載平衡叢集和 #124;NLB 叢集事件與錯誤Troubleshooting Network Load Balancing Clusters | NLB Cluster Events and Errors
工具和設定Tools and settings 網路負載平衡 Windows PowerShell cmdletNetwork Load Balancing Windows PowerShell cmdlets
社群資源Community resources 可用性 (Clustering) 論壇High Availability (Clustering) Forum