CN108667730A - Message forwarding method, device, storage medium based on load balancing and equipment - Google Patents
Message forwarding method, device, storage medium based on load balancing and equipment Download PDFInfo
- Publication number
- CN108667730A CN108667730A CN201810344312.2A CN201810344312A CN108667730A CN 108667730 A CN108667730 A CN 108667730A CN 201810344312 A CN201810344312 A CN 201810344312A CN 108667730 A CN108667730 A CN 108667730A
- Authority
- CN
- China
- Prior art keywords
- core
- forwarding
- clear text
- session
- target
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/302—Route determination based on requested QoS
- H04L45/306—Route determination based on the nature of the carried application
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/7453—Address table lookup; Address filtering using hashing
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
Abstract
This disclosure relates to which a kind of message forwarding method, device, storage medium and equipment based on load balancing, this method include:When receiving clear text, it whether there is the corresponding session entry of the clear text according to being inquired in Hash conversational list from the payload information parsed in the clear text;When there is no the session entry, determined in multiple forwarding core for forwarding the target of the clear text to forward core according to the load balancing state of multiple forwarding core;Core is forwarded to create the corresponding session entry of the clear text according to the payload information by the target;Based on the session entry, forward core that the clear text is forwarded processing by the target.It can realize that resource during message forward process of each forwarding core is independent, to make the throughput performance of the lower seven layers of SiteServer LBS of multinuclear increase with the increase of check figure.
Description
Technical field
This disclosure relates to network communication technology field, and in particular, to a kind of message forwarding method based on load balancing,
Device, storage medium and equipment.
Background technology
With the rapid development of Internet, the flow of major website also have it is swift and violent be skyrocketed through, load-balancing technique
One of the most important technology being increasingly becoming in the network information security, load-balancing device also just becomes large-scale application network
Core necessary equipment.SiteServer LBS carries out equilibrium assignment so that it can share multiple for that will load (task)
(such as web server, ftp server etc.) is executed on unit or system, realizes that multiple servers complete task jointly
Purpose.Current main load-balancing technique includes seven layers of load balancing and four-layer load-equalizing.Wherein, seven layers of load are equal
Weighing apparatus, also known as " content exchange ", refer to that load-balancing device passes through the application layer message (URL (Uniform in message
Resource Locator, uniform resource locator) and HTTP (HyperText Transfer Protocol, hypertext biography
Defeated agreement) information such as head) and load-balancing algorithm, select purpose internal server;Four-layer load-equalizing is by message
Target ip address and port load equalizing algorithm, choose final destination server.
Currently, seven layers of load-balancing technique carry out load balancing according to the content of message, relative to only according to IP address and
For port carries out the four-layer load-equalizing technology of load balancing, seven layers of load-balancing technique are loaded according to the content of message
Equilibrium, it is more intelligent, it may have higher flexibility.But message identification is carried out according to content and needs load balancing service
Device could select server to do three-way handshake after extracting message content, therefore the server of seven layers of load-balancing technique of application exists
It needs to increase agent functionality when realization, this has resulted in the consumption of performance.Also, seven layers of load-balanced server need to extract every
Item connects the content of message to analyze, this process also results in the increase of load, causes certain performance consumption.
Invention content
Purpose of this disclosure is to provide a kind of message forwarding method, device, storage medium and equipment based on load balancing,
To solve the problems, such as that seven layers of SiteServer LBS performance consumption are big.
To achieve the goals above, according to the first aspect of the embodiments of the present disclosure, a kind of report based on load balancing is provided
Literary retransmission method is applied to include the gateway device of multiple forwarding cores, the method includes:
When receiving clear text, breathed out according to the payload information parsed from the clear text
Inquiry whether there is the corresponding session entry of the clear text in uncommon conversational list;
When there is no the session entry, according to the load balancing state of the multiple forwarding core in the multiple forwarding
It is determined in core for forwarding the target of the clear text to forward core;
Core is forwarded to create the corresponding conversational list of the clear text according to the payload information by the target
;
Based on the session entry, the clear text is checked by target forwarding and is forwarded processing.
Optionally, described when receiving clear text, it is effective according to what is parsed from the clear text
Load information is inquired in Hash conversational list whether there is the corresponding session entry of the clear text, including:
It is described for receiving when at least one of described gateway device forwarding core receives the clear text
Each of clear text forwards core, by inquiring in the session Hash table with the presence or absence of corresponding with the clear text
Key assignments and session status determine whether there is the corresponding session entry of the clear text;
When the corresponding key assignments of the clear text and session status are not present in the session Hash table, determination is not deposited
In session entry corresponding with the clear text;
When there are when the corresponding key assignments of the clear text and session status, determined in the session Hash table exist with
The corresponding session entry of the clear text;
Wherein, the session Hash table be arranged to allow the multiple forwarding core without resource lock simultaneously
The session Hash table of inquiry.
Optionally, the clear text is the message of left direction, and the left direction is from client to server end
Direction, described when there is no the session entry, according to the load balancing state of the multiple forwarding core the multiple
It is determined in forwarding core for before forwarding the target of the clear text to forward core, the method to further include:
For each forwarding core for receiving the clear text, based on the client with the transmission clear text
Between three-way handshake the corresponding left direction session key of the clear text is linked into the Hash conversational list;
According to the three-way handshake as a result, determining whether the session status of the left direction session key is to be successfully established;
When it is to be successfully established to determine the session status of the left direction session key, according to the institute in the clear text
Payload information and preset matching connection strategy are stated, determines the destination server of the clear text.
Optionally, described to be based on the session entry, forward core to be turned the clear text by the target
Hair processing, including:
The corresponding right direction session key of the clear text is linked into the session Hash table;Wherein, right direction be from
Server end is to the direction of client;
After target forwarding core carries out three-way handshake with the destination server, the clear text is forwarded to
The destination server.
Optionally, the load balancing state according to the multiple forwarding core is determined for forwarding the clear text
The target forward core, including:
It determines and whether is in load balancing state between the multiple forwarding core;
When being in load balancing state between determining the multiple forwarding core, the clear text will be currently received
Forwarding core as the target forward core;Alternatively,
It, will be the multiple when determining that at least one of the multiple forwarding core forwarding core is in load imbalance state
Minimum forwarding core, which is loaded, in forwarding core forwards core as the target.
Optionally, described to forward core to create the clear text pair according to the payload information by the target
The session entry answered, including:
When target forwarding core receives the forwarding core of the clear text for described in, described in described receive
The session entry is created in the forwarding core of clear text;
The session status of left direction session key corresponding with the clear text is changed in the Hash conversational list
It is had been established for load balancing;Alternatively,
When target forwarding core is the minimum forwarding core of the load, by the session status of the left direction session key
Load balancing is set as to wait establishing;
The clear text is fallen core to the target from the forwarding core for receiving the clear text to forward
Core;
The session entry is created in the target forwards core;
The session status of left direction session key corresponding with the clear text is changed in the Hash conversational list
It is had been established for load balancing.
Optionally, it is described according to the three-way handshake as a result, determine the left direction session key session status whether
To be successfully established, including:
When target forwarding core does not receive the ACK message that the client is replied in preset time, three are confirmed
It is secondary to shake hands not successfully;
Delete the left direction session key in the session Hash table;Alternatively,
When target forwarding core receives the ACK message that the client is replied in the preset time,
Confirm three-way handshake success;
Determine that the session status of the left direction session key is to be successfully established.
Optionally, described after target forwarding core carries out three-way handshake with the destination server, it waits locating by described
Reason message is forwarded to the destination server, including:
Core is forwarded to send SYN message to the destination server by the target;
The SYN-ACK synchronous response message that the destination server is replied is received by the first forwarding core, described first turn
Hair core is the forwarding core of the message for receiving right direction in the multiple forwarding core;
By the SYN-ACK message from it is described first forwarding core fall core to the target forward core;
Forward core to reply ACK message to the destination server by the target, with complete target forwarding core with
Three-way handshake between the destination server;
Forward core that the clear text is forwarded to the destination server by the target.
Optionally, the method further includes:
When there are the session entry, determine whether the clear text triggers in the session entry first
The variation of session status on direction, the first direction are the sending direction of the message received;
According to the situation of change of the session status in the session entry in said first direction, it is determined whether to described
Clear text carries out the practical forwarding core of the processing of falling core in said first direction with the determination clear text;
The clear text, which is checked, by the practical forwarding is forwarded processing.
Optionally, the situation of change according to the session status in the session entry in said first direction, really
It is fixed whether the reality of the processing of falling core in said first direction with the determination clear text to be carried out to the clear text
Core is forwarded, including:
When determining when not changing of the session status in the session entry in said first direction, without institute
The processing of falling core is stated, the forwarding core for receiving the clear text is determined as the practical forwarding core;Alternatively,
When determining when changing of the session status in the session entry in said first direction, wait locating by described
Reason message falls the forwarding core where core to the session entry;
Forwarding core where the session entry is checked into the session entry as the practical forwarding and is updated place
Reason.
According to the second aspect of the embodiment of the present disclosure, a kind of apparatus for forwarding message based on load balancing is provided, is applied to
Include the gateway device of multiple forwarding cores, described device includes:
List item enquiry module, for when receiving clear text, being obtained according to being parsed from the clear text
Payload information inquired in Hash conversational list whether there is the corresponding session entry of the clear text;
Core determining module is forwarded, for when there is no the session entry, the load according to the multiple forwarding core to be equal
Weighing apparatus state determines in the multiple forwarding core for forwarding the target of the clear text to forward core;
List item creation module, for forwarding core described pending according to payload information establishment by the target
The corresponding session entry of message;
First packet forwarding module, it is described pending by target forwarding verification for being based on the session entry
Message is forwarded processing.
Optionally, the list item enquiry module, including:
List item inquires submodule, and the pending report is received for working as at least one of described gateway device forwarding core
Wen Shi forwards core for receiving each of described clear text, by inquire in the session Hash table with the presence or absence of with
The corresponding key assignments of the clear text and session status determine whether there is the corresponding session entry of the clear text;
List item determination sub-module, in the session Hash table there is no the corresponding key assignments of the clear text and
When session status, determines and session entry corresponding with the clear text is not present;Or
When there are when the corresponding key assignments of the clear text and session status, determined in the session Hash table exist with
The corresponding session entry of the clear text;
Wherein, the session Hash table be arranged to allow the multiple forwarding core without resource lock simultaneously
The session Hash table of inquiry.
Optionally, the clear text is the message of left direction, and the left direction is from client to server end
Direction, described device further include:
Session key generation module, for for each forwarding core for receiving the clear text, being based on and sending institute
State three-way handshake between the client of clear text the corresponding left direction session key of the clear text is linked into it is described
Hash conversational list;
State determining module is used for according to the three-way handshake as a result, determining the session shape of the left direction session key
Whether state is to be successfully established;
Server determining module, when for being successfully established when the session status for determining the left direction session key, according to
The payload information in the clear text and preset matching connection strategy, determine the clear text
Destination server.
Optionally, first packet forwarding module, including:
Session key generates submodule, is breathed out for the corresponding right direction session key of the clear text to be linked into the session
Uncommon table;Wherein, right direction is the direction from server end to client;
Message forwards submodule, is used for after target forwarding core carries out three-way handshake with the destination server, will
The clear text is forwarded to the destination server.
Optionally, the forwarding core determining module, including:
Whether load balancing determination sub-module is in load balancing state between the multiple forwarding core for determining;
First forwarding core determination sub-module, when for being in load balancing state between determining the multiple forwarding core,
The forwarding core for being currently received the clear text is forwarded into core as the target;Alternatively,
It, will be the multiple when determining that at least one of the multiple forwarding core forwarding core is in load imbalance state
Minimum forwarding core, which is loaded, in forwarding core forwards core as the target.
Optionally, the list item creation module, is used for:
When target forwarding core receives the forwarding core of the clear text for described in, described in described receive
The session entry is created in the forwarding core of clear text;
The session status of left direction session key corresponding with the clear text is changed in the Hash conversational list
It is had been established for load balancing;Alternatively,
When target forwarding core is the minimum forwarding core of the load, by the session status of the left direction session key
Load balancing is set as to wait establishing;
The clear text is fallen core to the target from the forwarding core for receiving the clear text to forward
Core;
The session entry is created in the target forwards core;
The session status of left direction session key corresponding with the clear text is changed in the Hash conversational list
It is had been established for load balancing.
Optionally, the state determining module, is used for:
When target forwarding core does not receive the ACK message that the client is replied in preset time, three are confirmed
It is secondary to shake hands not successfully;
Delete the left direction session key in the session Hash table;Alternatively,
When target forwarding core receives the ACK message that the client is replied in the preset time,
Confirm three-way handshake success;
Determine that the session status of the left direction session key is to be successfully established.
Optionally, the message forwards submodule, is used for:
Core is forwarded to send SYN message to the destination server by the target;
The SYN-ACK synchronous response message that the destination server is replied is received by the first forwarding core, described first turn
Hair core is the forwarding core of the message for receiving right direction in the multiple forwarding core;
By the SYN-ACK message from it is described first forwarding core fall core to the target forward core;
Forward core to reply ACK message to the destination server by the target, with complete target forwarding core with
Three-way handshake between the destination server;
Forward core that the clear text is forwarded to the destination server by the target.
Optionally, described device further includes:
State monitoring module, for when there are the session entry, determining whether the clear text triggers institute
The variation of the session status in session entry in a first direction is stated, the first direction is the transmission of the message received
Direction;
The determining module of falling core, for the variation feelings according to the session status in the session entry in said first direction
Condition, it is determined whether the processing of falling core is carried out with the determination clear text in said first direction to the clear text
Practical forwarding core;
Second packet forwarding module is forwarded processing for passing through the practical forwarding verification clear text.
Optionally, the determining module of falling core, including:
Second forwarding core determination sub-module, for when the session shape in the determining session entry in said first direction
The forwarding core for receiving the clear text is determined as described by when not changing of state without the processing of falling core
Practical forwarding core;Alternatively,
The message module of falling nucleon, for when the hair for determining the session status in the session entry in said first direction
When changing, the forwarding core that the clear text is fallen where core to the session entry;
Entry updating submodule, for using the forwarding core where the session entry as described in the practical forwarding verification
Session entry is updated processing.
According to the third aspect of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, is stored thereon with calculating
Machine program realizes the message forwarding method based on load balancing that first aspect provides when the computer program is executed by processor
The step of.
According to the fourth aspect of the embodiment of the present disclosure, a kind of electronic equipment is provided, including:The computer that the third aspect provides
Readable storage medium storing program for executing;And one or more processors, for executing the computer journey in the computer readable storage medium
Sequence.
Through the above technical solutions, the disclosure can be when receiving clear text, according to from the clear text
It parses obtained payload information and is inquired in Hash conversational list and whether there is the corresponding session entry of the clear text;When
There is no when the session entry, determined in multiple forwarding core for forwarding according to the load balancing state of multiple forwarding core
The target of the clear text forwards core;Core is forwarded to create the clear text pair according to the payload information by the target
The session entry answered;Based on the session entry, forward core that the clear text is forwarded processing by the target.It can be real
Now each resource during message forward process of forwarding core is independent, to make gulping down for the lower seven layers of SiteServer LBS of multinuclear
Performance is spat with the increase of check figure to increase.
Other feature and advantage of the disclosure will be described in detail in subsequent specific embodiment part.
Description of the drawings
Attached drawing is for providing further understanding of the disclosure, and a part for constitution instruction, with following tool
Body embodiment is used to explain the disclosure together, but does not constitute the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is a kind of flow chart of message forwarding method based on load balancing shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart for the session entry querying method for implementing to exemplify according to Fig. 1;
Fig. 3 is the flow chart for another message forwarding method based on load balancing for implementing to exemplify according to Fig. 1;
Fig. 4 is a kind of flow chart for the message forwarding method for implementing to exemplify according to Fig. 1;
Fig. 5 is the flow chart that a kind of forwarding core for implementing to exemplify according to Fig. 1 determines method;
Fig. 6 is the flow chart for another message forwarding method based on load balancing for implementing to exemplify according to Fig.3,;
Fig. 7 is the flow chart for another message forwarding method based on load balancing for implementing to exemplify according to Fig.6,;
Fig. 8 is a kind of block diagram of apparatus for forwarding message based on load balancing shown according to an exemplary embodiment;
Fig. 9 is a kind of block diagram for the list item enquiry module for implementing to exemplify according to Fig.8,;
Figure 10 is the block diagram for another apparatus for forwarding message based on load balancing for implementing to exemplify according to Fig.8,;
Figure 11 is a kind of block diagram for first packet forwarding module for implementing to exemplify according to Fig.8,;
Figure 12 is a kind of block diagram for the forwarding core determining module for implementing to exemplify according to Fig.8,;
Figure 13 is the block diagram for another apparatus for forwarding message based on load balancing for implementing to exemplify according to Fig.10,;
Figure 14 is the block diagram according to apparatus for forwarding message of another shown in embodiment illustrated in fig. 13 based on load balancing;
Figure 15 is the block diagram according to a kind of electronic equipment shown in an exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of message forwarding method based on load balancing shown according to an exemplary embodiment,
Applied to the gateway device for including multiple forwarding cores, as shown in Figure 1, this method includes:
Step 101, when receiving clear text, believed according to the payload parsed from the clear text
Breath inquiry in Hash conversational list whether there is the corresponding session entry of the clear text.
Wherein, which is arranged to allow multiple forwarding core without resource lock while inquire
Session Hash table.The session Hash table is global table, for recording the corresponding meeting of each message received in the form of key assignments
Address where words involved forwarding core and conversational list.It should be noted that since the session Hash table supports the overall situation
It is inquired without lock, therefore multiple forwarding cores is supported to inquire simultaneously the session Hash table, but (added from gauge outfit being added
Add) and when delete operation still take locking protection (addition and delete operation that can be regarded as to limit hash table only allow
The forwarding core of the hash table is created to execute), to ensure multinuclear is concurrently inquired under the conditions of multinuclear is concurrent efficiency and new
It builds and safe operation when deletion hash table.The hash table is contained in above-mentioned session Hash table, the tool of the hash table
Hold in vivo to pass through the calculated session entry of hash algorithm according to the session entry content in the corresponding conversational list of message
Corresponding key assignments.In addition, since the operation of inquiry session Hash table is no lock, and the conversational list conduct that each forwarding core is own
The independent resource of each forwarding core, therefore it is no lock that the forwarding of each forwarding verification message, which operates in entire repeating process,.
Illustratively, it when at least one client sends message, is checked first by any forwarding in multiple forwarding core
The message is received, and it can be multiple CPU (Central Processing in the gateway device that border is verified in multiple forwarding
Unit, central processing unit) chip.
The present embodiment by by a message from the process that client is forwarded to corresponding server for, to the disclosure provide
The message forwarding method based on load balancing illustrate:
Illustratively, when gateway device receives the clear text of client transmission, first by forwarding core according to this
The message content of message inquires session Hash table, determines and whether there is the corresponding conversational list of the clear text in the gateway device
, wherein the forwarding core be gateway device be based on default allocation strategy and conversation direction (in the present embodiment will from client to
The direction of server end is known as left direction, and the direction from server end to client is known as right direction, and that receive at this time is visitor
Family end send message, then at this time be left direction) selection for receive the clear text target forward core.When determination is deposited
In the session entry, according to the direction of the clear text and session status, determination is directly to be carried out to the clear text
Forwarding or needs are forwarded again after carrying out the processing of falling core to the clear text;Alternatively, session entry is not present when determining
When, it needs to create the clear text pair after target forwarding core terminates three-way handshake with the client in the following steps 103
The session entry answered, then after target forwarding core establishes three-way handshake with the server, based on per the independent conversational list of core, realize
The message forwarding without lock of multi-core parallel concurrent.
Wherein, which can be comprising multiple forwarding cores and the network of seven layers of load balancing to be supported to prevent fires
Wall.Connection between client and server is known as a session, and it is equal that the session connection in the present embodiment is based on this seven layers load
Weighing apparatus strategy is completed.Wherein, the connection from client to server is known as left direction session, and connection from server to client claims
For right direction session.Every session corresponds to a conversational list, and a conversational list is answered in each forwarding verification, and only establishes the meeting
The forwarding core of words table can be added to the session entry in the conversational list and delete operation.Comprising in three parts in conversational list
Hold, respectively common info (public information) content, left info (left direction information) contents and right info are (right
Directional information) content, wherein Common info contents include:Whether the matching strategy of session, session are in lasting
(persistent) state, message forwarding relevant information (such as MAC (Medium Access Control, media access control)
Location etc.), agency real server between delta (increment) differences and each direction caching message etc. to be sent;
Left info contents and right info contents respectively include the session status on respective direction.The session status is by state machine
It is recorded, for reflecting the connection of the session in different directions.The session entry can be understood as pending at this
The particular content of the content of three parts as described above write-in in the corresponding conversational list of message.
Step 102, when there is no the session entry, according to the load balancing state of multiple forwarding core at multiple turn
It is determined in hair core for forwarding the target of the clear text to forward core.
Illustratively, when there is no the loads when session entry, needed according to all forwarding cores in the gateway device for determination
Equilibrium state selects a forwarding core appropriate, i.e., the target forwards core, and forwards core completion subsequent to report by the target
Forwarding and session entry the addition processing of text ensure multiple forwarding core to realize the load balancing between multiple forwarding cores
Each of forwarding core task amount to be dealt be balanced.It should be noted that target forwarding core is received with above-mentioned
The forwarding core of the clear text can be same forwarding core or different forwarding cores.
Step 103, core is forwarded to create the corresponding session of the clear text according to the payload information by the target
List item.
Illustratively, since seven layers of load-balancing technique are realized based on agent functionality, it is forwarded in general message
Cheng Zhong, client carry out three-way handshake firstly the need of with forwarding core, then by forwarding core according to the current payload information of message
Destination server appropriate is selected with matching strategy, is forwarded the packet later to selected destination server by the forwarding core.
On the basis of this process, client firstly the need of with receive clear text forwarding core and carry out three-way handshake, while also needing
The corresponding session key of the clear text of generation is linked into Hash conversational list, destination server appropriate then is being determined
Afterwards, using the target forwarding core selected in step 102 corresponding session entry is created for the clear text, it can be understood as
Session entry is added in the corresponding conversational list of session where the clear text.In addition, due in above-mentioned three-way handshake, and
During determining that target forwards core, and establishment session entry by the load balancing between multiple forwarding cores, this is pending
The corresponding session status of message can change, it is therefore desirable to carry out whole record and more to the session status of the session key
Newly.
Step 104, it is based on the session entry, forwards the verification clear text to be forwarded processing by the target.
Illustratively, the corresponding embodiment of above-mentioned steps 101 to 104 from client by a message to be forwarded to corresponding clothes
It is engaged in for the repeating process of device, the message forwarding method based on load balancing provided the disclosure illustrates.Optionally, when
When needing a message being forwarded to corresponding client from server, method similar to the above embodiments may be used to report
Text is forwarded:When gateway device receives the message of server transmission, first by forwarding core according to the message of the message
Content search session Hash table determines and whether there is the corresponding session entry of the message in the gateway device, wherein the forwarding core
It is based on default allocation strategy and turn for receiving the message of conversation direction (being herein right direction) selection for gateway device
Send out core.When determining there are when the session entry, according to the direction of the message and session status, determination is directly to be carried out to the message
Forwarding or needs are forwarded again after carrying out the processing of falling core to the message;Alternatively, when determining there is no when session entry, need
In above-mentioned steps 103 after the forwarding core for receiving the clear text terminates three-way handshake with the server, according to more
The corresponding session entry of the message is created in the target forwarding core of the load balancing state selection of a forwarding core, then is turned in the target
After hair core and the client establish three-way handshake, based on each forwarding independent conversational list of core, realize multinuclear in right direction simultaneously
The capable message forwarding without lock.
In conclusion the disclosure can be obtained when receiving clear text according to being parsed from the clear text
Payload information inquired in Hash conversational list whether there is the corresponding session entry of the clear text;When there is no this
When session entry, determined in multiple forwarding core for forwarding this pending according to the load balancing state of multiple forwarding core
The target of message forwards core;Core is forwarded to create the corresponding session of the clear text according to the payload information by the target
List item;Based on the session entry, forward core that the clear text is forwarded processing by the target.It can realize each turn
Resource during message forward process for sending out core is independent, to make the throughput performance of the lower seven layers of SiteServer LBS of multinuclear with
It the increase of check figure and increases.
Fig. 2 is a kind of flow chart for the session entry querying method for implementing to exemplify according to Fig. 1, wherein such as Fig. 2 institutes
Show, above-mentioned steps 101 may include:
Step 1011, when at least one of gateway device forwarding core receives the clear text, for receiving
To each of clear text forwarding core, by inquiring in the session Hash table with the presence or absence of corresponding with the clear text
Key assignments and session status determine whether there is the corresponding session entry of the clear text.
Step 1012, when the corresponding key assignments of the clear text and session status are not present in the session Hash table, really
It is fixed that session entry corresponding with the clear text is not present.
Step 1013, when there are when the corresponding key assignments of the clear text and session status, being determined in the session Hash table
In the presence of session entry corresponding with the clear text.
Fig. 3 is the flow chart for another message forwarding method based on load balancing for implementing to exemplify according to Fig. 1,
Wherein, it as shown in figure 3, when determining there is no when session entry corresponding with the clear text, before above-mentioned steps 102, is somebody's turn to do
Method may include:
Step 105, for each forwarding core for receiving the clear text, based on the visitor that sends the clear text
The corresponding left direction session key of the clear text is linked into the Hash conversational list by the three-way handshake between the end of family.
Illustratively, when in the three-way handshake that the forwarding core for receiving the clear text receives client transmission
When SYN (synchronous, synchronous) message, corresponding session entry is not established at once, but to receive this pending by this
The forwarding core of message first replys SYN-ACK (Synchronize-Acknowledgement, synchronization-response) message to client,
And the corresponding session key of the clear text is calculated (since the sending direction of message is a left side according to the content of the clear text
Direction, so the session key is left direction session key), while the left direction session key being linked into global Hash table, and will
Speech phase is denoted as SYN-ACK (synchronization-response).Wherein, the calculating process of the left direction session key includes:It should according to what is got
The address of session entry determines the left info in the session entry, is calculated further according to the left info and hash algorithm
The corresponding key assignments of left info (i.e. left direction session key).
Step 106, according to the three-way handshake as a result, determining whether the session status of the left direction session key is to be created as
Work(.
Illustratively, which may include:ACK is replied to client by overtime list item first
The time of (Acknowledgement, response) message is recorded and is judged, when this receives the forwarding core of the clear text
When not receiving the ACK message of client reply in preset time, confirm that three-way handshake is failed, and this is received
The failed quantity of forwarding core three-way handshake of the clear text adds one;When determining that three-way handshake is failed, the meeting is deleted
Talk about Hash table in the left direction session key, and keep this receive the current three-way handshake of forwarding core of the clear text not at
The quantity of work(is constant;Alternatively, when the forwarding core for receiving the clear text receives the client in the preset time
When the ACK message replied, three-way handshake success is confirmed;When determining three-way handshake success, the left direction session key is determined
Session status is to be successfully established and (show that three-way handshake is successfully established), and this is received to the forwarding core three of the clear text
Secondary failed quantity of shaking hands subtracts one.In this way, when server meets with the ssyn attack of flood rank, it can be to avoid excessive useless
Or malice SYN message occupy high-volume conversation key mapping cause memory consumption excessive.Furthermore it is also possible to for three-way handshake success
Session be added timer be further reduced memory consumption to ensure that the session key is automatically deleted after a certain time.
Step 107, when it is to be successfully established to determine the session status of the left direction session key, according in the clear text
The payload information and preset matching connection strategy, determine the destination server of the clear text.
Wherein, which is contained in the clear text, which can be URL
(Uniform Resource Locator, uniform resource locator) and HTTP (HyperText Transfer
Protocol, hypertext transfer protocol) information such as head, which is used to combine above-mentioned payload information, really
The fixed and matched destination server of the clear text.
Further, based on the step 105 to 107, above-mentioned steps 103 may include:When target forwarding core connects for this
When receiving the forwarding core of the clear text, the session entry is created in the forwarding core for receiving the clear text, and
The session status of left direction session key corresponding with the clear text (is created as by three-way handshake in the Hash conversational list
Work() it is revised as load balancing and has been established;Alternatively, when target forwarding core is the forwarding core of load minimum, by the left direction
The session state setting of session key is that load balancing waits establishing (being originally used for three-way handshake to be successfully established);By the clear text from
The forwarding core for receiving the clear text fall core to the target forward core;The conversational list is created in the target forwards core
, and in the Hash conversational list by the session status of left direction session key corresponding with the clear text (by load balancing
Wait establishing) it is revised as load balancing and has been established.
Fig. 4 is a kind of flow chart for the message forwarding method for implementing to exemplify according to Fig. 1, as shown in figure 4, above-mentioned step
Rapid 104 may include:
Step 1041, the corresponding right direction session key of the clear text is linked into the session Hash table.
Wherein, right direction is the direction from server end to client.Before carrying out the following steps 1042, basis is needed
The address of the session entry got determines the right info in the session entry, so according to the right info and
Hash algorithm calculates the corresponding key assignments of right info (i.e. right direction session key), then the right direction session key is linked into this
Global Hash table.That is, right direction session key needs to be calculated and be linked into the session Hash table in advance, in case in subsequent forwarding
It is used in the three-way handshake process of core and server.
Step 1042, after target forwarding core carries out three-way handshake with the destination server, which is turned
It is sent to the destination server.
Illustratively, which may include:Core is forwarded to send SYN message to the destination server by the target;
The SYN-ACK synchronous response message of destination server reply is received by the first forwarding core;By the SYN-ACK message from this
One forwarding core fall core to the target forward core;Core is forwarded to reply ACK message to the destination server by the target, to complete to be somebody's turn to do
Target forwards the three-way handshake between core and the destination server;Forward core that the clear text is forwarded to this by the target
Destination server.It should be noted that the first forwarding core is turn of the message in multiple forwarding core for receiving right direction
Core is sent out, also, during forwarding core to carry out three-way handshake with server, the SYN-ACK message that destination server is replied is first
It is first received by the first forwarding core, then the SYN-ACK message transmissions to target is forwarded into core by the first forwarding core, turned by target
It sends out core and carries out subsequent processing.Wherein, which is that gateway device is based on preset allocation strategy and conversation direction
(being herein right direction) selection, forwarding core for receiving the SYN-ACK message.
Fig. 5 is the flow chart that a kind of forwarding core for implementing to exemplify according to Fig. 1 determines method, as shown in figure 5, above-mentioned
Step 102 may include:
Step 1021, it determines and whether is in load balancing state between multiple forwarding core.
Step 1022, when being in load balancing state between determining multiple forwarding core, this will be currently received and wait locating
The forwarding core for managing message forwards core as the target.
It step 1023, will when determining that at least one of multiple forwarding core forwarding core is in load imbalance state
Minimum forwarding core is loaded in multiple forwarding core forwards core as the target.
Fig. 6 is the flow chart for another message forwarding method based on load balancing for implementing to exemplify according to Fig.3,
As shown in fig. 6, when determining that method shown in Fig. 3 can also include when there is session entry corresponding with above-mentioned clear text:
Step 108, determine whether the clear text triggers the session status in the session entry in a first direction
Variation.
Wherein, which is the sending direction of the message received, since the step 108 is undertaken in above-mentioned steps
101, therefore in the present embodiment, which is left direction.It should be noted that when the sending direction of message is right direction
When, i.e., when the message is the message that server is replied to client, it can in most cases determine that there are the message is corresponding
Session entry, at this point, the step 108 and the following steps 109 and 110 equally applicable.
Step 109, according to the situation of change of the session status in the session entry in the first direction, it is determined whether right
The clear text carries out the processing of falling core to determine the practical forwarding core of the clear text in the first direction.
Illustratively, it needs to detect the session status in the session entry in a first direction and whether changes and (send out herein
The situation for changing is triggered by the arrival of message), it is to directly proceed with the following steps 110 to the clear text with determination
It is forwarded, it is desired nonetheless to could carry out step 110 after carrying out the processing of falling core to the clear text.
Step 110, which is checked by the practical forwarding and is forwarded processing.
Fig. 7 is the flow chart for another message forwarding method based on load balancing for implementing to exemplify according to Fig.6,
As shown in fig. 7, above-mentioned steps 109 may include:
Step 1091, when determining when not changing of the session status in the session entry in the first direction, no
The processing of falling core is carried out, the forwarding core for receiving the clear text is determined as the practical forwarding core.
Step 1092, when determining when changing of the session status in the session entry in the first direction, by this
Clear text falls the forwarding core where core to the session entry.
Illustratively, the case where causing the session status in the session entry in the first direction to change, can wrap
It includes:The clear text is the message for needing to cache, which is the message for needing to empty the cache, alternatively, this waits locating
Reason message is the message for needing to delete session entry.
It is understood that the step 1092 and the principle of the following steps 1093 are, needing to change conversational list and caching
When, it need to ensure only there are one forwarding core operation, be unique and safe to the operation of conversational list more to ensure to forward under core.Example
Such as, when the relevant session status of previous message is between load balancing waits establishing and load balancing establishes state, i.e., and server
Three-way handshake do not complete when, client sends message and needs to cache again, then needs message being sent to the conversational list at this time
It is cached in forwarding core where.For need delete session entry message, also need message carrying out the processing of falling core,
It is needed in processing procedure by the session state setting of session entry to be dead (death), and overtime deletion is set, finally by the meeting
Forwarding core where words list item deletes the session entry, while left direction session key and right direction will be corresponded in session Hash table
The content of session key is extractd.
Wherein, it should be noted that in the case where needing to delete session entry, it is contemplated that lasting in state machine
(persistent) duration of state needs to ensure that the survival duration of session is maintained in time-out time.Specifically, example
Such as, after client has sent FIN (Finish terminates) message, session entry is not deleted, but only changes conversational list
Session status, and, it will the session status of words Hash table left direction session key becomes dead, and the address of preserving sessions table.
When client sends SYN message again, forwarding core continues to reply SYN-ACK message, while session status being set to
Persistent-SYN-ACK (permanent state-synchronization-response), to wait for time-out.If client is replied at the appointed time
ACK messages, then search the forwarding core where conversational list, and message is gone in this forwarding core and calculates and record this session
Delta values.Finally abandon the message, it will words table status is set to load balancing foundation.
Step 1093, the forwarding core where the session entry session entry is checked as the practical forwarding to be updated
Processing.
In conclusion the disclosure can be obtained when receiving clear text according to being parsed from the clear text
Payload information inquired in Hash conversational list whether there is the corresponding session entry of the clear text;When there is no this
When session entry, determined in multiple forwarding core for forwarding this pending according to the load balancing state of multiple forwarding core
The target of message forwards core;Core is forwarded to create the corresponding session of the clear text according to the payload information by the target
List item;Based on the session entry, forward core that the clear text is forwarded processing by the target.It can either prevent a large amount of
Ssyn attack, save memory, ensure the high robustness of system, but can realize it is each forwarding core in message forward process process
In resource it is independent, to make the throughput performance of the lower seven layers of SiteServer LBS of multinuclear increase with the increase of check figure.
Fig. 8 is a kind of block diagram of apparatus for forwarding message based on load balancing shown according to an exemplary embodiment, is answered
To contain the gateway device of multiple forwarding cores, as shown in figure 8, the device 800 includes:
List item enquiry module 8010, for when receiving clear text, being parsed according to from the clear text
To payload information inquired in Hash conversational list whether there is the corresponding session entry of the clear text;
Core determining module 8020 is forwarded, for when there is no the session entry, the load according to multiple forwarding core to be equal
Weighing apparatus state determines in multiple forwarding core for forwarding the target of the clear text to forward core;
List item creation module 8030 creates the pending report for passing through target forwarding core according to the payload information
The corresponding session entry of text;
First packet forwarding module 8040 is forwarded by the target for being based on the session entry and checks the pending report
Text is forwarded processing.
Fig. 9 is a kind of block diagram for the list item enquiry module for implementing to exemplify according to Fig.8, as shown in fig. 7, the list item is looked into
Module 8010 is ask, including:
List item inquires submodule 8011, and the pending report is received for working as at least one of gateway device forwarding core
Wen Shi forwards core for receiving each of the clear text, is waited for this by inquiring to whether there is in the session Hash table
The corresponding key assignments of message and session status are handled to determine whether there is the corresponding session entry of the clear text;
List item determination sub-module 8012, in the session Hash table there is no the corresponding key assignments of the clear text and
When session status, determines and session entry corresponding with the clear text is not present;Or
When there are when the corresponding key assignments of the clear text and session status, determine to exist to wait for this in the session Hash table
Handle the corresponding session entry of message;
Wherein, which is arranged to allow multiple forwarding core without resource lock while inquire
Session Hash table.
Figure 10 is the block diagram for another apparatus for forwarding message based on load balancing for implementing to exemplify according to Fig.8,
The clear text is the message of left direction, which is the direction from client to server end, as shown in Figure 10, the dress
Setting 800 further includes:
Session key generation module 8050, for for each forwarding core for receiving the clear text, being based on and transmission
The corresponding left direction session key of the clear text is linked into the Hash by the three-way handshake between the client of the clear text
Conversational list;
State determining module 8060 is used for according to the three-way handshake as a result, determining the session shape of the left direction session key
Whether state is to be successfully established;
Server determining module 8070, when for being successfully established when the session status for determining the left direction session key, root
According in the clear text the payload information and preset matching connection strategy, determine the target of the clear text
Server.
Figure 11 is a kind of block diagram for first packet forwarding module for implementing to exemplify according to Fig.8, as shown in figure 11, should
First packet forwarding module 8040, including:
Session key generates submodule 8041, is breathed out for the corresponding right direction session key of the clear text to be linked into the session
Uncommon table;Wherein, right direction is the direction from server end to client;
Message forwards submodule 8042, is used for after target forwarding core carries out three-way handshake with the destination server, will
The clear text is forwarded to the destination server.
Figure 12 is a kind of block diagram for first packet forwarding module for implementing to exemplify according to Fig.8, as shown in figure 12, should
Core determining module 8020 is forwarded, including:
Whether load balancing determination sub-module 8021 is in load balancing state between multiple forwarding core for determining;
First forwarding core determination sub-module 8022, for being in load balancing state between determining multiple forwarding core
When, the forwarding core for being currently received the clear text is forwarded into core as the target;Alternatively,
When determining that at least one of multiple forwarding core forwarding core is in load imbalance state, by multiple forwarding
Minimum forwarding core is loaded in core forwards core as the target.
Optionally, the list item creation module 8030, is used for:
When target forwarding core is that this receives the forwarding core of the clear text, the clear text is received at this
Forwarding core in create the session entry, and will left direction session key corresponding with the clear text in the Hash conversational list
Session status be revised as load balancing and have been established;Alternatively,
When target forwarding core is the forwarding core of load minimum, the session state setting by the left direction session key is
Load balancing waits establishing;
The clear text is received from this clear text forwarding core fall core to the target forward core;
The session entry is created in the target forwards core, and will be corresponding with the clear text in the Hash conversational list
The session status of left direction session key be revised as load balancing and have been established.
Optionally, the state determining module 8060, is used for:
When target forwarding core does not receive the ACK message of client reply in preset time, confirmation is held three times
Hand is failed;
Delete the left direction session key in the session Hash table;Alternatively,
When target forwarding core receives the ACK message of client reply in the preset time, confirm three times
It shakes hands success;
Determine that the session status of the left direction session key is to be successfully established.
Optionally, which forwards submodule 8042, is used for:
Core is forwarded to send SYN message to the destination server by the target;
The SYN-ACK synchronous response message of destination server reply is received by the first forwarding core, the first forwarding core
For the forwarding core of the message for receiving right direction in multiple forwarding core;
By the SYN-ACK message from this first forwarding core fall core to the target forward core;
Core is forwarded to reply ACK message to the destination server by the target, to complete target forwarding core and the target
Three-way handshake between server;
Forward core that the clear text is forwarded to the destination server by the target.
Figure 13 is the block diagram for another apparatus for forwarding message based on load balancing for implementing to exemplify according to Fig.10,
As shown in figure 13, which further includes:
State monitoring module 8080, for when there are the session entry, determining whether the clear text triggers this
The variation of session status in session entry in a first direction, the first direction are the sending direction of the message received;
The determining module of falling core 8090, for the variation feelings according to the session status in the session entry in the first direction
Condition, it is determined whether the processing of falling core is carried out to the clear text to determine that the reality of the clear text in the first direction turns
Send out core;
Second packet forwarding module 8100 is forwarded processing for checking the clear text by the practical forwarding.
Figure 14 is the block diagram of the message forwarding based on load balancing according to another shown in embodiment illustrated in fig. 13, is such as schemed
Shown in 14, it is somebody's turn to do the determining module of falling core 8090, including:
Second forwarding core determination sub-module 8091, for when the session shape in the determining session entry in the first direction
The forwarding core for receiving the clear text is determined as this practical turn by when not changing of state without the processing of falling core
Send out core;Alternatively,
The message module of falling nucleon 8092, for when the hair for determining the session status in the session entry in the first direction
When changing, the forwarding core which is fallen where core to the session entry;
Entry updating submodule 8093, for checking the meeting using the forwarding core where the session entry as the practical forwarding
Words list item is updated processing.
In conclusion the disclosure can be obtained when receiving clear text according to being parsed from the clear text
Payload information inquired in Hash conversational list whether there is the corresponding session entry of the clear text;When there is no this
When session entry, determined in multiple forwarding core for forwarding this pending according to the load balancing state of multiple forwarding core
The target of message forwards core;Core is forwarded to create the corresponding session of the clear text according to the payload information by the target
List item;Based on the session entry, forward core that the clear text is forwarded processing by the target.It can either prevent a large amount of
Ssyn attack, save memory, ensure the high robustness of system, but can realize it is each forwarding core in message forward process process
In resource it is independent, to make the throughput performance of the lower seven layers of SiteServer LBS of multinuclear increase with the increase of check figure.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Figure 15 is the block diagram according to a kind of electronic equipment 1500 shown in an exemplary embodiment.As shown in figure 15, the electricity
Sub- equipment 1500 may include:Processor 1501, memory 1502, multimedia component 1503, input/output (I/O) interface
1504 and communication component 1505.
Wherein, processor 1501 is used to control the integrated operation of the electronic equipment 1500, above-mentioned based on load to complete
All or part of step in balanced message forwarding method.Memory 1502 is for storing various types of data to support
The operation of the electronic equipment 1500, these data for example may include any application for being operated on the electronic equipment 1500
The instruction of program or method and the relevant data of application program, for example, contact data, the message of transmitting-receiving, picture, audio,
Video etc..The memory 1502 can be real by any kind of volatibility or non-volatile memory device or combination thereof
It is existing, such as static RAM (Static Random Access Memory, abbreviation SRAM), electric erasable can be compiled
Journey read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviation EEPROM),
Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read-Only Memory, abbreviation EPROM), can compile
Journey read-only memory (Programmable Read-Only Memory, abbreviation PROM), read-only memory (Read-Only
Memory, abbreviation ROM), magnetic memory, flash memory, disk or CD.Multimedia component 1503 may include screen and sound
Frequency component.Wherein screen for example can be touch screen, and audio component is for output and/or input audio signal.For example, audio group
Part may include a microphone, and microphone is for receiving external audio signal.The received audio signal can be further
It is stored in memory 1502 or is sent by communication component 1505.Audio component further includes at least one loud speaker, for exporting
Audio signal.I/O interfaces 1504 provide interface between processor 1501 and other interface modules, other above-mentioned interface modules can
To be keyboard, mouse, button etc..These buttons can be virtual push button or entity button.Communication component 1505 is used for the electricity
Wired or wireless communication is carried out between sub- equipment 1500 and other equipment.Wireless communication, such as Wi-Fi, bluetooth, near-field communication
(Near Field Communication, abbreviation NFC), 2G, 3G or 4G or they one or more of combination, therefore
The communication component 1505 may include accordingly:Wi-Fi module, bluetooth module, NFC module.
In one exemplary embodiment, electronic equipment 1500 can be by one or more application application-specific integrated circuit
(Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor (Digital
Signal Processor, abbreviation DSP), digital signal processing appts (Digital Signal Processing Device,
Abbreviation DSPD), programmable logic device (Programmable Logic Device, abbreviation PLD), field programmable gate array
(Field Programmable Gate Array, abbreviation FPGA), controller, microcontroller, microprocessor or other electronics member
Part is realized, for executing the above-mentioned message forwarding method based on load balancing.
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction, example are additionally provided
Such as include the memory 1502 of program instruction, above procedure instruction can be executed by the processor 1501 of electronic equipment 1500 to complete
The above-mentioned message forwarding method based on load balancing.
In conclusion specified knowledge point information of the disclosure according to any two knowledge point in default knowledge point range,
It determines the degree of correlation of two knowledge points, further, according to the degree of correlation of two knowledge points and preset relevance threshold, judges
Each other whether correlated knowledge point is determined when the degree of correlation of two knowledge points is greater than or equal to relevance threshold for two knowledge points
Knowledge point, can be associated by two knowledge points correlated knowledge point each other according to the degree of correlation.
The preferred embodiment of the disclosure is described in detail above in association with attached drawing, still, the disclosure is not limited to above-mentioned reality
The detail in mode is applied, in the range of the technology design of the disclosure, those skilled in the art are considering specification and practice
After the disclosure, it is readily apparent that other embodiments of the disclosure, belongs to the protection domain of the disclosure.
It is further to note that specific technical features described in the above specific embodiments, in not lance
In the case of shield, it can be combined by any suitable means.Simultaneously between a variety of different embodiments of the disclosure
Arbitrary combination can also be carried out, as long as it, without prejudice to the thought of the disclosure, equally should be considered as disclosure disclosure of that.
The disclosure is not limited to the precision architecture being described above out, and the scope of the present disclosure is only limited by the attached claims
System.
Claims (10)
1. a kind of message forwarding method based on load balancing, which is characterized in that set applied to the gateway comprising multiple forwarding cores
It is standby, the method includes:
When receiving clear text, according to the payload information parsed from the clear text in Hash meeting
It talks about inquiry in table and whether there is the corresponding session entry of the clear text;
When there is no the session entry, according to the load balancing state of the multiple forwarding core in the multiple forwarding core
It determines for forwarding the target of the clear text to forward core;
Core is forwarded to create the corresponding session entry of the clear text according to the payload information by the target;
Based on the session entry, the clear text is checked by target forwarding and is forwarded processing.
2. according to the method described in claim 1, it is characterized in that, the clear text be left direction message, the left side
Direction is the direction from client to server end, in the load balancing state according to the multiple forwarding core described more
It is determined in a forwarding core for before forwarding the target of the clear text to forward core, the method to further include:
For each forwarding core for receiving the clear text, based between the client for sending the clear text
Three-way handshake the corresponding left direction session key of the clear text is linked into the Hash conversational list;
According to the three-way handshake as a result, determining whether the session status of the left direction session key is to be successfully established;
When it is to be successfully established to determine the session status of the left direction session key, have according to described in the clear text
Load information and preset matching connection strategy are imitated, determines the destination server of the clear text.
3. according to the method described in claim 2, it is characterized in that, it is described be based on the session entry, pass through the target turn
The clear text is forwarded processing by hair core, including:
The corresponding right direction session key of the clear text is linked into the session Hash table;Wherein, right direction is from service
Device end to the direction of client;
After target forwarding core carries out three-way handshake with the destination server, the clear text is forwarded to described
Destination server.
4. according to the method described in claim 1, it is characterized in that, the load balancing state according to the multiple forwarding core
Determine the target forwarding core for forwarding the clear text, including:
It determines and whether is in load balancing state between the multiple forwarding core;
When being in load balancing state between determining the multiple forwarding core, turning for the clear text will be currently received
It sends out core and forwards core as the target;Alternatively,
When determining that at least one of the multiple forwarding core forwarding core is in load imbalance state, by the multiple forwarding
Minimum forwarding core is loaded in core forwards core as the target.
5. according to the method described in claim 2, it is characterized in that, described forward core according to described effectively negative by the target
The corresponding session entry of clear text described in information creating is carried, including:
When target forwarding core receives the forwarding core of the clear text for described in, wait locating described in described receive
It manages in the forwarding core of message and creates the session entry;
The session status of left direction session key corresponding with the clear text is revised as bearing in the Hash conversational list
Equilibrium is carried to have been established;Alternatively,
When target forwarding core is the minimum forwarding core of the load, by the session state setting of the left direction session key
It waits establishing for load balancing;
By the clear text from the forwarding core for receiving the clear text fall core to the target forward core;
The session entry is created in the target forwards core;
The session status of left direction session key corresponding with the clear text is revised as bearing in the Hash conversational list
Equilibrium is carried to have been established.
6. according to the method described in claim 2, it is characterized in that, it is described according to the three-way handshake as a result, determine described in
The session status of left direction session key whether be successfully established, including:
When target forwarding core does not receive the ACK message that the client is replied in preset time, confirmation is held three times
Hand is failed;
Delete the left direction session key in the session Hash table;Alternatively,
When target forwarding core receives the ACK message that the client is replied in the preset time, confirm
Three-way handshake success;
Determine that the session status of the left direction session key is to be successfully established.
7. according to the method described in claim 3, it is characterized in that, described in target forwarding core and the destination server
After carrying out three-way handshake, the clear text is forwarded to the destination server, including:
Core is forwarded to send SYN message to the destination server by the target;
The SYN-ACK synchronous response message that the destination server is replied, the first forwarding core are received by the first forwarding core
For the forwarding core of the message for receiving right direction in the multiple forwarding core;
By the SYN-ACK message from it is described first forwarding core fall core to the target forward core;
Forward core to reply ACK message to the destination server by the target, with complete target forwarding core with it is described
Three-way handshake between destination server;
Forward core that the clear text is forwarded to the destination server by the target.
8. a kind of apparatus for forwarding message based on load balancing, which is characterized in that set applied to the gateway comprising multiple forwarding cores
Standby, described device includes:
List item enquiry module, for when receiving clear text, according to the having of obtaining of parsing from the clear text
Effect load information is inquired in Hash conversational list whether there is the corresponding session entry of the clear text;
Core determining module is forwarded, is used for when there is no the session entry, according to the load balancing shape of the multiple forwarding core
State determines in the multiple forwarding core for forwarding the target of the clear text to forward core;
List item creation module, for forwarding core to create the clear text according to the payload information by the target
Corresponding session entry;
First packet forwarding module checks the clear text for being based on the session entry by target forwarding
It is forwarded processing.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor
The step of any one of claim 1-7 the methods are realized when row.
10. a kind of electronic equipment, which is characterized in that including:
Computer readable storage medium described in claim 9;And
One or more processor, for executing the program in the computer readable storage medium.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810344312.2A CN108667730B (en) | 2018-04-17 | 2018-04-17 | Message forwarding method, device, storage medium and equipment based on load balancing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810344312.2A CN108667730B (en) | 2018-04-17 | 2018-04-17 | Message forwarding method, device, storage medium and equipment based on load balancing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108667730A true CN108667730A (en) | 2018-10-16 |
CN108667730B CN108667730B (en) | 2021-02-12 |
Family
ID=63783645
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810344312.2A Active CN108667730B (en) | 2018-04-17 | 2018-04-17 | Message forwarding method, device, storage medium and equipment based on load balancing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108667730B (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109347623A (en) * | 2018-10-18 | 2019-02-15 | 盛科网络(苏州)有限公司 | Conversate the method and device of holding in a kind of application of balancing link load |
CN109495504A (en) * | 2018-12-21 | 2019-03-19 | 东软集团股份有限公司 | A kind of firewall box and its message processing method and medium |
CN109714648A (en) * | 2018-12-03 | 2019-05-03 | 南方电网科学研究院有限责任公司 | A kind of video flow load balancing method and device |
CN110138662A (en) * | 2019-05-08 | 2019-08-16 | 东软集团股份有限公司 | Session entry processing method, device and multiple nucleus system in multiple nucleus system |
CN110247806A (en) * | 2019-06-25 | 2019-09-17 | 杭州迪普科技股份有限公司 | Session failure processing method, device, electronic equipment |
CN110381032A (en) * | 2019-06-24 | 2019-10-25 | 东软集团股份有限公司 | Session entry processing method, device and Related product in a kind of multiple nucleus system |
CN111835729A (en) * | 2020-06-15 | 2020-10-27 | 东软集团股份有限公司 | Message forwarding method, system, storage medium and electronic equipment |
CN111865713A (en) * | 2020-06-23 | 2020-10-30 | 东软集团股份有限公司 | Throughput testing method and device, storage medium and electronic equipment |
CN112162901A (en) * | 2020-09-21 | 2021-01-01 | 东软集团股份有限公司 | Method, system, storage medium and electronic device for determining CPU utilization rate |
CN112615784A (en) * | 2020-12-17 | 2021-04-06 | 北京天融信网络安全技术有限公司 | Method, device, storage medium and electronic equipment for forwarding message |
CN113489775A (en) * | 2021-06-30 | 2021-10-08 | 深圳市风云实业有限公司 | VPP-based seven-layer load balancing server and load balancing method |
CN114513466A (en) * | 2022-03-23 | 2022-05-17 | 杭州迪普科技股份有限公司 | Session processing method and device for load balancing equipment |
CN116436855A (en) * | 2023-06-12 | 2023-07-14 | 建信金融科技有限责任公司 | Data information processing method, device, electronic equipment and medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6980550B1 (en) * | 2001-01-16 | 2005-12-27 | Extreme Networks, Inc | Method and apparatus for server load balancing |
CN102480430A (en) * | 2010-11-24 | 2012-05-30 | 迈普通信技术股份有限公司 | Method and device for realizing message order preservation |
US8619584B2 (en) * | 2010-04-30 | 2013-12-31 | Cisco Technology, Inc. | Load balancing over DCE multipath ECMP links for HPC and FCoE |
US8660005B2 (en) * | 2010-11-30 | 2014-02-25 | Marvell Israel (M.I.S.L) Ltd. | Load balancing hash computation for network switches |
US9083710B1 (en) * | 2012-01-03 | 2015-07-14 | Google Inc. | Server load balancing using minimally disruptive hash tables |
US20150215236A1 (en) * | 2014-01-29 | 2015-07-30 | Telefonaktiebolaget L M Ericsson (Publ) | Method and apparatus for locality sensitive hash-based load balancing |
US20160269297A1 (en) * | 2015-03-10 | 2016-09-15 | Nec Laboratories America, Inc. | Scaling the LTE Control Plane for Future Mobile Access |
CN106453116A (en) * | 2016-11-03 | 2017-02-22 | 上海斐讯数据通信技术有限公司 | SDN (Software Defined Network) based least connection load balancing method and system |
CN106534345A (en) * | 2016-12-07 | 2017-03-22 | 东软集团股份有限公司 | Message forwarding method and device |
CN107612840A (en) * | 2017-09-26 | 2018-01-19 | 东软集团股份有限公司 | A kind of data processing method and device of four-layer load-equalizing equipment |
US9875126B2 (en) * | 2014-08-18 | 2018-01-23 | Red Hat Israel, Ltd. | Hash-based load balancing for bonded network interfaces |
US10050885B2 (en) * | 2014-04-01 | 2018-08-14 | Endace Technology Limited | Hash tag load balancing |
-
2018
- 2018-04-17 CN CN201810344312.2A patent/CN108667730B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6980550B1 (en) * | 2001-01-16 | 2005-12-27 | Extreme Networks, Inc | Method and apparatus for server load balancing |
US8619584B2 (en) * | 2010-04-30 | 2013-12-31 | Cisco Technology, Inc. | Load balancing over DCE multipath ECMP links for HPC and FCoE |
CN102480430A (en) * | 2010-11-24 | 2012-05-30 | 迈普通信技术股份有限公司 | Method and device for realizing message order preservation |
US8660005B2 (en) * | 2010-11-30 | 2014-02-25 | Marvell Israel (M.I.S.L) Ltd. | Load balancing hash computation for network switches |
US9083710B1 (en) * | 2012-01-03 | 2015-07-14 | Google Inc. | Server load balancing using minimally disruptive hash tables |
US20150215236A1 (en) * | 2014-01-29 | 2015-07-30 | Telefonaktiebolaget L M Ericsson (Publ) | Method and apparatus for locality sensitive hash-based load balancing |
US10050885B2 (en) * | 2014-04-01 | 2018-08-14 | Endace Technology Limited | Hash tag load balancing |
US9875126B2 (en) * | 2014-08-18 | 2018-01-23 | Red Hat Israel, Ltd. | Hash-based load balancing for bonded network interfaces |
US20160269297A1 (en) * | 2015-03-10 | 2016-09-15 | Nec Laboratories America, Inc. | Scaling the LTE Control Plane for Future Mobile Access |
CN106453116A (en) * | 2016-11-03 | 2017-02-22 | 上海斐讯数据通信技术有限公司 | SDN (Software Defined Network) based least connection load balancing method and system |
CN106534345A (en) * | 2016-12-07 | 2017-03-22 | 东软集团股份有限公司 | Message forwarding method and device |
CN107612840A (en) * | 2017-09-26 | 2018-01-19 | 东软集团股份有限公司 | A kind of data processing method and device of four-layer load-equalizing equipment |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109347623B (en) * | 2018-10-18 | 2022-09-09 | 苏州盛科通信股份有限公司 | Method and device for session maintenance in link load balancing application |
CN109347623A (en) * | 2018-10-18 | 2019-02-15 | 盛科网络(苏州)有限公司 | Conversate the method and device of holding in a kind of application of balancing link load |
CN109714648A (en) * | 2018-12-03 | 2019-05-03 | 南方电网科学研究院有限责任公司 | A kind of video flow load balancing method and device |
CN109714648B (en) * | 2018-12-03 | 2021-09-03 | 南方电网科学研究院有限责任公司 | Video stream load balancing method and device |
CN109495504B (en) * | 2018-12-21 | 2021-05-25 | 东软集团股份有限公司 | Firewall equipment and message processing method and medium thereof |
CN109495504A (en) * | 2018-12-21 | 2019-03-19 | 东软集团股份有限公司 | A kind of firewall box and its message processing method and medium |
CN110138662A (en) * | 2019-05-08 | 2019-08-16 | 东软集团股份有限公司 | Session entry processing method, device and multiple nucleus system in multiple nucleus system |
CN110381032A (en) * | 2019-06-24 | 2019-10-25 | 东软集团股份有限公司 | Session entry processing method, device and Related product in a kind of multiple nucleus system |
CN110381032B (en) * | 2019-06-24 | 2022-01-07 | 东软集团股份有限公司 | Session table item processing method and device in multi-core system and related products |
CN110247806A (en) * | 2019-06-25 | 2019-09-17 | 杭州迪普科技股份有限公司 | Session failure processing method, device, electronic equipment |
CN111835729A (en) * | 2020-06-15 | 2020-10-27 | 东软集团股份有限公司 | Message forwarding method, system, storage medium and electronic equipment |
CN111835729B (en) * | 2020-06-15 | 2022-08-02 | 东软集团股份有限公司 | Message forwarding method, system, storage medium and electronic equipment |
CN111865713A (en) * | 2020-06-23 | 2020-10-30 | 东软集团股份有限公司 | Throughput testing method and device, storage medium and electronic equipment |
CN111865713B (en) * | 2020-06-23 | 2022-02-08 | 东软集团股份有限公司 | Throughput testing method and device, storage medium and electronic equipment |
CN112162901A (en) * | 2020-09-21 | 2021-01-01 | 东软集团股份有限公司 | Method, system, storage medium and electronic device for determining CPU utilization rate |
CN112615784A (en) * | 2020-12-17 | 2021-04-06 | 北京天融信网络安全技术有限公司 | Method, device, storage medium and electronic equipment for forwarding message |
CN113489775A (en) * | 2021-06-30 | 2021-10-08 | 深圳市风云实业有限公司 | VPP-based seven-layer load balancing server and load balancing method |
CN113489775B (en) * | 2021-06-30 | 2023-07-21 | 深圳市风云实业有限公司 | Seven-layer load balancing server and load balancing method based on VPP |
CN114513466A (en) * | 2022-03-23 | 2022-05-17 | 杭州迪普科技股份有限公司 | Session processing method and device for load balancing equipment |
CN116436855A (en) * | 2023-06-12 | 2023-07-14 | 建信金融科技有限责任公司 | Data information processing method, device, electronic equipment and medium |
CN116436855B (en) * | 2023-06-12 | 2023-09-12 | 建信金融科技有限责任公司 | Data information processing method, device, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN108667730B (en) | 2021-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108667730A (en) | Message forwarding method, device, storage medium based on load balancing and equipment | |
CN107948324B (en) | Request Transmission system, method, apparatus and storage medium | |
CN108200165B (en) | Request Transmission system, method, apparatus and storage medium | |
US8001188B2 (en) | Server device, client device, and process execution method | |
JP4833995B2 (en) | Mobile online game system and communication method between mobile game terminals | |
EP2692095B1 (en) | Method, apparatus and computer program product for updating load balancer configuration data | |
CN108200158B (en) | Request Transmission system, method, apparatus and storage medium | |
JP2006302153A5 (en) | ||
US10693785B2 (en) | Method and system for forwarding data, virtual load balancer, and readable storage medium | |
WO2014023003A1 (en) | Method, apparatus, and system for controlling data transmission | |
WO2022007406A1 (en) | K8s-based service deployment method, apparatus, device, and medium | |
CN108494623A (en) | A kind of performance test methods and equipment of network forwarding equipment | |
CN105991793B (en) | The method and apparatus of message forwarding | |
CN106878434A (en) | A kind of method and device of redirection | |
WO2006083052A1 (en) | Method for providing function of registering in session initiation protocol and sip load balancer of enabling the method | |
CN108023736A (en) | Communication means, server device, client device, apparatus and system | |
CN108124002A (en) | A kind of data transmission method for uplink and device | |
CN110460641A (en) | Data transmission method, apparatus and system | |
CN103441944B (en) | Method based on load-balancing device processing data and load-balancing device | |
CN104967572B (en) | Network Access Method, device and equipment | |
CN105743852B (en) | Method and system for realizing Socket connection maintaining communication across network gate through http | |
CN109413224A (en) | Message forwarding method and device | |
CN107547680A (en) | A kind of data processing method and device | |
WO2023116165A1 (en) | Network load balancing method and apparatus, electronic device, medium, and program product | |
US10341292B2 (en) | Increased port address space |
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 |