In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Server Load Balancing is a network service device that distributes traffic to multiple CVMs (computing clusters). It can quickly improve the external service capability of the application system through traffic distribution; hide the actual service port to enhance the security of the internal system; by eliminating the service single point of failure, improve the reliability of the application system. Today, I will introduce to you what are the three mainstream software load balancing clusters? How do they compare?
The three mainstream software load balancing clusters are:
LVS;Nginx;Haproxy;LVS load balancing cluster features:
1. Strong anti-load ability. Strong load resistance and high performance, up to 60% of F5 hardware; low consumption of memory and cpu resources
2. Work at layer 4 of the network and forward it through vrrp protocol (for distribution only). The specific traffic is handled by the linux kernel, so there is no traffic generation.
2. Good stability and reliability, and has a perfect hot backup scheme (e.g. LVS+Keepalived)
3. A wide range of applications can be used for load balancing of all applications.
4. Regular processing is not supported and static and dynamic separation can not be done.
6. the configuration is complex, the dependence on the network is relatively large, and the stability is high.
Ngnix load balancing cluster features:
1. Working above layer 7 of the network, you can make some diversion strategies for http applications, such as domain name and directory structure.
2. Nginx is less dependent on the network, so in theory, it can carry out the load function as soon as it can ping.
3. Nginx is easy to install and configure, and easy to test.
4. it can also bear high load pressure and is stable, and can generally support more than 10,000 concurrency.
5. The health check of backend CVM can only be checked through port, not through url.
6. The asynchronous processing of requests by Nginx can help the node server lighten the load.
7. Nginx can only support http, https and Email protocols, so it is less applicable.
8. Direct retention of Session is not supported, but it can be solved through ip_hash. The support for Big request header is not very good
9. Support load balancing algorithms: Round-robin (round robin), Weight-round-robin (weighted round robin), Ip-hash (Ip hash)
10. Nginx can also do Web server or Cache function.
HAProxy load balancing cluster features:
1. Supports two proxy modes: TCP (layer 4) and HTTP (layer 7), and supports virtual hosts
2. It can supplement some shortcomings of Nginx, such as the maintenance of Session, the boot of Cookie and so on.
3. Detection of problems with servers that support url detection at the backend will be very helpful.
4. More load balancing strategies such as dynamic weighted Round Robin (Dynamic Round Robin), weighted Source address Hash (Weighted Source Hash), weighted URL Hash and weighted Parameter Hash (Weighted Parameter Hash) have been implemented.
5. In terms of efficiency, HAProxy will have better load balancing speed than Nginx.
6. HAProxy can load balance the Mysql, detect and load balance the DB nodes at the back end.
9. Support load balancing algorithms: Round-robin (round robin), Weight-round-robin (weighted round robin), source (original address retention), RI (request URL), rdp-cookie (according to cookie)
10. Cannot be a Web server, that is, Cache.
The three mainstream software load balancers are suitable for business scenarios:
1. At the beginning of website construction, Nigix/HAproxy can be selected as reverse proxy load balancer (or load balancer can not be selected for most of the traffic), because its configuration is simple and its performance can meet general business scenarios. If you consider that the load balancer has a single point problem, you can use Nginx+Keepalived/HAproxy+Keepalived to avoid the single point problem of the load balancer itself.
2. After website concurrency reaches a certain degree, LVS can be used to improve stability and forwarding efficiency. After all, LVS is more stable than Nginx/HAproxy, and the forwarding efficiency is also higher. However, the maintenance of LVS will have higher requirements for maintenance personnel and higher input costs.
Comparison between 3.Niginx and Haproxy: Niginx supports seven layers, has the largest number of users, and is more reliable. Haproxy supports layer 4 and layer 7, supports more load balancing algorithms, and supports session storage. Specific selection depends on the usage scenario. At present, the number of users of Haproxy is also increasing because it makes up for some shortcomings of Niginx.
There are several important factors for the quality of load balancers:
1. Session rate: the number of requests processed per unit time
2. Session concurrency ability: concurrent processing ability
3. Data rate: data processing ability
To sum up, haproxy is a load balancing and reverse proxy server with superior performance.
The main advantages of HAProxy load balancing cluster are:
1. Free and open source, stability is also very good. This can be seen from some small projects I have done. Haproxy alone also runs well, and its stability is comparable to LVS.
two。 According to official documents, HAProxy can run all over 10Gbps-New benchmark of HAProxy at 10Gbps using Myricom's 10GbE NICs (Myri-10G PCI-Express), which is also amazing as a software-level load balancer.
3.HAProxy can be used as MySQL, mail, or other non-web load balancers. We often use it as MySQL (read) load balancers.
4.
5.HAProxy supports virtual hosts
If there is anything else you need to know, you can find our professional technical engineer on the official website. The technical engineer has more than ten years of experience in the industry, so it will be more detailed and professional than the editor's answer. Official website link www.yisu.com
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.