Load balancing_cluster scheme_DNS round robin

 

When I was studying, I learned all these things. If you don't practice, forget it.

 

from:http://www.tuicool.com/articles/bumARv

Most domain name registrars support adding multiple A records to a unified host. This is DNS round robin. The DNS server randomly assigns resolution requests to different IPs in the order of the A records, thus completing simple load balancing. The example in the figure below is: there are 3 Unicom servers and 3 telecom servers. To achieve the effect of "sharing Unicom user traffic to 3 Unicom servers and other users' traffic to telecom servers".

dns

DNS is generally used more in small websites due to its low cost. However, large websites generally use it in combination with other load balancing methods. The IP address provided by DNS polling is often the address of a cluster in large websites, which may be a balancing switch or a balancing server. . For small websites, it is no problem to connect multiple servers. Such as:

nslookup

Advantages of DNS round robin:

  • Zero cost: just bind a few A records on the DNS server, and domain name registrars generally provide resolution services for free;
  • The deployment is simple: it is to expand the equipment in the network topology, and then add records on the DNS server.

Disadvantages of DNS round robin:

1. Low reliability

Suppose a domain name DNS polls multiple servers. If one of the servers fails, all requests to access the server will not be responded to, which is not what anyone wants to see. Even if the IP of the server is removed from the DNS, on the Internet, broadband access providers such as telecom and China Netcom in various regions store many DNSs in the cache to save access time. It takes several hours for all DNS records to take effect, or even more Long. Therefore, although DNS round robin solves the load balancing problem to a certain extent, it has the disadvantage of low reliability.

2. Uneven load distribution

DNS load balancing adopts a simple polling algorithm, which cannot distinguish the difference between servers, cannot reflect the current running status of the server, and cannot allocate more requests to servers with better performance, and even client requests may be concentrated on a certain server. situation above.

DNS servers are organized according to a certain hierarchical structure. The local DNS server will cache the mapping of resolved domain names to IP addresses, which will cause users who use the DNS server to access the same web server for a period of time, causing the web server to uneven load. In addition, the user's local computer also caches the resolved domain name to IP address mapping. When multiple user computers have cached the mapping from a domain name to an IP address, and these users continue to access web pages under the domain name, the load distribution among different web servers will also be uneven.

The possible consequences of uneven load are: some servers are under low load, while other servers are under high load and slow processing; servers with high configuration are assigned fewer requests, while servers with low configuration are assigned more requests.

 

-

-

-

=

=

=

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326944669&siteId=291194637