Using the DNS Server Load balancer solution round-robin DNS [zz]

Source: Internet
Author: User

 

Repeat DNS load balancing technology

Round-Robin DNS is one of the most common load balancing methods. The earliest load balancing technology was implemented through random name resolution in the DNS service. On the DNS server, you can configure the same name for multiple different addresses. The data is sent to other name servers, the client that finally queries the name will randomly use one of the addresses when parsing the name. Therefore, for the same name, different customers get different addresses. Therefore, different customers access web servers with different addresses to achieve load balancing.

For example, if you want to use three web servers to respond to HTTP requests from www.cqcc.com, set their IP addresses to: 202.192.99.1, 202.192.99.2, 202.192.99.3. Install a circular reuse DNS software. configure this software so that all three IP addresses are returned each time www.cqcc.com is resolved. The returned addresses in the first resolution result are in the same order as listed above. The next request will have a slightly different answer: 202.192.99.2, 202.192.99.3, 202.192.99.1. Next time, you will get the third answer: 202.192.99.3, 202.192.99.1, 202.192.99.2. The first customer will establish a connection with 202.192.99.1, because 202.192.99.1 is the first IP address it sees. The second client sees the first IP address 202.192.99.2, so it will access 202.192.99.2. Similarly, the third customer will visit 202.192.99.3 ......

For the above example, you can set the DNS server for this domain to include at least the results similar to the following example:

Www1 in a 202.192.99.1

Www2 in a 202.192.99.2

Www3 in a 202.192.99.3

WWW in cname www1

WWW in cname www2

WWW in cname www3

First, define a real name (www1, www2, and www3) for each computer, and then define the same alias for them. You can directly set the same real name (a record) for different addresses, but the alias method is easier to manage.

In this case, reverse resolution can only be performed on one computer. Therefore, each web server must use servername to redefine the same name, or set the resolution sequence to hosts file first, in the hosts file, it is defined as WWW to ensure that the name settings of each server are consistent.

Cyclic DNS is transparent to clients and servers. At the beginning of the transaction processing, it only executes once. However, cyclic DNS often fails because the intermediate name server and client software (including browsers with a wide range of applications) often store the IP addresses returned by DNS, or ignore the TTL value. TTL is an IP data bit used to indicate the length of time that IP data can be forwarded to other routers before it is discarded.

Due to IP address storage, the Server Load balancer function provided by the DNS server is bypassed, and the client continues to use the IP address to be stored without reconnecting. This creates a "Hotspot". In this "Hotspot", over-utilized servers continue to receive additional access requests.

Another problem with DNS load balancing is that once a server fails, even if the DNS settings are modified in time, it still takes enough time (refresh time) to take effect, the DNS server does not know this, so the customer request will be delayed, or return a "inaccessible server" message to the user, during this period, the client computer that saves the address of the faulty server will not be able to access the server normally.

Because DNS data has a refresh time mark, once the time limit expires, other DNS servers need to talk to the server to obtain the address data again. If the refresh time is short, the DNS server in different places can update the corresponding address so that the faulty server address can be deleted in time, and the user can still be directed to the normal server, however, if you buffer the IP address of the faulty server, this method cannot solve the problem. At the same time, setting the expiration time too low will increase DNS traffic, resulting in additional network problems.

Because cyclic DNS does not have the ability to differentiate ports, it cannot be aware of the availability of the server and cannot consider the existing load on the server, it is impossible to dynamically analyze the server load so that the next request is always processed by the server with the smallest load. Therefore, there are too many limitations on the circular reuse DNS, which can be regarded as a barely acceptable Load Balancing solution.

Despite a variety of problems, it is still a very effective method, which is currently used on many websites, including yahoo.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.