Detailed load balancing implementation of a domain name corresponding to multiple IP addresses

  • 2020-06-03 09:07:27
  • OfStack

Detailed load balancing implementation 1 domain name corresponding to multiple IP addresses

Load balancing is implemented using traditional and conventional practices, while other approaches require special handling. (dns polling, or do your own parsing)

1. Set multiple dns services or servers for each domain name to resolve. Each resolution of the same domain name points to a different ip address. If the space also exist in different locations of the same content image, so this way, the most suitable sohu national has a server, for example, did, unless you specify to access a server somewhere, otherwise the default to the fastest space, because the content is mirror automatically synchronized, there is no difference on the content, the user is not know. General domain name authorities are only allowed to set up 2 or 3 DNS, so any more is not supported.

2. Set up the server of my company and provide dns parsing service for myself, so as to achieve the operation of the above functions easily. And there is no limit on the number, for example, to offer mobile, unicom, netcom, telecom, broadband, the Great Wall broadband and so on multiple dns east, then using corresponding broadband user can automatically redirect to suits own web site, enterprise can respectively established in different carriers website, of different bandwidth users can fast access, many game operators are so dry.

DNS load balancing technology is in DNS server with more than one hostname configuration IP addresses, in response to DNS query, DNS server for each query will host DNS file to record the IP address return different analytic results according to the order will lead to different client access machines, make different client access server, so as to achieve the aim of load balancing.

The advantages of DNS load balancing are that it is economical and easy to perform, and the server can be located anywhere on internet. But it also has a number of drawbacks:

In order to make the DNS server interact with other DNS servers in a timely manner, to ensure the timely update of DNS data and random address allocation, the refresh time of DNS should be set to a small level in general, but too small will increase the traffic of DNS and cause additional network problems.

1 Once a server fails, even if the DNS setting is modified in time, it still has to wait enough time (refresh time) for it to take effect, during which the client computer that saved the address of the failed server will not be able to access the server normally.

DNS load balancing adopts a simple round-trip load algorithm, which cannot distinguish the difference between servers, cannot reflect the current running state of servers, cannot allocate more requests for servers with better performance, and even the customer requests may be concentrated on one server.

Assigning one IP address on internet to each server would take up too many IP addresses.

The simplest way to determine whether a site has adopted DNS load balancing is the continuous ping domain name. If the IP address returned by multiple parsing is not the same, then the site is likely to adopt the more common DNS load balancing. However, it is not certain, because if DNS response equalization is used, the IP address returned by multiple parses may also be different. Try,,

Now suppose you have three servers to handle the request for

The implementation under NT is also very simple. The following details are the process of DNS load balancing under win2000 server. NT4.0 is similar:

Open "DNS" under "Administration Tools" and enter the DNS Service Configuration console.

Open Properties for the corresponding DNS server, and in Server Options on the Advanced TAB, select the Enable Loop check box. This step is equivalent to adding a two-word controlled value (dword value) RoundRobin to the registry record HKEY_LOCAL_MACHINE\ CurrentControlSet\Services\DNS\Parameters with a value of 1.

Open the corresponding area of the forward search area (such as test. com), and add the host (A) resource record to the new host. The record is as follows:

www IN A
www IN A
www IN A

The difference you can see here is that under NT, one host name corresponds to multiple IP address records, but under unix, multiple different host names correspond to their respective IP addresses, and then these hosts are assigned with an individual name (CNAME) to achieve this.

Here it is important to note that NT under local subnet priority will replace the cycle of the host name more reuse, so in the test, if do the test with client IP IP address with the host resource record, within the range with 1 kind of mask needs to be cleared in the "advanced" TAB "server option" in the "enable netmask sort".

Thank you for reading, I hope to help you, thank you for your support to this site!

Related articles: