CN104158735A - Network data package distribution method and device - Google Patents

Network data package distribution method and device Download PDF

Info

Publication number
CN104158735A
CN104158735A CN201410415872.4A CN201410415872A CN104158735A CN 104158735 A CN104158735 A CN 104158735A CN 201410415872 A CN201410415872 A CN 201410415872A CN 104158735 A CN104158735 A CN 104158735A
Authority
CN
China
Prior art keywords
server
master server
client
operating state
address
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.)
Pending
Application number
CN201410415872.4A
Other languages
Chinese (zh)
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.)
Netlegend Technology (beijing) Co Ltd
Secworld Information Technology Beijing Co Ltd
Original Assignee
Netlegend Technology (beijing) Co Ltd
Secworld Information Technology Beijing 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 Netlegend Technology (beijing) Co Ltd, Secworld Information Technology Beijing Co Ltd filed Critical Netlegend Technology (beijing) Co Ltd
Priority to CN201410415872.4A priority Critical patent/CN104158735A/en
Publication of CN104158735A publication Critical patent/CN104158735A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention discloses a network data package distribution method and device, wherein the method comprises: real-time monitoring a first working state of a master server; forwarding a network data package of a client to the master server when the first working state of the master server is normal; and forwarding the network data package of the client to a backup server when the first working state of the master server is abnormal. The present invention solves the problem of high network cost caused by the same configuration used for the master server and backup server in the network of the prior art, and realizes the effect of reducing network cost while ensuring the processing speed and continuity of access.

Description

The distribution method of network packet and device
Technical field
The present invention relates to internet arena, in particular to a kind of distribution method and device of network packet.
Background technology
At present, in the time that network master server breaks down, the common practices that server is realized backup is: after master server breaks down, the service request of client is mail to backup server by gateway, take in time master server by backup server and continue as client service is provided, thereby reach the continual object of access.But adopt above-mentioned backup method in the time that master server recovers normal, client has been set up with backup server and not being connected of follow-up foundation can be switched back master server from backup server.
In prior art, also have a kind of processing method, the configuration of backup server is the same with the configuration of master server in the method, but the configuration of master server and backup server is the same, and hardware configuration is had relatively high expectations, and has increased the cost of website.
As the above analysis, in order to ensure processing speed, the master server of website is the same with the configuration of backup server, causes the cost of website high.
For website in prior art, master server and backup server are used to same configuration, cause the problem that cost of network station is high, not yet propose at present effective solution.
Summary of the invention
For website in correlation technique, master server and backup server are used to same configuration, cause the problem that cost of network station is high, not yet propose at present effective solution, for this reason, main purpose of the present invention is to provide a kind of distribution method and device of network packet, to address the above problem.
To achieve these goals, according to an aspect of the present invention, provide a kind of distribution method of network packet, the method comprises: the first operating state of Real-Time Monitoring master server; When normal, the network packet of client is forwarded to master server in the first operating state of master server; When abnormal, the network packet of client is forwarded to backup server in the first operating state of master server.
Further, the first operating state of Real-Time Monitoring master server comprises: continue to send monitoring request to master server according to default monitoring mode; If receive the response that master server returns according to monitoring request, determine that the first operating state of master server is normal; If do not receive the response that master server returns according to monitoring request, determine that the first operating state of master server is abnormal.
Further,, the network packet of client is forwarded to master server and comprises: the second operating state of obtaining a moment on the master server monitoring when normal in the first operating state of master server; While being abnormal, the mapping server of the network packet of client is switched to master server by backup server in the second operating state, wherein, mapping server is the destination server of gateway forwards network packet.
Further, the mapping server of the network packet of client being switched to master server by backup server comprises: the IP address of the IP address of the mapping server in gateway being revised as to master server.
Further, when the IP address of master server is revised as in the IP address of the mapping server in gateway, or after the IP address of master server is revised as in the IP address of the mapping server in gateway, distribution method also comprises: that has set up with backup server according to the identification information inquiring client terminal of backup server is connected, wherein, identification information comprises the IP address of backup server and the port numbers of backup server; What deletion client had been set up with backup server is connected.
Further,, the network packet of client is forwarded to backup server and comprises: the mapping server of the network packet of client is switched to backup server by master server when abnormal in the first operating state of master server; Wherein, the mapping server of the network packet of client being switched to backup server by master server comprises: the IP address of the IP address of the mapping server in gateway being revised as to backup server.
To achieve these goals, according to a further aspect in the invention, provide a kind of checkout gear of cable local discharge, this device comprises: monitoring modular, for the first operating state of Real-Time Monitoring master server; The first forwarding module, for when normal, being forwarded to master server by the network packet of client in the first operating state of master server; The second forwarding module, for when abnormal, being forwarded to backup server by the network packet of client in the first operating state of master server.
Further, monitoring modular comprises: sending module, sends monitoring request for continuing according to default monitoring mode to master server; The first determination module, in the case of receiving master server according to monitoring the response of asking to return, determines that the first operating state of master server is normal; The second determination module, in the case of not receiving master server according to monitoring the response of asking to return, determines that the first operating state of master server is abnormal.
Further, the first forwarding module comprises: acquisition module, for obtaining second operating state in a moment on the master server monitoring; The first handover module, when being abnormal in the second operating state, switches to master server by the mapping server of the network packet of client by backup server, and wherein, mapping server is the destination server of gateway forwards network packet.
Further, the first handover module comprises: the first modified module, and for the IP address of the mapping server of gateway being revised as to the IP address of master server.
Further, distributor also comprises: enquiry module, for when the IP address of master server is revised as in the IP address of the mapping server of gateway, or after the IP address of master server is revised as in the IP address of the mapping server in gateway, that has set up with backup server according to the identification information inquiring client terminal of backup server is connected, wherein, identification information comprises the IP address of backup server and the port numbers of backup server; Removing module, for deleting being connected that client set up with backup server.
Further, the second forwarding module comprises: the second handover module, for the mapping server of the network packet of client is switched to backup server by master server; Wherein, the second handover module comprises: the second modified module, and for the IP address of the mapping server of gateway being revised as to the IP address of backup server.
Adopt the embodiment of the present invention, the operating state of master server is carried out to Real-Time Monitoring, in the time that the operating state of master server is normal, the network packet of client is forwarded to master server; In the time that the operating state of master server is abnormal, the network packet of client is forwarded to backup server.In the above embodiment of the present invention, the network packet of client is forwarded to backup server by the very first time that the operating state of Real-Time Monitoring master server can break down at master server, and at once the network packet of client is forwarded to master server again after master server recovers normally.Because the service time of backup server is shorter, therefore backup server uses lower configuration, to save cost.Particularly, can, using high configuration server as master server, in trouble-proof situation, preferentially provide service, process the network packet of client, use the lower server of configuration is backup server simultaneously, and service is provided in the situation that master server breaks down.Pass through the above embodiment of the present invention, thereby solve website in prior art master server and backup server have been used to same configuration, cause the problem that cost of network station is high, realized and ensured processing speed and accessing the continual while, reduce the effect of cost of network station.
Brief description of the drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the application's a part, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is according to the flow chart of the distribution method of the network packet of the embodiment of the present invention;
Fig. 2 is according to the topological diagram of a kind of application network of the embodiment of the present invention;
Fig. 3 is according to the flow chart of changing method between a kind of optional master server of the embodiment of the present invention and backup server;
Fig. 4 is according to the schematic diagram of the distribution method of a kind of optional network packet of the embodiment of the present invention; And
Fig. 5 is according to the schematic diagram of the distributor of the network packet of the embodiment of the present invention.
Embodiment
In order to make those skilled in the art person understand better the present invention program, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in specification of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and needn't be used for describing specific order or precedence.The data that should be appreciated that such use suitably can exchanged in situation, so as embodiments of the invention described herein can with except diagram here or describe those order enforcement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, for example, those steps or unit that process, method, system, product or the equipment that has comprised series of steps or unit is not necessarily limited to clearly list, but can comprise clearly do not list or for these processes, method, product or equipment intrinsic other step or unit.
Fig. 1 is that the method comprises the steps: as shown in Figure 1 according to the flow chart of the distribution method of the network packet of the embodiment of the present invention
Step S102, the first operating state of Real-Time Monitoring master server.
Step S104, when normal, is forwarded to master server by the network packet of client in the first operating state of master server.
Step S106, when abnormal, is forwarded to backup server by the network packet of client in the first operating state of master server.
Adopt the embodiment of the present invention, the operating state of master server is carried out to Real-Time Monitoring, in the time that the operating state of master server is normal, the network packet of client is forwarded to master server; In the time that the operating state of master server is abnormal, the network packet of client is forwarded to backup server.In the above embodiment of the present invention, the network packet of client is forwarded to backup server by the very first time that the operating state of Real-Time Monitoring master server can break down at master server, and at once the network packet of client is forwarded to master server again after master server recovers normally.Because the service time of backup server is shorter, therefore backup server uses lower configuration, to save cost.Particularly, can, using high configuration server as master server, in trouble-proof situation, preferentially provide service, process the network packet of client, use the lower server of configuration is backup server simultaneously, and service is provided in the situation that master server breaks down.Pass through the above embodiment of the present invention, thereby solve website in prior art master server and backup server have been used to same configuration, cause the problem that cost of network station is high, realized and ensured processing speed and accessing the continual while, reduce the effect of cost of network station.
Introduce in detail above-described embodiment below in conjunction with Fig. 2.
As shown in Figure 2, server area has the server of 2 at present, provides service with server load backup mode.Server A in Fig. 2: 192.168.1.2 is above-mentioned master server, and server B: 192.168.1.3 is above-mentioned backup server, and GE is gigabit Ethernet.
For example, when the tcp6021 port of client-access 61.61.61.1, by tcp6021 port mapping to office system server group.Wherein, office system server can be OA server, can be also http server of TCP 80 ports etc.
The above embodiment of the present invention specifically can realize the forwarding of network packet by the following method:
1. the working method when operating state of master server is normal: when server A: when 192.168.1.2 operating state is normal, the tcp6021 port mapping of 61.61.61.1 is to the tcp6021 port of server A: 192.168.1.2.
2. working method when master server breaks down: when server A: 192.168.1.2 breaks down while stopping serving, above-mentioned mapping goes to server B: 192.168.1.3; Fire compartment wall can active probe server A: 192.168.1.2 tcp6021 port whether have response, in the time stopping responding, mapping switches to the tcp6021 port of server B: 192.168.1.3 immediately.
3. master server recovers normal later working method: in the time that server A: 192.168.1.2 recovers normal work, mapping goes to server A: 192.168.1.2, is connected disconnection with server B: 192.168.1.3 original; In the time of the tcp6021 of server A: 192.168.1.2 port Resume service, fire compartment wall will cut off server B immediately: the mapping session on 192.168.1.3, and force the Mapping and Converting of network to server A: 192.168.1.2.
By the above embodiment of the present invention, in the normal situation of operating state of master server, client and master server are set up mapping, and network packet will be forwarded to master server, provide service by master server.After master server breaks down, client will stop and the mapping of master server, and set up mapping with backup server immediately, network packet by forwarding immediately to backup server, provide service to continue as client, avoid causing website normally to work because master server breaks down.Owing to can the operating state of master server being carried out to Real-Time Monitoring, therefore, after master server recovers normally, can immediately mapping be gone to master server, and cut off the mapping session on backup server.Because backup server is to use during master server breaks down, and the configuration of backup server is lower, can continuously and effectively provide for client under the prerequisite of service in guarantee, realizes the effect of saving cost of network station.
According to the abovementioned embodiments of the present invention, the first operating state of Real-Time Monitoring master server can comprise: continue to send monitoring request to master server according to default monitoring mode; If receive the response that master server returns according to monitoring request, determine that the first operating state of master server is normal; If do not receive the response that master server returns according to monitoring request, determine that the first operating state of master server is abnormal.
Particularly, can specify detection mode, probe interval time and survey and unsuccessfully confirm number of times (above-mentioned default monitoring mode), the first operating state of master server is carried out to Real-Time Monitoring.Gateway can, according to the default probe interval time, regularly be surveyed the state of master server, and wherein, the probe interval time is a default value, and particularly, the probe interval time can be set as required flexibly.Detection method can ask to survey master server by PING, and whether also can survey master server by the detection mode of TCP provides the process of service normal (such as initiating SYN request).If receive the response that master server returns according to monitoring request, for example, in the above embodiment of the present invention, receive that ping replys or SYN+ACK responds bag etc., for to survey successfully, the first operating state of determining master server is normal, if do not receive the response that master server returns according to monitoring request, for to survey unsuccessfully, determine that the first operating state of master server is abnormal.According to different needs, can set detection and unsuccessfully confirm number of times, lead to errors and be judged as master server fault to avoid once not receiving the response that master server returns according to monitoring request, unsuccessfully confirm number of times by detection is set, can improve the accuracy of the first operating state of monitoring master server.
Wherein, PING (Packet Internet Groper, be the Internet packets survey meter), for the program of test network connection amount, PING sends an ICMP (Internet Control Messages Protocol, be internet letter report control protocol), whether echo request message receives desirable ICMP Echo Reply to destination report, is the order for checking the whether unobstructed or network connection speed of network; TCP (Transmission Control Protocol, be transmission control protocol) be the transport layer protocol in internet, when masters is sent after SYN connection request, wait for that the other side answers SYN+ACK, and finally the other side's SYN is carried out to ACK and confirm, this method connecting can prevent wrong connection.
According to the abovementioned embodiments of the present invention, in the first operating state of master server, when normal, the network packet of client is forwarded to master server can be comprised: the second operating state of obtaining a moment on the master server monitoring; While being abnormal, the mapping server of the network packet of client is switched to master server by backup server in the second operating state, wherein, mapping server is the destination server of gateway forwards network packet.
Particularly, the mapping server of the network packet of client being switched to master server by backup server can comprise: the IP address of the IP address of the mapping server in gateway being revised as to master server.
What need to further illustrate is, when the IP address of master server is revised as in the IP address of the mapping server in gateway, or after the IP address of master server is revised as in the IP address of the mapping server in gateway, distribution method also comprises: that has set up with backup server according to the identification information inquiring client terminal of backup server is connected, wherein, identification information comprises the IP address of backup server and the port numbers of backup server; What deletion client had been set up with backup server is connected.
Describe the above embodiment of the present invention in detail below in conjunction with Fig. 3.As shown in Figure 3, this embodiment comprises the steps:
Step S301, detects master server and recovers normal operating conditions.
Wherein, if it is normal to detect the operating state of current time master server, and the operating state of the master server in a upper moment of current time is abnormal, determines that master server recovers normal operating conditions.
Particularly, the implementation method of surveying in this embodiment is identical with the implementation method of the detection of the step S102 shown in Fig. 1, does not repeat them here.
Step S303, obtains backup server IP address and port numbers.
Step S305, according to backup server IP address and port numbers query State table, obtains Query Result.
Particularly, after detecting master server recovery normal operating conditions, obtain IP address and the port numbers of backup server, and carry out status table according to the IP address of backup server and port numbers, wherein, in state table, record the information being connected of having set up between client and backup server, obtain Query Result.
Step S307, the link information of deleting the backup server recording in state table according to Query Result.
Particularly, according to Query Result, in deletion gateway, record the state table being connected that client is set up with backup server.
Pass through above-described embodiment, can be after master server recovers normal condition, when the IP address of master server is revised as in the IP address of the mapping server in gateway, or after the IP address of master server is revised as in the IP address of the mapping server in gateway, delete being connected of having set up between client and backup server, old like this connection request just can be forwarded to master server, after master server recovers normal operating conditions, disconnect being connected between client and backup server, continue to use master server to provide service for client.
Wherein, old connection request is for before switching to master server by mapping server, and that between client and backup server, sets up is connected.
According to the abovementioned embodiments of the present invention, in the first operating state of master server, when abnormal, the network packet of client is forwarded to backup server can be comprised: the mapping server of the network packet of client is switched to backup server by master server; Wherein, the mapping server of the network packet of client being switched to backup server by master server comprises: the IP address of the IP address of the mapping server in gateway being revised as to backup server.
In the first operating state of master server when abnormal, the IP address that gateway can be revised as backup server by the IP address of the mapping server of wherein preserving, so that the mapping server of the network packet of client is switched to backup server by master server, take over master server by backup server and continue as client service is provided, ensure to be continuously client in the situation that master server breaks down service is provided.
Fig. 4 is according to the flow chart of the distribution method of a kind of optional network packet of the embodiment of the present invention, and as shown in Figure 4, the method embodiment comprises the following steps:
Step S401, judges that whether the operating state of master server is normal.
Wherein, the implementation method of this step is identical with the implementation method of the detection of the step S102 shown in Fig. 1, does not repeat them here.
Particularly, in the case of the working state abnormal of master server, execution step S402; In the normal situation of operating state of master server, execution step S404.
Step S402, the IP address that the IP address of upgrading mapping server is backup server.
Particularly, in the case of the working state abnormal of master server, the IP address that backup server is revised as in the IP address of the mapping server corresponding with client recording in gateway, provides service to use backup server to continue as client during master server breaks down.
Step S403, data retransmission is to backup server.
Wherein, the data in this step are the network packet that client-requested forwards.
Step S404, judges that whether the last operating state of master server is normal.
The operating state of the master server that the upper moment that wherein, last operating state is current time monitors.
Wherein, on master server once in the normal situation of operating state, execution step S405; On master server once working state abnormal in the situation that, execution step S406.
Step S405, data are still forwarded to master server.
Particularly, in the normal situation of operating state of master server, continue to judge that whether the last operating state of master server is normal, on master server once in the normal situation of operating state, continue to forward the data to master server, wherein, the data in this step are the network packet of client.
Step S406, mapping server switches back master server by backup server.
Step S407, that between the client of preserving in inquiry gateway and backup server, sets up is connected.
Step S408, Delete query to client and backup server between set up be connected.
On master server, once working state abnormal in the situation that, master server IP address is revised as in the mapping server IP address corresponding with client of recording in gateway, so that mapping server switches back master server.Then according to backup server IP address and service port number, that between the client that inquiry is preserved in gateway and backup server, has set up is connected, and all connections to backup server that inquire are deleted.
Pass through above-described embodiment, can be the in the situation that of the normal work of master server, use master server to provide service for client, in the situation that master server breaks down, use backup server to provide service for client, and after master server recovers normally, continue to use master server to serve instead of backup server for client provides.
It should be noted that, can in the computer system such as one group of computer executable instructions, carry out in the step shown in the flow chart of accompanying drawing, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
Fig. 5 is according to the schematic diagram of the distributor of the network packet of the embodiment of the present invention, and as shown in Figure 5, this checkout gear can comprise: monitoring modular 10, the first forwarding module 30 and the second forwarding module 50.
Wherein, monitoring modular, for the first operating state of Real-Time Monitoring master server.
The first forwarding module, for when normal, being forwarded to master server by the network packet of client in the first operating state of master server.
The second forwarding module, for when abnormal, being forwarded to backup server by the network packet of client in the first operating state of master server.
Adopt the embodiment of the present invention, the operating state of master server is carried out to Real-Time Monitoring, in the time that the operating state of master server is normal, the network packet of client is forwarded to master server; In the time that the operating state of master server is abnormal, the network packet of client is forwarded to backup server.In the above embodiment of the present invention, the network packet of client is forwarded to backup server by the very first time that the operating state of Real-Time Monitoring master server can break down at master server, and at once the network packet of client is forwarded to master server again after master server recovers normally.Because the service time of backup server is shorter, therefore backup server uses lower configuration, to save cost.Particularly, can, using high configuration server as master server, in trouble-proof situation, preferentially provide service, process the network packet of client, use the lower server of configuration is backup server simultaneously, and service is provided in the situation that master server breaks down.Pass through the above embodiment of the present invention, thereby solve website in prior art master server and backup server have been used to same configuration, cause the problem that cost of network station is high, realized and ensured processing speed and accessing the continual while, reduce the effect of cost of network station.
Particularly, in the normal situation of operating state of master server, client and master server are set up mapping, and network packet will be forwarded to master server, provide service by master server.After master server breaks down, client will stop and the mapping of master server, and set up mapping with backup server immediately, network packet by forwarding immediately to backup server, provide service to continue as client, avoid causing website normally to work because master server breaks down.Owing to can the operating state of master server being carried out to Real-Time Monitoring, therefore, after master server recovers normally, can immediately mapping be gone to master server, and cut off the mapping session on backup server.Because backup server is to use during master server breaks down, and the configuration of backup server is lower, can continuously and effectively provide for client under the prerequisite of service in guarantee, realizes the effect of saving cost of network station.
According to the abovementioned embodiments of the present invention, monitoring modular can comprise: sending module, sends monitoring request for continuing according to default monitoring mode to master server; The first determination module, in the case of receiving master server according to monitoring the response of asking to return, determines that the first operating state of master server is normal; The second determination module, in the case of not receiving master server according to monitoring the response of asking to return, determines that the first operating state of master server is abnormal.
Particularly, can specify detection mode, probe interval time and survey and unsuccessfully confirm number of times (above-mentioned default monitoring mode), the first operating state of master server is carried out to Real-Time Monitoring.Gateway can, according to the default probe interval time, regularly be surveyed the state of master server, and wherein, the probe interval time is a default value, and particularly, the probe interval time can be set as required flexibly.Detection method can ask to survey master server by PING, and whether also can survey master server by the detection mode of TCP provides the process of service normal (such as initiating SYN request).If receive the response that master server returns according to monitoring request, for example, in the above embodiment of the present invention, receive that ping replys or SYN+ACK responds bag etc., for to survey successfully, the first operating state of determining master server is normal, if do not receive the response that master server returns according to monitoring request, for to survey unsuccessfully, determine that the first operating state of master server is abnormal.According to different needs, can set detection and unsuccessfully confirm number of times, lead to errors and be judged as master server fault to avoid once not receiving the response that master server returns according to monitoring request, unsuccessfully confirm number of times by detection is set, can improve the accuracy of the first operating state of monitoring master server.
Wherein, PING (Packet Internet Groper, be the Internet packets survey meter), for the program of test network connection amount, PING sends an ICMP (Internet Control Messages Protocol, be internet letter report control protocol), whether echo request message receives desirable ICMP Echo Reply to destination report, is the order for checking the whether unobstructed or network connection speed of network; TCP (Transmission Control Protocol, be transmission control protocol) be the transport layer protocol in internet, when masters is sent after SYN connection request, wait for that the other side answers SYN+ACK, and finally the other side's SYN is carried out to ACK and confirm, this method connecting can prevent wrong connection.
In the above embodiment of the present invention, the first forwarding module can comprise: acquisition module, for obtaining second operating state in a moment on the master server monitoring; The first handover module, when being abnormal in the second operating state, switches to master server by the mapping server of the network packet of client by backup server, and wherein, mapping server is the destination server of gateway forwards network packet.
Particularly, the first handover module can comprise: the first modified module, and for the IP address of the mapping server of gateway being revised as to the IP address of master server.
According to the abovementioned embodiments of the present invention, distributor can also comprise: enquiry module, for when the IP address of master server is revised as in the IP address of the mapping server of gateway, or after the IP address of master server is revised as in the IP address of the mapping server in gateway, that has set up with backup server according to the identification information inquiring client terminal of backup server is connected, wherein, identification information comprises the IP address of backup server and the port numbers of backup server; Removing module, for deleting being connected that client set up with backup server.
Pass through above-described embodiment, can be after master server recovers normal condition, when the IP address of master server is revised as in the IP address of the mapping server in gateway, or after the IP address of master server is revised as in the IP address of the mapping server in gateway, delete being connected of having set up between client and backup server, old like this connection request just can be forwarded to master server, after master server recovers normal operating conditions, disconnect being connected between client and backup server, continue to use master server to provide service for client.
Wherein, old connection request is for before switching to master server by mapping server, and that between client and backup server, sets up is connected.
Need to further illustrate, the second forwarding module can comprise: the second handover module, for the mapping server of the network packet of client is switched to backup server by master server; The second handover module comprises: the second modified module, and for the IP address of the mapping server of gateway being revised as to the IP address of backup server.
Pass through above-described embodiment, in the first operating state of master server when abnormal, the IP address that gateway can be revised as backup server by the IP address of the mapping server of wherein preserving, so that the mapping server of the network packet of client is switched to backup server by master server, take over master server by backup server and continue as client service is provided, ensure to be continuously client in the situation that master server breaks down service is provided.
The modules providing in the present embodiment is identical with the using method that the corresponding step of embodiment of the method provides, application scenarios also can be identical.Certainly, it should be noted that the scheme that above-mentioned module relates to can be not limited to content and the scene in embodiment of the method, and above-mentioned module may operate in terminal or mobile terminal, can realize by software or hardware.
As can be seen from the above description, the present invention has realized following technique effect:
Adopt the embodiment of the present invention, the operating state of master server is carried out to Real-Time Monitoring, in the time that the operating state of master server is normal, the network packet of client is forwarded to master server; In the time that the operating state of master server is abnormal, the network packet of client is forwarded to backup server.In the above embodiment of the present invention, the network packet of client is forwarded to backup server by the very first time that the operating state of Real-Time Monitoring master server can break down at master server, and at once the network packet of client is forwarded to master server again after master server recovers normally.Because the service time of backup server is shorter, therefore backup server uses lower configuration, to save cost.Particularly, can, using high configuration server as master server, in trouble-proof situation, preferentially provide service, process the network packet of client, use the lower server of configuration is backup server simultaneously, and service is provided in the situation that master server breaks down.Pass through the above embodiment of the present invention, thereby solve website in prior art master server and backup server have been used to same configuration, cause the problem that cost of network station is high, realized and ensured processing speed and accessing the continual while, reduce the effect of cost of network station.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that multiple calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in storage device and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or the multiple modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. a distribution method for network packet, is characterized in that, comprising:
The first operating state of Real-Time Monitoring master server;
When normal, the network packet of client is forwarded to described master server in the first operating state of described master server;
When abnormal, the described network packet of described client is forwarded to backup server in the first operating state of described master server.
2. distribution method according to claim 1, is characterized in that, the first operating state of Real-Time Monitoring master server comprises:
Continue to send monitoring request to described master server according to default monitoring mode;
If receive the response that described master server returns according to described monitoring request, determine that the first operating state of described master server is normal;
If do not receive the response that described master server returns according to described monitoring request, determine that the first operating state of described master server is abnormal.
3. distribution method according to claim 1, is characterized in that,, the network packet of client is forwarded to described master server and comprises when normal in the first operating state of described master server:
Obtain second operating state in a moment on the described master server monitoring;
While being abnormal, the mapping server of the described network packet of described client is switched to described master server by described backup server in described the second operating state,
Wherein, described mapping server is the destination server of network packet described in gateway forwards.
4. distribution method according to claim 3, is characterized in that, the mapping server of the described network packet of described client is switched to described master server by described backup server and comprise:
The IP address of the described mapping server in described gateway is revised as to the IP address of described master server.
5. distribution method according to claim 4, is characterized in that,
When the IP address of described master server is revised as in the IP address of the described mapping server in described gateway, or after the IP address of described master server is revised as in the IP address of the described mapping server in described gateway, described distribution method also comprises:
Inquire about described client and being connected that described backup server has been set up according to the identification information of described backup server, wherein, described identification information comprises the IP address of described backup server and the port numbers of described backup server;
Delete described client and being connected that described backup server has been set up.
6. according to the distribution method described in any one in claim 1 to 5, it is characterized in that,
, the described network packet of described client is forwarded to backup server and comprises: the mapping server of the described network packet of described client is switched to described backup server by described master server when abnormal in the first operating state of described master server;
Wherein, the mapping server of the described network packet of described client being switched to described backup server by described master server comprises: the IP address of the IP address of the described mapping server in gateway being revised as to described backup server.
7. a distributor for network packet, is characterized in that, comprising:
Monitoring modular, for the first operating state of Real-Time Monitoring master server;
The first forwarding module, for when normal, being forwarded to described master server by the network packet of client in the first operating state of described master server;
The second forwarding module, for when abnormal, being forwarded to backup server by the described network packet of described client in the first operating state of described master server.
8. distributor according to claim 7, is characterized in that, described monitoring modular comprises:
Sending module, sends monitoring request for continuing according to default monitoring mode to described master server;
The first determination module, in the case of receiving the response that described master server returns according to described monitoring request, determines that the first operating state of described master server is normal;
The second determination module, in the case of not receiving the response that described master server returns according to described monitoring request, determines that the first operating state of described master server is abnormal.
9. distributor according to claim 7, is characterized in that, described the first forwarding module comprises:
Acquisition module, for obtaining second operating state in a moment on the described master server monitoring;
The first handover module, when being abnormal in described the second operating state, switches to described master server by the mapping server of the described network packet of described client by described backup server,
Wherein, described mapping server is the destination server of network packet described in gateway forwards.
10. distributor according to claim 9, is characterized in that, described the first handover module comprises:
The first modified module, for being revised as the IP address of the described mapping server of described gateway the IP address of described master server.
11. distributors according to claim 10, is characterized in that, described distributor also comprises:
Enquiry module, for when the IP address of described master server is revised as in the IP address of the described mapping server of described gateway, or after the IP address of described master server is revised as in the IP address of the described mapping server in described gateway, inquire about described client and being connected that described backup server has been set up according to the identification information of described backup server, wherein, described identification information comprises the IP address of described backup server and the port numbers of described backup server;
Removing module, for deleting described client and being connected that described backup server has been set up.
12. according to the distributor described in any one in claim 7 to 11, it is characterized in that, described the second forwarding module comprises:
The second handover module, for switching to described backup server by the mapping server of the described network packet of described client by described master server;
Wherein, the second handover module comprises:
The second modified module, for being revised as the IP address of the described mapping server of gateway the IP address of described backup server.
CN201410415872.4A 2014-08-21 2014-08-21 Network data package distribution method and device Pending CN104158735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410415872.4A CN104158735A (en) 2014-08-21 2014-08-21 Network data package distribution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410415872.4A CN104158735A (en) 2014-08-21 2014-08-21 Network data package distribution method and device

Publications (1)

Publication Number Publication Date
CN104158735A true CN104158735A (en) 2014-11-19

Family

ID=51884144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410415872.4A Pending CN104158735A (en) 2014-08-21 2014-08-21 Network data package distribution method and device

Country Status (1)

Country Link
CN (1) CN104158735A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106100940A (en) * 2016-08-25 2016-11-09 上海斐讯数据通信技术有限公司 A kind of network message supervising device and monitoring method thereof
CN107979876A (en) * 2017-11-16 2018-05-01 广州市百果园网络科技有限公司 Data transmission method and terminal
CN108134854A (en) * 2017-12-15 2018-06-08 江苏神州信源系统工程有限公司 A kind of hot spare method and system based on NAT technologies

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030167343A1 (en) * 2002-03-04 2003-09-04 Takayuki Furuno Communications system
CN101204076A (en) * 2005-02-11 2008-06-18 思科技术公司 Resilient regisration with a call manager
CN101394306A (en) * 2008-07-08 2009-03-25 国电南瑞科技股份有限公司 Seamless switching method for dual server system
CN103236947A (en) * 2013-04-23 2013-08-07 厦门亿联网络技术股份有限公司 Method for switching main server and standby of VOIP (voice over Internet phone)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030167343A1 (en) * 2002-03-04 2003-09-04 Takayuki Furuno Communications system
CN101204076A (en) * 2005-02-11 2008-06-18 思科技术公司 Resilient regisration with a call manager
CN101394306A (en) * 2008-07-08 2009-03-25 国电南瑞科技股份有限公司 Seamless switching method for dual server system
CN103236947A (en) * 2013-04-23 2013-08-07 厦门亿联网络技术股份有限公司 Method for switching main server and standby of VOIP (voice over Internet phone)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106100940A (en) * 2016-08-25 2016-11-09 上海斐讯数据通信技术有限公司 A kind of network message supervising device and monitoring method thereof
CN107979876A (en) * 2017-11-16 2018-05-01 广州市百果园网络科技有限公司 Data transmission method and terminal
CN107979876B (en) * 2017-11-16 2022-01-07 广州市百果园网络科技有限公司 Data transmission method and terminal
CN108134854A (en) * 2017-12-15 2018-06-08 江苏神州信源系统工程有限公司 A kind of hot spare method and system based on NAT technologies

Similar Documents

Publication Publication Date Title
CN108123824B (en) Network fault detection method and device
EP3151467B1 (en) Method and apparatus for detecting user network interface connectivity of virtual private network
CN104270291A (en) Content delivery network (CDN) quality monitoring method
CN110855633A (en) Method, device and system for protecting distributed denial of service (DDOS) attack
CN105024855A (en) Distributed cluster management system and method
CN102571492B (en) Method and device for detecting failure of routing equipment
CN109586959B (en) Fault detection method and device
CN108833149B (en) Method and system for monitoring network availability and self-healing of express delivery cabinet
CN111355649A (en) Flow reinjection method, device and system
CN104065508A (en) Application service health examination method, device and system
US20170033978A1 (en) Method and device for processing communication path
CN101841424B (en) EMS network management system and method based on SOCKS proxy connection
CN104580013A (en) Network communication method and system capable of realizing fast access point selection
CN102739462B (en) Test message sending method and device
CN104158735A (en) Network data package distribution method and device
CN105306303B (en) The real-time monitoring system of failure and terminal network appliance based on terminal network appliance
CN108683561B (en) Site state detection method and device
CN106230658B (en) A kind of method and apparatus monitoring the network equipment
CN116708129A (en) Method, device and storage medium for link fault detection and quick recovery
CN101848165B (en) The method recovered after controlling interrupted communication link and interface board
CN109379760B (en) MEC bypass system and method
CN109347743B (en) Special line communication method, computer readable storage medium and terminal equipment
CN113517994A (en) Network fault removing method and system
CN108270593A (en) A kind of two-node cluster hot backup method and system
CN113037622B (en) System and method for preventing BFD from vibrating

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141119