A stateful cluster recovery method, device, equipment and readable storage medium
A recovery method and state technology, applied in digital transmission systems, data exchange networks, electrical components, etc., can solve problems such as agent incompatibility, high coupling between implementation and business modules, and complex pacemaker state machines
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0059] Please refer to figure 2 , figure 2 It is a flowchart of a stateful cluster recovery method in an embodiment of the present invention, the method can be applied to each node in the stateful cluster, and the method includes the following steps:
[0060] S101. After the target node restarts, obtain the identity identification file recorded by the distributed coordination service.
[0061] It should be noted that the target node in this embodiment of the present invention may be any target node in the stateful cluster. The reason for the restart of the target node can be power-off restart, fault restart, or other planned restarts. In addition, the target node restart can be a single-point restart, or it can be each node when the entire stateful cluster is restarted as a whole. That is, when the stateful cluster restarts, each node can be regarded as a target node, and executes the recovery method provided by the embodiment of the present invention. Among them, statefu...
Embodiment 2
[0097] In order to facilitate those skilled in the art to better understand the technical solution provided by the embodiment of the present invention, the technical solution provided by the embodiment of the present invention will be described in detail below taking the distributed coordination service specifically ETCD as an example.
[0098] It should be noted that the premise of this embodiment is to cancel the load balancing function of SLB, and all business processing falls on the master node, which also has certain requirements on the overall system scale and business pressure, and is only suitable for small and medium-sized business architectures . Each business can be automatically started after abnormal exit through systemd or docker. When the cluster is restarted, the previous master node must be able to start normally. For example, the cluster contains nodes 1, 2, and 3, of which 1 is the master node. After the cluster restarts as a whole, node 1 must be in place, ...
Embodiment 3
[0148] Corresponding to the above method embodiment, the embodiment of the present invention also provides a stateful cluster recovery device. The stateful cluster recovery device described below and the stateful cluster recovery method described above can be referred to in correspondence.
[0149] see Figure 10 As shown, the device includes the following modules:
[0150] The identification file obtaining module 101 is used for obtaining the identification file recorded by the distributed coordination service after the target node is restarted;
[0151] The identification judging module 102 is used to determine the main node identification by using the identification file, and judge whether the main node identification is the same as the local identification;
[0152] The main identity determination module 103 is used to obtain the distributed lock of the distributed coordination service if it is, and set the VIP of the stateful cluster to provide external access services i...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


