A summary of common web load balancing methods

Source: Internet
Author: User
Tags enom domain

There are many ways to load balance the web, and here are a few common load-balancing methods. 1. User manual Selection method This is an older way. Load balancing is achieved by providing different lines and different server connections in the main home portal. This approach is more common in some Web sites that offer downloads. 2.DNS Polling mode most domain registrars support the addition of multiple A records to the same host name, which is DNS polling, and the DNS server will resolve the riding cows randomly assigned to different IPs in the order of a records, thus completing a simple load balancer.The cost of DNS polling is very low and is often used on some unimportant services. For the enom domain name Web management interface, here we add a level two domain name NTP.API.BZ (host named NTP) for the API.BZ domain name, and add multiple A records for the domain name, let its DNS poll 7 IPs, use 7 servers to do load balancing.

After adding, we use the dig command under Linux to view the domain name resolution of the NTP.API.BZ domain name.

[[Email protected] ~]# dig ntp.api.bz; <<>> DiG9.9.4-redhat-9.9.4- A. EL7 <<>>test1.testa.com; global options:+cmd;; Got answer:;; ->>header<<-Opcode:query, Status:noerror,ID:33762;; Flags:qr Rd RA; QUERY:1, ANSWER:1, authority:2, ADDITIONAL: +;; OPT pseudosection:; Edns:version:0, Flags:; Udp:4096;;                 QUESTION section:;test1.testa.com. in A;;          ANSWER SECTION:test1.testa.com.  -In A201.17.07.223;;             Authority SECTION:testa.com. 172761In NS vip2.testdns.com.testa.com. 172761In NS vip1.testdns.com.;;        ADDITIONAL SECTION:vip1.testdns.com. 475In A101.19.44.101vip1.testdns.com.475In A110.215.1.1vip1.testdns.com.475In A110.215.28.103vip1.testdns.com.475In A110.215.208.11vip1.testdns.com.475In A13.1.102.10vip1.testdns.com.475In A42.66.22.111vip1.testdns.com.475In A101.15.10.103;; Query Time: themsec;; SERVER:192.168.0.88# -(192.168.0.2);; When:mon Jul .  +: -: ACst -;; MSG SIZE RCVD:391
Although the cost of DNS polling is very low, DNS load balancing has two distinct Disadvantages。 (1). Low reliability Assuming that a domain name DNS polls multiple servers, if one of the servers fails, then all requests to access the server will not respond, and this is something that no one would want to see. Even if the server's IP is removed from the DNS, but on the Internet, the regional telecommunications, netcom and other broadband providers to store a large number of DNS in the cache in order to save access time, the full effect of DNS records takes several hours, or even longer. Therefore, although DNS rotation to some extent solves the problem of load balancing, but there is a disadvantage of low reliability. (2). Unbalanced load distribution DNS load Balancing is the simplest polling load algorithm, can not distinguish between server differences, not reflect the current running state of the server, can not be a better performance of the server multi-allocation request, Even when a client request is concentrated on a single server The DNS server is organized in a hierarchical structure, and the local DNS server buffers the resolved domain name-to-IP address mappings, which causes users who use the DNS server to access the same Web server for a period of time. Causes the load imbalance between Web servers. Additionally, the user's local computer caches the resolved domain name-to-IP-address mappings. When multiple user computers cache the mapping of a domain name to an IP address, and those users continue to access the Web page under that domain name, this can also result in uneven load distribution for different Web server parts.
The possible consequences of a load imbalance are the low load on some servers, the high load on the other servers, the slow processing of servers, the small number of requests allocated by the server with high configuration, and the many requests that are allocated by the server that configures lease.Therefore, the DNS polling method only applies to some server clusters with low reliability requirements, such as: Picture server farm, pure static Web server cluster, etc. 3. Four/Seven layer load Balancer devices common four/Seven load balancing devices: 1. Hardware four/Seven load balancer switches common such as F5 big-IP, foundry and other products, the use of F5 companies have: Sina, Baidu, Yahoo, MOP, Sohu, HC NET and so on. 2. The software four-tier load balancer represents the LVs (Linux Virtual Server). 3. Software seven layer load balancer is based on HTTP reverse proxy, the Representative has Nginx4. Multi-line multi-region intelligent DNS resolution and hybrid load balancing approach Sina home page For example, load balancing uses the " Multi-line multi-region Intelligent DNS resolution, DNS polling, four-/seven-tier load balancing switch "and other technologies. Intelligent DNS resolution can resolve the same domain name request to a different IP based on the DNS server line and region that the user has set locally.

A summary of common web load balancing methods

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.