Using DNS Server to Realize Load Balancing

  

The number of users accessing the enterprise network server has increased dramatically. One server is difficult to meet the user's access needs. How can we ensure the normal access of users? There are many solutions, such as using Windows 2000 or Windows. Server 2003 provides network load balancing services, but the settings for this service are very complex. Network load balancing through a DNS server is a relatively simple method.

The author uses the Web server in the enterprise network as an example to introduce how to use the DNS server to achieve network load balancing. In order to increase the number of websites with the domain name of “www.rtj.net”, three web servers with the same content are deployed in the enterprise network, which provide the same service, but the IP addresses of each server are different. The following is to set up the DNS server in the enterprise network to realize that the three Web servers share the customer's access to the website.

First, enable loop

Take Windows Server 2003 system as an example. In the DNS server, click “start → program → management tool → DNS” option, enter DNS management Window, right click on the DNS server icon, select the "Properties" option in the shortcut menu that pops up, then switch to the "Advanced" tab in the properties dialog (Figure 1) to ensure "Server Options" The "Enable Loops" option in the list box is selected.

Figure 1

Second, add host record

Create a host record in the “rtj.net” area. In the DNS Manager window, right-click the <quo;rtj.net” item and select “New Host" from the pop-up menu to enter the New Host dialog box and enter “WWW” in the "Name" Enter the IP address of one of the web servers in the IP address field, for example, 192.168.0.5, and finally click the “Add Host” button.

Because there are three web servers in the enterprise network and their IP addresses are different, there are two new host records named "WWW", which are just like the above. The IP address content is different. This will resolve the website domain name to a different web server.

The contents of the three host records in the DNS server rtj.net area are as follows: After the creation of the above three host records (Figure 2), the network load balancing of the Web server is realized. This way, when the client visits the www.rtj.net website, it will issue a domain name resolution request to the DNS server. When the DNS server receives the first request, it will return the first IP address 192.168.0.5 to the client. When the second client requests domain name resolution, the DNS server returns the second IP address 192.168.1.5. Client computer. Through such a round-robin allocation, the client's access can be shared to different web servers, thereby implementing network load balancing.

Figure 2

Three, load balancing function optimization

Enterprise network usually consists of many subnets, in order to reduce the data traffic in the network, the client is best to access A web server that is on the same subnet. Although the network load balancing function is implemented, it is not guaranteed that the client accesses the web server of the subnet. In fact, this problem is also very well resolved, as long as the DNS server's "Enable Netmask Sorting" function is enabled.

In the DNS Manager window, right click on the DNS server, select “Properties> in the pop-up menu, then switch to the “Advanced” tab in the Properties dialog box and tick ““ The Server Options “Enable Netmask Sorting” option is available in the list box. This way the client can access the web server in this subnet every time.

After completing the above settings, the DNS server implements the network load balancing function, which distributes the customer's access to each web server, and also reduces the network communication traffic across the subnet, greatly reducing the enterprise. The communication burden of the network.

Copyright © Windows knowledge All Rights Reserved