Vaguely or many years ago, was responsible for a relatively large project (China Telecom BDC), load balancing is indispensable. Hardware asked a lot of vendors, software has also tried some influential tools. According to the company at that time, the background of the project and the actual situation, the choice is the hardware scheme, the purchase of equipment is F5.
Time goes by quickly, hardware always must be old, and new times always come. Turn out the original information and tidy it up, perhaps the new journey must be set sail again.
What is load balancing (Balance)? If we have only one server, if this server can meet our business development and needs, then we basically do not need load balancing. But this is a kind of era, this is an era of Internet, this is an information industry rapid development of the era, a server can sweep the world is long gone.
Of course, the development of hardware is also very rapid, we have a 4G of memory server can not hold up, could be replaced by 64G server. This is also a way of thinking and method, but if the business further development, if the 64G server can not withstand the pressure, then whether to upgrade to 640G memory server? This, beyond my present imagination ability.
If this server fails, it cannot be used, even if it has 640G of memory, but the application is still unavailable. This time, you need a backup. Load balancing devices or load balancing methods inevitably appear in our vision, together look at these concepts and methods.
Based on the existing network structure, load Balancing provides a cheap and effective way to expand Network equipment and server bandwidth, increase throughput , enhance network data processing capabilities, and improve network flexibility and availability.
Hardware
The Hardware load Balancing solution is to install load balancing devices directly between the server and the external network, which is often referred to as a load balancer , and because specialized equipment accomplishes specialized tasks, operating independently of the OS , the overall performance is improved, Coupled with a variety of load balancing strategies, intelligent traffic management, to achieve the best load balancing requirements.
software Load Balancing solution is to install one or more additional software on one or more servers corresponding operating system to achieve load balancing, such as DNS load BALANCE,APACHE,NGINX,LVX, etc., Its advantages are based on a specific environment, simple configuration, flexible use, low cost, can meet the general load balancing requirements.
In general, hardware load balancing is better than software in function and performance, but it is costly.
Local/Global
Load balancing is divided into local load balancing (global load Balance, also called geo-load Balancing) from the geographic structure of its application, and local load balancing is the load balancing on the local server farm, Balance Global load balancing is the load balancing of server groups that are placed in different geographic locations with different network architectures.
Local load balancing can effectively solve the problem of excessive data traffic, overloading the network, and do not need to spend expensive to purchase the performance of the server , make full use of the existing equipment, to avoid the loss of data traffic caused by the server single point of failure. It has a flexible and diverse balance strategy to allocate data traffic reasonably to servers in the server farm burden. Even if you extend the upgrade to an existing server , simply add a new server to the service farm without changing the existing network structure and stopping the existing service.
Global load balancing is primarily used for sites that have their own servers in a multi-region, so that global users can access their closest servers with only one (or a group of) IP addresses or domain names, thus obtaining the fastest access speed. It can also be used for large companies with dispersed distribution sites to achieve the purpose of uniform and rational distribution of resources through intranet ( intra-enterprise Internet ).
Global load Balancing has the following characteristics:
Achieve geo-location independence and be able to provide users with full transparency services over long distances.
In addition to avoid the server , data center and other single point of failure, but also to avoid the ISP line failure caused by a single point of failure.
Solve the problem of network congestion , improve the response speed of the server , provide services to the nearest, achieve better quality of access.
Some common ways to load balance:
1. DNS load Balancing , is the first load balancing technology is implemented through DNS, in DNS for multiple addresses configured with the same name, so the client queried the name will be one of the addresses, so that different customers access to different servers To achieve the purpose of load balancing. DNS load balancing is a simple and efficient method, but it does not differentiate between server differences, nor does it reflect the current state of the server's operation.
2. Reverse Proxy Server load balancing, using a proxy server, you can forward the request to the internal server, using this acceleration mode obviously can improve the speed of static Web page access. However, it is also possible to consider a technique that uses a reverse proxy server to forward requests evenly to multiple servers to achieve load balancing purposes. The reverse proxy method refers to a proxy server that accepts connection requests on the Internet, then forwards the request to a server on the internal network and returns the results from the server to the client requesting the connection on the Internet, Reverse. At this point the proxy server is represented as a server externally. The reverse proxy load balancing technique is to load balance by dynamically forwarding a connection request from the Internet to multiple servers on the internal network in a reverse proxy manner.
3. Address Translation Gateway load Balancing, support load-balanced address translation gateway, you can map an external IP address to multiple internal IP addresses, for each TCP connection request dynamically use one of the internal address, to achieve load balancing purposes.
4. HTTP redirection or mirroring function, you can also define the protocol, network and load forwarding;
5. Hybrid Load Balancing in some large networks, due to the differences in hardware devices, sizes, and services provided in multiple server groups, consider the most appropriate load balancing method for each server farm. Then again load-balancing or clustering among the multiple server farms to provide services to the outside world (i.e., as a new server farm) for optimal performance. This approach is called hybrid load Balancing . This approach is sometimes used in situations where the performance of a single equalization device does not satisfy a large number of connection requests.
Getting Started with load balancing and some basic concepts