CN107948088B - Method for balancing network application layer load - Google Patents
Method for balancing network application layer load Download PDFInfo
- Publication number
- CN107948088B CN107948088B CN201810012507.7A CN201810012507A CN107948088B CN 107948088 B CN107948088 B CN 107948088B CN 201810012507 A CN201810012507 A CN 201810012507A CN 107948088 B CN107948088 B CN 107948088B
- Authority
- CN
- China
- Prior art keywords
- load
- grouping
- load balancing
- traffic
- balancing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a network application layer load balancing method which is matched with the flows of flow acquisition, session analysis, application service grouping, rule matching, priority grouping, load scheduling and the like, can effectively improve the granularity and efficiency of load balancing, reasonably uses the hardware performance of a server, can realize the combination of an automatic load balancing algorithm and manual rule matching configuration, meets the customized requirement of load balancing, and improves the application range and various environmental requirements of load balancing.
Description
Technical Field
The invention belongs to the field of network communication, and particularly relates to a method for balancing network application layer loads.
Background
Load Balance (Load Balance) is one of the factors that must be considered in the design of a distributed system architecture, and generally refers to the uniform distribution of requests and data among multiple operation units for execution. In a data network, a plurality of servers form a server set in a symmetrical mode, each server has an equivalent status, and the servers can independently provide services to the outside without the assistance of other servers. By means of some load sharing technology, externally sent requests are distributed homogeneously to some server in symmetrical structure, and the server receiving the requests responds to the client's request independently. Load balancing enables even distribution of client requests to the server array, thereby providing fast acquisition of important data and solving the problem of large numbers of concurrent access services.
In an application layer of a network layer, a client sends a request to a load balancing device at the front end of a server group, a virtual service on the load balancing device receives the client request, a real server is selected through a scheduling algorithm, a target address of a request message is rewritten by a real server address through network address conversion, and then the request is sent to the selected real server. When the response message of the real server passes through the load balancing equipment, the source address of the message is restored to the VSIP of the virtual service and then returned to the client, and the whole load scheduling process is completed. This prior art scheme employs VSIPs for virtual services, and users access the subsequent servers by accessing the VSIPs. When the VSIP is abnormal, load balancing cannot be carried out, and the risk is high. Meanwhile, the implementation of the load balancing scheme is realized through a built-in scheduling algorithm on equipment, the effect depends on the quality of the algorithm, manual intervention cannot be carried out, and the rule of load balancing is set automatically.
Disclosure of Invention
In view of this, the present invention aims to provide a method for load balancing at a network application layer, which is used in cooperation with flows of traffic acquisition, session analysis, application service grouping, rule matching, priority grouping, load scheduling, and the like, so that the granularity and efficiency of load balancing can be effectively improved, the performance of server hardware can be reasonably used, and meanwhile, the combination of an automatic load balancing algorithm and manual rule matching configuration can be realized, and the customized requirement of load balancing is met.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method for network application layer load balancing comprises the following steps:
step 1: flow acquisition: extracting header information of a data packet in the data stream to obtain a source IP, a destination IP, a source port, a destination port and a quintuple of a protocol of the data message;
step 2: and (3) session analysis: dividing and classifying the five tuples of the source IP, the destination IP, the source port and the destination port of the acquired data packet and the protocol;
and step 3: application service grouping: according to the result of the session analysis in the step 2, performing service grouping on the traffic, and independently marking the grouping on the traffic of the same service or similar services;
or a certain parameter of the session type and the flow can be marked and grouped separately;
and 4, step 4: rule matching: manually configuring a load scheduling rule through a command line; saving the data into a configuration file, and importing, exporting and saving the data;
and 5: priority grouping: the priority grouping ensures that the high-performance server is scheduled and used preferentially, and can bear the traffic load to the maximum extent under the allowed specification;
since the performance and hardware parameters of the servers located in the intranet may vary. The priority scheduling can ensure that the high-performance server is scheduled and used preferentially, and can bear the traffic load to the maximum extent under the allowed specification, thereby ensuring the performance requirement and the stability requirement of the service.
Step 6: load scheduling: the traffic of the packets in step 3 is load balanced to different servers using a load balancing algorithm in combination with manually configured load scheduling rules in step 4 and a priority grouping policy in step 5.
Further, in step 4, the configuration file is stored in a json format.
Further, in step 4, the configuration file is stored in an xml format.
Further, the load balancing algorithm used in step 6 may be one or a combination of a source address hashing algorithm, a weighted round robin method and a minimum concatenation method.
One or more combinations of mainstream algorithms are used, so that high load balancing efficiency is realized, and the servers are switched quickly.
Further, the load schedule in step 6 is visually displayed.
Compared with the prior art, the method for balancing the network application layer load has the following advantages that:
the network application layer load balancing method is matched with the flows of flow acquisition, session analysis, application service grouping, rule matching, priority grouping, load scheduling and the like, can effectively improve the granularity and efficiency of load balancing, reasonably uses the hardware performance of the server, can realize the combination of an automatic load balancing algorithm and manual rule matching configuration, meets the customized requirement of load balancing, and improves the application range and various environmental requirements of load balancing.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention.
In the drawings:
fig. 1 is a schematic flow chart of a method for balancing network application layer load according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1, a method for balancing network application layer load includes:
step 1: flow acquisition: extracting header information of a data packet in the data stream to obtain a source IP, a destination IP, a source port, a destination port and a quintuple of a protocol of the data message;
step 2: and (3) session analysis: dividing and classifying the five tuples of the source IP, the destination IP, the source port and the destination port of the acquired data packet and the protocol;
and step 3: application service grouping: according to the result of the session analysis in the step 2, performing service grouping on the traffic, and independently marking the grouping on the traffic of the same service or similar services;
or a certain parameter of the session type and the flow can be marked and grouped separately;
and 4, step 4: rule matching: manually configuring a load scheduling rule through a command line; saving the data into a configuration file, and importing, exporting and saving the data;
and 5: priority grouping: the priority grouping ensures that the high-performance server is scheduled and used preferentially, and can bear the traffic load to the maximum extent under the allowed specification;
because the server group performance and hardware parameters in the intranet may be different. The priority scheduling can ensure that the high-performance server is scheduled and used preferentially, and can bear the traffic load to the maximum extent under the allowed specification, thereby ensuring the performance requirement and the stability requirement of the service.
Step 6: load scheduling: and (3) balancing the traffic load of the packets in the step (3) to different servers by using a load balancing algorithm and combining the manual configuration of the load scheduling rules in the step (4) and the priority grouping strategy in the step (5).
As shown in fig. 1, the configuration file is stored in json format in step 4.
As shown in fig. 1, the configuration file is stored in xml format in step 4.
As shown in fig. 1, the load balancing algorithm used in step 6 may be one or a combination of a source address hashing algorithm, a weighted round robin method and a minimum concatenation method.
One or more combinations of mainstream algorithms are used, so that high load balancing efficiency is realized, and the servers are switched quickly.
As shown in fig. 1, the load schedule in step 6 is visually displayed.
One specific embodiment of the present invention: taking a ticketing system of a certain ticketing company as an example, load balancing is realized for access links of various ticket data servers and authentication servers. After a client logs in through a webpage or a ticketing client, the transmitted data traffic is obtained through the step 1, the step 2 session analysis is further carried out on the data traffic, the accessed access session is analyzed, the quintuple of the information message is extracted, and whether the session is a new session or an existing session is determined through the content of the quintuple. Further to the application service grouping of step 3, the grouping process will determine which service the message session is associated with, set a flag, determine the type of data traffic and the protocol type. And (4) after the completion, carrying out rule matching through the step 4, checking whether a load rule specified by the ticket staff exists, and if not, carrying out configuration according to a built-in optimized configuration rule. Then, the method is sent to step 5 to carry out priority grouping, and the priorities of the different accessed resources are determined, wherein the priorities are two, namely, the self-defined priority and the automatic priority. The custom priority may be set manually and the automatic priority may be generated automatically by the core algorithm. And finally, transmitting the ticket buying request of the client to a specific service database through the load scheduling implementation of the step 6.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (5)
1. A method for balancing network application layer load is characterized in that: the method comprises the following steps:
step 1: flow acquisition: extracting header information of a data packet in the data stream to obtain a source IP, a destination IP, a source port, a destination port and a quintuple of a protocol of the data message;
step 2: and (3) session analysis: dividing and classifying the five tuples of the source IP, the destination IP, the source port and the destination port of the acquired data packet and the protocol;
and step 3: application service grouping: according to the result of the session analysis in the step 2, performing service grouping on the traffic, and independently marking the grouping on the traffic of the same service or similar services;
and 4, step 4: rule matching: manually configuring a load scheduling rule through a command line; saving the data into a configuration file, and importing, exporting and saving the data;
and 5: priority grouping: the priority grouping ensures that the high-performance server is scheduled and used preferentially, and can bear the traffic load to the maximum extent under the allowed specification;
step 6: load scheduling: and (3) balancing the traffic load of the packets in the step (3) to different corresponding servers by using a load balancing algorithm and combining the manual configuration of the load scheduling rules in the step (4) and the priority grouping strategy in the step (5).
2. The method of claim 1, wherein the method comprises: in step 4 the configuration file is stored in json format.
3. The method of claim 1, wherein the method comprises: in step 4 the configuration file is stored in xml format.
4. A method for network application layer load balancing according to any one of claims 1 or 2, characterized by: the load balancing algorithm used in step 6 may be one or a combination of a source address hashing algorithm, a weighted round robin method and a minimum concatenation method.
5. The method of claim 4, wherein the method comprises: the load schedule in step 6 is visually displayed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810012507.7A CN107948088B (en) | 2018-01-05 | 2018-01-05 | Method for balancing network application layer load |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810012507.7A CN107948088B (en) | 2018-01-05 | 2018-01-05 | Method for balancing network application layer load |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107948088A CN107948088A (en) | 2018-04-20 |
CN107948088B true CN107948088B (en) | 2021-10-01 |
Family
ID=61938530
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810012507.7A Active CN107948088B (en) | 2018-01-05 | 2018-01-05 | Method for balancing network application layer load |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107948088B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111459664A (en) * | 2020-03-19 | 2020-07-28 | 北京美住美宿科技有限公司 | Hotel management system capable of balancing load |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7469295B1 (en) * | 2001-06-25 | 2008-12-23 | Network Appliance, Inc. | Modified round robin load balancing technique based on IP identifier |
CN101945407A (en) * | 2010-10-22 | 2011-01-12 | 东南大学 | Load balancing method for content monitoring of mobile service |
CN102932271A (en) * | 2012-11-27 | 2013-02-13 | 无锡城市云计算中心有限公司 | Method and device for realizing load balancing |
CN103905324A (en) * | 2014-03-21 | 2014-07-02 | 汉柏科技有限公司 | Dispatching and distributing method and system based on message five-element set |
CN104852934A (en) * | 2014-02-13 | 2015-08-19 | 阿里巴巴集团控股有限公司 | Method for realizing flow distribution based on front-end scheduling, device and system thereof |
CN105357142A (en) * | 2015-12-02 | 2016-02-24 | 浙江工商大学 | Method for designing network load balancer system based on ForCES |
CN106302225A (en) * | 2016-10-18 | 2017-01-04 | 上海优刻得信息科技有限公司 | A kind of method and apparatus of server load balancing |
CN106850599A (en) * | 2017-01-18 | 2017-06-13 | 中国科学院信息工程研究所 | A kind of NAT detection methods based on fusion user behavior and sudden peal of thunder ID |
CN107196869A (en) * | 2017-07-14 | 2017-09-22 | 北京知道创宇信息技术有限公司 | The adaptive load balancing method, apparatus and system of Intrusion Detection based on host actual loading |
Family Cites Families (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020032727A1 (en) * | 2000-09-08 | 2002-03-14 | International Business Machines Corporation | System and method for enhancing load controlling in a clustered Web site |
US20030074467A1 (en) * | 2001-10-11 | 2003-04-17 | Oblak Sasha Peter | Load balancing system and method for data communication network |
CN101207550B (en) * | 2007-03-16 | 2010-09-15 | 中国科学技术大学 | Load balancing system and method for multi business to implement load balancing |
JP4753316B2 (en) * | 2007-07-03 | 2011-08-24 | 株式会社Kddi研究所 | Load distribution server and program for distributing and managing load of presence information |
CN101562534B (en) * | 2009-05-26 | 2011-12-14 | 中山大学 | Network behavior analytic system |
CN102571782B (en) * | 2011-12-29 | 2014-10-01 | 浙江大学 | Novel load balancing server cluster system |
CN103201989B (en) * | 2012-08-09 | 2016-05-25 | 华为技术有限公司 | The methods, devices and systems of control data transmission |
US9036476B2 (en) * | 2012-09-28 | 2015-05-19 | Juniper Networks, Inc. | Maintaining load balancing after service application with a network device |
CN103929368B (en) * | 2014-05-05 | 2017-04-26 | 华为技术有限公司 | Load balance method and device for multiple service units |
CN105430027A (en) * | 2014-09-04 | 2016-03-23 | 中国石油化工股份有限公司 | Load balance dynamic pre-allocating method based on a plurality of resource scales |
CN106034089A (en) * | 2015-03-20 | 2016-10-19 | 中兴通讯股份有限公司 | Message scheduling method and device based on scheduling flow identification |
CN105208133B (en) * | 2015-10-20 | 2018-05-25 | 上海斐讯数据通信技术有限公司 | A kind of server, load equalizer and server load balancing method and system |
CN105763617B (en) * | 2016-03-31 | 2019-08-02 | 北京百卓网络技术有限公司 | A kind of load-balancing method and system |
CN107342926A (en) * | 2017-06-13 | 2017-11-10 | 国家计算机网络与信息安全管理中心 | A kind of method of multi-service Rapid matching distribution |
CN107197035A (en) * | 2017-06-21 | 2017-09-22 | 中国民航大学 | A kind of compatibility dynamic load balancing method based on uniformity hash algorithm |
-
2018
- 2018-01-05 CN CN201810012507.7A patent/CN107948088B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7469295B1 (en) * | 2001-06-25 | 2008-12-23 | Network Appliance, Inc. | Modified round robin load balancing technique based on IP identifier |
CN101945407A (en) * | 2010-10-22 | 2011-01-12 | 东南大学 | Load balancing method for content monitoring of mobile service |
CN102932271A (en) * | 2012-11-27 | 2013-02-13 | 无锡城市云计算中心有限公司 | Method and device for realizing load balancing |
CN104852934A (en) * | 2014-02-13 | 2015-08-19 | 阿里巴巴集团控股有限公司 | Method for realizing flow distribution based on front-end scheduling, device and system thereof |
CN103905324A (en) * | 2014-03-21 | 2014-07-02 | 汉柏科技有限公司 | Dispatching and distributing method and system based on message five-element set |
CN105357142A (en) * | 2015-12-02 | 2016-02-24 | 浙江工商大学 | Method for designing network load balancer system based on ForCES |
CN106302225A (en) * | 2016-10-18 | 2017-01-04 | 上海优刻得信息科技有限公司 | A kind of method and apparatus of server load balancing |
CN106850599A (en) * | 2017-01-18 | 2017-06-13 | 中国科学院信息工程研究所 | A kind of NAT detection methods based on fusion user behavior and sudden peal of thunder ID |
CN107196869A (en) * | 2017-07-14 | 2017-09-22 | 北京知道创宇信息技术有限公司 | The adaptive load balancing method, apparatus and system of Intrusion Detection based on host actual loading |
Also Published As
Publication number | Publication date |
---|---|
CN107948088A (en) | 2018-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020063335A1 (en) | Slice information processing method and apparatus | |
CN108809857A (en) | A method of the traffic monitoring based on SDN and service quality securing strategy | |
US9674279B2 (en) | Methods, devices, and systems for allocating service nodes in a network | |
WO2017005223A1 (en) | Information sharing method of smart electricity meter, smart electricity meter and acquisition router | |
CN106034330B (en) | Mobile terminal flow processing method, apparatus and system based on content distributing network | |
US8738700B2 (en) | Method and system for providing network services | |
CN102281190B (en) | Networking method for load balancing apparatus, server and client access method | |
CN105282191B (en) | SiteServer LBS, controller and method | |
CN109218355A (en) | Load equalizing engine, client, distributed computing system and load-balancing method | |
CN103747274B (en) | A kind of video data center setting up cache cluster and cache resources dispatching method thereof | |
CN104660507B (en) | The control method and device of forwarding data flow routing | |
KR20120127050A (en) | A Method and Apparatus of selecting network connection in M2M communication | |
Chiha et al. | Network slicing cost allocation model | |
EP3510728A1 (en) | System and method for programmable native analytics in 5g mobile networks | |
CN114040272B (en) | Path determination method, device and storage medium | |
CN113133087B (en) | Method and device for configuring network slice for terminal equipment | |
CN102932913B (en) | Obtain method, server, gateway and the system of MAB terminal access positions | |
CN109005126B (en) | Data stream processing method, device and computer readable storage medium | |
CN105284150B (en) | Service shunting method, control network element, gateway router and user entity | |
CN109982391A (en) | The processing method and processing device of data | |
CN105656964B (en) | The implementation method and device of data-pushing | |
US20160380861A1 (en) | Method for ordering monitored packets with tightly-coupled processing elements | |
WO2020035000A1 (en) | Method for acquiring network configuration information, and related device | |
WO2016180188A1 (en) | Distributed link establishment method, apparatus and system | |
CN107948088B (en) | Method for balancing network application layer load |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |