当前位置:网站首页>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)

边栏推荐
- MySQL数据库优化的几种方式(笔面试必问)
- MapReduce instance (VII): single table join
- [daily question] Porter (DFS / DP)
- Several ways of MySQL database optimization (pen interview must ask)
- Cap theory
- 【深度学习】语义分割:论文阅读:(2021-12)Mask2Former
- Kratos ares microservice framework (II)
- 六月刷题01——数组
- Persistence practice of redis (Linux version)
- 一大波開源小抄來襲
猜你喜欢

Redis geospatial

Research and implementation of hospital management inpatient system based on b/s (attached: source code paper SQL file)

工作流—activiti7环境搭建

Redis之cluster集群

英雄联盟轮播图自动轮播

Redis connection redis service command

Redis分布式锁实现Redisson 15问

为拿 Offer,“闭关修炼,相信努力必成大器

IDS cache preheating, avalanche, penetration

基于B/S的医院管理住院系统的研究与实现(附:源码 论文 sql文件)
随机推荐
Reids之删除策略
MapReduce working mechanism
Global and Chinese market of airport kiosks 2022-2028: Research Report on technology, participants, trends, market size and share
为拿 Offer,“闭关修炼,相信努力必成大器
Kratos战神微服务框架(三)
运维,放过监控-也放过自己吧
Mapreduce实例(四):自然排序
基于WEB的网上购物系统的设计与实现(附:源码 论文 sql文件)
Improved deep embedded clustering with local structure preservation (Idec)
Hard core! One configuration center for 8 classes!
【深度学习】语义分割:论文阅读(NeurIPS 2021)MaskFormer: per-pixel classification is not all you need
What is an R-value reference and what is the difference between it and an l-value?
Redis之cluster集群
Redis之主从复制
In order to get an offer, "I believe that hard work will make great achievements
[deep learning] semantic segmentation: paper reading: (CVPR 2022) mpvit (cnn+transformer): multipath visual transformer for dense prediction
Master slave replication of redis
DCDC power ripple test
Redis之哨兵模式
Redis之连接redis服务命令