CN109067667B - Dynamic load balancing method based on message classification - Google Patents

Dynamic load balancing method based on message classification Download PDF

Info

Publication number
CN109067667B
CN109067667B CN201810771518.3A CN201810771518A CN109067667B CN 109067667 B CN109067667 B CN 109067667B CN 201810771518 A CN201810771518 A CN 201810771518A CN 109067667 B CN109067667 B CN 109067667B
Authority
CN
China
Prior art keywords
syn
overload
processing core
load
message
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
Application number
CN201810771518.3A
Other languages
Chinese (zh)
Other versions
CN109067667A (en
Inventor
苘大鹏
杨武
王巍
玄世昌
吕继光
田国庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Harbin Engineering University filed Critical Harbin Engineering University
Priority to CN201810771518.3A priority Critical patent/CN109067667B/en
Publication of CN109067667A publication Critical patent/CN109067667A/en
Application granted granted Critical
Publication of CN109067667B publication Critical patent/CN109067667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]

Abstract

The invention belongs to the field of message load balancing based on a multi-core processor, and particularly relates to a dynamic load balancing method based on message classification. The method comprises the following steps: judging whether the message received by the distribution core is a TCP message; if not, adopting a static load balancing algorithm; if the TCP message is the TCP message, judging whether the received TCP message is a SYN or SYN-ACK packet. The invention dynamically manages each processing core and improves the processing performance of the system as a whole.

Description

Dynamic load balancing method based on message classification
Technical Field
The invention belongs to the field of message load balancing based on a multi-core processor, and particularly relates to a dynamic load balancing method based on message classification.
Background
With the increasing of network traffic in recent years, a low-speed security gateway "filter" cannot well complete the security detection of a high-speed network. Although the processor is upgraded from a single core to a plurality of cores, the whole processing performance is greatly improved, some cores are overloaded and some cores are overloaded due to the uneven load of each service core,Some cores are "starved" and do not exhibit multi-core performance. Therefore, load balancing is a key technology which is not negligible for improving the performance of the security gateway based on the multi-core[42]. The load balancing algorithm at the message level can distribute the network data message to different service processing cores, and although each service core can be balanced in processing, the integrity of the message flow or the session can be damaged, so that data leakage of the TCP application layer and the reduction of the network service quality are caused.
In summary, the problems in the prior art are that the integrity of data cannot be guaranteed, and the quality of network service cannot be guaranteed.
Disclosure of Invention
The invention aims to provide a method for relatively balancing loads of processing cores when local hot spots occur in data traffic.
A dynamic load balancing method based on message classification is characterized by comprising the following steps:
(1) judging whether the message received by the distribution core is a TCP message;
(2) if not, adopting a static load balancing algorithm; if the TCP message is a TCP message, judging whether the received TCP message is a SYN or SYN-ACK packet;
(3) if the packets are SYN and SYN-ACK packets and a slight overload table exists, directly performing a newly-built connection remapping strategy; if the packets are SYN and SYN-ACK packets and a serious overload table exists, directly performing a connection migration strategy; if SYN and SYN-ACK packets do not exist and a severe overload table and a mild overload table, directly performing hash calculation;
(4) if the packet is not a SYN or SYN-ACK packet and a heavy overload table exists, directly performing a connection migration strategy; if the packets are not SYN and SYN-ACK packets and no heavy overload table exists, directly performing hash calculation;
(5) and updating the state information table.
The newly-built connection remapping strategy comprises the following steps:
when the load unevenness exists in the light overload table and SYN-ACK packets are received, the current newly-built connection is remapped to the processing core with the light load corresponding to the newly-built connection so as to reduce the load difference of the newly-built connection and the processing core.
The connection migration policy comprises:
when the heavy overload table has the load unevenness phenomenon, the newly established connection in the heavy processing core is adjusted to the processing core with the light load corresponding to the newly established connection in the heavy processing core so as to narrow the difference.
The hash calculation includes:
the hash calculation module adopts a target IP folding XOR algorithm in a static load balancing function, modulo the hash value of each message according to the number of processing cores, and distributes the hash value to each processing core.
The state information table comprises a flow state information table, a light overload table, a heavy overload table and a processing core load table; the stream state information table records the source IP, the destination IP and the protocol type of each stream, the number of a processing core corresponding to each session and determines the processing core allocated to each message through the stream state information table; the mild overload table records the condition of the currently paired light and heavy processing cores under the condition of mild overload; the corresponding heavy overload table records the condition of the current paired light and heavy processing cores under the condition of heavy overload, the algorithm dynamically adjusts each processing core according to the two tables to enable the processing cores to tend to be balanced, and the processing core load table records the load capacity of each current processing core.
The invention has the beneficial effects that:
the invention adopts a static and dynamic combined load balancing algorithm to realize dynamic management of the load of each processing core and improve the processing performance of the system as a whole.
Drawings
FIG. 1 is a logic diagram of a dynamic load balancing algorithm;
FIG. 2 is an overall flow diagram of the present invention;
FIG. 3 is a graph of packet loss rate results for a multi-core processor;
FIG. 4 is a graph of load balancing results for a multicore processor;
FIG. 5 is a graph of connection adjustment rate results for a multicore processor;
Detailed Description
The invention is further described below with reference to the accompanying drawings.
The invention is based on the field of multi-core processor message load balancing and mainly aims at multi-core processor load balancing when local hot spots occur to data.
With the increasing of network traffic in recent years, a low-speed security gateway "filter" cannot well complete the security detection of a high-speed network. Although the processor is upgraded from a single core to multiple cores, the overall processing performance is greatly improved, but due to the uneven load of each service core, some cores are overloaded and some cores are in a starvation state, and the performance of multiple cores is not exerted. Therefore, load balancing is a key technology which is not negligible for improving the performance of the security gateway based on the multi-core[42]. The load balancing algorithm at the message level can distribute the network data message to different service processing cores, and although each service core can be balanced in processing, the integrity of the message flow or the session can be damaged, so that data leakage of the TCP application layer and the reduction of the network service quality are caused. Here, a load balancing algorithm based on packet classification is provided in this section according to packet characteristics, and a load balancing algorithm combining static and dynamic is adopted to dynamically manage the load of each processing core, thereby improving the processing performance of the system as a whole.
The invention aims to provide a method for relatively balancing loads of processing cores when local hot spots occur in data traffic.
The invention is mainly realized by the following steps:
the method shown in fig. 1 includes a newly-created connection remapping module, a connection migration module, a state information table, and a hash calculation module.
1) A newly-built connection remapping module: if the load unevenness exists in the light overload table and SYN packets and SYN-ACK packets are received, the current new connection is remapped to the processing core with the light load corresponding to the current new connection so as to reduce the load difference.
2) A connection migration module: if the load unevenness exists in the current heavy overload table, the newly established connection in the heavy processing core is adjusted to the processing core with the light load corresponding to the newly established connection in the heavy processing core so as to narrow the gap.
3) State information table: the state information table mainly comprises a flow state information table, a light overload table, a heavy overload table and a processing core load table. The flow state information table mainly records the source IP, the destination IP and the protocol type of each flow, the processing core number corresponding to each session, and the processing core allocated to each message can be determined through the table. The mild overload table records the condition of the currently paired light and heavy processing cores under the condition of mild overload; the corresponding heavy overload table records the condition of the current paired light and heavy processing cores under the condition of heavy overload, the algorithm dynamically adjusts each processing core according to the two tables to enable the processing cores to tend to be balanced, and the load table records the load capacity of each current processing core.
4) A hash calculation module: the hash calculation module adopts a target IP folding XOR algorithm in a static load balancing function, modulo the hash value of each message according to the number of processing cores, and distributes the hash value to each processing core. The static load algorithm logic is simple and efficient to operate, and the integrity of the session or the flow can be better guaranteed.
The existing load balancing method cannot meet the requirement of processing core balancing processing when local hot spots occur in network data. The invention mainly aims at adjusting when the load between the processing cores is unbalanced, and prevents packet loss. And adopting a static load balancing algorithm for non-TCP messages, adopting a dynamic load balancing algorithm for TCP messages, dividing load overload into light overload core heavy overload, wherein the light overload is to map a newly-arrived connection to a processor with light load, and the heavy overload is to transfer a newly-established connection of a processing core to the processing core with light load. This prevents excessive overhead from frequent dynamic adjustments, load-balancing the processing cores, and reduces disruption to the integrity of the connection.
Fig. 3 shows packet loss rate at different flows; FIG. 4 is a graph of load balancing at different flows; fig. 5 is a diagram of the scale of the newly created connection remapping and connection migration for different flows. By combining the results of the three graphs, the load balancing method of the invention can be seen to achieve the effect of load balancing.
1) Fig. 2 is a main flow chart of the present invention, and the overall processing flow of the present invention is that when the system runs, the message received by the distribution core is a TCP message or not.
2) If not, a static load balancing algorithm is adopted.
3) If the data packet is the TCP message, judging whether the current data packet is a SYN packet or a SYN-ACK packet.
4) If the SYN/SYN-ACK packet exists, a newly-built connection remapping strategy is directly carried out if a light load table exists, and a connection migration strategy is directly carried out if a heavy load table exists; if the heavy load table is not the SYN/SYN-ACK packet, the connection migration strategy is directly carried out if the heavy load table exists, otherwise, the data packet distribution is carried out according to the load table.
5) And regularly updating state information tables such as a load balancing table, a light load table, a heavy load table and the like.

Claims (1)

1. A dynamic load balancing method based on message classification is characterized by comprising the following steps:
(1) judging whether the message received by the distribution core is a TCP message;
(2) if not, adopting a static load balancing algorithm; if the TCP message is a TCP message, judging whether the received TCP message is a SYN or SYN-ACK packet;
(3) if the packets are SYN and SYN-ACK packets and a slight overload table exists, directly performing a newly-built connection remapping strategy; if the packets are SYN and SYN-ACK packets and a serious overload table exists, directly performing a connection migration strategy; if the packets are SYN and SYN-ACK packets and no serious overload table or light overload table exists, directly performing hash calculation;
(4) if the packet is not a SYN or SYN-ACK packet and a heavy overload table exists, directly performing a connection migration strategy; if the packets are not SYN and SYN-ACK packets and no heavy overload table exists, directly performing hash calculation;
(5) updating the state information table;
the newly-built connection remapping strategy comprises the following steps:
when the load unevenness exists in the light overload table and SYN-ACK packets are received, remapping the current newly-built connection to a processing core with light load corresponding to the newly-built connection to reduce the load difference of the newly-built connection and the processing core;
the connection migration policy comprises:
when the heavy overload table has the phenomenon of uneven load, adjusting the newly established connection in the heavy processing core to the processing core with light load corresponding to the connection to reduce the difference between the connection and the processing core;
the hash calculation includes:
the hash calculation module adopts a target IP folding XOR algorithm in a static load balancing function, modulo the hash value of each message according to the number of processing cores, and distributes the hash value to each processing core;
the state information table comprises a flow state information table, a light overload table, a heavy overload table and a processing core load table; the stream state information table records the source IP, the destination IP and the protocol type of each stream, the number of a processing core corresponding to each session and determines the processing core allocated to each message through the stream state information table; the light overload table records the condition of the current paired light and heavy processing cores under the light overload condition; the corresponding heavy overload table records the condition of the currently paired light and heavy processing cores under the heavy overload condition, the algorithm dynamically adjusts each processing core according to the light and heavy overload tables to enable the processing cores to tend to be balanced, and the processing core load table records the load capacity of each current processing core.
CN201810771518.3A 2018-07-13 2018-07-13 Dynamic load balancing method based on message classification Active CN109067667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810771518.3A CN109067667B (en) 2018-07-13 2018-07-13 Dynamic load balancing method based on message classification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810771518.3A CN109067667B (en) 2018-07-13 2018-07-13 Dynamic load balancing method based on message classification

Publications (2)

Publication Number Publication Date
CN109067667A CN109067667A (en) 2018-12-21
CN109067667B true CN109067667B (en) 2022-03-18

Family

ID=64816412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810771518.3A Active CN109067667B (en) 2018-07-13 2018-07-13 Dynamic load balancing method based on message classification

Country Status (1)

Country Link
CN (1) CN109067667B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2592315B (en) 2019-04-04 2023-07-19 Pismo Labs Technology Ltd Methods and systems for sending packets through a plurality of tunnels

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2942914A1 (en) * 2013-01-28 2015-11-11 ZTE Corporation Load sharing method and apparatus
KR20170035396A (en) * 2015-09-22 2017-03-31 한국전자통신연구원 Method for distributing network packets
CN106572170A (en) * 2016-10-28 2017-04-19 中国电子科技集团公司第五十四研究所 Controller and dynamic load balancing method under SDN hierarchical multiple controllers
CN107196870A (en) * 2017-07-20 2017-09-22 哈尔滨工业大学 A kind of flow dynamics load-balancing method based on DPDK
CN108259374A (en) * 2017-08-24 2018-07-06 新华三信息安全技术有限公司 A kind of multi-core processor and message processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2942914A1 (en) * 2013-01-28 2015-11-11 ZTE Corporation Load sharing method and apparatus
KR20170035396A (en) * 2015-09-22 2017-03-31 한국전자통신연구원 Method for distributing network packets
CN106572170A (en) * 2016-10-28 2017-04-19 中国电子科技集团公司第五十四研究所 Controller and dynamic load balancing method under SDN hierarchical multiple controllers
CN107196870A (en) * 2017-07-20 2017-09-22 哈尔滨工业大学 A kind of flow dynamics load-balancing method based on DPDK
CN108259374A (en) * 2017-08-24 2018-07-06 新华三信息安全技术有限公司 A kind of multi-core processor and message processing method

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
"基于多核网络处理器的路由器数据转发平面设计与实现";贾海龙;《中国优秀硕士学位论文全文数据库·信息科技辑》;20170315;全文 *
"Adaptive network-traffic balancing on multi-core software networking devices";Tomazˇ Buh a 等;《Computer Networks》;20140429;第69卷;全文 *
"Load balancing for parallel forwarding";Weiguang Shi 等;《IEEE/ACM Transactions on Networking》;20050822;第13卷(第4期);全文 *
"基于DPDK的流量动态负载均衡方法";李凯等;《智能计算机与应用》;20170828(第04期);全文 *
"网络处理器负载均衡和报文转发设计与实现";刘需鸽;《中国优秀博硕士学位论文全文数据库(硕士)·信息科技辑》;20061115;全文 *
"网络处理器负载均衡算法综述";孔大伟 等;《自动化技术与应用》;20070730;全文 *

Also Published As

Publication number Publication date
CN109067667A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
WO2021135416A1 (en) Load balancing method and device
CN102118319B (en) Traffic load balancing method and device
CN102158386B (en) Distributed load balance for system management program
US9137165B2 (en) Methods of load balancing using primary and stand-by addresses and related load balancers and servers
CN102427475B (en) Load balance scheduling system in cloud computing environment
US8937865B1 (en) Scheduling traffic over aggregated bundles of links
US20150124826A1 (en) Network fabric overlay
US20100254409A1 (en) System and Method for Optimizing Network Bandwidth Usage
US20140372567A1 (en) Methods of forwarding data packets using transient tables and related load balancers
US20140372616A1 (en) Methods of forwarding/receiving data packets using unicast and/or multicast communications and related load balancers and servers
US7290059B2 (en) Apparatus and method for scalable server load balancing
US10476800B2 (en) Systems and methods for load balancing virtual connection traffic
CN103095600B (en) A kind of method of the load balancing based on Trill network and routing device
EP2595348B1 (en) Streaming service load sharing method, streaming service processing method, device and system thereof
US9602331B2 (en) Shared interface among multiple compute units
CN109067667B (en) Dynamic load balancing method based on message classification
CN106572009A (en) Method and device for forwarding massages under multi-operator link environment
WO2021218014A1 (en) Data center traffic management and control method and system
CN102769556A (en) Dynamic regulation method and device for active VLAN
CN106713378A (en) Method and system for realizing service provision by multiple application servers
WO2008089667A1 (en) Method and apparatus for reducing service loss in a link aggregation group
CN112000435A (en) Multi-activity load balancing method and system based on Openstack
CN101867521A (en) Multilink accessing and flow load dispatching managing method
CN104202349B (en) The method of scheduling distributed buffer resources, Apparatus and system
US20080056164A1 (en) Method and system of distributing multicast group join requests in computer systems operating with teamed communication ports

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