Load Balancing Classification

Source: Internet
Author: User
Keywords load balancing load balancing working mode load balancing classification
According to different implementation technologies, it can be divided into DNS load balancing, HTTP load balancing, IP load balancing, link layer load balancing, etc.

2.1 DNS load balancing
The earliest load balancing technology uses domain name resolution to achieve load balancing. In the DNS server, multiple A records are configured, and the servers corresponding to these A records form a cluster. Large websites always partially use DNS resolution as the first level of load balancing.

advantage

1>. Simple to use: load balancing work is handed over to the DNS server for processing, saving the trouble of maintaining the load balancing server;

2>. Improve performance: It can support address-based domain name resolution and resolve to the server address closest to the user, which can speed up access and improve performance;

Disadvantage

1>. Poor usability: DNS resolution is a multi-level resolution, after adding/modifying DNS, the resolution time is longer; during the resolution process, users will fail to access the website;

2>. Low scalability: DNS load balancing is controlled by the domain name provider, and it is impossible to improve and extend it;

3>. Poor maintainability: it can't reflect the current running state of the server; it supports few algorithms; it can't distinguish the difference of the server (can't judge the load according to the state of the system and service).

Practical advice

Using DNS as the first level of load balancing, the A record corresponds to the IP address of the internal load balancing, and the request is distributed to the real web server through the internal load balancing. Generally used for Internet companies, complex business systems are not suitable for use.


2.2 IP load balancing
Load balancing is performed at the network layer by modifying the request target address.

After the user requests the data packet and arrives at the load balancing server, the load balancing server obtains the network data packet in the operating system kernel process, obtains a real server address according to the load balancing algorithm, and then modifies the request destination address to the real IP address obtained. Need to go through the user process.

 

After the real server is processed, the response data packet is returned to the load balancing server, the load balancing server, and then modify the source address of the data packet to its own ip address and send it to the user browser.

In IP load balancing, the real physical server is returned to the load balancing server. There are two ways: (1) The load balancing server modifies the source address while modifying the destination IP address. Set the source address of the data packet to its own disk, that is, source address translation (snat). (2) The load balancing server is also used as the gateway server of the real physical server cluster.

Advantages: Data distribution is completed in the kernel process, which has better performance than distribution at the application layer;

Disadvantages: All requests and responses need to go through the load balancing server, and the maximum throughput of the cluster is limited by the bandwidth of the load balancing server network card;

2.4 Link layer load balancing
Modify the mac address at the data link layer of the communication protocol for load balancing.

When data is distributed, not modifying the ip address means modifying the target mac address, configuring the virtual ip of all machines in the real physical server cluster to be consistent with the ip address of the load balancing server, so as to achieve the purpose of data distribution without modifying the source address and destination address of the data packet.

 

The actual processing server IP is the same as the destination IP of the data request, and there is no need to perform address translation by the load balancing server, and the response data packet can be directly returned to the user's browser to avoid the load balancing server network card bandwidth from becoming a bottleneck. Also known as direct routing mode (DR mode).

Advantages: good performance;

Disadvantages: complex configuration;

Practical suggestions: DR mode is currently the most widely used load balancing method.

2.5 Hybrid load balancing
Due to the differences in hardware equipment, their respective scales, and services provided in multiple server clusters, the most appropriate load balancing method can be considered for each server cluster, and then load balancing or clustering among these multiple server clusters again To provide services to the outside world as a whole (that is, to treat these multiple server groups as a new server group) to achieve the best performance. This method is called hybrid load balancing.

This method is sometimes used when the performance of a single balancing device cannot meet a large number of connection requests. This is the method commonly used by large Internet companies.

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.