Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compare the advantages and disadvantages of load balancing schemes

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

The following brings you how to compare the advantages and disadvantages of load balancing solutions, hoping to give you some help in practical application. Load balancing involves many things, there are not many theories, and there are many books on the Internet. today, we will use the accumulated experience in the industry to make an answer.

Comparison of advantages and disadvantages of load balancing schemes

LVS has the advantages of strong anti-load ability, working in layer 4 only for distribution, no traffic generation, which also determines its strongest performance in load balancing software; no traffic, while ensuring that the performance of equalizer IO will not be affected by large traffic; 2, stable operation, has its own complete dual-machine hot backup scheme, such as LVS+Keepalived and LVS+Heartbeat 3, a wide range of applications, you can do load balancing for all applications; 4, the configuration is relatively low, which is both a disadvantage and an advantage, because there are not too many things to configure, so you do not need too much contact, which greatly reduces the probability of human error; 1, the software itself does not support regular processing, can not do dynamic and static separation, which highlights the advantages of Nginx/HAProxy+Keepalived. 2. If the website application is relatively large, LVS/DR+Keepalived will be more complex, especially for the machines behind the Windows Server application, the implementation, configuration and maintenance process will be more troublesome, relatively speaking, Nginx/HAProxy+Keepalived is much simpler. Nginx advantages 1. Working in layer 7 of OSI, you can do some diversion strategies for http applications. For example, for domain name, directory structure. Its regularization is more powerful and flexible than HAProxy; 2. Nginx has very little dependence on the network, and theoretically it can carry out load function as soon as it can ping, which is also its advantage; 3. Nginx installation and configuration is relatively simple, and it is convenient to test; 4. It can bear high load pressure and is stable, and can generally support more than tens of thousands of concurrency. 5. Nginx can detect internal faults in the CVM through the port, such as the status code and timeout returned by the web page processed by the server, and will resubmit the request that returns an error to another node; 6. Nginx is not only an excellent load balancer / reverse proxy software, but also a powerful Web application server. LNMP is now also a very popular web environment, and there is a tendency to compete with LAMP environment. Nginx has an advantage over apache in dealing with static pages, especially in anti-high concurrency. 7. Nginx is now becoming more and more mature as a Web reverse acceleration cache, faster than the traditional Squid server, friends in need can consider using it as a reverse proxy accelerator; disadvantage 1, Nginx does not support url to detect. 2. Nginx can only support http and Email, which is its weakness. 3. The Session of Nginx is maintained, and the guiding ability of Cookie is relatively lacking. HAProxy advantages: 1. HAProxy supports virtual hosts and can work on layers 4 and 7 (supports multiple network segments); 2, it can supplement some shortcomings of Nginx, such as the maintenance of Session, the boot of Cookie, etc.; 3, it supports url detection of backend servers; 4, like LVS, it is only a load balancing software. In terms of efficiency, HAProxy has a better load balancing speed than Nginx, and it is also better than Nginx in concurrent processing. 5. HAProxy can load balance Mysql reads, detect and load balance the back-end MySQL nodes, but when the number of MySQL slaves in the back end exceeds 10, the performance is not as good as LVS; 6 and HAProxy, reaching 8 kinds of algorithms. Disadvantages: the advantages of DNS are basically free of cost, because this resolution is often free for domain name registrars. In addition to the simple expansion of the network topology, the newly added Web server only needs to add a public network IP to defect health check. If a server goes down, the DNS server cannot know it, and access will still be assigned to this server. It takes at least 3-4 hours or more for all modified DNS records to take effect; the distribution is uneven, and the pressure is different if the configuration of several Web servers is different, but the access allocated by DNS resolution is evenly distributed. In fact, DNS also has an allocation algorithm, which can be allocated according to the current allocation of fewer connections, Rate weight distribution, and so on, but most DNS servers do not support it.

Session persistence, if it is a site that requires authentication, can be fatal without modifying the software architecture, because DNS parsing cannot persistently assign the access of authenticated users to the same server. Although there is a certain local DNS cache, it is difficult to ensure that the local DNS does not expire during user access, and re-query the server and point to the new server, then the user information saved by the original server can not be brought to the new server, and may be required to be re-authenticated, switching back and forth for a long time, each server saves different information of users, which is also a waste of server resources.

After reading the above about how to compare the advantages and disadvantages of load balancing solutions, if you have anything else you need to know, you can find out what you are interested in in the industry information or find our professional technical engineer to answer it. Technical engineers have more than ten years of experience in the industry.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report