Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment one,
See also Fig. 2, the flow chart of a kind of main/standby switching method that Fig. 2 provides for the embodiment of the invention one.As shown in Figure 2, this method can comprise:
201: whether monitoring is main takes place unusually with server;
Whether for instance, monitoring is main takes place can include but not limited to following method unusually with server:
Whether A1, monitoring receive main the indication with server being used to of sending mainly with server unusual message takes place, thereby determines mainly whether take place unusually with server.
Whether B1, monitoring receive described main heartbeat status data with server in the given time, thereby determine whether the master takes place with server unusually.
202: take place the main policy data that is used to manage business with server to be loaded into standby server when unusual with server when main;
For instance, the main policy data that is used to manage business with server is loaded into standby server and can includes but not limited to following method:
C1, from service managing server, obtain the main policy data that is used to manage business with server, and the master that will obtain is loaded into standby server with the policy data that server is used to manage business.
D1, instruction standby server obtain and load the policy data that the unusual master of generation is used to manage business with server from service managing server.
203: the control standby server carries out Business Processing according to the main policy data with server that is loaded.
For instance, the control standby server carries out Business Processing according to main policy data with server and can include but not limited to following method:
Unusual main unsteady Internet protocol (IP, Internet Protocol) address with server takes place in the binding of control standby server, so that standby server carries out Business Processing according to main policy data with server.
For instance,, after the control standby server carried out Business Processing according to main policy data with server, the method that the embodiment of the invention provides may further include:
Recover normal if monitor the master with server, then control standby server and stop to carry out Business Processing.
Specifically can discharge the main unsteady Internet protocol address of having bound, thereby stop to carry out Business Processing by the control standby server with server.
For instance, the main policy data that is used to manage business with server can include but not limited to main service quality (QoS, the Quality of Service) policy data that is used to manage business with server, routing policy data or the like.
The above-mentioned main/standby switching method that the embodiment of the invention one is provided is described in detail, the embodiment of the invention main takes place when unusual with server monitoring, can be loaded into standby server with unusual main policy data with server takes place, replace the master to continue as the user by standby server Business Processing is provided with server, thereby realized the active and standby switching in the server cluster system, avoided adopting the mode of disk chassis to carry out active and standby switching, reduced system cost.
Embodiment two,
See also Fig. 3, the flow chart of a kind of main/standby switching method that Fig. 3 provides for the embodiment of the invention two.As shown in Figure 3, this method can comprise:
301: whether monitoring is main takes place unusually with server, if then carry out 302; If not, then carry out 305;
Whether for instance, monitoring is main takes place can comprise unusually with server:
Whether monitoring receives main is represented mainly with server unusual message to take place with server being used to of sending;
Perhaps, whether monitoring receives main heartbeat status data with server in the given time, thereby determines whether the master takes place with server unusually.
For instance, the main server of using can pass through to receive after the switching message that is produced by the manual mode triggering, sends self unexpected message; Perhaps, main can unusual extension to have taken place in certain resource that monitors self with server dead, and can't recover the time, mainly represents self unexpected message with serving to send.
Because unusual situation when taking place in the main server of using, standby server and other network equipment transmission of mode in group system that generally can take to broadcast is used to indicate the unusual message of self generation, therefore, can mainly with server unusual message take place and determine mainly to take place unusually with server by receiving main the indication with server being used to of sending.
Because in server cluster system, main with connecting by the heartbeat network between server and standby server and other network equipments, and work as the master just often with server, main heartbeat status data with server can be received by standby server and other network equipments by the heartbeat network, therefore, if can not receive in the given time main with server the heartbeat status data think that this master taken place with server unusually.
302: from service managing server, obtain the policy data that unusual master is used to manage business with server takes place;
For instance, described master can be stored in service managing server in advance with the policy data that server is used for managing business, and the main policy data that is used to manage business with server can include but not limited to main qos policy data with server, routing policy data or the like.
303: unusual master will be taken place be loaded into standby server with the policy data that server is used to manage business;
304: the control standby server carries out Business Processing according to the main policy data with server that loads.
For instance, can control the standby server binding unusual main unsteady Internet protocol address with server takes place, standby server can carry out Business Processing according to unusual main policy data with server takes place like this.
Need to prove, take place when unusual with server, mainly can automatically perform off-line operation, and discharge the floating IP address of self with server when main.
305:, then control standby server and stop to carry out Business Processing if monitor main normally with server.
For instance, can discharge the main floating IP address with server bound by the control standby server, like this, when standby server discharges bound main with after the floating IP address of server, standby server will stop to carry out Business Processing.
Above-mentionedly provide main/standby switching method to be described in detail to the embodiment of the invention two, the embodiment of the invention main takes place when unusual with server monitoring, can from service managing server, obtain unusual main policy data with server takes place, and this policy data is loaded into standby server, replace the unusual master of generation to continue as the user by standby server Business Processing is provided with server, thereby realized the active and standby switching in the server cluster system, avoided adopting the mode of disk chassis to carry out active and standby switching, reduced system cost.
Embodiment three:
See also Fig. 4, the flow chart of a kind of main/standby switching method that Fig. 4 provides for the embodiment of the invention three.As shown in Figure 4, this method can comprise:
401: whether monitoring is main takes place unusually with server, if then carry out 402; If not, then carry out 404;
For instance, hang owing to the reason of sudden power causes when dead with server, mainly will stop all work, and discharge the floating IP address of self with server when main.At this moment, can not receive main heartbeat status data in the given time by judging with server, unusual thereby definite master is taken place with server.
402: the instruction standby server obtains and loads the policy data that the unusual master of generation is used to manage business with server from service managing server;
For instance, the main policy data that is used to manage business with server can include but not limited to main qos policy data with server, routing policy data or the like.
403: the control standby server carries out Business Processing according to the main policy data with server that loads.
For instance, can control the standby server binding unusual main unsteady Internet protocol address with server takes place, standby server can carry out Business Processing according to unusual main policy data with server takes place like this.
Need to prove, take place when unusual with server, mainly can automatically perform off-line operation, and discharge the floating IP address of self with server when main.
404:, then control standby server and stop to carry out Business Processing if monitor main normally with server.
For instance, can discharge the main floating IP address with server bound by the control standby server, like this, when standby server discharges bound main with after the floating IP address of server, standby server will stop to carry out Business Processing.
Said main number with server can be a plurality of in the present embodiment, and described standby server also can be a plurality of.Because of certain reason hang dead when main with server suddenly, can cause not receiving in the given time the heartbeat status data of this master with server, can determine that like this this master is unusual with the server generation, the policy data that unusual master is used to manage business with server take place thereby can instruct standby server from service managing server, to obtain and load.
The above-mentioned main/standby switching method that the embodiment of the invention three is provided is described in detail, the embodiment of the invention can take place when unusual with server in that monitoring is main, the instruction standby server is from obtaining and load main policy data with server from service managing server, replace the master to continue as the user according to the policy data that loads then Business Processing is provided with server, thereby realized the active and standby switching in the server cluster system, avoided adopting the mode of disk chassis to carry out active and standby switching, can reduce system cost.
Embodiment four:
See also Fig. 5, the structure chart of a kind of active and standby switching device shifter that Fig. 5 provides for the embodiment of the invention four.The active and standby switching device shifter that the embodiment of the invention provides both can be used as the active and standby switching that separate equipment is used for realizing server cluster system, also can be used as the part of standby server, was used for the active and standby switching of existing server cluster system.As shown in Figure 5, this device can comprise:
Monitoring unit 501 is used for whether monitoring is main takes place unusually with server;
Loading unit 502 is used for taking place the main policy data that is used to manage business with server to be loaded into standby server when unusual with server when main;
Control unit 503 is used to control standby server and carries out Business Processing according to the main policy data with server that loads.
For instance, whether monitoring unit 501 can receive main the indication with server being used to of sending by monitoring and mainly with server unusual message takes place; Or whether receive main heartbeat status data in the given time, thereby determine whether described master takes place with server unusually with server by monitoring.
Because unusual situation when taking place in the main server of using, standby server and other network equipment transmission of mode in group system that generally can take to broadcast is used to indicate the unusual message of self generation, therefore, can mainly with server unusual message take place and determine mainly to take place unusually with server by receiving main the indication with server being used to of sending.
Because in server cluster system, main with connecting by the phychology network between server and standby server and other network equipments, and work as the master just often with server, main heartbeat status data with server can be received by other servers and other network equipments by the heartbeat network, therefore, can determine main unusual with the heartbeat status data of server by not receiving the master in the given time with the server generation.
See also Fig. 6, the structure chart of a kind of loading unit 502 that Fig. 6 provides for the embodiment of the invention five.As shown in Figure 6, this loading unit 502 can comprise:
Obtain subelement 5021, be used for taking place from service managing server, to obtain the main policy data that is used to manage business with server when unusual with server when main;
Operation subelement 5022 is used for the main policy data that is used to manage business with server is loaded into standby server.
Further, this loading unit 502 can also comprise:
Instruction subelement 5023 is used for taking place when unusual with server when main, and the instruction standby server obtains from service managing server and loads leads the policy data that is used to manage business with server.
For instance, the main policy data that is used to manage business with server can include but not limited to the main qos policy data that are used to manage business with server, routing policy data or the like.
For instance, control unit 503 can be controlled the standby server binding the unsteady Internet protocol address that unusual master discharges with server takes place, and carries out Business Processing according to the main policy data with server that loads.
Further, if monitoring unit 501 monitors main normal with the server recovery after control unit 503 control standby servers carry out Business Processing according to the main policy data with server that loads; At this moment, control unit 503 can further be controlled standby server and stops to carry out Business Processing.
For instance, control unit 503 can discharge the main floating IP address of having bound with server by the control standby server, when leading with after the floating IP address of server that standby server release has been bound, standby server will stop to carry out Business Processing.
The above-mentioned active and standby switching device shifter that the embodiment of the invention four is provided is described in detail, the embodiment of the invention main takes place when unusual with server monitoring, main policy data with server can be loaded into standby server, provide Business Processing by standby server for the user, thereby realized the active and standby switching in the server cluster system, avoided adopting the mode of disk chassis to carry out active and standby switching, can reduce system cost.
Embodiment five:
See also Fig. 7, the structure chart of a kind of server cluster system that Fig. 7 provides for the embodiment of the invention five.As shown in Figure 7, this server cluster system can comprise:
Main with server 701, active and standby switching device shifter 702 and standby server 703; Wherein,
Main with server 701, be used to carry out Business Processing;
Active and standby switching device shifter 702, be used for main taking place when unusual monitoring with server 701, the main policy data that is used to manage business with server 701 is loaded into standby server 703, and control standby server 703 carries out Business Processing according to main policy data with server 701;
Standby server 703 is used for replacing described master to carry out Business Processing with server according to main policy data with server 701 when the master is unusual with server 701 generations.
As shown in Figure 7, the server cluster system that provides of the embodiment of the invention can also comprise:
Service managing server 704 is used to store the main policy data that is used to manage business with server 701;
For instance, for instance, the main policy data that is used to manage business with server 701 can include but not limited to lead the qos policy data that are used to manage business with server 701, routing policy data or the like.
At this moment, active and standby switching device shifter 702 can main take place when unusual with server 701 by monitoring, from service managing server 704, obtain the main policy data that is used to manage business with server 701, and will lead the policy data that is used to manage business with server 701 and be loaded into standby server 703;
Perhaps, active and standby switching device shifter 702 can main take place when unusual with server 701 by monitoring, and instruction standby server 703 obtains and load the main policy data that is used to manage business with server 701 from service managing server 704.
Further, active and standby switching device shifter 702 is after control standby server 703 carries out Business Processing according to main policy data with server 701, recover normal if monitor the main server 701 of using, then active and standby switching device shifter 702 can be controlled standby server 703 and stop to carry out Business Processing;
At this moment, standby server 703 can discharge the main floating IP address of having bound with server, stops to carry out Business Processing.
In the server cluster system that the embodiment of the invention provides, when the unusual master of standby server 703 replacement generations proceeds Business Processing with server 701, unusual master is taken place all can store business datum with server 701 and standby server 703, at this moment, the user can be by sending the business datum that request is obtained to be needed to service managing server 704.Service managing server 701 can to standby server 703 and take place unusual main with server 701 query traffic data after, gather and send to the user.In this case, can't proceed Business Processing though unusual master is taken place with server, single-shot is given birth to unusual master still can be equivalent to a memory (such as USB flash disk) use with server.
The above-mentioned server cluster system that the embodiment of the invention five is provided is described in detail, the embodiment of the invention main takes place when unusual with server monitoring, can be loaded into standby server with unusual main policy data with server takes place, provide Business Processing by standby server for the user, thereby realized the active and standby switching in the server cluster system, avoided adopting the mode of disk chassis to carry out active and standby switching, can reduce system cost.
Need to prove, for aforesaid each method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, do not have the part that describes in detail among certain embodiment, can be referring to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that, realize all or part of flow process in the foregoing description method, be to instruct relevant hardware to finish by computer program, program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, storage medium can be magnetic disc, CD, (ROM Read-OnlyMemory) or at random stores memory body (RAM, Random Access Memory) etc. to read-only storage memory body.
More than a kind of main/standby switching method, Apparatus and system that the embodiment of the invention provided are described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.