CN105657025A - Homologous homoclinic algorithm for realizing passing UDP message through load balancing device based on UDP characteristic keyword matching and structure thereof - Google Patents

Homologous homoclinic algorithm for realizing passing UDP message through load balancing device based on UDP characteristic keyword matching and structure thereof Download PDF

Info

Publication number
CN105657025A
CN105657025A CN201610050271.7A CN201610050271A CN105657025A CN 105657025 A CN105657025 A CN 105657025A CN 201610050271 A CN201610050271 A CN 201610050271A CN 105657025 A CN105657025 A CN 105657025A
Authority
CN
China
Prior art keywords
mid
udp
message
node
load
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.)
Granted
Application number
CN201610050271.7A
Other languages
Chinese (zh)
Other versions
CN105657025B (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.)
Nanjing Balance Network Technology Co Ltd
Original Assignee
Nanjing Balance Network Technology Co Ltd
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 Nanjing Balance Network Technology Co Ltd filed Critical Nanjing Balance Network Technology Co Ltd
Priority to CN201610050271.7A priority Critical patent/CN105657025B/en
Publication of CN105657025A publication Critical patent/CN105657025A/en
Application granted granted Critical
Publication of CN105657025B publication Critical patent/CN105657025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a homologous homoclinic algorithm for realizing passing a UDP message through a load balancing device based on UDP characteristic keyword matching; the algorithm comprises two parts of a session balancing mechanism and a session ageing mechanism, thereby realizing homologous homoclinic balanced shunting and resource releasing of a UDP session; the algorithm involves in four hash algorithm tables, including an ACL rule table, an MID learning table, a shunting group table and an MAC table; the session balancing mechanism is used for shunting one UDP session to a back-end server in a balanced manner; and the session ageing mechanism is used for releasing system resources occupied by one session. Because the traditional keyword learning method has the load unbalanced problem, the algorithm abandons the traditional keyword learning manner, and carries out hash operation according to load condition of a node; the hardware computing power of a network processor is played fully, and the shunting balance, stability and high efficiency of a load balancing system are greatly improved.

Description

The UDP message algorithm by load-balancing device homology chummage and structure thereof is realized based on UDP feature critical word coupling
Technical field
The present invention relates to a kind of file load balancing technique field, be specifically related to realize based on UDP feature critical word coupling the UDP message algorithm by load-balancing device homology chummage and structure thereof.
Background technology
Load-balancing device traditional at present generally adopts the mode of Hash directly to be sent to responding rear end according to shunting table by data stream, when between every is flowed, backend resources consumption is differed greatly by the difference in size of the content of transmission, transmission data, may result in the magnitude of deviation of back-end server consumption resource relatively big, produce the situation that load is uneven.
Summary of the invention
In order to overcome the shortcoming of above-mentioned prior art, it is an object of the invention to provide and a kind of realize UDP message by the algorithm of load-balancing device homology chummage and structure thereof based on UDP feature critical word coupling.
For solving above-mentioned technical problem, the technical solution used in the present invention is:
The UDP message algorithm by load-balancing device homology chummage is realized, it is characterised in that step is as follows based on UDP feature critical word coupling:
Step 1: first enter load-balancing device with the UDP message of feature critical word MID, carry out Hash operation for key value to acl rule table with the IP five-tuple information of message, obtain the shunting group number that message belongs to, otherwise, dropping packets;
Step 2: carry out Hash operation as key value to MID learning table using the MID of message and shunting group number combination, obtain shunt group inode number index and the ip address of described message, and carry out step 4, otherwise, carry out step 3;
Step 3: shunt group interior joint adopts translocation sorting method, with the load weighted value of node for number of repetition, it is sized to order with the weighted value of node, is circulated from high to low and repeats sequence, this ensure that the node occurrence number that weight is high is many, the probability being hit is big; Combine as key value using the MID of message and shunting group number, wherein determine concrete shunt group tapping group number, with the least-significant byte of MID two byte cumulative sum for index, Hash operation is carried out to shunt group table, obtain call number index and the ip address of the high node of weight, and combine as key value using MID and the shunting group number of message, by corresponding node index and ip addition MID learning table, otherwise, dropping packets;
Step 4: carry out Hash operation for key value to MAC table with node i ndex, obtain mac address corresponding for node i p, and NAT conversion, the purpose ip of message and mac address are replaced to ip and the mac address of described node, go out the wrap mouth corresponding from node taps, otherwise, adjust back step 3, and delete message MID described in MID learning table and tap group number be combined as the index that key value is corresponding;
Step 5:MID conversation end, or MID session termination packet loss and beyond ageing time, delete the list item of MID learning table corresponding for MID, free system resources.
For optimizing technique scheme, the concrete measure taked also includes:
Load-balancing device distinguishes user conversation according to the MID of UDP message, it is ensured that the message that different front-end servers are sent, as long as MID is identical, all can be balanced to same back-end server.
The shunt group table used in step 3 is divided into 36 shunt group, corresponding 4096 indexes of each shunt group.
Shunt group table can adjust with translocation sorting method dynamically according to the loading condition of backend nodes, it is ensured that a new UDP session can tap from the node that weight is high.
The back-end server that load-balancing device node is corresponding, once break down, will be deleted the MID learning table list item corresponding with shunt group table, and started learning functionality, is newly balanced to by the stream gravity being originally balanced to this node on other node of same shunt group.
The structure of the UDP message algorithm by load-balancing device homology chummage is realized based on UDP feature critical word coupling, it is characterized in that comprising four hash algorithm tables, it is respectively as follows: acl rule table, MID learning table, shunt group table and MAC table, the shunt group that acl rule table belongs to based on IP five-tuple information searching incoming message, MID learning table based on No. MID and shunting group number search incoming message distribute bag mouth, new inlet flow message is balanced to the back-end server that load weight is high based on No. MID and shunting group number by shunt group table, MAC table searches node mac address based on node i p.
The algorithm of the present invention is made up of session equilibrating mechanism and conversation aging mechanism two parts, invention algorithm relates to four hash algorithm tables, including acl rule table, MID learning table, shunt group table and MAC table, the shunt group that invention acl rule table belongs to based on IP five-tuple information searching incoming message, invention MID learning table based on No. MID and shunting group number search incoming message distribute bag mouth, new inlet flow message is balanced to the back-end server that load weight is high based on No. MID and shunting group number by invention shunt group table, and invention MAC table searches node mac address based on node i p. The aging mechanism of homology chummage algorithm, when ensure that described MID conversation end or terminate packet loss, can free system resources, this algorithm can also adjust the node ordering of shunt group table dynamically according to the loading condition of back-end server, it is ensured that what transmit data balancing is assigned to back-end server. There is the problem of load imbalance in invention algorithm abandoning tradition keyword learning style, carries out hash computing according to the loading condition of node, give full play to the hardware computing capability of network processing unit, substantially increase operation stability and the high efficiency of SiteServer LBS.
Accompanying drawing explanation
Fig. 1 is the algorithm principle schematic diagram of the present invention.
Accompanying drawing therein is labeled as: PMC plane 1, acl rule table 2, plane 3, MID learning table 4, MAC table 5, shunt group table 6, go out to wrap mouth 7.
Detailed description of the invention
Below in conjunction with accompanying drawing, technical scheme is elaborated.
Shown in reference Fig. 1 of the present invention, realizing the algorithm flow of load-balancing device homology chummage based on UDP feature critical word, flow process is as follows:
Step 1: first enter bag with the UDP message of feature critical word MID by the PMC plane 1 of back card/back board, acl rule table 2 carries out Hash operation with the IP five-tuple information of message for key value, obtain the shunting group number that message belongs to, otherwise, by plane 3 dropping packets;
Step 2:MID learning table 4 extracts the MID of message and carries out Hash operation with shunting group number combination as key value, obtains shunt group inode number index and the ip address of message, and carries out step 4, otherwise, carries out step 3;
Step 3: shunt group table 6 is divided into 36 shunt group, corresponding 4096 indexes of each shunt group, shunt group interior joint adopts translocation sorting method, with the load weighted value of node for number of repetition, it is sized to order with the weighted value of node, being circulated from high to low and repeat sequence, this ensure that the node occurrence number that weight is high is many, the probability being hit is big; Combine as key value using the MID of message and shunting group number, wherein determine concrete shunt group tapping group number, with the least-significant byte of MID two byte cumulative sum for index, Hash operation is carried out to shunt group table 6, obtain call number index and the ip address of the high node of weight, and combine as key value using MID and the shunting group number of message, by corresponding node index and ip addition MID learning table 4, otherwise, by plane 3 dropping packets;
Step 4: carry out Hash operation for key value to MAC table 5 with node i ndex, obtain mac address corresponding for node i p, and carry out NAT conversion, the purpose ip of message and mac address are replaced to ip and the mac address of node, go out the wrap mouth 7 corresponding from node taps, otherwise, adjust back step 3, and delete in MID learning table 4 message MID and tap group number and be combined as the index that key value is corresponding;
Step 5:MID conversation end, or MID session termination packet loss and beyond ageing time, delete the list item of MID learning table 4 corresponding for MID, free system resources.
Load-balancing device distinguishes user conversation according to the MID of UDP message, it is ensured that the message that different front-end servers are sent, as long as MID is identical, all can be balanced to same back-end server.
Shunt group table 6 can adjust with translocation sorting method dynamically according to the loading condition of backend nodes, it is ensured that a new UDP session can tap from the node that weight is high.
The back-end server that load-balancing device node is corresponding, once break down, will be deleted the list item of MID learning table 4 and shunt group table 6 correspondence, start learning functionality, will newly be balanced to by the stream gravity being originally balanced to this node on other node of same shunt group.
Homology chummage algorithm comprises a set of aging mechanism, it is ensured that when MID conversation end or termination packet loss, it is possible to free system resources.
The Network Process Unit for network processes of the present invention is controlled module, Fabric exchange and Base exchange constituted by network processor module, TCAM module, Network Interface Module, CPU, provide the user data access flexibly, realize the functions such as bag process at a high speed, protocal analysis, route querying, convergence, MESSAGE EXCHANGE and QoS, module meets ATCA carrier class standard, it is adaptable to builds the algorithm based on UDP feature critical word homology chummage in SiteServer LBS highly reliable, high efficiency and realizes.
Above, it it is only presently preferred embodiments of the present invention, not the present invention is done any pro forma restriction, although the present invention is disclosed above with preferred embodiment, but it is not limited to the present invention, any those skilled in the art, without departing within the scope of technical solution of the present invention, when the technology contents of available the disclosure above makes a little change or is modified to the Equivalent embodiments of equivalent variations, in every case it is without departing from technical solution of the present invention content, technical spirit according to the present invention, within the spirit and principles in the present invention, the any simple amendment that above example is made, equivalent replacement and improvement etc., all still fall within the protection domain of technical solution of the present invention.

Claims (6)

1. realize the UDP message algorithm by load-balancing device homology chummage based on UDP feature critical word coupling, it is characterised in that step is as follows:
Step 1: first enter load-balancing device with the UDP message of feature critical word MID, carry out Hash operation for key value to acl rule table with the IP five-tuple information of message, obtain the shunting group number that message belongs to, otherwise, dropping packets;
Step 2: carry out Hash operation as key value to MID learning table using the MID of described message and shunting group number combination, obtain shunt group inode number index and the ip address of described message, and carry out step 4, otherwise, carry out step 3;
Step 3: shunt group interior joint adopts translocation sorting method, with the load weighted value of node for number of repetition, it is sized to order with the weighted value of node, is circulated from high to low and repeats sequence, this ensure that the node occurrence number that weight is high is many, the probability being hit is big; Combine as key value using the MID of described message and shunting group number, wherein determine concrete shunt group tapping group number, with the least-significant byte of MID two byte cumulative sum for index, Hash operation is carried out to shunt group table, obtain call number index and the ip address of the high node of weight, and combine as key value using MID and the shunting group number of described message, by corresponding node index and ip addition MID learning table, otherwise, dropping packets;
Step 4: carry out Hash operation for key value to MAC table with node i ndex, obtain mac address corresponding for node i p, and NAT conversion, the purpose ip of described message and mac address are replaced to ip and the mac address of described node, go out the wrap mouth corresponding from node taps, otherwise, adjust back step 3, and delete message MID described in MID learning table and tap group number be combined as the index that key value is corresponding;
Step 5:MID conversation end, or MID session termination packet loss and beyond ageing time, delete the list item of MID learning table corresponding for MID, free system resources.
2. according to claim 1 coupling based on UDP feature critical word, realizes the UDP message algorithm by load-balancing device homology chummage, it is characterized in that load-balancing device distinguishes user conversation according to the MID of UDP message, ensure that the message that different front-end server is sent, as long as MID is identical, same back-end server all can be balanced to.
3. according to claim 1 coupling based on UDP feature critical word, realizes the UDP message algorithm by load-balancing device homology chummage, it is characterised in that the shunt group table used in step 3 is divided into 36 shunt group, corresponding 4096 indexes of each shunt group.
4. according to claim 3 coupling based on UDP feature critical word, realizes the UDP message algorithm by load-balancing device homology chummage, it is characterized in that described shunt group table can adjust with translocation sorting method dynamically according to the loading condition of backend nodes, it is ensured that a new UDP session can tap from the node that weight is high.
5. according to claim 1 coupling based on UDP feature critical word, realizes the UDP message algorithm by load-balancing device homology chummage, it is characterized in that back-end server that described load-balancing device node is corresponding is once break down, the list item corresponding with shunt group table by deleting described MID learning table, and start learning functionality, the stream gravity being originally balanced to this node is newly balanced on other node of same shunt group.
6. the structure of the UDP message algorithm by load-balancing device homology chummage is realized based on UDP feature critical word coupling, it is characterized in that comprising four hash algorithm tables, it is respectively as follows: acl rule table, MID learning table, shunt group table and MAC table, the shunt group that described acl rule table belongs to based on IP five-tuple information searching incoming message, described MID learning table based on No. MID and shunting group number search incoming message distribute bag mouth, new inlet flow message is balanced to the back-end server that load weight is high based on No. MID and shunting group number by described shunt group table, described MAC table searches node mac address based on node i p.
CN201610050271.7A 2016-01-26 2016-01-26 Realize that UDP message passes through the method for the homologous chummage of load-balancing device Active CN105657025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610050271.7A CN105657025B (en) 2016-01-26 2016-01-26 Realize that UDP message passes through the method for the homologous chummage of load-balancing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610050271.7A CN105657025B (en) 2016-01-26 2016-01-26 Realize that UDP message passes through the method for the homologous chummage of load-balancing device

Publications (2)

Publication Number Publication Date
CN105657025A true CN105657025A (en) 2016-06-08
CN105657025B CN105657025B (en) 2019-03-08

Family

ID=56487905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610050271.7A Active CN105657025B (en) 2016-01-26 2016-01-26 Realize that UDP message passes through the method for the homologous chummage of load-balancing device

Country Status (1)

Country Link
CN (1) CN105657025B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106961393A (en) * 2017-03-06 2017-07-18 北京安博通科技股份有限公司 The detection method and device of UDP messages in BlueDrama
CN109818997A (en) * 2017-11-21 2019-05-28 中兴通讯股份有限公司 A kind of load-balancing method, system and storage medium
CN112187905A (en) * 2020-09-22 2021-01-05 烽火通信科技股份有限公司 Load balancing interface table maintenance method, equipment and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043428A (en) * 2006-05-30 2007-09-26 华为技术有限公司 Routing retransmitting method and system
US20110277022A1 (en) * 2010-05-06 2011-11-10 Jonathan Weizman Apparatus and Method for Establishing a Peer-to-Peer Communication Session with a Host Device
CN103188231A (en) * 2011-12-30 2013-07-03 北京锐安科技有限公司 Multi-core printed circuit board access control list (ACL) rule matching method
CN104135481A (en) * 2014-08-06 2014-11-05 汉柏科技有限公司 System and method for multi-device self-service cooperation processing of messages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043428A (en) * 2006-05-30 2007-09-26 华为技术有限公司 Routing retransmitting method and system
US20110277022A1 (en) * 2010-05-06 2011-11-10 Jonathan Weizman Apparatus and Method for Establishing a Peer-to-Peer Communication Session with a Host Device
CN103188231A (en) * 2011-12-30 2013-07-03 北京锐安科技有限公司 Multi-core printed circuit board access control list (ACL) rule matching method
CN104135481A (en) * 2014-08-06 2014-11-05 汉柏科技有限公司 System and method for multi-device self-service cooperation processing of messages

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106961393A (en) * 2017-03-06 2017-07-18 北京安博通科技股份有限公司 The detection method and device of UDP messages in BlueDrama
CN106961393B (en) * 2017-03-06 2020-11-27 北京安博通科技股份有限公司 Detection method and device for UDP (user Datagram protocol) message in network session
CN109818997A (en) * 2017-11-21 2019-05-28 中兴通讯股份有限公司 A kind of load-balancing method, system and storage medium
CN112187905A (en) * 2020-09-22 2021-01-05 烽火通信科技股份有限公司 Load balancing interface table maintenance method, equipment and system

Also Published As

Publication number Publication date
CN105657025B (en) 2019-03-08

Similar Documents

Publication Publication Date Title
US9485183B2 (en) System and method for efectuating packet distribution among servers in a network
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
CN104823416B (en) The device and method for realizing the message sequence in the software defined network of OpenFlow
CN112965824B (en) Message forwarding method and device, storage medium and electronic equipment
US10375193B2 (en) Source IP address transparency systems and methods
EP2940949B1 (en) Method and device for packet handling
US11233737B2 (en) Stateless distributed load-balancing
TWI635726B (en) Heavy network flow detection method and software-defined networking switch
Wang et al. Implementation of multipath network virtualization with SDN and NFV
US11171870B2 (en) Communication failover and load balancing method
CN106506700A (en) A kind of transparent proxy method of load equalizer and SiteServer LBS
WO2022127475A1 (en) Data transmission method and apparatus, electronic device, and storage medium
US11646976B2 (en) Establishment of fast forwarding table
US20150052575A1 (en) Steering Traffic Among Multiple Network Services Using a Centralized Dispatcher
CN105657025A (en) Homologous homoclinic algorithm for realizing passing UDP message through load balancing device based on UDP characteristic keyword matching and structure thereof
CN106453091B (en) The equivalent route management method and device of router Forwarding plane
Detti et al. A cluster-based scalable router for information centric networks
CN107948087A (en) A kind of method and apparatus of load balancing
CN104052679B (en) The load-balancing method of network traffics and device
CN110099115A (en) A kind of load-balancing method and system of transparent scheduling forwarding
Ha et al. Efficient flow table management scheme in SDN-based cloud computing networks
CN101478480B (en) Method and apparatus for implementing load balance
CN102255816A (en) Method and device for load sharing
CN101599910A (en) The method and apparatus that message sends
US9667540B2 (en) Fiber channel over ethernet (FCoE) frame forwarding system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant