CN111026586A - Main/standby state switching method and device for cluster equipment - Google Patents

Main/standby state switching method and device for cluster equipment Download PDF

Info

Publication number
CN111026586A
CN111026586A CN201911150185.3A CN201911150185A CN111026586A CN 111026586 A CN111026586 A CN 111026586A CN 201911150185 A CN201911150185 A CN 201911150185A CN 111026586 A CN111026586 A CN 111026586A
Authority
CN
China
Prior art keywords
state
cluster
standby
equipment
cluster equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911150185.3A
Other languages
Chinese (zh)
Other versions
CN111026586B (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.)
CRSC Urban Rail Transit Technology Co Ltd
Original Assignee
CRSC Urban Rail Transit Technology 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 CRSC Urban Rail Transit Technology Co Ltd filed Critical CRSC Urban Rail Transit Technology Co Ltd
Priority to CN201911150185.3A priority Critical patent/CN111026586B/en
Publication of CN111026586A publication Critical patent/CN111026586A/en
Application granted granted Critical
Publication of CN111026586B publication Critical patent/CN111026586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2028Failover techniques eliminating a faulty processor or activating a spare

Abstract

The embodiment of the invention provides a method and a device for switching master and standby states of cluster equipment, wherein the method comprises the following steps: monitoring the change condition of the related state of the cluster equipment; and switching the main state and the standby state of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment. According to the embodiment of the invention, the main/standby states of the cluster equipment are switched according to the change condition of the relevant state of the cluster equipment, so that the switching real-time performance is ensured; and multi-machine hot standby is adopted, and the condition of switching the cluster equipment is monitored in real time, so that the switching reliability is ensured.

Description

Main/standby state switching method and device for cluster equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for switching between active and standby states of a cluster device.
Background
At present, the dual-computer hot standby technology has the characteristics of stability, reliability and strong real-time performance, and is widely applied to a signal system.
However, with the development of signal technology, the requirement on system reliability is continuously improved, the detection information nodes of the system are continuously increased, the judgment condition is continuously refined, although a simple dual-computer hot standby design ensures certain reliability, the problems that the nodes cannot be freely configured, the reverse condition cannot be quantified and the like exist, and the existing main standby control center is switched to mostly adopt a cold plugging mode, so that the real-time performance cannot meet the requirement of a real-time operation system.
Therefore, how to improve the reliability and real-time performance of the master/standby state switching of the cluster device becomes a problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a method and a device for switching main and standby states of cluster equipment, which are used for solving the problem of how to improve the reliability and the real-time performance of the main and standby state switching of the cluster equipment.
In a first aspect, an embodiment of the present invention provides a method for switching active/standby states of cluster devices, where the method includes:
monitoring the change condition of the related state of the cluster equipment;
and switching the main state and the standby state of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment.
Optionally, the cluster device-related status includes: network card state, interface state, process state of the cluster equipment and/or heartbeat connection state among the cluster equipment.
Optionally, before monitoring a change condition of a relevant state of the cluster device, the method for switching between active and standby states of the cluster device further includes:
setting an initial master/standby state of the cluster equipment according to the current network card state, interface state, process state and/or heartbeat connection state among the cluster equipment;
under the condition that the initial main/standby state of the cluster equipment is a host, adding a drift IP on a network card of the host;
and deleting the drift IP on the network card of the standby machine under the condition that the initial main/standby state of the cluster equipment is the standby machine.
Optionally, the interface state includes: an interlock interface state, a Zone Controller (Zone Controller) speed limit channel state, a Zone Controller (ZC) Train channel state and/or an Automatic Train Operation (ATO) channel state.
Optionally, after the switching the active/standby state of the cluster device according to the monitored change condition of the relevant state of the cluster device, the method for switching the active/standby state of the cluster device further includes:
deleting the drift IP of the host under the condition that the main/standby state of the cluster equipment is switched from the host to the standby;
and under the condition that the main/standby state of the cluster equipment is switched from the standby machine to the host machine, adding the drift IP to the standby machine.
Optionally, the setting an initial active/standby state of the cluster device according to a current network card state, an interface state, a process state of the cluster device, and/or a heartbeat connection state between the cluster devices includes:
and setting the initial main/standby state of the cluster equipment as a standby machine under the conditions that the current network card state of the cluster equipment cannot work normally, the interface state is broken, the process state is terminated and/or the heartbeat connection state between the cluster equipment is failed in heartbeat connection.
Optionally, the setting an initial active/standby state of the cluster device according to a current network card state, an interface state, a process state of the cluster device, and/or a heartbeat connection state between the cluster devices further includes:
and setting the initial main and standby states of the cluster equipment as a host under the conditions that the current network card state of the cluster equipment can work normally, the interface state is in good connection, the process state is non-termination and the heartbeat connection state between the cluster equipment is in good heartbeat connection.
In a second aspect, an embodiment of the present invention provides a device for switching active/standby states of cluster equipment, including:
the system comprises a monitoring module and a switching module;
the monitoring module is used for monitoring the change condition of the related state of the cluster equipment;
and the switching module is used for switching the main state and the standby state of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment.
Optionally, the cluster device-related status includes: network card state, interface state, process state of the cluster equipment and/or heartbeat connection state among the cluster equipment.
Optionally, the monitoring module is configured to monitor a change condition of a relevant state of the cluster device, where the master-standby state switching apparatus of the cluster device further includes: the device comprises a setting module, an adding module and a deleting module;
the setting module is used for setting an initial main standby state of the cluster equipment according to the current network card state, the interface state, the process state and/or the heartbeat connection state among the cluster equipment;
the adding module is used for adding a drift IP on a network card of the host under the condition that the initial main/standby state of the cluster equipment is the host;
and the deleting module is used for deleting the drift IP on the network card of the standby machine under the condition that the initial main/standby state of the cluster equipment is the standby machine.
Optionally, the interface state includes: the interlocking interface state, the ZC speed limit channel state, the ZC train channel state and/or the ATO channel state.
Optionally, the switching module is configured to switch the main state and the standby state of the cluster device according to the monitored change condition of the relevant state of the cluster device, and the deleting module is further configured to delete the drift IP of the host when the main state and the standby state of the cluster device are switched from the host to the standby; the adding module is further configured to add the drift IP to the standby machine when the active/standby state of the cluster device is switched from the standby machine to the host machine.
Optionally, the setting module is specifically configured to set an initial active/standby state of the cluster device as a standby state when a current network card state of the cluster device is abnormal, an interface state is broken, a process state is terminated, and/or a heartbeat connection state between the cluster devices is a heartbeat connection failure.
Optionally, the setting module is further specifically configured to set an initial active/standby state of the cluster device as a host when a current network card state of the cluster device is capable of working normally, an interface state is intact, a process state is non-terminated, and a heartbeat connection state between the cluster devices is intact.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the above-described methods.
In a fourth aspect, the embodiments of the present invention also provide a non-transitory computer-readable storage medium, which stores a computer program, and the computer program causes the computer to execute the above method.
According to the embodiment of the invention, the main/standby states of the cluster equipment are switched according to the change condition of the relevant state of the cluster equipment, so that the switching real-time performance is ensured; and multi-machine hot standby is adopted, and the condition of switching the cluster equipment is monitored in real time, so that the switching reliability is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for switching between active and standby states of cluster devices according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a main/standby state switching device of cluster equipment according to an embodiment of the present invention;
fig. 3 is a logic block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 shows a schematic flowchart of a method for switching between active and standby states of cluster devices according to an embodiment of the present invention, where the method includes:
and S11, monitoring the change condition of the related state of the cluster equipment.
In the embodiment of the invention, the master/standby control center switches the master/standby state of the cluster equipment according to the change condition of the relevant state of the cluster equipment. Therefore, the master and standby control centers monitor the change condition of the relevant state of the cluster equipment in real time.
And S12, switching the main and standby states of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment.
In the embodiment of the invention, the master and standby control centers monitor the change condition of the relevant state of the cluster equipment in real time. And the master/standby control center switches the master/standby states of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment. For example, when the master/backup control center monitors that the process of the host in the cluster device is terminated, the host is switched to the backup, and the drift IP is deleted. If the master-backup control center monitors that the network card of the backup computer in the cluster equipment can work normally from abnormal work, the backup computer is switched to the host computer.
According to the embodiment of the invention, the main/standby states of the cluster equipment are switched according to the change condition of the relevant state of the cluster equipment, so that the switching real-time performance is ensured; and multi-machine hot standby is adopted, and the condition of switching the cluster equipment is monitored in real time, so that the switching reliability is ensured.
Further, on the basis of the above method embodiment, the cluster device correlation state includes: network card state, interface state, process state of the cluster equipment and/or heartbeat connection state among the cluster equipment.
In the embodiment of the present invention, the relevant states of the cluster device include a network card state, an interface state, a process state of the cluster device, and/or a heartbeat connection state between the cluster devices. The network card state of the cluster equipment is divided into a normal working state and an abnormal working state; the interface state of the cluster equipment is divided into a connection intact state and an interface fracture state; the process state of the cluster equipment is divided into a non-termination state and a termination state; the heartbeat connection state among the cluster devices is divided into a heartbeat connection intact state and a heartbeat connection failure state.
The cluster equipment related state in the embodiment of the invention provides a basis for the subsequent switching of the main and standby states of the cluster equipment. .
Further, on the basis of the above method embodiment, before monitoring a change condition of a relevant state of the cluster device, the method for switching between active and standby states of the cluster device further includes:
setting an initial master/standby state of the cluster equipment according to the current network card state, interface state, process state and/or heartbeat connection state among the cluster equipment;
under the condition that the initial main/standby state of the cluster equipment is a host, adding a drift IP on a network card of the host;
and deleting the drift IP on the network card of the standby machine under the condition that the initial main/standby state of the cluster equipment is the standby machine.
In the embodiment of the present invention, before monitoring a change condition of a relevant state of cluster equipment, an initial active/standby state of the cluster equipment needs to be set according to a current network card state, an interface state, a process state and/or a heartbeat connection state between the cluster equipment; for example, if the current network card state of the cluster device is capable of working normally, the interface state is in a good connection state, the process state is in a non-termination state, and the heartbeat connection state between the cluster devices is in a good heartbeat connection state, setting the initial master/standby state of the cluster device as a host; if the current network card state of the cluster equipment is abnormal, the interface state is broken, the process state is terminated and/or the heartbeat connection state between the cluster equipment is failed, setting the initial main/standby state of the cluster equipment as a standby machine. Under the condition that the initial main/standby state of the cluster equipment is a host, adding a drift IP on a network card of the host; and deleting the drift IP on the network card of the standby machine under the condition that the initial main/standby state of the cluster equipment is the standby machine.
The embodiment of the invention sets the initial master/standby state of the cluster equipment based on the current relevant state of the cluster equipment, and provides a basis for the subsequent switching of the master/standby state of the cluster equipment.
Further, on the basis of the above method embodiment, the interface state includes: the interlocking interface state, the ZC speed limit channel state, the ZC train channel state and/or the ATO channel state.
In the embodiment of the present invention, the interface state includes: the interlocking interface state, the ZC speed limit channel state, the ZC train channel state and/or the ATO channel state.
The interface state in the embodiment of the invention can be used as a basis for judging the main/standby state of the cluster equipment.
Further, on the basis of the above method embodiment, after the switching of the master/slave states of the cluster device is performed according to the monitored change condition of the relevant state of the cluster device, the method for switching the master/slave states of the cluster device further includes:
deleting the drift IP of the host under the condition that the main/standby state of the cluster equipment is switched from the host to the standby;
and under the condition that the main/standby state of the cluster equipment is switched from the standby machine to the host machine, adding the drift IP to the standby machine.
In the embodiment of the invention, the host is switched into the standby machine, and the drift IP of the host needs to be deleted; the standby machine is switched to the host machine, and a drift IP needs to be added to the standby machine. Specifically, after the main/standby state of the cluster equipment is switched according to the monitored change condition of the relevant state of the cluster equipment, under the condition that the main/standby state of the cluster equipment is switched from a host to a standby machine, the drift IP of the host is deleted; and under the condition that the main/standby state of the cluster equipment is switched from the standby machine to the host machine, adding the drift IP to the standby machine.
According to the embodiment of the invention, the automatic addition and deletion of the drift IP are realized according to the switching of the main and standby states of the cluster equipment.
Further, on the basis of the above method embodiment, setting an initial active/standby state of the cluster device according to a current network card state, an interface state, a process state of the cluster device, and/or a heartbeat connection state between the cluster devices includes:
and setting the initial main/standby state of the cluster equipment as a standby machine under the conditions that the current network card state of the cluster equipment cannot work normally, the interface state is broken, the process state is terminated and/or the heartbeat connection state between the cluster equipment is failed in heartbeat connection.
In the embodiment of the invention, before the change condition of the relevant state of the cluster equipment is monitored, the initial master/standby state of the cluster equipment is set according to the current relevant state of the cluster equipment. Specifically, the initial master/standby state of the cluster device is set as a standby machine under the condition that the current network card state of the cluster device is abnormal, the interface state is broken, the process state is terminated and/or the heartbeat connection state between the cluster devices is failed.
The embodiment of the invention sets the initial main/standby state of the cluster equipment by monitoring the relevant state of the cluster equipment, and provides a basis for the subsequent switching of the main/standby state of the cluster equipment.
Further, on the basis of the above method embodiment, the setting an initial active/standby state of the cluster device according to a current network card state, an interface state, a process state of the cluster device, and/or a heartbeat connection state between the cluster devices further includes:
and setting the initial main and standby states of the cluster equipment as a host under the conditions that the current network card state of the cluster equipment can work normally, the interface state is in good connection, the process state is non-termination and the heartbeat connection state between the cluster equipment is in good heartbeat connection.
In the embodiment of the invention, before the change condition of the relevant state of the cluster equipment is monitored, the initial master/standby state of the cluster equipment is set according to the current relevant state of the cluster equipment. Specifically, the initial master/standby state of the cluster device is set as the host under the condition that the current network card state of the cluster device is capable of working normally, the interface state is in good connection, and the process state is non-terminated and the heartbeat connection state between the cluster devices is in good heartbeat connection.
The embodiment of the invention sets the initial main/standby state of the cluster equipment by monitoring the relevant state of the cluster equipment, and provides a basis for the subsequent switching of the main/standby state of the cluster equipment.
The above is an introduction of the method for switching the active/standby states of the cluster device.
It should be noted that, whether the host is switched to the standby host or not may also be determined by the following parameters, such as special parameters, interface and process parameters, and priority parameters. In practical application, the special parameters are preferentially compared, the interface and process parameters are secondarily compared, and the priority parameters are compared again. If the local cache has no host and the local has the condition of becoming the host, the local is promoted to be the host. When the network card is switched reversely automatically, the host computer is switched to the standby computer, the redundancy time needs to be considered, namely when some equipment monitors that the host computer is not in the cache and the parameters of the local computer are not suitable for serving as the host computer, at the moment, if the network card cannot work normally, the network card is switched to the standby computer immediately; if the judgment condition is that the external interface and the process state wait for a plurality of periods, the parameters received in a plurality of continuous periods point to the host machine and are not suitable for serving as the host machine, and the specific period parameters are determined by configuration, the host machine is reduced to a standby machine. And after the success, the state packet broadcast is immediately sent to inform the standby machine to switch the host. The redundant time is not needed to be considered when the host computer is upgraded from the standby computer to the host computer, and if the host computer is suitable and the host computer does not exist in the cache, the host computer is upgraded to the host computer immediately. If the local computer is the host computer, if the host computer exists in the cache, the equipment with low priority is immediately reduced to the standby computer through priority judgment. If a scene exists, double hosts appear in the environment due to some reason, due to the problems of time delay and the like, the two hosts both monitor that the other host exists in the cache, and the priority is judged to be reduced to a standby host.
Next, a master/slave state switching device of the cluster device is introduced.
Fig. 2 is a schematic structural diagram illustrating an active/standby state switching device of cluster equipment according to an embodiment of the present invention, where the device includes: a monitoring module 21 and a switching module 22;
the monitoring module 21 is configured to monitor a change condition of a relevant state of the cluster device;
the switching module 22 is configured to switch the active/standby states of the cluster device according to the monitored change condition of the relevant state of the cluster device.
Further, on the basis of the foregoing apparatus embodiment, the cluster device correlation status includes: network card state, interface state, process state of the cluster equipment and/or heartbeat connection state among the cluster equipment.
Further, on the basis of the foregoing apparatus embodiment, the monitoring module 21 is configured to, before monitoring a change condition of a relevant state of cluster equipment, further include: the device comprises a setting module, an adding module and a deleting module;
the setting module is used for setting an initial main standby state of the cluster equipment according to the current network card state, the interface state, the process state and/or the heartbeat connection state among the cluster equipment;
the adding module is used for adding a drift IP on a network card of the host under the condition that the initial main/standby state of the cluster equipment is the host;
and the deleting module is used for deleting the drift IP on the network card of the standby machine under the condition that the initial main/standby state of the cluster equipment is the standby machine.
Further, on the basis of the above apparatus embodiment, the interface status includes: the interlocking interface state, the ZC speed limit channel state, the ZC train channel state and/or the ATO channel state.
Further, on the basis of the above apparatus embodiment, the switching module 22 is configured to, after switching the main/standby state of the cluster device according to the monitored change condition of the relevant state of the cluster device, delete the drift IP of the host when the main/standby state of the cluster device is switched from the host to the standby; the adding module is further configured to add the drift IP to the standby machine when the active/standby state of the cluster device is switched from the standby machine to the host machine.
Further, on the basis of the above apparatus embodiment, the setting module is specifically configured to set an initial main/standby state of the cluster device as a standby state when a current network card state of the cluster device is abnormal, an interface state is broken, a process state is terminated, and/or a heartbeat connection state between the cluster devices is a heartbeat connection failure.
Further, on the basis of the above apparatus embodiment, the setting module is further specifically configured to set an initial active/standby state of the cluster device as a host when a current network card state of the cluster device is capable of working normally, an interface state is in a good connection state, a process state is not terminated, and a heartbeat connection state between the cluster devices is in a good heartbeat connection state.
The above is an introduction of the master/standby state switching device of the cluster device. Next, an electronic device and a non-transitory computer-readable storage medium are described.
FIG. 3 is a logic block diagram of an electronic device according to an embodiment of the invention; the electronic device includes: a processor (processor)31, a memory (memory)32, and a bus 33;
wherein, the processor 31 and the memory 32 complete the communication with each other through the bus 33; the processor 31 is configured to call the program instruction in the memory 32 to execute the method for switching the active/standby state of the cluster device according to the foregoing method embodiment, including: monitoring the change condition of the related state of the cluster equipment; and switching the main state and the standby state of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for switching between active and standby states of a cluster device, which is provided in the foregoing embodiments, is implemented, for example, including: monitoring the change condition of the related state of the cluster equipment; and switching the main state and the standby state of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for switching master and standby states of cluster equipment is characterized by comprising the following steps:
monitoring the change condition of the related state of the cluster equipment;
and switching the main state and the standby state of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment.
2. The method according to claim 1, wherein the relevant states of the cluster device include: network card state, interface state, process state of the cluster equipment and/or heartbeat connection state among the cluster equipment.
3. The method according to claim 2, wherein before the monitoring of the change of the relevant state of the cluster device, the method for switching between the active state and the standby state of the cluster device further comprises:
setting an initial master/standby state of the cluster equipment according to the current network card state, interface state, process state and/or heartbeat connection state among the cluster equipment;
under the condition that the initial main/standby state of the cluster equipment is a host, adding a drift IP on a network card of the host;
and deleting the drift IP on the network card of the standby machine under the condition that the initial main/standby state of the cluster equipment is the standby machine.
4. The method according to claim 2, wherein the interface state includes: the interlocking interface state, the ZC speed limit channel state, the ZC train channel state and/or the ATO channel state.
5. The method according to claim 3, wherein after the switching of the master/slave state of the cluster device is performed according to the monitored change condition of the relevant state of the cluster device, the method for switching the master/slave state of the cluster device further comprises:
deleting the drift IP of the host under the condition that the main/standby state of the cluster equipment is switched from the host to the standby;
and under the condition that the main/standby state of the cluster equipment is switched from the standby machine to the host machine, adding the drift IP to the standby machine.
6. The method according to claim 3, wherein setting an initial active/standby state of the cluster device according to a current network card state, an interface state, a process state of the cluster device, and/or a heartbeat connection state between the cluster devices comprises:
and setting the initial main/standby state of the cluster equipment as a standby machine under the conditions that the current network card state of the cluster equipment cannot work normally, the interface state is broken, the process state is terminated and/or the heartbeat connection state between the cluster equipment is failed in heartbeat connection.
7. The method according to claim 6, wherein the setting of the initial active/standby state of the cluster device according to the current network card state, the interface state, the process state of the cluster device and/or the heartbeat connection state between the cluster devices further comprises:
and setting the initial main/standby state of the cluster equipment as a host under the conditions that the current network card state of the cluster equipment can work normally, the interface state is in good connection, the process state is not terminated and the heartbeat connection state between the cluster equipment is in good heartbeat connection.
8. A device for switching between master and standby states of cluster equipment is characterized by comprising: the system comprises a monitoring module and a switching module;
the monitoring module is used for monitoring the change condition of the related state of the cluster equipment;
and the switching module is used for switching the main state and the standby state of the cluster equipment according to the monitored change condition of the relevant state of the cluster equipment.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for switching between active and standby states of a cluster device according to any one of claims 1 to 7.
10. A non-transitory computer readable storage medium, on which a computer program is stored, which, when being executed by a processor, performs the steps of the master-slave state switching method of a cluster device according to any one of claims 1 to 7.
CN201911150185.3A 2019-11-21 2019-11-21 Main and standby state switching method and device of cluster equipment Active CN111026586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911150185.3A CN111026586B (en) 2019-11-21 2019-11-21 Main and standby state switching method and device of cluster equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911150185.3A CN111026586B (en) 2019-11-21 2019-11-21 Main and standby state switching method and device of cluster equipment

Publications (2)

Publication Number Publication Date
CN111026586A true CN111026586A (en) 2020-04-17
CN111026586B CN111026586B (en) 2024-01-02

Family

ID=70206324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911150185.3A Active CN111026586B (en) 2019-11-21 2019-11-21 Main and standby state switching method and device of cluster equipment

Country Status (1)

Country Link
CN (1) CN111026586B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647668A (en) * 2013-12-16 2014-03-19 上海证券交易所 Host group decision system in high availability cluster and switching method for host group decision system
US20170373926A1 (en) * 2016-06-22 2017-12-28 Vmware, Inc. Dynamic heartbeating mechanism
CN109344014A (en) * 2018-09-26 2019-02-15 新华三大数据技术有限公司 A kind of main/standby switching method, device and communication equipment
CN109507866A (en) * 2018-12-07 2019-03-22 天津津航计算技术研究所 A kind of double-machine redundancy system and method based on network address drift technology
CN109842505A (en) * 2017-11-27 2019-06-04 北京通号国铁城市轨道技术有限公司 A kind of cloud clustering fault processing method and processing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647668A (en) * 2013-12-16 2014-03-19 上海证券交易所 Host group decision system in high availability cluster and switching method for host group decision system
US20170373926A1 (en) * 2016-06-22 2017-12-28 Vmware, Inc. Dynamic heartbeating mechanism
CN109842505A (en) * 2017-11-27 2019-06-04 北京通号国铁城市轨道技术有限公司 A kind of cloud clustering fault processing method and processing device
CN109344014A (en) * 2018-09-26 2019-02-15 新华三大数据技术有限公司 A kind of main/standby switching method, device and communication equipment
CN109507866A (en) * 2018-12-07 2019-03-22 天津津航计算技术研究所 A kind of double-machine redundancy system and method based on network address drift technology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨晓芬;王永会;刘轶;: "实时数据库系统双机热备机制设计与实现", 计算机工程与应用 *

Also Published As

Publication number Publication date
CN111026586B (en) 2024-01-02

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
CN110890980A (en) Method, device, server and system for switching main terminal and standby terminal
CN109471759B (en) A kind of database failure switching method and equipment based on SAS dual control equipment
CN103036719A (en) Cross-regional service disaster method and device based on main cluster servers
CN111385107B (en) Main/standby switching processing method and device for server
CN105072029A (en) Redundant link design method and system of active-active storage system
CN109921942B (en) Cloud platform switching control method, device and system and electronic equipment
WO2016095344A1 (en) Link switching method and device, and line card
CN104469699A (en) Cluster quorum method and multi-cluster cooperation system
CN110740066B (en) Seat-invariant cross-machine fault migration method and system
CN105049238A (en) Redundancy backup method and equipment for LTE (Long Term Evolution) gateway equipment exchange subsystem
CN111026586B (en) Main and standby state switching method and device of cluster equipment
CN114598594B (en) Method, system, medium and equipment for processing application faults under multiple clusters
CN113949623B (en) MLAG double-master exception repairing method and device, electronic equipment and storage medium
CN112822039B (en) Main and standby mode switching method for dual-machine hot standby system
CN102594605A (en) Dual-host port universal serial bus (USB) hub and working method thereof
CN107087021B (en) Master-slave server determination method and device
US11954509B2 (en) Service continuation system and service continuation method between active and standby virtual servers
CN114690618A (en) Backup switching method, device, equipment and storage medium for flight control computer
CN114095462A (en) Fault tolerance method and system for SRIO communication system of radar processor
CN113742142A (en) Method for managing SATA hard disk by storage system and storage system
CN110601972A (en) Message transmission method and device and intelligent elastic architecture system
CN115981879B (en) Data synchronization method, device and equipment of redundant structure and storage medium
CN116055315B (en) MVB communication configuration method, device, equipment and storage medium
CN114553900B (en) Distributed block storage management system, method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant