Summary of the invention
The objective of the invention is to propose a kind of communication system backup method and equipment, utilize this method and apparatus, can overcome the redundancy backup dead angle that prior art exists, communication link standby system at the high reliability real-time system, propose a solution, can realize that the software detecting switches the real-time full backup of server, client and communication link, but equal quick recovery system function when any breaks down among the three, thereby make the reliability of backup reach further raising.
The object of the present invention is achieved like this, construct a kind of communication system backup method of high reliability, may further comprise the steps: whether once connected with client computer with main by main first network measuring module detection with server, it is less that the first overtime T1 then is set in this way, be T1=2.5*T, otherwise it is bigger that the first overtime T1 is set, i.e. T1=20*T; If through the current first overtime T1, the master can't connect with client computer with main with server, then carries out server and switches for active and standby part; At the second overtime T2 in the time, wherein: whether T2=2.5*T, detected with main by the second server activestandby state detection module in the backup server and to set up " heartbeat " with server and is connected, if fail to connect then carry out active and standby part of switching of server; Whether detect once with leading by main the 5th network measuring module and to connect, as do not connect that the 3rd overtime T3 then is set is bigger, be i.e. T3=20*T, otherwise it is less that the 3rd overtime T3 is set, i.e. T3=2*T<T1 with server with client computer; If can not connect with server with main, then carry out client computer and switch for active and standby part through the current the 3rd overtime T3; At less the 4th overtime T4 in the time, whether T4=2*T is wherein detected with main by the second client activestandby state detection module in the backup client machine and to set up " heartbeat " with client computer and is connected, if fail to set up then carry out active and standby part of switching of client computer; No matter backup server still is the backup client machine, initiatively requires active and standby switching with server or master with client computer as long as detect the master, and the sign that then will connect is changed to " not connecting " mark; Wherein, T=20s.
Another object of the present invention is to realize like this, construct a kind of communication system alternate device, comprise main with client computer and backup client machine, receive on hub and the backup hub by network adapter respectively, also comprise main with server and backup server, two network adapter are arranged respectively on described server and the backup server, be connected on hub and the backup hub by each line respectively, between the described active and standby part of client computer bidirectional communication link is arranged, it is a disk array cabinet that described server and described backup server are connected respectively to a shared data bank shared data bank, the redundant ability that possesses disk, two hubs constitute double copies, the double copies of two paired client computer of customer facility, two servers constitute double copies, the while network connectivity, the network adapter of server also is double copies, and whole system has all constituted the framework of a full backup.
Equipment provided by the invention, wherein said main with comprising the server host administration module in the server, the first server activestandby state detection module, the first network measuring module and the second network measuring module, in described backup server, comprise server backup machine administration module, second server activestandby state detection module, the 3rd network measuring module and the 4th network measuring module, wherein, the described first network measuring module, the 3rd network measuring module is used to detect the main server of using, backup server and main being connected with client computer, the described second network measuring module, the 4th network measuring module is respectively applied for and detects the main server of using, backup server is connected with the backup client machine, and described Host Administration module is carried out the link joint detection by described first server activestandby state detection module indication, the first or second network measuring module; Described server backup machine administration module indicates the 3rd or the 4th network measuring module to carry out the link joint detection by described second server activestandby state detection module.Wherein, in leading, client-server administration module, the first client activestandby state detection module and the 5th network measuring module are arranged, backup client server management module, the second client activestandby state detection module and the 6th network measuring module are arranged in the backup client machine with client computer.
Implement high reliability communication system backup method provided by the invention and equipment, at first, can in time find the link or the system failure by software mode, and but fault location is initiated the source, and make judgement, its fault judgement mechanism is to judge that by the monitoring facilities that resides in server and client the system communication fault realizes.Secondly, method and apparatus of the present invention can be realized the full backup communication link from the client to the server.Guaranteed the backup completely of system.At last, utilize method and apparatus of the present invention, when communication system breaks down, can recover normal condition rapidly, according to designing after the system failure takes place, system generally can resume operation with interior at 1 minute, thereby satisfies the requirement of present telecommunications industry to the high reliability of communication equipment.
Embodiment
In the hardware implementation structure schematic diagram of the realization the inventive method shown in Fig. 1, be provided with client computer 101 and backup client machine 102, they are received on hub 105 and the backup hub 106 by network adapter 103,104 respectively.Equally, main with two network adapter 109,110 and 111,112 are arranged respectively on server 107 and the backup server 108, also receive on hub 105 and the backup hub 106 by network respectively.These two hubs constitute two networks respectively and backup each other.Herein, two networks are irrelevant mutually, separate.And the network segment of the IP of corresponding network card adapter is identical.But it is main with server 107 and backup server 108 shared databases 113.Dotted line 114,115,116,117,118,119 expression connection message paths among the figure, wherein: dotted line 114 expressions are main with server and main message path with client computer; The main first handshake information path of dotted line 115 expressions with server and backup server; The main message path of dotted line 116 expressions with server and backup client machine; Dotted line 117 expression backup servers and main message path with client computer; The main second handshake information path of dotted line 118 expressions with server and backup server; The message path of dotted line 119 expression backup servers and backup client machine, the communication dual link between active and standby part of client computer of bidirectional signal line 120 expressions.
Realize in the block diagram at the software of the inventive method shown in Fig. 2, in leading, comprise server host administration module 201 with server 107, server activestandby state detection module 202, the first network measuring module 203 and the second network measuring module 204, in backup server 108, comprise server backup machine administration module 205, server activestandby state detection module 206, the first network measuring module 207 and the second network measuring module 208, client-server administration module 209 is arranged in client computer 101, client activestandby state detection module 210 and network measuring module 211 have client-server administration module 212 in client computer 102, client activestandby state detection module 213 and network measuring module 214.Also illustrate among Fig. 2, the master is wiredly connected to main with hub 105, backup hub 106 respectively with server 107, backup server 108, and the master is connected to the main client computer 101 of using with hub 105, and backup hub 106 is connected to Alternative Client 102.
In conjunction with the explanation of above equipment tissue, further specify the backup method of communication system of the present invention.Herein, the master mutually receives and dispatches test frame with main with client computer 101 realization programs by network TCP/IP with server 107 softwares, attention connects in the realization at TCP/IP, main mixed-media network modules mixed-media with server 107 is initiatively to carry out the network connection, and it is to be connected to lead mixed-media network modules mixed-media with client computer 101 and be connect port etc.Originally, backup client machine 102 and backup server 108 all are idlely promptly not provide application service, but detect the running status of main frames at any time by activestandby state detection module 213.The master is connected by general communication link 120 with backup client machine 102 with client computer 101, as by two serial ports, sets up two serial ports links and connects.Server end is set up two communication links by line 114, line 116, master with hub 105, line 115, line 116, backup hub 106 and is connected (also can adopt two serial ports to connect).
Main with server 107 ends being connected by network measuring module 203 and 204 detections and client computer.Two detection modules are all arranged, as 203,204 and 207,208 on each server.Network measuring module 207 and 208 on the backup server is not worked.Main have a network measuring module 211 and 214 respectively with client computer and backup client machine, is used to detect and being connected of server, and the detection module 214 on the backup client machine is not worked.
201 pairs of two network measuring modules 203,204 of server host administration module and server activestandby state detection module 202 carry out integrated management.Determine whether carrying out active and standby part of switching, alarm etc. according to following criterion, the time wherein is provided with, and parameter can be changed according to actual needs.Following column of figure just illustrates.(related T, T1, T2, T3, all legends below T4 is suitable for), below, T=20s basic time is set, backup machine switches deadline<0.2*T from beginning to switch to, and then carries out active and standby part according to following criterion and switches:
If main network measuring module with server as yet not with the client computer setting that connects, so overtimely be set to T1=20*T, in case network measuring module and client computer connect, the overtime T1=2.5*T of being is set so.If can not connect with client computer through T1, then switch.This moment, main frame became standby host, and standby host becomes main frame.
Backup server finds to surpass the T2=2.5*T time, and the activestandby state detection module can't be connected with server foundation " heartbeat " with main, then automatically switches into the main server of using.
The client network detection module does not connect with server as yet, be provided with overtime for T3=20*T, if otherwise T3=2*T<T1. can not connect with server through T1, then switch.This moment, main frame became standby host, and standby host becomes main frame.
The backup client machine finds that through the overtime T4=2*T time activestandby state detection module can't be connected with client computer foundation " heartbeat " with main, then automatically switches into the main client computer of using.
No matter backup server still is the backup client machine, initiatively requires active and standby switching with server or master with client computer as long as detect the master, and the sign that then will once connect is changed to the mark that had not connected.
Be provided with do not connect as yet time-out time quite the reason of big (20T) be to prevent active and standby part of server, client computer is switched back and forth repeatedly.
In the structure of two network interface card driver modules, two NIC drivers adopt two threads that two network interface cards are detected respectively on the server shown in Fig. 3, and network interface path condition detection module manages two network interface cards.
Fig. 4 is when operate as normal, and article one network path 114 is disconnected, and among the figure, 4 " X " of appearance represents the fault point.All are normal for other circuit and backup machine.
Client computer is switched after the time through T3.Be 0.2*T switching time, breaks from link and finish 102 switchings of backup client machine to switching, and is total to 2.2*T<T1, and the master can not switched with server 107.After backup client machine 102 is finished switching,, the winner is rebulid with client computer with server 107 be connected, adapter work, alarm simultaneously by network measuring module 204, network measuring module 214 and the backup hub 106 of Fig. 2.
Illustrate under the situation of main crash with the server appearance (representing to crash with " X " in the server square frame with main among Fig. 5) at Fig. 5, the master earlier will once with server linkage flag be changed to as yet not linkage flag at T3 after the time with client computer 101, automatically switch to the backup client machine then, backup client machine 102 becomes the wait state that enters the 20*T time behind the main frame.The server activestandby state detection module 206 (Fig. 2) of backup server 108 (Fig. 1) was found and can't be connected with server with main in the T2 time, then automaticallying switch becomes the main server of using, network measuring module 208, network measuring module 214 and backup hub 106 that this moment, backup server 108 and backup client machine 102 passed through among Fig. 2, line 219 and 221 rebulids and is connected.
Under main (among the figure, crashing with " X " in square frame expression) situation that occurs crashing with client computer 101 shown in Fig. 6, backup client machine 102 switches after the time through T4.Be 0.2*T switching time, breaks from link and finish the switching of backup client machine to switching, and is total to 2.2*T<T1, and the master can not switched with server 107.After the backup client machine is finished switching, the network measuring module 204 by Fig. 2, network measuring module 214, and backup hub 106, line 217 and 221, main rebuliding with the backup client machine with server 107 is connected, and adapter work is alarmed simultaneously.
Fig. 7 illustrates main two processing procedures that grid line all breaks down with server 107.As shown in Figure 7, after the master finds to connect with server 107 with the master with client computer 101 as through the T3 time, to once be changed to " not being connected as yet " mark with server 107 linkage flags earlier with main, automatically switch to backup client machine 102 then, backup becomes the wait state that current master enters the 20*T time after with client computer with client computer 102.If server is the mutual detection of setting up state by two networks, the software 206 of the activestandby state of backup server 108 detection was so subsequently found and can't be connected with server with main in the T2 time, if (server is to carry out state-detection by serial ports or other communication links, finding after time to be connected through T1 initiatively by serial ports notice backup server requirement switching with client computer) then automaticallying switch becomes the current main server of using, this moment, backup server 108 and backup client machine 102 were by the network measuring module 208 among Fig. 2, network measuring module 214 and backup hub 106, line 219 and 221 rebulids and is connected.
From as seen last, no matter be a network path break down (Fig. 4), still main with server crash (Fig. 5), or the master occurs crashing (Fig. 6) with client computer or two network paths break down (Fig. 7), utilize backup method provided by the invention, can realize quickly and easily that all active and standby part switches.