CN103441944A - Data processing method based on load balancing equipment and load balancing equipment - Google Patents

Data processing method based on load balancing equipment and load balancing equipment Download PDF

Info

Publication number
CN103441944A
CN103441944A CN2013103648238A CN201310364823A CN103441944A CN 103441944 A CN103441944 A CN 103441944A CN 2013103648238 A CN2013103648238 A CN 2013103648238A CN 201310364823 A CN201310364823 A CN 201310364823A CN 103441944 A CN103441944 A CN 103441944A
Authority
CN
China
Prior art keywords
load
server
balancing device
address
packet
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
CN2013103648238A
Other languages
Chinese (zh)
Other versions
CN103441944B (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.)
Shenzhen Shenxinfu Information Security Co.,Ltd.
Original Assignee
Sangfor Network Technology Shenzhen 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 Sangfor Network Technology Shenzhen Co Ltd filed Critical Sangfor Network Technology Shenzhen Co Ltd
Priority to CN201310364823.8A priority Critical patent/CN103441944B/en
Publication of CN103441944A publication Critical patent/CN103441944A/en
Application granted granted Critical
Publication of CN103441944B publication Critical patent/CN103441944B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data processing method based on load balancing equipment. The method includes the steps of receiving a data package sent by a client, judging the type of the data package, if the data package is an access data package containing the address of the load balancing equipment, performing protocol processing and load balancing scheduling on the data package, and forwarding a response data package returned by a server to the client. The invention further provides the load balancing equipment. The access data package which has access to the server and is sent by the client is intercepted and scheduled, so that the address of the load balancing equipment contained in the access data package is the IP address of the server, and a source address in the response data package returned by the sever is consistent with the address of the load balancing equipment in the access data package. Thus, the load balancing equipment is transparent and invisible to the client and the server, and when the load balancing equipment has a fault, continuity of services can still be ensured.

Description

Method based on the load-balancing device deal with data and load-balancing device
Technical field
The present invention relates to Internet technical field, specially refer to a kind of method and load-balancing device based on the load-balancing device deal with data.
Background technology
At present when load-balancing device is disposed, be merely able to dispose with " route pattern ", " bypass mode ", " triangle transmission mode ", and there is a fatal shortcoming in this several modes, can't accomplish that to other equipment in network be transparent, sightless.Adopt existing dispositions method, when load-balancing device is deployed to network, must revise the configuration of other equipment in network (for example, by the server of load), even need to revise server or client code.Therefore, there is inconvenience greatly in load-balancing device when disposing, and the system of some business keys even can't be disposed load-balancing device.And, due to existing dispositions method can not make load-balancing device when disposing, accomplish network in other equipment transparent, invisible, once thereby load-balancing device break down, the attendant is difficult to the normal operation that recovers at short notice whole network.
Summary of the invention
Main purpose of the present invention, for a kind of method and load-balancing device based on the load-balancing device deal with data is provided, can realize the transparent deployment of load-balancing device, and can guarantee the continuity of business when load-balancing device breaks down.
The invention provides a kind of method based on the load-balancing device deal with data, comprise step:
Receive the packet that client sends, judge the type of this packet;
If the visit data bag that the type of described packet is the address that comprises load-balancing device, carry out protocol processes to described packet, this packet is carried out to load balance scheduling;
The reply data bag that server is returned is forwarded to client, and the source address in this reply data bag is consistent with the address of load-balancing device in described visit data bag.
Preferably, described packet is carried out to protocol processes, the step of this packet being carried out to load balance scheduling comprises:
Described visit data bag is carried out to protocol analysis, obtain the communications protocol that this visit data bag is corresponding;
According to the described communications protocol parsed, described visit data bag is carried out to corresponding protocol processes;
By the extremely corresponding server of the visit data packet scheduling after protocol processes.
Preferably, described by the visit data packet scheduling after protocol processes to before the step of corresponding server, also comprise:
Whether the address that judges load-balancing device in described visit data bag is consistent with the address of dispatched server, if not, the address of described load-balancing device is revised as to the address of dispatched server.
Preferably, before the described reply data bag that server is returned is forwarded to the step of client, also comprise:
Judge that whether source address in the reply data bag that server returns is consistent with the address of load-balancing device in described visit data bag, if not, the address that is the load-balancing device in the visit data bag by described source address modification.
Preferably, after the step of the type of described judgement packet, also comprise:
If the type of described packet is the general data bag that comprises general service, this packet is forwarded;
If the data query bag of the physical address that the type of described packet is querying server, be forwarded to this data query bag corresponding server or reply to client according to this data query bag.
Preferably, if the data query bag of the physical address that the type of described packet is querying server is forwarded to corresponding server by this data query bag or the step of replying to client according to this data query bag specifically comprises:
If the data query bag of the physical address that the type of packet is querying server, judge that whether this server is online;
When described server is online, by described package forward to this server to reply to client;
When described server is not online, reply the physical address of load-balancing device to client.
The present invention also provides a kind of load-balancing device, comprising:
The first judge module, for receiving the packet of client transmission, judge the type of this packet;
Process and scheduler module, while for the type when described packet being the visit data bag of the destination address that comprises load-balancing device, described packet is carried out to protocol processes, this packet is carried out to load balance scheduling;
The first forwarding module, be forwarded to client for the reply data bag that server is returned, and the source address in this reply data bag is consistent with the address of load-balancing device in described visit data bag.
Preferably, described processing and scheduler module comprise:
Resolution unit, for described visit data bag is carried out to protocol analysis, obtain the communications protocol that this visit data bag is corresponding;
Processing unit, carry out corresponding protocol processes for the described communications protocol according to parsing to described visit data bag;
Scheduling unit, for by the visit data packet scheduling after protocol processes to corresponding server.
Preferably, described processing and scheduler module also comprise:
The first judging unit, whether consistent with the address of dispatched server for the address of the load-balancing device that judges described visit data bag;
Revise unit, the address of being revised as dispatched server for the address by described load-balancing device.
Preferably, load-balancing device also comprises:
The second judge module, whether consistent with the address of load-balancing device in described visit data bag for the source address that judges the reply data bag that server returns;
Modified module, for the address of the load-balancing device that is the visit data bag by described source address modification.
Preferably, load-balancing device also comprises:
The second forwarding module, if be the general data bag that comprises general service for the type of described packet, forwarded this packet;
Responder module, if the data query bag of the physical address that is querying server for the type of described packet is forwarded to this data query bag corresponding server or replys to client according to this data query bag.
Preferably, described responder module comprises:
The second judging unit, if the data query bag of the physical address that is querying server for the type of packet judges that whether this server is online;
Retransmission unit, for when described server is online, by described package forward to this server to reply to client;
Response unit, for when described server is not online, reply the physical address of load-balancing device to client.
The type of the packet that client that the present invention receives by judgement sends, the visit data bag when the type of packet is the destination address that comprises load-balancing device, carry out protocol processes to packet, and this packet is carried out to load balance scheduling; And the reply data bag that server is returned is back to client, the source address in this reply data bag is consistent with the address of load-balancing device in the visit data bag.The visit data bag of the access services device that load-balancing device sends client is tackled and is dispatched, the IP address that the address that makes the load-balancing device that comprises in the visit data bag is server, and the source address in the reply data bag that server returns is consistent with the address of load-balancing device in the visit data bag, realized the transparent and invisibility of load-balancing device to client and server, and, when load-balancing device breaks down, can guarantee the continuity of business.
The accompanying drawing explanation
Fig. 1 is the schematic flow sheet that the present invention is based on method first embodiment of load-balancing device deal with data;
Fig. 2 the present invention is based in the method for load-balancing device deal with data packet is carried out to protocol processes, and packet is carried out to the schematic flow sheet of load balance scheduling;
Fig. 3 is the schematic flow sheet that the present invention is based on method second embodiment of load-balancing device deal with data;
Fig. 4 is the schematic flow sheet that the present invention is based on method the 3rd embodiment of load-balancing device deal with data;
Fig. 5 the present invention is based on the schematic flow sheet that in the method for load-balancing device deal with data, this data query bag is forwarded to corresponding server or replys to client according to this data query bag;
Fig. 6 is the schematic flow sheet that the present invention is based on method the 4th embodiment of load-balancing device deal with data;
The structural representation that Fig. 7 is load-balancing device the first embodiment of the present invention;
The processing that Fig. 8 is load-balancing device of the present invention and the structural representation of scheduler module;
The structural representation that Fig. 9 is load-balancing device the second embodiment of the present invention;
The structural representation that Figure 10 is load-balancing device of the present invention the 3rd embodiment;
The structural representation that Figure 11 is load-balancing device responder module of the present invention;
The structural representation that Figure 12 is load-balancing device of the present invention the 4th embodiment.
The realization of the object of the invention, functional characteristics and advantage, in connection with embodiment, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The invention provides a kind of method based on the load-balancing device deal with data.While disposing in network, load-balancing device is all transparent, sightless to client and server, can in advance the IP address of a plurality of servers and login-port number be configured in this load-balancing device, making its virtual IP address of externally issuing can be the IP address of a plurality of servers, port numbers is also the login-port number of server, can certainly be number identical with the IP address of part server and login-port; And the gateway of a plurality of servers also points to fire compartment wall all the time.After client sends packet, data package capture client sent by load-balancing device, and this packet is forwarded accordingly, replys and the processing such as load balance scheduling according to the type of packet.
With reference to Fig. 1, Fig. 1 is the schematic flow sheet that the present invention is based on method first embodiment of load-balancing device deal with data.
The method based on the load-balancing device deal with data that the present embodiment provides comprises:
Step S10, receive the packet that client sends, and judges the type of this packet;
In the present embodiment, when client is passed through the firewall access network, the packet that the client that network interface card drives the reception fire compartment wall to forward sends, load-balancing device is by this data package capture, and the type of judgement packet, carry out different processing with the packet to dissimilar.In the present embodiment, the type of packet comprises visit data bag, general data bag and data query bag; Wherein, the packet that the visit data bag is the server in accesses network, IP address and login-port number comprising accessed load-balancing device, in the present embodiment, the IP address of load-balancing device and login-port number can be IP address and the port numbers of a plurality of servers, or identical with IP address and the port numbers of part server; The packet of the physical address that the data query bag is querying server, as the ARP request; And the packet of the type of general data Bao Zewei except visit data bag and data query bag has wherein comprised the general service of client and server interaction.
Step S20, if the visit data bag that the type of packet is the address that comprises load-balancing device carries out protocol processes to packet, carry out load balance scheduling to this packet;
As the type of the packet of judging is the visit data bag, in the present embodiment, the IP address that the destination address comprised in the visit data bag that fire compartment wall forwards is load-balancing device, fire compartment wall is not also known the existence of load-balancing device.Load-balancing device carries out protocol processes to this visit data bag, then, and according to the load capacity of a plurality of servers in network, by the extremely corresponding server of visit data packet scheduling.
Please in the lump with reference to Fig. 2, Fig. 2 the present invention is based in the method for load-balancing device deal with data packet is carried out to protocol processes, and packet is carried out to the schematic flow sheet of load balance scheduling.
In the present embodiment, step S20 further comprises:
Step S21, carry out protocol analysis to the visit data bag, obtains the communications protocol that this visit data bag is corresponding;
Step S22, carry out corresponding protocol processes according to the communications protocol parsed to the visit data bag;
Step S23, by the extremely corresponding server of the visit data packet scheduling after protocol processes.
After receiving the visit data bag of the destination address that comprises load-balancing device, TCP/UDP protocol stack in load-balancing device carries out protocol analysis to this visit data bag, obtain the communications protocol that the visit data bag is corresponding, then by the HTTP/DNS/RADIU protocol module, the visit data bag is carried out to corresponding protocol processes, can with a plurality of server communications; Load-balancing algorithm scheduler in load-balancing device is according to the load capacity of a plurality of servers, by the extremely corresponding server of the visit data packet scheduling after protocol processes.In the present embodiment, due to server that client is accessed, likely load is too much, therefore, and can be by the visit data packet scheduling to other servers in network, to guarantee better the treatment effeciency of business.
Step S30, the reply data bag that server is returned is forwarded to client, and the source address in this reply data bag is consistent with the address of load-balancing device in the visit data bag.
Server receives the visit data bag of client, carry out corresponding Business Processing according to this visit data bag, then forward the reply data bag to client by load-balancing device, comprise source address in this reply data bag, in the visit data bag that this source address sends with client, the address of load-balancing device is consistent, is the IP address of the server that client accesses.
In the present embodiment, if load-balancing device breaks down, its inner hardware BYPASS module can be automatically by two network interface docking of equipment, make load-balancing device as a wire, guarantee the connection between server and fire compartment wall, whole network can not interrupt, and system business can not interrupt yet.
The type of the packet that client that the present embodiment receives by judgement sends, the visit data bag when the type of packet is the destination address that comprises load-balancing device, carry out protocol processes to packet, and this packet is carried out to load balance scheduling; And the reply data bag that server is returned is back to client, the source address in this reply data bag is consistent with the address of load-balancing device in the visit data bag.The visit data bag of the access services device that load-balancing device sends client is tackled and is dispatched, the IP address that the address that makes the load-balancing device that comprises in the visit data bag is server, and the source address in the reply data bag that server returns is consistent with the address of load-balancing device in the visit data bag, realized the transparent and invisibility of load-balancing device to client and server, and, when load-balancing device breaks down, can guarantee the continuity of business.
With reference to Fig. 3, Fig. 3 is the schematic flow sheet that the present invention is based on method second embodiment of load-balancing device deal with data.
On the basis of method the first embodiment that the present invention is based on the load-balancing device deal with data, before execution step S23, step S20 also comprises:
Step S24, whether the address that judges the load-balancing device in the visit data bag is consistent with the address of dispatched server; If not, perform step S25;
Step S25, the address of the address of load-balancing device being revised as to dispatched server.
In the present embodiment, after parsing the communications protocol of visit data bag and this visit data bag being carried out to corresponding protocol processes, due to server that client is accessed, likely load is too much, and the load-balancing algorithm scheduler can be by the visit data packet scheduling to other servers in network, therefore, when the visit data bag is dispatched, whether the address that at first judges the load-balancing device in this visit data bag is consistent with the address of dispatched server, as unanimously, the IP address that the address that is load-balancing device is the client server of accessing, directly by the visit data packet scheduling to this server, and, as inconsistent, the address of address of load-balancing device being revised as to dispatched server, then by the extremely corresponding server of visit data packet scheduling.
With reference to Fig. 4, Fig. 4 is the schematic flow sheet that the present invention is based on method the 3rd embodiment of load-balancing device deal with data.
On the basis of method the first embodiment that the present invention is based on the load-balancing device deal with data, before execution step S30, the method also comprises:
Step S40, judge that whether source address in the reply data bag that server returns is consistent with the address of load-balancing device in the visit data bag, if not, performs step S41;
Step S41, the address that is the load-balancing device in the visit data bag by source address modification.
In the present embodiment, receive the visit data bag of load-balancing device forwarding at server after, carry out corresponding Business Processing according to this visit data bag, then return to corresponding reply data bag to client, likely load is too much for the server of accessing due to client equally, and can be by the visit data packet scheduling to other servers in network, when load-balancing device forwards the reply data bag to client, also can judge that whether source address in the reply data bag is consistent with the address of load-balancing device in the visit data bag, as unanimously, directly forward it to client, as inconsistent, the address that is first the load-balancing device in the visit data bag by source address modification, and then forwarded.
Due to server that client is accessed, likely load is too much, and the load-balancing algorithm scheduler can be by the visit data packet scheduling to other servers in network, when the visit data bag is dispatched, whether the address that judges load-balancing device is consistent with the address of dispatched server, and when the reply data bag that server is returned is forwarded to client, judge that whether address is consistent with the address of dispatched server, and modify when inconsistent, thereby further guaranteed the transparent and invisibility of load-balancing device to client and server.
With reference to Fig. 5, Fig. 5 is the schematic flow sheet that the present invention is based on method the 4th embodiment of load-balancing device deal with data.
On the basis of the method that the present invention is based on the load-balancing device deal with data first, second or the 3rd embodiment, after execution step S10, the method also comprises:
Step S50, if the type of packet is the general data bag that comprises general service, forwarded this packet;
In the present embodiment, the packet that the received client that fire compartment wall was forwarded sends as judged is the general data bag that comprises general service, and now load-balancing device, as in the bridge access network, only carries out two layers of forwarding for the general data bag.
Step S51, if the data query bag of the physical address that the type of packet is querying server is forwarded to this data query bag corresponding server or replys to client according to this data query bag.
As judge the data query bag of the physical address that packet is querying server,, according to the online situation of server, the data query bag is forwarded to corresponding server or directly replys to client by the ARP proxy module of load-balancing device.
Please, in the lump with reference to Fig. 6, Fig. 6 the present invention is based on the schematic flow sheet that in the method for load-balancing device deal with data, this data query bag is forwarded to corresponding server or replys to client according to this data query bag.
In the present embodiment, step S51 further comprises:
Step S511, if the data query bag of the physical address that the type of packet is querying server judges that whether this server is online; When server is online, execution step S512; When server is not online, execution step S513;
Step S512, by package forward to this server to reply to client;
Step S513, reply the physical address of load-balancing device to client.
As judge the data query bag of the physical address that packet is querying server, at first judge that whether this server is online, if server is online, the data query bag is forwarded to this server, by server, to client, replied, the address of now replying is the physical address as MAC Address of this server self; And if server is not online, by the ARP proxy module of load-balancing device, directly to client, replied the physical address as MAC Address that the address now replied is load-balancing device.Like this, client is not known the server machine of having delayed, and the physical address of its requesting query has become the physical address of load-balancing device, and load-balancing device can reschedule a station server for access request.
The present invention also provides a kind of load-balancing device.
With reference to Fig. 7, the structural representation that Fig. 7 is load-balancing device the first embodiment of the present invention.
The load-balancing device that the present embodiment provides comprises:
The first judge module 10, for receiving the packet of client transmission, judge the type of this packet;
Process and scheduler module 20, while for the type when packet being the visit data bag of the address that comprises load-balancing device, packet is carried out to protocol processes, this packet is carried out to load balance scheduling;
The first forwarding module 30, be forwarded to client for the reply data bag that server is returned, and the source address in this reply data bag is consistent with the address of load-balancing device in the visit data bag.
In the present embodiment, when client is passed through the firewall access network, the packet that the client that network interface card drives the reception fire compartment wall to forward sends, load-balancing device is by this data package capture, and, by the type of the first judge module 10 judgement packets, with the packet to dissimilar, carry out different processing.In the present embodiment, the type of packet comprises visit data bag, general data bag and data query bag; Wherein, the packet that the visit data bag is the server in accesses network, IP address and login-port number comprising accessed load-balancing device, in the present embodiment, the IP address of load-balancing device and login-port number can be IP address and the port numbers of a plurality of servers, or identical with IP address and the port numbers of part server; The packet of the physical address that the data query bag is querying server, as the ARP request; And the packet of the type of general data Bao Zewei except visit data bag and data query bag has wherein comprised the general service of client and server interaction.。
The type of the packet of judging as the first judge module 10 is the visit data bag, in the present embodiment, the IP address that the address of the load-balancing device comprised in the visit data bag that fire compartment wall forwards is server, fire compartment wall is not also known the existence of load-balancing device.20 pairs of these visit data bags of the processing of load-balancing device and scheduler module carry out protocol processes, then, and according to the load capacity of a plurality of servers in network, by the extremely corresponding server of visit data packet scheduling.
Please in the lump with reference to Fig. 8, the processing that Fig. 8 is load-balancing device of the present invention and the structural representation of scheduler module.
In the present embodiment, processing and scheduler module 20 further comprise:
Resolution unit 21, for the visit data bag is carried out to protocol analysis, obtain the communications protocol that this visit data bag is corresponding;
Processing unit 22, carry out corresponding protocol processes for the communications protocol according to parsing to the visit data bag;
Scheduling unit 23, for by the visit data packet scheduling after protocol processes to corresponding server.
After receiving the visit data bag of the address that comprises load-balancing device, the resolution unit 21 of load-balancing device is carried out protocol analysis by the TCP/UDP protocol stack to this visit data bag, obtain the communications protocol that the visit data bag is corresponding, and post-processing unit 22 carries out corresponding protocol processes by the HTTP/DNS/RADIU protocol module to the visit data bag, can with a plurality of server communications; The scheduling unit 23 load-balancing algorithm schedulers of load-balancing device are according to the load capacity of a plurality of servers, by the extremely corresponding server of the visit data packet scheduling after protocol processes.In the present embodiment, due to server that client is accessed, likely load is too much, therefore, and can be by the visit data packet scheduling to other servers in network, to guarantee better the treatment effeciency of business.
Server receives the visit data bag of client, carry out corresponding Business Processing according to this visit data bag, then the first forwarding module 30 by load-balancing device forwards the reply data bag to client, comprise source address in this reply data bag, the address of the load-balancing device in the visit data bag that this source address sends with client is consistent, is the IP address of the server that client accesses.
In the present embodiment, if load-balancing device breaks down, its inner hardware BYPASS module can be automatically by two network interface docking of equipment, make load-balancing device as a wire, guarantee the connection between server and fire compartment wall, whole network can not interrupt, and system business can not interrupt yet.
The type of the packet that client that the present embodiment receives by judgement sends, the visit data bag when the type of packet is the destination address that comprises load-balancing device, carry out protocol processes to packet, and this packet is carried out to load balance scheduling; And the reply data bag that server is returned is back to client, the source address in this reply data bag is consistent with the address of load-balancing device in the visit data bag.The visit data bag of the access services device that load-balancing device sends client is tackled and is dispatched, the IP address that the address that makes the load-balancing device that comprises in the visit data bag is server, and the source address in the reply data bag that server returns is consistent with the address of load-balancing device in the visit data bag, realized the transparent and invisibility of load-balancing device to client and server, and, when load-balancing device breaks down, can guarantee the continuity of business.
With reference to Fig. 9, the structural representation that Fig. 9 is load-balancing device the second embodiment of the present invention.
On the basis of load-balancing device the first embodiment of the present invention, processing and scheduler module 20 also comprise:
The first judging unit 24, whether consistent with the address of dispatched server for the address of the load-balancing device that judges the visit data bag;
Revise unit 25, the address of being revised as dispatched server for the address by load-balancing device.
In the present embodiment, after parsing the communications protocol of visit data bag and this visit data bag being carried out to corresponding protocol processes, due to server that client is accessed, likely load is too much, and the load-balancing algorithm scheduler can be by the visit data packet scheduling to other servers in network, therefore, when the visit data bag is dispatched, whether the address that at first the first judging unit 24 judges the load-balancing device in this visit data bag is consistent with the address of dispatched server, as unanimously, the IP address that the address that is load-balancing device is the client server of accessing, directly by the visit data packet scheduling to this server, and, as inconsistent, revise unit 25 address of load-balancing device to be revised as to the address of dispatched server, then by the extremely corresponding server of visit data packet scheduling.
With reference to Figure 10, the structural representation that Figure 10 is load-balancing device of the present invention the 3rd embodiment.
On the basis of load-balancing device the first embodiment of the present invention, load-balancing device also comprises:
The second judge module 40, whether consistent with the address of load-balancing device in the visit data bag for the source address that judges the reply data bag that server returns;
Modified module 41, for the address of the load-balancing device that is the visit data bag by source address modification.
In the present embodiment, receive the visit data bag of load-balancing device forwarding at server after, carry out corresponding Business Processing according to this visit data bag, then return to corresponding reply data bag to client, likely load is too much for the server of accessing due to client equally, and can be by the visit data packet scheduling to other servers in network, when load-balancing device forwards the reply data bag to client, the second judge module 40 also can judge that whether source address in the reply data bag is consistent with the address of load-balancing device in the visit data bag, as unanimously, directly forward it to client, as inconsistent, the address that is first the load-balancing device in the visit data bag by modified module 41 by source address modification, and then forwarded.
Due to server that client is accessed, likely load is too much, and the load-balancing algorithm scheduler can be by the visit data packet scheduling to other servers in network, when the visit data bag is dispatched, whether the address that judges load-balancing device is consistent with the address of dispatched server, and when the reply data bag that server is returned is forwarded to client, judge that whether address is consistent with the address of dispatched server, and modify when inconsistent, thereby further guaranteed the transparent and invisibility of load-balancing device to client and server.
With reference to Figure 11, the structural representation that Figure 11 is load-balancing device of the present invention the 4th embodiment.
On the basis of load-balancing device of the present invention first, second or the 3rd embodiment, load-balancing device also comprises:
The second forwarding module 50, if be the general data bag that comprises general service for the type of packet, forwarded this packet;
Responder module 51, if the data query bag of the physical address that is querying server for the type of packet is forwarded to this data query bag corresponding server or replys to client according to this data query bag.
In the present embodiment, as the packet of judging the received client that fire compartment wall was forwarded transmission is the general data bag that comprises general service, now load-balancing device, as in the bridge access network, only carries out two layers of forwarding by the second forwarding module 50 for the general data bag.
As judge the data query bag of the physical address that packet is querying server,, according to the online situation of server, by responder module 51, the data query bag is forwarded to corresponding server or directly replys to client by the ARP proxy module of load-balancing device.
Please in the lump with reference to Figure 12, the structural representation that Figure 12 is load-balancing device responder module of the present invention.
In the present embodiment, responder module 51 further comprises:
The second judging unit 511, if the data query bag of the physical address that is querying server for the type of packet judges that whether this server is online;
Retransmission unit 512, for when server is online, by package forward to this server to reply to client;
Response unit 513, for when server is not online, reply the physical address of load-balancing device to client.
As judge the data query bag of the physical address that packet is querying server, at first the second judging unit 511 judges that whether this server is online, if server is online, retransmission unit 512 is forwarded to this server by the data query bag, by server, to client, replied, the address of now replying is the physical address as MAC Address of this server self; And if server is not online, by the response unit 513 of load-balancing device, by the ARP proxy module, directly to client, replied the physical address as MAC Address that the address now replied is load-balancing device.Like this, client is not known the server machine of having delayed, and the physical address of its requesting query has become the physical address of load-balancing device, and load-balancing device can reschedule a station server for access request.
The foregoing is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in scope of patent protection of the present invention.

Claims (12)

1. the method based on the load-balancing device deal with data, is characterized in that, comprises step:
Receive the packet that client sends, judge the type of this packet;
If the visit data bag that the type of described packet is the address that comprises load-balancing device, carry out protocol processes to described packet, this packet is carried out to load balance scheduling;
The reply data bag that server is returned is forwarded to client, and the source address in this reply data bag is consistent with the address of load-balancing device in described visit data bag.
2. the method based on the load-balancing device deal with data according to claim 1, is characterized in that, described packet carried out to protocol processes, and the step of this packet being carried out to load balance scheduling comprises:
Described visit data bag is carried out to protocol analysis, obtain the communications protocol that this visit data bag is corresponding;
According to the described communications protocol parsed, described visit data bag is carried out to corresponding protocol processes;
By the extremely corresponding server of the visit data packet scheduling after protocol processes.
3. the method based on the load-balancing device deal with data according to claim 2, is characterized in that, described by the visit data packet scheduling after protocol processes to before the step of corresponding server, also comprise:
Whether the address that judges load-balancing device in described visit data bag is consistent with the address of dispatched server, if not, the address of described load-balancing device is revised as to the address of dispatched server.
4. the method based on the load-balancing device deal with data according to claim 3, is characterized in that, before the described reply data bag that server is returned is forwarded to the step of client, also comprises:
Judge that whether source address in the reply data bag that server returns is consistent with the address of load-balancing device in described visit data bag, if not, the address that is the load-balancing device in the visit data bag by described source address modification.
5. according to the described method based on the load-balancing device deal with data of any one in claim 1 to 4, it is characterized in that, after the step of the type of described judgement packet, also comprise:
If the type of described packet is the general data bag that comprises general service, this packet is forwarded;
If the data query bag of the physical address that the type of described packet is querying server, be forwarded to this data query bag corresponding server or reply to client according to this data query bag.
6. the method based on the load-balancing device deal with data according to claim 5, it is characterized in that, if the data query bag of the physical address that the type of described packet is querying server is forwarded to corresponding server by this data query bag or the step of replying to client according to this data query bag specifically comprises:
If the data query bag of the physical address that the type of packet is querying server, judge that whether this server is online;
When described server is online, by described package forward to this server to reply to client;
When described server is not online, reply the physical address of load-balancing device to client.
7. a load-balancing device, is characterized in that, comprising:
The first judge module, for receiving the packet of client transmission, judge the type of this packet;
Process and scheduler module, while for the type when described packet being the visit data bag of the destination address that comprises load-balancing device, described packet is carried out to protocol processes, this packet is carried out to load balance scheduling;
The first forwarding module, be forwarded to client for the reply data bag that server is returned, and the source address in this reply data bag is consistent with the address of load-balancing device in described visit data bag.
8. load-balancing device according to claim 7, is characterized in that, described processing and scheduler module comprise:
Resolution unit, for described visit data bag is carried out to protocol analysis, obtain the communications protocol that this visit data bag is corresponding;
Processing unit, carry out corresponding protocol processes for the described communications protocol according to parsing to described visit data bag;
Scheduling unit, for by the visit data packet scheduling after protocol processes to corresponding server.
9. load-balancing device according to claim 8, is characterized in that, described processing and scheduler module also comprise:
The first judging unit, whether consistent with the address of dispatched server for the address of the load-balancing device that judges described visit data bag;
Revise unit, the address of being revised as dispatched server for the address by described load-balancing device.
10. load-balancing device according to claim 9, is characterized in that, also comprises:
The second judge module, whether consistent with the address of load-balancing device in described visit data bag for the source address that judges the reply data bag that server returns;
Modified module, for the address of the load-balancing device that is the visit data bag by described source address modification.
11. according to the described load-balancing device of any one in claim 7 to 10, it is characterized in that, also comprise:
The second forwarding module, if be the general data bag that comprises general service for the type of described packet, forwarded this packet;
Responder module, if the data query bag of the physical address that is querying server for the type of described packet is forwarded to this data query bag corresponding server or replys to client according to this data query bag.
12. load-balancing device according to claim 11, is characterized in that, described responder module comprises:
The second judging unit, if the data query bag of the physical address that is querying server for the type of packet judges that whether this server is online;
Retransmission unit, for when described server is online, by described package forward to this server to reply to client;
Response unit, for when described server is not online, reply the physical address of load-balancing device to client.
CN201310364823.8A 2013-08-20 2013-08-20 Method based on load-balancing device processing data and load-balancing device Active CN103441944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310364823.8A CN103441944B (en) 2013-08-20 2013-08-20 Method based on load-balancing device processing data and load-balancing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310364823.8A CN103441944B (en) 2013-08-20 2013-08-20 Method based on load-balancing device processing data and load-balancing device

Publications (2)

Publication Number Publication Date
CN103441944A true CN103441944A (en) 2013-12-11
CN103441944B CN103441944B (en) 2017-03-08

Family

ID=49695610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310364823.8A Active CN103441944B (en) 2013-08-20 2013-08-20 Method based on load-balancing device processing data and load-balancing device

Country Status (1)

Country Link
CN (1) CN103441944B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905324A (en) * 2014-03-21 2014-07-02 汉柏科技有限公司 Dispatching and distributing method and system based on message five-element set
CN104079497A (en) * 2014-07-21 2014-10-01 北京信诺瑞得软件系统有限公司 High-availability loading balancing equipment and method under transparent network bridge mode
CN103929368B (en) * 2014-05-05 2017-04-26 华为技术有限公司 Load balance method and device for multiple service units
CN107087023A (en) * 2017-04-06 2017-08-22 平安科技(深圳)有限公司 Data forwarding method and system
CN111726295A (en) * 2020-06-28 2020-09-29 北京天融信网络安全技术有限公司 Message processing method and device, network equipment and computer readable storage medium
CN115022334A (en) * 2022-05-13 2022-09-06 深信服科技股份有限公司 Flow distribution method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270605A1 (en) * 2004-04-08 2008-10-30 Viktors Berstis Distributing and Geographically Load Balancing Location Aware Communication Device Client-Proxy Applications
CN102075445A (en) * 2011-02-28 2011-05-25 杭州华三通信技术有限公司 Load balancing method and device
CN102523302A (en) * 2011-12-26 2012-06-27 成都市华为赛门铁克科技有限公司 Load balance method for virtual machine cluster, server and system
CN102638396A (en) * 2012-03-21 2012-08-15 华为技术有限公司 Load balancing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270605A1 (en) * 2004-04-08 2008-10-30 Viktors Berstis Distributing and Geographically Load Balancing Location Aware Communication Device Client-Proxy Applications
CN102075445A (en) * 2011-02-28 2011-05-25 杭州华三通信技术有限公司 Load balancing method and device
CN102523302A (en) * 2011-12-26 2012-06-27 成都市华为赛门铁克科技有限公司 Load balance method for virtual machine cluster, server and system
CN102638396A (en) * 2012-03-21 2012-08-15 华为技术有限公司 Load balancing method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905324A (en) * 2014-03-21 2014-07-02 汉柏科技有限公司 Dispatching and distributing method and system based on message five-element set
CN103929368B (en) * 2014-05-05 2017-04-26 华为技术有限公司 Load balance method and device for multiple service units
CN104079497A (en) * 2014-07-21 2014-10-01 北京信诺瑞得软件系统有限公司 High-availability loading balancing equipment and method under transparent network bridge mode
CN104079497B (en) * 2014-07-21 2017-03-22 北京信诺瑞得软件系统有限公司 High-availability loading balancing equipment and method under transparent network bridge mode
CN107087023A (en) * 2017-04-06 2017-08-22 平安科技(深圳)有限公司 Data forwarding method and system
CN107087023B (en) * 2017-04-06 2019-11-05 平安科技(深圳)有限公司 Data forwarding method and system
US10693785B2 (en) 2017-04-06 2020-06-23 Ping An Technology (Shenzhen) Co., Ltd. Method and system for forwarding data, virtual load balancer, and readable storage medium
CN111726295A (en) * 2020-06-28 2020-09-29 北京天融信网络安全技术有限公司 Message processing method and device, network equipment and computer readable storage medium
CN111726295B (en) * 2020-06-28 2023-04-07 北京天融信网络安全技术有限公司 Message processing method and device, network equipment and computer readable storage medium
CN115022334A (en) * 2022-05-13 2022-09-06 深信服科技股份有限公司 Flow distribution method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN103441944B (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN105554065B (en) Handle method, converting unit and the applying unit of message
US9674054B2 (en) Concept for providing information on a data packet association and for forwarding a data packet
CN103441944A (en) Data processing method based on load balancing equipment and load balancing equipment
US9680948B2 (en) System and method for device failure notification
US20120303809A1 (en) Offloading load balancing packet modification
CN102404229B (en) System, device and method for load balancing
US10313247B2 (en) System, method, and device for network load balance processing
US9015822B2 (en) Automatic invocation of DTN bundle protocol
CN105791315B (en) A kind of udp protocol acceleration method and system
Shi et al. NDNLP: A link protocol for NDN
WO2014023003A1 (en) Method, apparatus, and system for controlling data transmission
MX2007001777A (en) Methods and apparatus for efficient vpn server interface, address allocation , and signaling with a local addressing domain.
EP3110081A1 (en) Method and apparatus for controlling service chain of service flow
US20130318173A1 (en) Automatically replacing localhost as hostname in url with fully qualified domain name or ip address
CN109474713B (en) Message forwarding method and device
WO2023221452A1 (en) Packet processing system and method, device, and storage medium
CN101873235A (en) Detection method of equipment network link, network management system and network system
CN107249038A (en) Business datum retransmission method and system
CN102761608B (en) The method of UDP session multiplexing and load balancing equipment
US8943123B2 (en) Server apparatus, network access method, and computer program
CN107786536B (en) TCP reverse port penetration method and system thereof
US8478813B2 (en) Transparent migration of endpoint
CN107547621B (en) Message forwarding method and device
CN110995744A (en) Message transmission method and device, software defined network switch and storage medium
JP5723808B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200611

Address after: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park building A1 layer

Patentee after: SANGFOR TECHNOLOGIES Inc.

Address before: 518000 Nanshan Science and Technology Pioneering service center, No. 1 Qilin Road, Guangdong, Shenzhen 418, 419,

Patentee before: Sangfor Network Technology (Shenzhen) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221025

Address after: Floor 3, Building A1, Nanshan Zhiyuan, No. 1001, Xueyuan Avenue, Nanshan District, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Shenxinfu Information Security Co.,Ltd.

Address before: 518000 the first floor of A1 building, Nanshan Zhiyuan 1001, Nanshan District Xue Yuan Avenue, Shenzhen, Guangdong.

Patentee before: SANGFOR TECHNOLOGIES Inc.

TR01 Transfer of patent right