CN102739451B - Method and device for updating master-slave switchover condition, server and system - Google Patents

Method and device for updating master-slave switchover condition, server and system Download PDF

Info

Publication number
CN102739451B
CN102739451B CN201210222428.1A CN201210222428A CN102739451B CN 102739451 B CN102739451 B CN 102739451B CN 201210222428 A CN201210222428 A CN 201210222428A CN 102739451 B CN102739451 B CN 102739451B
Authority
CN
China
Prior art keywords
switching condition
active
standby
instruction
standby switching
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.)
Active
Application number
CN201210222428.1A
Other languages
Chinese (zh)
Other versions
CN102739451A (en
Inventor
石峰
吴登奔
张羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210222428.1A priority Critical patent/CN102739451B/en
Publication of CN102739451A publication Critical patent/CN102739451A/en
Priority to PCT/CN2013/076299 priority patent/WO2014000545A1/en
Application granted granted Critical
Publication of CN102739451B publication Critical patent/CN102739451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Landscapes

  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a method and a device for updating master-slave switchover condition and a master-slave switchover system based on the device, and belongs to the technical field of communication. The method for updating the master-slave switchover condition comprises the following steps of: firstly, receiving a master-slave switchover condition updating command; then, locking the polling operation for determining whether the master-slave switchover is needed or not; and updating the master-slave switchover condition in a dynamic editable database according to the updating command. By the method and device for updating the master-slave switchover condition, the master-slave switchover condition is preset in the form of a dynamic linkbase; when the master-slave switchover condition needs to be updated, as the dynamic linkbase can be dynamically loaded in the process of program execution and halt is not required, the switchover condition can be updated during operation of a main server. As the main server operates all the time in the updating process, the working continuity is ensured.

Description

A kind of active and standby switching condition update method, device, server and system
Technical field
The present invention relates to communication technical field, particularly relate to a kind of active and standby switching condition update method, device, server and system.
Background technology
When network management means are in-band management, maximum defect is when network breaks down interruption, and transfer of data and management all cannot normally be carried out.Technical development along with minicomputer field, in order to overcome above-mentioned defect, outband management system has become an indispensable part in whole system, for example, in order to guarantee availability, the fail safe of management system, management server has mostly adopted the backup scenario of active and standby " 1+1 " at present.
In existing backup scenario, need to preset active and standby switching condition, then by functions such as the transmission of primary server executing data and management, after meeting described active and standby switching condition, carry out again the switching of active/standby server, so that described standby server is carried out various functions.
But, inventor finds in the application's research process, and many software and hardware factors all may have influence on active and standby switching, and management server has application in numerous applied environments, in different applied environments, the factor that affects active and standby switching can there are differences, and that is to say, under different applied environments, the factor that affects active and standby switching may be not identical, even, under identical running environment, while running to different phase, the factor that affects active and standby switching is not identical yet.Therefore,, under different application scenarioss, need to set different active and standby switching conditions.But; in the prior art; if there is the situation that need to upgrade active and standby switching condition; after needing to shut down, could revise the code of source program and the definition in configuration file; and after start is reruned; amended active and standby switching condition just can come into force, thereby has caused the interruption of management server work, affects the work of server.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of active and standby switching condition update method, to solve, in prior art, exist, when upgrading active and standby switching condition, the problem that must shut down.
Active and standby switching condition update method disclosed by the invention, comprises two steps:
Receive active and standby switching condition and upgrade instruction, the type of described renewal instruction comprises: upgrade priority instruction, increase switching condition instruction or delete switching condition instruction;
Locking is for the polling operation that determines whether to carry out active and standby switching, and according to described renewal instruction, upgrades the active and standby switching condition being arranged at dynamically in can editing data storehouse.
In addition, described active and standby switching condition update method also comprises: arrange dynamically can editing data storehouse to store active and standby switching condition, wherein, one dynamically can active and standby switching condition of editing data library storage, and each dynamically can provide an interface externally calling in editing data storehouse;
, the active and standby switching condition that described renewal is arranged at dynamically in can editing data storehouse comprises:
According to described renewal instruction, determine active and standby switching condition to be updated, by the corresponding external calling interface that dynamically can editing data storehouse of described active and standby switching condition to be updated, upgrade described active and standby switching condition to be updated.
In the first implementation, when the type of described renewal instruction is the instruction of renewal priority, upgrades described active and standby switching condition step to be updated and comprise:
According to the corresponding renewal of the described renewal priority instruction precedence information corresponding with active and standby switching condition to be updated, and described active and standby switching condition to be updated is corresponding dynamically can editing data storehouse in, the configuration information that comprises the priority that active and standby switching condition is corresponding with it after storage update;
Judge whether to receive other and upgrade instruction, if not, remove the locking to described polling operation, if so, continue to carry out the corresponding operation of upgrading.
In the second implementation, when the type of described renewal instruction is the instruction of increase switching condition, upgrading described active and standby switching condition step to be updated comprises: according to the instruction of described increase switching condition, arranging that active and standby switching condition to be increased is corresponding dynamically can editing data storehouse, and dynamically can in editing data storehouse, increase the active and standby switching condition corresponding with the instruction of described increase switching condition, the precedence information that each active and standby switching condition of corresponding renewal is corresponding what arrange;
Judge whether to receive other and upgrade instruction, if not, remove the locking to described polling operation, if so, continue to carry out the corresponding operation of upgrading.
In the third implementation, when the type of described renewal instruction is the instruction of deletion switching condition, upgrading described active and standby switching condition step to be updated comprises: according to the instruction of described deletion switching condition, nullifying that active and standby switching condition to be deleted is corresponding dynamically can editing data storehouse;
Judge whether to receive other and upgrade instruction, if not, remove the locking to described polling operation, if so, continue to carry out the corresponding operation of upgrading.
After renewal has operated, this method also comprises step: the configuration information after upgrading is sent to standby server.
Accordingly, the invention discloses a kind of active and standby switching condition updating device, comprising:
Receiving port, upgrades instruction for receiving active and standby switching condition, and the type of described renewal instruction comprises: upgrade priority instruction, increase switching condition instruction and delete switching condition instruction;
Operation executing module, for receiving the active and standby switching condition of described reception of described receiving port transmission, upgrade after instruction, locking is for the polling operation that determines whether to carry out active and standby switching, and according to described renewal instruction, upgrades the active and standby switching condition being arranged at dynamically in can editing data storehouse.
In addition, described active and standby switching condition updating device also comprises:
Module is set, for arrange dynamically can editing data storehouse to store active and standby switching condition, wherein, one dynamically can active and standby switching condition of editing data library storage, described each dynamically can provide an interface externally calling in editing data storehouse;
; described operation executing module is when renewal is arranged at dynamically the active and standby switching condition in can editing data storehouse; concrete operations are: according to described renewal instruction, determine active and standby switching condition to be updated; by the corresponding external calling interface that dynamically can editing data storehouse of described active and standby switching condition to be updated, upgrade described active and standby switching condition to be updated.
Wherein, described operation executing module comprises: locking submodule, upgrades after instruction the polling operation of locking for determining whether to carry out active and standby switching for the described active and standby switching condition receiving described receiving port transmission;
Upgrade submodule, for according to described renewal instruction, upgrade the active and standby switching condition being arranged at dynamically in can editing data storehouse.
In the first implementation, described renewal submodule comprises:
Priority update unit, be used for according to the corresponding renewal of the described renewal priority instruction precedence information corresponding with active and standby switching condition to be updated, and described active and standby switching condition to be updated is corresponding dynamically can editing data storehouse in, the configuration information that comprises the priority that active and standby switching condition is corresponding with it after storage update;
The first judging unit, for after described priority update unit end operation, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
In the second implementation, described renewal submodule comprises:
Switching condition increases unit, be used for according to the instruction of described increase switching condition, arranging that active and standby switching condition to be increased is corresponding dynamically can editing data storehouse, and dynamically can in editing data storehouse, increase the active and standby switching condition corresponding with the instruction of described increase switching condition, the precedence information that each active and standby switching condition of corresponding renewal is corresponding what arrange;
The second judging unit, for increasing after unit end operation at described switching condition, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
In the third implementation, described renewal submodule comprises:
Switching condition delete cells, for according to the instruction of described deletion switching condition, nullifying that active and standby switching condition to be deleted is corresponding dynamically can editing data storehouse;
The 3rd judging unit, for after described switching condition delete cells end operation, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
In addition, described active and standby switching condition updating device also comprises:
Transmit port, for being sent to standby server by the configuration information after upgrading.
Accordingly, the invention also discloses a kind of server, in described server, be provided with the disclosed active and standby switching condition updating device of this programme.
Accordingly, the invention also discloses a kind of active and standby switched system, comprise in master state, be provided with the server of active and standby switching condition updating device, and the server in stand-by state.
Disclosed active and standby switching condition update method and corresponding device above; in advance with the form of dynamic link library; be provided with active and standby switching condition, when needs upgrade described active and standby switching condition, because dynamic link library can load dynamically in program operation process; thereby do not need to shut down; in the process of primary server operation, just can realize the renewal to described switching condition, in this process; because described primary server is moving always, guaranteed the continuity of work.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the entity Organization Chart of the disclosed a kind of active and standby switching condition update method of the embodiment of the present invention;
Fig. 2 is the workflow schematic diagram of the disclosed a kind of active and standby switching condition update method of the embodiment of the present invention;
Fig. 3 upgrades the workflow schematic diagram of priority in the disclosed a kind of active and standby switching condition update method of the embodiment of the present invention;
Fig. 4 increases the workflow schematic diagram of active and standby switching condition in the disclosed a kind of active and standby switching condition update method of the embodiment of the present invention;
Fig. 5 deletes the workflow schematic diagram of active and standby switching condition in the disclosed a kind of active and standby switching condition update method of the embodiment of the present invention;
Fig. 6 is the workflow schematic diagram of polling operation in the disclosed a kind of active and standby switching condition update method of the embodiment of the present invention;
Fig. 7 is the structural representation of the disclosed a kind of active and standby switching condition updating device of the embodiment of the present invention;
Fig. 8 is the structural representation of disclosed another the active and standby switching condition updating device of the embodiment of the present invention;
Fig. 9 is the structural representation of operation executing module in the disclosed a kind of active and standby switching condition updating device of the embodiment of the present invention;
Figure 10 upgrades the structural representation of submodule in the disclosed a kind of active and standby switching condition updating device of the embodiment of the present invention;
Figure 11 upgrades the structural representation of submodule in disclosed another the active and standby switching condition updating device of the embodiment of the present invention;
Figure 12 upgrades the structural representation of submodule in disclosed another the active and standby switching condition updating device of the embodiment of the present invention;
Figure 13 is the structural representation of disclosed another the active and standby switching condition updating device of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The invention discloses a kind of active and standby switching condition update method, to solve, in prior art, have the problem that must shut down when upgrading active and standby switching.Wherein, Fig. 1 discloses a kind of entity Organization Chart.
Wherein, baseboard management controller (BMC, Baseboard Management Controller) is a system on a station server, and server is played to monitoring and managerial role; Service processor (SP, Service Processor) for BMC is carried out to unified management, because SP is unified manager, very important effect is played in normal work to server, therefore adopted the scheme of active and standby " 1+1 ", be equipped with two-server simultaneously, in master state is primary server, in stand-by state be standby server, to increase the reliability of server work.Wherein connecting SP and BMC, is LAN switch LAN Switch, and described SP is connected with described LAN Switch by netting twine with described BMC, and carries out the mutual of information., between described active and standby SP, also by netting twine, be connected meanwhile, mutual with the information of carrying out.
In addition, when if in server, other system is significant, also can adopt the scheme of active and standby " 1+1 ", two-server is set, carry out active and standby switching, to ensure the reliability of server work, in this case, also can adopt the disclosed mode of this programme, realize the renewal of active and standby switching condition.
Its workflow schematic diagram as shown in Figure 2, mainly for primary server, comprising:
Step S1, receive active and standby switching condition and upgrade instruction, wherein said active and standby switching condition renewal instruction is difference with the difference of staff's demand, specifically, the type of described renewal instruction comprises: upgrade priority instruction, increase switching condition instruction or delete switching condition instruction;
Step S2, locking be for the polling operation that determines whether to carry out active and standby switching, and according to described renewal instruction, upgrades the active and standby switching condition being arranged at dynamically in can editing data storehouse.
In addition, the disclosed active and standby switching condition update method of this programme also comprises:
Arrange dynamically can editing data storehouse to store active and standby switching condition, wherein, one dynamically can active and standby switching condition of editing data library storage, described each dynamically can provide an interface externally calling in editing data storehouse;
, the active and standby switching condition that described renewal is arranged at dynamically in can editing data storehouse comprises:
According to described renewal instruction, determine active and standby switching condition to be updated, by the corresponding external calling interface that dynamically can editing data storehouse of described active and standby switching condition to be updated, upgrade described active and standby switching condition to be updated.
In this programme, dynamically can generally with the form of dynamic link library (DLL, Dynamic Link Library), realize in editing data storehouse.Described dynamic link library is one, and include can be for a plurality of programs code simultaneously and the storehouse of data; can load dynamically; common code is after writing; need could use after compiling, operation, this process need server outage, and described dynamic link library is in the process of dynamic load; server can continue operation; do not need server outage, thereby during the active and standby switching condition in renewal is arranged at described dynamic link library, do not need to shut down.
The disclosed active and standby switching condition update method of this programme, in the specific implementation, in advance with the form of dynamic link library, be provided with active and standby switching condition, wherein, when described active and standby switching condition is while being a plurality of, each active and standby switching condition is corresponding with a dynamic link library, and the default corresponding priority of each active and standby switching condition.When needs upgrade described active and standby switching condition; because dynamic link library can load dynamically in program operation process; thereby do not need to shut down; in the process of primary server operation; just can realize the modification to described active and standby switching condition; and after renewal, continue to carry out polling operation.In this process, described primary server is moving always, has guaranteed the continuity of work.
Described polling operation, refer to by described primary server and take turns to inquire about described primary server with respect to the state of active and standby switching condition, and receive standby server and inquire about after the state of described standby server with respect to described active and standby switching condition, send to the state of described primary server, and judge whether to meet active and standby switching condition according to the two state, and in the situation that meeting described active and standby switching condition, carry out active and standby switching.In upgrading the process of active and standby switching condition, need to lock this polling operation, but described primary server and standby server can continue to carry out other operation, to guarantee the continuity of server work.
Specifically, described active and standby switching condition is at least one, as " heartbeat detection ", " hardware failure detection ", " detection of CPU occupation rate " and " operating time length detects " etc., at described active and standby switching condition, be when more than two, importance according to it to server, arranges corresponding priority.Wherein, heartbeat signal is a requisite switching judging condition in main preparation system, therefore, generally " heartbeat detection " conduct is there is to the switching condition of limit priority, whether the described primary server of preferential detection has heartbeat, and stop after heartbeat described primary server being detected, carry out the switching of active/standby server.And each active and standby switching condition exists with the form of dynamic link library.
In this programme, an embodiment of dynamic link library is as follows:
int?read(void*data);
int?compare(void*my_data,void*other_data);
Wherein, the effect of read function is to read out to call the server of this dynamic link library corresponding to the state of this active and standby switching condition, for example, for " hardware failure detection " condition, it can read out the server that calls this active and standby dynamic link library, the menace level of the fault that current hardware produces, and for " detection of CPU occupation rate " condition, can read out the server that calls this active and standby dynamic link library, current CPU occupation rate is how many.After reading successfully, described standby server can be sent to the state reading described primary server.
Compare function just provides the function of comparison, generally by primary server, carry out this comparing function, with by what read out, described primary server and standby server compare corresponding to the state of active and standby switching condition, and comparative result is back to described primary server.
Form with above-mentioned dynamic link library arranges described active and standby switching condition, when upgrading switching condition, does not need recompile compiling, operation, thereby in renewal process, does not need to shut down, and has guaranteed the continuity of server work.
During concrete enforcement, referring to the disclosed workflow schematic diagram of Fig. 3, when the type of described renewal instruction is the instruction of renewal priority, the described active and standby switching condition step to be updated of described renewal comprises:
Step S11, according to the corresponding renewal of the described renewal priority instruction precedence information corresponding with active and standby switching condition to be updated, and described active and standby switching condition to be updated is corresponding dynamically can editing data storehouse in, the configuration information that comprises the priority that active and standby switching condition is corresponding with it after storage update;
Step S12, judge whether to receive other and upgrade instruction, if so, continue to carry out the corresponding operation of upgrading, if not, the operation of execution step S13;
Step S13, the locking of releasing to described polling operation.
Operation by step S11 to step S13, can upgrade active and standby switching condition priority, thereby adjusts the poll order of each active and standby switching condition.
Workflow schematic diagram shown in Figure 4, when the type of described renewal instruction is the instruction of increase switching condition, the described active and standby switching condition step to be updated of described renewal comprises:
Step S21, according to the instruction of described increase switching condition, arranging that active and standby switching condition to be increased is corresponding dynamically can editing data storehouse, and dynamically can in editing data storehouse, increase the active and standby switching condition corresponding with the instruction of described increase switching condition, the precedence information that each active and standby switching condition of corresponding renewal is corresponding what arrange;
Step S22, judge whether to receive other and upgrade instruction, if so, continue to carry out the corresponding operation of upgrading, if not, the operation of execution step S23;
Step S23, the locking of releasing to described polling operation.
By above-mentioned steps, can realize the renewal operation while increasing new active and standby switching condition.
Structural representation shown in Figure 5, when the type of described renewal instruction is the instruction of deletion switching condition, the described active and standby switching condition step to be updated of described renewal comprises:
Step S31, according to the instruction of described deletion switching condition, nullifying that active and standby switching condition to be deleted is corresponding dynamically can editing data storehouse;
Step S32, judge whether to receive other and upgrade instruction, if so, continue to carry out the corresponding operation of upgrading, if not, the operation of execution step S33;
Step S33, the locking of releasing to described polling operation.
By above-mentioned steps, can realize the renewal operation while deleting new active and standby switching condition.
Especially, after renewal operation is finished, also comprise step: the configuration information after upgrading is sent to standby server, so that the maintenance of the configuration information in described standby server and described primary server is consistent, be convenient in polling operation, according to described active and standby switching condition, inquire about corresponding state.Wherein, described configuration information comprises: be arranged at dynamically the active and standby switching condition in can editing data storehouse, and the priority corresponding with described active and standby switching condition, when described active and standby switching condition only has one,, in described configuration information, needn't comprise precedence information.
Wherein, the workflow of described polling operation, referring to Fig. 6, specifically comprises the following steps:
Step S41, determine current switching condition, when described active and standby switching condition only has one, this active and standby switching condition is current switching condition, when a plurality of, need to determine current switching condition according to the priority of described active and standby switching condition, concrete mode is, judge that whether the priority that described current switching condition is corresponding is minimum, if not, there is the lower switching condition of other priority in explanation, this polling operation of taking turns does not finish, the switching condition that definite priority is only second to described current switching condition is current switching condition, if, illustrate that the priority that described current switching condition is corresponding is minimum, this polling operation of taking turns finishes, need to start the polling operation of a new round, determine that the highest switching condition of priority is current switching condition.
Step S42, inquire about the primary server state corresponding with described current switching condition; For example, for the active and standby switching condition of " heartbeat detection ", need to inquire about described primary server and whether there is heartbeat; For " hardware failure detection " condition, need inquiry to obtain the menace level of the fault of the current hardware generation of described primary server; And for " detection of CPU occupation rate " condition, need inquiry to obtain the current CPU occupation rate of described primary server and be how many;
Step S43, the sign of described current switching condition is sent to standby server, so that the described standby server inquiry state corresponding with current switching condition, the mode of the state that described standby server inquiry is corresponding with current switching condition, identical with the working method of described primary server, in described standby server inquiry, get after the state corresponding with described current switching condition, can send it in described primary server; Wherein, described sign can be the relevant priority tag of each switching condition, for example, for the highest switching condition of priority arranges priority tag " 1 ", and by that analogy, or other sign is set;
Step S44, receive the state corresponding with described current switching condition that described standby server sends, and the state corresponding with described current switching condition with described standby server according to described primary server, judge whether to meet described current switching condition, if, perform step the operation of S45, if not, return to the operation of execution step S41;
Step S45, the active and standby switching of definite execution.
Wherein, different active and standby switching conditions, the process of its concrete judgement has difference,
For example, when described current switching condition is " heartbeat detection ", only need described primary server to there is heartbeat signal, do not carry out active and standby switching, and when described current switching condition is " hardware failure detection ", need the menace level of hardware fault of more described primary server and the menace level of the hardware fault of standby server, when the hardware fault situation of described primary server is more serious than described standby server, explanation meets described current switching condition, need to carry out active and standby switching, and for the active and standby switching condition of " detection of CPU occupation rate ", in when judgement, complexity is a bit a little, first need the CPU occupation rate that judges described primary server whether in a more rational state, for example the CPU usage of primary server is 20%, and standby server is 18%, the two is all in more rational state, in this case, even if the CPU occupation rate of described primary server is higher, do not think and meet described current switching condition yet, to carry out active and standby switching, if and be both positioned at a higher state, for example be greater than 80%, and the current CPU usage of described standby server is lower, so next, will assess described standby server is upgraded to after primary server, CPU usage can be how many, also can or can not be than own low, if described standby server is upgraded to after primary server, CPU usage is still low than current primary server, think meet described current switching condition by, need to carry out active and standby switching.
Process by step S41 to the disclosed polling operation of operation of step S45, can make described primary server and standby server meet under the condition of active and standby switching, carries out active and standby switching, to meet the demand of current application scene.
Active and standby switching condition update method disclosed in this invention; employing is arranged at the mode in dynamic link library by switching condition; dynamic link library can load dynamically in program operation process; thereby realize in non-stop-machine situation; just can upgrade switching condition, guarantee the continuity of server work.
In addition, the invention also discloses a kind of active and standby switching condition update method, be mainly used in standby server, specifically comprise step:
Receive that primary server sends, the configuration information that comprises the active and standby switching condition after renewal, by this step, can make configuration information in primary server and the configuration information in standby server be consistent;
Receive the sign of the current switching condition of described primary server transmission, and the inquiry state corresponding with described current switching condition;
By enforcement state transfer corresponding to described current switching condition to described primary server.
Pass through above-mentioned steps, can make described standby server inquiry self correspond to the state of described current switching condition, and described state is sent to described primary server, be convenient to described primary server and carry out polling operation, to judge whether carrying out active and standby switching.
Accordingly, referring to the disclosed structural representation of Fig. 7, the invention also discloses a kind of active and standby switching condition updating device, described active and standby switching condition updating device comprises: receiving port 1 and operation executing module 2, wherein:
Described receiving port 1, upgrades instruction for receiving active and standby switching condition, and the type of described renewal instruction comprises: upgrade priority instruction, increase switching condition instruction and delete switching condition instruction;
Described operation executing module 2, for receiving the active and standby switching condition of described reception of described receiving port transmission, upgrade after instruction, locking is for the polling operation that determines whether to carry out active and standby switching, and according to described renewal instruction, upgrades the active and standby switching condition being arranged at dynamically in can editing data storehouse.
In addition, referring to the disclosed structural representation of Fig. 8, described active and standby switching condition updating device also comprises:
Module 3 is set, for arrange dynamically can editing data storehouse to store active and standby switching condition, wherein, one dynamically can active and standby switching condition of editing data library storage, described each dynamically can provide an interface externally calling in editing data storehouse.
In this case, described operation executing module 2 is when renewal is arranged at dynamically the active and standby switching condition in can editing data storehouse, concrete operations are: according to described renewal instruction, determine active and standby switching condition to be updated, by the corresponding external calling interface that dynamically can editing data storehouse of described active and standby switching condition to be updated, upgrade described active and standby switching condition to be updated.
Specifically, structural representation shown in Figure 9, described operation executing module 2 comprises: locking submodule 21 and renewal submodule 22, wherein,
Described locking submodule 21, upgrades after instruction the polling operation of locking for determining whether to carry out active and standby switching for the described active and standby switching condition receiving described receiving port 1 transmission;
Described renewal submodule 22, for according to described renewal instruction, upgrades the active and standby switching condition being arranged at dynamically in can editing data storehouse.
Wherein, referring to the disclosed structural representation of Figure 10, described renewal submodule 22 comprises priority update unit 221 and the first judging unit 222,
Described priority update unit 221, be used for according to the corresponding renewal of the described renewal priority instruction precedence information corresponding with active and standby switching condition to be updated, and described active and standby switching condition to be updated is corresponding dynamically can editing data storehouse in, the configuration information that comprises the priority that active and standby switching condition is corresponding with it after storage update;
Described the first judging unit 222, for after described priority update unit end operation, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
In addition, referring to the disclosed structural representation of Figure 11, described renewal submodule 22 comprises: switching condition increases unit 223 and the second judging unit 224, wherein,
Described switching condition increases unit 223, be used for according to the instruction of described increase switching condition, arranging that active and standby switching condition to be increased is corresponding dynamically can editing data storehouse, and dynamically can in editing data storehouse, increase the active and standby switching condition corresponding with the instruction of described increase switching condition, the precedence information that each active and standby switching condition of corresponding renewal is corresponding what arrange;
Described the second judging unit 224, for increasing after unit end operation at described switching condition, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
In addition, referring to the disclosed structural representation of Figure 12, described renewal submodule 22 comprises: switching condition delete cells 225 and the 3rd judging unit 226, wherein,
Described switching condition delete cells 225, for according to the instruction of described deletion switching condition, nullifying that active and standby switching condition to be deleted is corresponding dynamically can editing data storehouse;
Described the 3rd judging unit 226, for after described switching condition delete cells end operation, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
Wherein, described the first judging unit 222, the second judging unit 224 and the 3rd judging unit 226, can be same judging unit, can be also different judging units.
In addition, referring to the disclosed structural representation of Figure 13, described active and standby switching condition updating device also comprises: transmit port 4, described transmit port 4 is for being sent to standby server by the configuration information after upgrading.
Active and standby switching condition updating device disclosed in this invention; employing is arranged at the mode in dynamic link library by switching condition; dynamic link library can load dynamically in program operation process; thereby realize in non-stop-machine situation; just can upgrade switching condition, guarantee the continuity of server work.
Accordingly, the invention also discloses a kind of server, in described server, be provided with described active and standby switching condition updating device, wherein, described active and standby switching condition updating device comprises: receiving port 1 and operation executing module 2, can also comprise module 3 and transmit port 4 are set.
Accordingly, the invention also discloses a kind of active and standby switched system, it is characterized in that, comprising: the server in master state and the server in stand-by state, be wherein provided with the disclosed active and standby switching condition updating device of this programme in the server in master state.
Disclosed active and standby switching condition updating device above; in advance with the form of dynamic link library; be provided with active and standby switching condition, when needs upgrade described active and standby switching condition, because dynamic link library can load dynamically in program operation process; thereby do not need to shut down; in the process of primary server operation, just can realize the renewal to described switching condition, in this process; because described primary server is moving always, guaranteed the continuity of work.
Those of ordinary skills can recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with the combination of electronic hardware or computer software and electronic hardware.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds scope of the present invention.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of the system of foregoing description, device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that disclosed system, apparatus and method can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.
If described function usings that the form of SFU software functional unit realizes and during as production marketing independently or use, can be stored in a computer read/write memory medium.Understanding based on such, the part that technical scheme of the present invention contributes to prior art in essence in other words or the part of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) carry out all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CDs.
Above-mentioned explanation to the disclosed embodiments, makes professional and technical personnel in the field can realize or use the present invention.To the multiple modification of these embodiment, will be apparent for those skilled in the art, General Principle as defined herein can, in the situation that not departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (13)

1. an active and standby switching condition update method, is characterized in that, comprising:
Arrange dynamically can editing data storehouse to store active and standby switching condition, wherein, one dynamically can active and standby switching condition of editing data library storage, each dynamically can provide an interface externally calling in editing data storehouse;
Receive active and standby switching condition and upgrade instruction, the type of described renewal instruction comprises: upgrade priority instruction, increase switching condition instruction or delete switching condition instruction;
The polling operation of locking for determining whether to carry out active and standby switching, and determine active and standby switching condition to be updated according to described renewal instruction, by the corresponding external calling interface that dynamically can editing data storehouse of described active and standby switching condition to be updated, upgrade described active and standby switching condition to be updated;
Wherein, described polling operation comprises:
1) determine current switching condition;
2) inquire about the primary server state corresponding with described current switching condition;
3) sign of described current switching condition is sent to standby server, so that the described standby server inquiry state corresponding with current switching condition;
4) receive the state corresponding with described current switching condition that described standby server sends, and the state corresponding with described current switching condition with standby server according to described primary server, judge whether to meet described current switching condition, if met, determine and carry out active and standby switching, if do not met, return to execution step 1) operation.
2. method according to claim 1, is characterized in that, when the type of described renewal instruction is the instruction of renewal priority, the described active and standby switching condition step to be updated of described renewal comprises:
According to the corresponding renewal of the described renewal priority instruction precedence information corresponding with active and standby switching condition to be updated, and described active and standby switching condition to be updated is corresponding dynamically can editing data storehouse in, the configuration information that comprises the priority that active and standby switching condition is corresponding with it after storage update;
Judge whether to receive other and upgrade instruction, if not, remove the locking to described polling operation, if so, continue to carry out the corresponding operation of upgrading.
3. method according to claim 1, is characterized in that, when the type of described renewal instruction is the instruction of increase switching condition, the described active and standby switching condition step to be updated of described renewal comprises:
According to the instruction of described increase switching condition, arranging that active and standby switching condition to be increased is corresponding dynamically can editing data storehouse, and dynamically can in editing data storehouse, increase the active and standby switching condition corresponding with the instruction of described increase switching condition, the precedence information that each active and standby switching condition of corresponding renewal is corresponding what arrange;
Judge whether to receive other and upgrade instruction, if not, remove the locking to described polling operation, if so, continue to carry out the corresponding operation of upgrading.
4. method according to claim 1, is characterized in that, when the type of described renewal instruction is the instruction of deletion switching condition, the described active and standby switching condition step to be updated of described renewal comprises:
According to the instruction of described deletion switching condition, nullifying that active and standby switching condition to be deleted is corresponding dynamically can editing data storehouse;
Judge whether to receive other and upgrade instruction, if not, remove the locking to described polling operation, if so, continue to carry out the corresponding operation of upgrading.
5. method according to claim 1, is characterized in that, carries out and upgrades after operation, also comprises step:
Configuration information after upgrading is sent to standby server.
6. an active and standby switching condition updating device, is characterized in that, comprising:
Module is set, for arrange dynamically can editing data storehouse to store active and standby switching condition, wherein, one dynamically can active and standby switching condition of editing data library storage, described each dynamically can provide an interface externally calling in editing data storehouse;
Receiving port, upgrades instruction for receiving active and standby switching condition, and the type of described renewal instruction comprises: upgrade priority instruction, increase switching condition instruction and delete switching condition instruction;
Operation executing module, for receiving the active and standby switching condition of described reception of described receiving port transmission, upgrade after instruction, the polling operation of locking for determining whether to carry out active and standby switching, and determine active and standby switching condition to be updated according to described renewal instruction, by the corresponding external calling interface that dynamically can editing data storehouse of described active and standby switching condition to be updated, upgrade described active and standby switching condition to be updated;
Wherein, described polling operation comprises:
1) determine current switching condition;
2) inquire about the primary server state corresponding with described current switching condition;
3) sign of described current switching condition is sent to standby server, so that the described standby server inquiry state corresponding with current switching condition;
4) receive the state corresponding with described current switching condition that described standby server sends, and the state corresponding with described current switching condition with standby server according to described primary server, judge whether to meet described current switching condition, if met, determine and carry out active and standby switching, if do not met, return to execution step 1) operation.
7. device according to claim 6, is characterized in that, described operation executing module comprises:
Locking submodule, upgrades after instruction for the described active and standby switching condition receiving described receiving port transmission, the polling operation of locking for determining whether to carry out active and standby switching;
Upgrade submodule, for according to described renewal instruction, upgrade the active and standby switching condition being arranged at dynamically in can editing data storehouse.
8. device according to claim 7, is characterized in that, described renewal submodule comprises:
Priority update unit, be used for according to the corresponding renewal of the described renewal priority instruction precedence information corresponding with active and standby switching condition to be updated, and described active and standby switching condition to be updated is corresponding dynamically can editing data storehouse in, the configuration information that comprises the priority that active and standby switching condition is corresponding with it after storage update;
The first judging unit, for after described priority update unit end operation, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
9. device according to claim 7, is characterized in that, described renewal submodule comprises:
Switching condition increases unit, be used for according to the instruction of described increase switching condition, arranging that active and standby switching condition to be increased is corresponding dynamically can editing data storehouse, and dynamically can in editing data storehouse, increase the active and standby switching condition corresponding with the instruction of described increase switching condition, the precedence information that each active and standby switching condition of corresponding renewal is corresponding what arrange;
The second judging unit, for increasing after unit end operation at described switching condition, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
10. device according to claim 7, is characterized in that, described renewal submodule comprises:
Switching condition delete cells, for according to the instruction of described deletion switching condition, nullifying that active and standby switching condition to be deleted is corresponding dynamically can editing data storehouse;
The 3rd judging unit, for after described switching condition delete cells end operation, judges whether to receive other and upgrades instruction, if not, removes the locking to described polling operation, if so, continues to carry out the corresponding operation of upgrading.
11. devices according to claim 6, is characterized in that, described active and standby switching condition updating device also comprises:
Transmit port, for being sent to standby server by the configuration information after upgrading.
12. 1 kinds of servers, is characterized in that, comprising:
Claim 6 is to the active and standby switching condition updating device described in claim 11 any one.
13. 1 kinds of active and standby switched systems, is characterized in that, comprising:
In master state, server as claimed in claim 12;
Server in stand-by state.
CN201210222428.1A 2012-06-29 2012-06-29 Method and device for updating master-slave switchover condition, server and system Active CN102739451B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210222428.1A CN102739451B (en) 2012-06-29 2012-06-29 Method and device for updating master-slave switchover condition, server and system
PCT/CN2013/076299 WO2014000545A1 (en) 2012-06-29 2013-05-28 Active/standby switching condition updating method, apparatus, server, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210222428.1A CN102739451B (en) 2012-06-29 2012-06-29 Method and device for updating master-slave switchover condition, server and system

Publications (2)

Publication Number Publication Date
CN102739451A CN102739451A (en) 2012-10-17
CN102739451B true CN102739451B (en) 2014-12-03

Family

ID=46994281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210222428.1A Active CN102739451B (en) 2012-06-29 2012-06-29 Method and device for updating master-slave switchover condition, server and system

Country Status (2)

Country Link
CN (1) CN102739451B (en)
WO (1) WO2014000545A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739451B (en) * 2012-06-29 2014-12-03 华为技术有限公司 Method and device for updating master-slave switchover condition, server and system
CN103905239A (en) * 2012-12-30 2014-07-02 青岛海尔软件有限公司 Method for providing non-stop hot deployment for website system based on virtual machine technology
CN104253746B (en) * 2014-09-17 2017-04-12 烽火通信科技股份有限公司 Fast rerouting switching method and system
CN107066480B (en) * 2016-12-20 2020-08-11 创新先进技术有限公司 Method, system and equipment for managing main and standby databases
CN107589955B (en) * 2017-09-19 2021-06-25 郑州云海信息技术有限公司 Method and system for upgrading double-CMC (carboxy methyl cellulose) firmware version
CN108959548B (en) * 2018-07-02 2023-04-18 创新先进技术有限公司 Service request processing method and device
CN109992695B (en) * 2019-04-10 2021-08-27 北京奇艺世纪科技有限公司 Video information query method and device
CN112988160B (en) * 2021-03-15 2022-04-19 深圳市慧为智能科技股份有限公司 Server compiling method, device, equipment and computer readable storage medium
CN115118335B (en) * 2022-08-29 2022-11-18 中国船舶重工集团公司第七0七研究所 Main-standby switching method of time-frequency reference equipment and time-frequency reference equipment applying same

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104471A (en) * 2009-12-21 2011-06-22 中兴通讯股份有限公司 Condition-based main/standby switching method and device in redundancy backup system
CN102255740A (en) * 2010-05-21 2011-11-23 中兴通讯股份有限公司 Method and device for active-standby switch of service nodes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739451B (en) * 2012-06-29 2014-12-03 华为技术有限公司 Method and device for updating master-slave switchover condition, server and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104471A (en) * 2009-12-21 2011-06-22 中兴通讯股份有限公司 Condition-based main/standby switching method and device in redundancy backup system
CN102255740A (en) * 2010-05-21 2011-11-23 中兴通讯股份有限公司 Method and device for active-standby switch of service nodes

Also Published As

Publication number Publication date
CN102739451A (en) 2012-10-17
WO2014000545A1 (en) 2014-01-03

Similar Documents

Publication Publication Date Title
CN102739451B (en) Method and device for updating master-slave switchover condition, server and system
CN202798798U (en) High availability system based on cloud computing technology
CN105229613A (en) Coordinate the fault recovery in distributed system
CN101977124B (en) Service clustering method and system based on ZooKeeper technology
CN102981931B (en) Backup method and device for virtual machine
CN105468717B (en) Database operation method and device
CN109656742B (en) Node exception handling method and device and storage medium
CN105095142B (en) Control the system and method for expansion card
CN109254876A (en) The management method and device of database in cloud computing system
CN105589756A (en) Batch processing cluster system and method
US9092396B2 (en) Standby system device, a control method, and a program thereof
CN109324549B (en) Dual-master control equipment configuration method and dual-master control equipment
CN111813605A (en) Disaster recovery method, platform, electronic device, and medium
CN104536846A (en) Data backing up method and device
CN103890713A (en) Apparatus and method for managing register information in a processing system
CN109271270A (en) The troubleshooting methodology, system and relevant apparatus of bottom hardware in storage system
US7519857B2 (en) Method, apparatus, and system for a software based business continuity solution for a computing environment
CN105354332A (en) Method and system for implementing mutual standby of database and middleware based on BCP (Batch Communications Program)
CN110620798A (en) Control method, system, equipment and storage medium for FTP connection
CN117453036A (en) Method, system and device for adjusting power consumption of equipment in server
TWI531903B (en) System and method for data back-up
CN112596371A (en) Control card switching method and device, electronic equipment and storage medium
CN104184612A (en) Power supply fault processing method and device
CN111966520A (en) Database high-availability switching method, device and system
CN105279042A (en) Redundant backup system and method for BSD system

Legal Events

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

Effective date of registration: 20211222

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Patentee after: Super fusion Digital Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.