NLB deployment of Network Load Balancing

Bowen directory
a Network Load Balancing overview of
two, NLB cluster operation mode
Third, use precautions NLB cluster
IV deploy NLB

First, the Network Load Balancing Overview

Network Load Balancing (Network Load Balancing, NLB) technology is the access pressure is evenly distributed to multiple servers, in order to improve the response capacity of the entire server cluster.

1, NLB

Windows Network Load Balancing cluster allows users to spread incoming requests to up to 32 servers that can use up to 32 servers share the external network service requests, they only need to provide a Foreign IP address (or domain name) . Even in the case of a heavy load, but also can respond quickly, if one or several server is unavailable, the service will not be interrupted.

Network Load Balancing automatically detects when the server is unavailable, the remaining can be rapidly reassigned server communicates with the client. This safeguard can help you provide uninterrupted service for your critical business processes, it can increase the number of network load balancing server based on network traffic to increase. Network load balancing may be implemented on a general computer. In Windows server 2016, the network load balancing applications include Internet Information Services (IIS), proxy servers, virtual private network, terminal server, Windows Media Services (Windows video on demand, video broadcasting) services. At the same time, network load balancing helps improve server performance and scalability to meet growing demand from Internet clients.

2, NLB works

In the NLB cluster, each server will have one of their own static IP address, and all the servers in the NLB cluster have a common IP address --NLB cluster IP address.

Each server runs a single copy of the required server application (e.g., web, FTP, or a virtual private network, etc.), when the client sends a request to the NLB cluster (NLB virtual cluster IP address), a plurality of the cluster NLB servers distribute incoming client requests. Weight of each server can be configured to load a heavy processing required, a cluster may be dynamically increased to equalize the secondary server cluster. In addition, NLB can all traffic to a server, which is called "default host."

For the application load balancing, when a server fails or goes offline, the load is automatically redistributed between computers still running, and disconnect activity between the server goes down or offline.

3, NLB cluster server failure protection cluster does not affect existing connections

NLB cluster server detection information exchange in order to maintain data consistency and health of cluster membership. By default, the server 5 seconds when the failure detection information is issued, i.e., that the NLB cluster server fails, and the remaining> * server with the following polymerization.

  • Determine which server is still an active member of the cluster;

  • Select the highest priority as the new default host server;

  • Ensure that all new client requests are handled by the server is still active;

4, network load balancing scalability

Scalability is a measure of a computer, service, or application how to better improve standards to meet the growing performance requirements. For NLB clusters, the scalability is the gradual addition of one or more server functionality to an existing cluster when the cluster exceeds its full load capacity. NLB can do the following.

  • NLB cluster load balancing on each request for TCP / IP services;

  • In a cluster supports up to 32 computers;

  • Request a plurality of load balancing in a cluster of servers;

  • When the load increases, support for server added to the cluster without bringing down the cluster;

  • When the load is reduced, removed from the cluster server support;

  • All achieved by pipelining to improve performance and reduce overhead. Send a request to the pipeline allows the cluster NLB, without waiting for a response to the request transmitted;

5, high-availability network load balancing

By minimizing downtime and high availability can be reliably provide services. NLB may automatically perform the following operations.

  • Detecting failure or offline and recover the cluster server;

  • Network load balancing when you add or remove a server;

  • Restored within 10 seconds and re-distribute the load;

Two, NLB cluster operation mode

1, Unicast

NLB participating computer will assign a unique MAC address; MAC address in response to a request by the client, the MAC address MAC is called cluster; unicast mode more compatible routers and switches network device; use of relatively small, the MAC address of the cluster not tied to the port on the switch;

Work NLB in unicast mode can operate correctly under all network environments, but because of its operating characteristics, has the following two limitations:

  • Because NLB cluster MAC address used is not bound to a particular switch port, so all communications are NLB broadcast by all the ports on the switch are, irrespective of whether this port is connected to the node NLB, this creates additional network traffic load.

  • NLB Since all nodes have the same MAC address, and therefore can not by their original private IP address for communication between nodes NLB.

2, multicast

In the multicast mode, NLB NLB node does not modify the NLB-enabled network adapter MAC address, but it is a redistribution of Layer multicast MAC address dedicated to communication NLB, NLB between such nodes through their original private IP address for communication.
In multicast mode, NLB cluster node for sending IP address, MAC address, ARP request ARP reply will cluster IP address mapping to a multicast MAC address, and many routers or switches will reject this behavior. More widely used.

3, IGMP multicast

NLB Network Load Balancing NLB transmitting node to listen for packets; NLB node will converge to a data connection to the server switch; switch floods generate traffic, poor stability fault NLB failed switch; use less.

Third, the use precautions NLB cluster

  • Proper protection Network Load Balancing hosts and the load balanced applications.

  • If possible, use on each cluster host at least two network adapters, but it is not a necessary condition.

  • Properly set up unicast or multicast mode network card.

  • Use only TCP / IP protocol on the cluster adapter.

  • Do not add other protocols other than TCP / IP protocol is enabled on the network load balancing network adapter.

  • Ensure that all hosts in a cluster belong to the same subnet, and the client can access the subnet. Cluster hosts private IP address or IP address of the cluster must belong to the same subnet.

  • Use Network Load Balancing Manager to configure NLB cluster.

  • Do not enable Network Load Balancing remote control option. Network Load Balancing remote control may be a security risk, including data tampering, denial of service and information disclosure and so on.

  • Enable logging.

  • Independent use NLB cluster and failover cluster.

Fourth, the deployment of NLB

1, case environment is as follows:

server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)

2, environmental analysis:

Needs to be installed on each node of two NICs NLB cluster, the cluster for each cluster and external services internal communication. This case is on both servers NLB cluster are ready to install two network cards (VMnet2 and VMnet3). VMnet2 for the intra-cluster communication, VMnet3 for the Foreign Service.

In addition to an address other than prepare the cluster nodes, but also planning IP addresses and domain names of the cluster and add the host cluster domain records on the DNS server, ensure that users can properly access the cluster. This case cluster domain name www.benet.com IP address 192.168.100.254/24.

Windows server 2016 NLB cluster can be set up either in a workgroup environment, and can be set up in a domain environment, in this case using a workgroup environment.

3, began to deploy:

DC3_node1 configuration is as follows:

DC3_node1 add two networks, then you can boot
server 2016 deployment of Network Load Balancing (NLB)

VMnet2 configure the cluster communication within an IP address (in order to facilitate the distinction I VMnet2 name changed to private, VMnet3 name I changed to the public)
server 2016 deployment of Network Load Balancing (NLB)

server 2016 deployment of Network Load Balancing (NLB)

VMnet3 configure the IP address and DNS Foreign Service
server 2016 deployment of Network Load Balancing (NLB)

Open Server Manager interface, click "Manage" button, then click the "Add Roles and Features" button
server 2016 deployment of Network Load Balancing (NLB)

Next to keep the default
server 2016 deployment of Network Load Balancing (NLB)

Next to keep the default
server 2016 deployment of Network Load Balancing (NLB)

Next to keep the default
server 2016 deployment of Network Load Balancing (NLB)

Select "Web Server" check box, and then click "Add Features" and click Next
server 2016 deployment of Network Load Balancing (NLB)

Default Next
server 2016 deployment of Network Load Balancing (NLB)

Default Next
server 2016 deployment of Network Load Balancing (NLB)

Default Next
server 2016 deployment of Network Load Balancing (NLB)

After the confirmation, you can click Install
server 2016 deployment of Network Load Balancing (NLB)

The installation is complete
server 2016 deployment of Network Load Balancing (NLB)

Add web root directory, D drive to create a folder into the folder, create a text document (Notepad) written www.node1.com! ! ! Index.html then Save As to save it.
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)

After the web root directory is created to start the configuration WEB Service
server 2016 deployment of Network Load Balancing (NLB)

The site is disabled by default zha, do not delete, stop it
server 2016 deployment of Network Load Balancing (NLB)

Add Site
server 2016 deployment of Network Load Balancing (NLB)

I'm just here named site WEB, the physical path is the root directory of the web browser just created position of which can be connected to a specific user, log in with local administrator, you can then test
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)

Adding a host name
server 2016 deployment of Network Load Balancing (NLB)
then web site has been deployed, and began deploying NLB

D4_node2 configuration is as follows:

配置和第一台服务器配置是基本相同的,同样添加两块网卡,VMnet2的IP地址:172.16.1.2/24 VMnet3的IP地址:192.168.100.20/24 DNS:192.168.100.30
添加WEB服务器,创建web根目录,实际环境WEB根目录内容是一样的,我这里方面看到效果这台服务器根目录内容就写www.node2.com!!! 方面客户端访问看出效果。(我就不截图了自行配置,不明白可以根据上面一步步配置)配置WEB服务器和注册新站点和上面配置都是一样的,自行配置吧!

DC5_DNS配置如下:
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)

前面基本无脑下一步我就不截图了,自行配置,我这就截重点了,添加DNS服务器
server 2016 deployment of Network Load Balancing (NLB)

默认下一步
server 2016 deployment of Network Load Balancing (NLB)

默认下一步
server 2016 deployment of Network Load Balancing (NLB)

安装DNS
server 2016 deployment of Network Load Balancing (NLB)

server 2016 deployment of Network Load Balancing (NLB)

开始配置DNS服务器
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)

新建主机
server 2016 deployment of Network Load Balancing (NLB)

IP地址就是群集地址
server 2016 deployment of Network Load Balancing (NLB)

客户端一会访问的话就用浏览器访问www.benet.com 就行了
server 2016 deployment of Network Load Balancing (NLB)
基本环境已经部署完成了,只剩下网络负载平衡了,客户端最后配置IP地址访问就行了。

开始配置NLB节点1(也就是DC3_node1):
默认下一步我就不一一截图了,不明白的看上面的截图把,我这里直接开始添加网络负载平衡。
server 2016 deployment of Network Load Balancing (NLB)

开始安装
server 2016 deployment of Network Load Balancing (NLB)

安装完成
server 2016 deployment of Network Load Balancing (NLB)

开始配置网络负载平衡
server 2016 deployment of Network Load Balancing (NLB)

新建群集
server 2016 deployment of Network Load Balancing (NLB)

输入节点1的计算机对外服务的IP地址,单击“连接”按钮,连接成功后下一步
server 2016 deployment of Network Load Balancing (NLB)

默认下一步
server 2016 deployment of Network Load Balancing (NLB)

添加群集IP地址
server 2016 deployment of Network Load Balancing (NLB)

添加Internet名称,操作模式我选择的多播
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)

单击编辑,可以修改端口号,以及协议,我在这里就不修改了,有需求自行修改即可
server 2016 deployment of Network Load Balancing (NLB)
NLB节点1配置完成,开始配置NLB节点2

NLB节点2配置如下(D4_node2):
自行安装网络负载平衡服务,不明白可以看节点1是怎么安装的,我这就直接开始配置了

节点2就不需要新建群集,直接连接现存的,也就是刚才配置的节点1
server 2016 deployment of Network Load Balancing (NLB)

这里连接需要等待2~3分钟左右,耐心等待就行了
server 2016 deployment of Network Load Balancing (NLB)

连接sha上之后,添加主机到群集
server 2016 deployment of Network Load Balancing (NLB)

This input is connected to IP address
server 2016 deployment of Network Load Balancing (NLB)

Default Next
server 2016 deployment of Network Load Balancing (NLB)

Click Finish to
server 2016 deployment of Network Load Balancing (NLB)

Review the following two servers on their own priorities are not the same, a client can access their own access to high-priority, high priority after the failure, automatically switches to the next level servers.
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)
So far NLB also completed the configuration, NLB can have up to 32 nodes, I am here to look at the effect of simulated two nodes, the configuration is the same, let's start to configure client access authentication.

win 7 configured as follows:
server 2016 deployment of Network Load Balancing (NLB)
server 2016 deployment of Network Load Balancing (NLB)

If normal access is a high priority that server
server 2016 deployment of Network Load Balancing (NLB)

Analog high priority that server failure, (server is down), then find another visit automatically switch to the priority on server 1
server 2016 deployment of Network Load Balancing (NLB)

------ This concludes the article, thanks for reading ------

© copyright reserved by the authors: original works from 51CTO blog author Chun Wai Kee i's, For reprint, please indicate the source, otherwise it will be held liable

Guess you like

Origin www.cnblogs.com/hanzeng1993/p/12213624.html