当前位置:网站首页>Selection of software load balancing and hardware load balancing
Selection of software load balancing and hardware load balancing
2022-07-06 09:39:00 【Java domain】
Software load balancing , There is also hardware load balancing , Choose which ?

In a network with excessive data traffic , A single device is generally unaffordable , Multiple devices are required for data shunting , The load balancer plays the role of shunting data to multiple devices .
Load balancing is also divided into many technologies , To meet different needs , Soft / Hardware load balancing 、 Local / Global load balancing 、 Higher network layer load balancing , And link aggregation technology .
We use soft load balancing , Hardware load balancing is also used , Now let's talk about the two respective generations .
One . Software load balancing
On the operating system of the server , Install the software , To achieve load balancing , Such as Nginx Load balancing . Its advantage is based on specific environment 、 Simple configuration 、 Flexible use 、 The cost is low , It can meet most of the load balancing requirements .
(1) Software load balancing mainly includes Nginx,LVS
Nginx Is a high-performance HTTP and Reverse proxy The server , Also a IMAP/POP3/SMTP proxy server . so to speak Nginx It's the most widely used HTTP Soft load balancer , At the same time, due to efficient performance 、 stability 、 Rich feature set 、 Example profiles and low system resource consumption are well known in the industry . Like tencent 、 TaoBao 、 Sina and other large portals and commercial websites adopt Nginx Conduct HTTP Website data streaming .
(2)Nginx Functional characteristics of
1、 Working on the Internet 7 Layer above , You can do some diversion strategies .
2、Nginx Less dependence on the Internet .
3、Nginx Installation and configuration are simple , The test is convenient .
4、 Can bear high load pressure and stable , Generally, it can support more than 1 Ten thousand concurrencies .
5、Nginx The internal fault of the server can be detected through the port , Prompt whether the load node is normal .;
6、 I won't support it Session To keep 、 Yes Big request header Our support is not very good , In addition, the default is Round-robin and IP-hash Two load balancing algorithms .
(3)Nginx Principle
Nginx It adopts reverse proxy technology , Proxy server to accept internet Connection request on , Then forward the request to the server on the internal network , And return the result of the request from the client to the server , At this time, the proxy server appears externally , Like for a server . Reverse proxy load balancing technology is to dynamically forward connection requests from the network to multiple servers in the internal network in the form of reverse proxy for processing , So as to achieve the goal of load balancing .

Two . Hardware load balancing
Install load balancing hardware directly between the server and the external network , This kind of equipment is usually called load balancer . By special equipment , Independent of the operating system , The overall performance has been greatly improved , Add more load balancing strategies , Intelligent traffic management , Can achieve the best load balancing demand . Generally speaking , Hardware load balancing in function 、 The performance is better than that of software , But it's expensive , Very common are F5 Load Balancer .
(1)F5 Introduction to load balancer
F5 Load balancer is the global leader in application delivery network F5 Networks A special equipment for load balancer provided by the company ,F5 BIG-IP LTM The official name of is called local traffic manager , You can do it 4-7 Layer load balancing , With load balancing 、 Application switching 、 Session switching 、 Condition monitoring 、 Intelligent network address translation 、 General continuity 、 Response error handling 、IPv6 gateway 、 Advanced routing 、 Smart port mirroring 、SSL Speed up 、 intelligence HTTP Compress 、TCP Optimize 、 The first 7 Layer rate shaping 、 Content buffer 、 Content conversion 、 Connection acceleration 、 Cache 、Cookie encryption 、 Selective content encryption 、 Apply attack filtering 、 Denial of service (DoS) Attack and SYN Flood Protect 、 A firewall — Packet filtering 、 Package disinfection and other functions .
(2)F5 Function introduction of load balancer :
1.F5 BIG-IP Provide 12 A flexible algorithm distributes all traffic evenly to each server , For users , Just a virtual server .
2.F5 BIG-IP You can confirm whether the application can return the corresponding data to the request . If F5 BIG-IP A service stop occurred on one of the following servers 、 Crash, etc ,F5 It will check and identify the server as down , Thus, the user's access request is not transmitted to the failed server . such , As long as the other servers work properly , The user's access will not be affected . Once the downtime is repaired ,F5 BIG-IP It will automatically verify that the application can respond correctly to the customer's request and resume transmission to the server .
3.F5 BIG-IP It's dynamic Session Session hold function .
4.F5 BIG-IP Of iRules The function can do content filtering , According to different domain names 、URL, Send access requests to different servers .
Comparison of advantages and disadvantages between hardware load balancing and software load balancing :
Hardware load balancing mode (F5)
advantage : It can be realized directly through intelligent switch , More processing power , And it's not about the system , Strong load performance, more suitable for a large number of equipment 、 A lot of traffic 、 Simple application
shortcoming : The high cost , In addition to the high price of equipment , And configure redundancy . It's hard to imagine a cluster of servers in the back , But the most critical load balancing device is the single point configuration ; Unable to effectively grasp the server and application status .
Hardware load balancing , Generally regardless of the actual system and application state , But only from the network layer , So sometimes the system processing power is no longer available , But the network may have time to respond ( This situation is typical , For example, the memory behind the application server has occupied a lot , But not completely , If the network transmission volume is not large, it may not be reflected in the network layer )
Software load balancing (Nginx)
advantage : Load balancing based on system and application , It can better distribute the load according to the conditions of the system and application . This is important for complex applications , High cost performance , In fact, if several servers , use F5 Such hardware products seem a little wasteful , And it's much more cost-effective to use software , Because the server can also run applications, clusters, etc .
shortcoming : The load capacity is affected by the performance of the server itself , The better the performance , The greater the load capacity .
review : For our system environment , Since the load balancer itself does not need to process the data , The performance bottleneck lies more in the background server , Usually, soft load balancer is very enough , It can be combined with our system platform .
Hardware load balancing application scenario , More is a large number of background servers , Massive data processing and distribution , For example, hundreds of thousands of data per second are concurrent , In this way, it is necessary to select an appropriate hardware load balancing device .
If this article helps you , Don't forget to give me a 3 even , give the thumbs-up , forward , Comment on , I'll see you next time ! Learn more JAVA Knowledge and skills , Follow up with private bloggers (666)

边栏推荐
- 018.有效的回文
- Redis cluster
- A wave of open source notebooks is coming
- Redis connection redis service command
- Leetcode:608 tree node
- Mapreduce实例(八):Map端join
- MapReduce instance (V): secondary sorting
- Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)
- [deep learning] semantic segmentation: paper reading: (2021-12) mask2former
- Hard core! One configuration center for 8 classes!
猜你喜欢

leetcode-14. Longest common prefix JS longitudinal scanning method

MapReduce instance (IX): reduce end join

Le modèle sentinelle de redis

英雄联盟轮播图手动轮播

Publish and subscribe to redis

MapReduce instance (VII): single table join

Detailed explanation of cookies and sessions

Persistence practice of redis (Linux version)

MapReduce instance (IV): natural sorting

Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)
随机推荐
Hard core! One configuration center for 8 classes!
英雄联盟轮播图手动轮播
面渣逆袭:Redis连环五十二问,图文详解,这下面试稳了
工作流—activiti7环境搭建
What are the models of data modeling
QML type: locale, date
Kratos ares microservice framework (III)
[Yu Yue education] Wuhan University of science and technology securities investment reference
Leetcode:608 树节点
Redis之哨兵模式
Kratos战神微服务框架(三)
Redis之cluster集群
软件负载均衡和硬件负载均衡的选择
Full stack development of quartz distributed timed task scheduling cluster
Redis' performance indicators and monitoring methods
Reids之缓存预热、雪崩、穿透
Mapreduce实例(五):二次排序
Withdrawal of wechat applet (enterprise payment to change)
【深度学习】语义分割:论文阅读:(2021-12)Mask2Former
Global and Chinese market of electric pruners 2022-2028: Research Report on technology, participants, trends, market size and share