Data replication relation updating method and disaster recovery system
By updating the data replication relationship when the primary disaster recovery node and the primary domain replication source node fail, the problem of insufficient data security caused by the failure of a single disaster recovery data center is solved, and the high reliability of the disaster recovery system and the continuity of data synchronization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-24
AI Technical Summary
In existing data disaster recovery technologies, the disaster recovery capabilities of disaster recovery systems rely too heavily on a single disaster recovery data center. Once this data center malfunctions, it becomes difficult to cope with sudden failures, resulting in insufficient data security during business processing.
When the primary disaster recovery node and/or the primary domain replication source node are in an abnormal operating state, the data replication relationship is updated through the disaster recovery domain control sentinel node. Flexible replication sources are selected and the data replication relationship is updated in a timely manner to ensure the continuity and reliability of data synchronization.
It improves the reliability of the disaster recovery system in terms of data disaster recovery, reduces the risk of data loss due to single point of failure, and ensures the continuity and flexibility of data backup.
Smart Images

Figure CN121728095A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data disaster recovery technology, and in particular to a data replication relationship update method and disaster recovery system. Background Technology
[0002] With the rapid development of communication technology, the amount of data cached during the processing of various services is also increasing. Therefore, data disaster recovery technology has emerged to alleviate the pressure on the main service nodes used to store cached data.
[0003] In current data disaster recovery technologies, the entire disaster recovery system's data disaster recovery capability typically relies entirely on a single disaster recovery data center. Therefore, if the disaster recovery data center or the main service node malfunctions, the disaster recovery system will struggle to cope with sudden failures. Clearly, this is detrimental to the data security of cached data generated during business processing. Summary of the Invention
[0004] Therefore, it is necessary to provide a data replication relationship update method, disaster recovery system, computer equipment, computer-readable storage medium, and computer program product that can improve the reliability of disaster recovery systems in data disaster recovery, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a data replication relationship update method applied to the disaster recovery domain control sentinel node of the first disaster recovery data center in a disaster recovery system. The disaster recovery system includes a primary data center and at least two disaster recovery data centers, the first disaster recovery data center being any one of the at least two disaster recovery data centers, the first disaster recovery data center including a primary disaster recovery node, and the primary data center including multiple nodes; the method includes:
[0006] Determine the running status of the primary disaster recovery node and the primary domain replication source node. The primary domain replication source node is the node among multiple nodes that has a data replication relationship with the primary disaster recovery node.
[0007] If the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state, update the data replication relationship of the first disaster recovery data center.
[0008] In one exemplary embodiment, the plurality of nodes includes at least two slave nodes; the primary domain replication source node is a slave node among the plurality of nodes that has a data replication relationship with the primary disaster recovery node.
[0009] In an exemplary embodiment, the first disaster recovery data center further includes at least one secondary disaster recovery node. The aforementioned update of the data replication relationship of the first disaster recovery data center in the event that the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0010] If the primary disaster recovery node is in an abnormal operating state, the primary disaster recovery node of the first disaster recovery data center is updated based on at least one secondary disaster recovery node.
[0011] Determine the data replication relationship between the updated primary disaster recovery node and the primary domain standby replication source node, where the primary domain standby replication source node is one of multiple nodes.
[0012] In an exemplary embodiment, updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0013] If the primary domain replication source node is in an abnormal running state, the primary domain is determined to replace the replication source node; the primary domain replacement replication source node is one of the multiple nodes other than the primary domain replication source node;
[0014] Determine the data replication relationship between the primary disaster recovery node and the primary domain alternative replication source node.
[0015] In one exemplary embodiment, determining the primary domain to replace the replication source node includes:
[0016] Identify at least one candidate node from among multiple nodes that are running normally and do not have a replication relationship.
[0017] Select one candidate node from at least one candidate node to obtain the primary domain replacement replication source node.
[0018] In an exemplary embodiment, the first disaster recovery data center further includes at least one secondary disaster recovery node. The aforementioned update of the data replication relationship of the first disaster recovery data center in the event that the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0019] If the primary disaster recovery node and at least one secondary disaster recovery node are in an abnormal operating state, repair the primary disaster recovery node and at least one secondary disaster recovery node so that the primary disaster recovery node and at least one secondary disaster recovery node are in a normal operating state.
[0020] Determine the primary domain recovery replication source node; the primary domain recovery replication source node can be any of the multiple nodes.
[0021] Determine the data replication relationship between the primary disaster recovery node and the primary domain recovery replication source node.
[0022] In an exemplary embodiment, updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0023] If the operating status of multiple nodes is abnormal, select one disaster recovery data center from at least two disaster recovery data centers to obtain a new primary data center;
[0024] The primary data center was designated as a disaster recovery data center.
[0025] With the new primary data center serving as the primary disaster recovery data center, determine the data replication relationship between the new primary data center and each disaster recovery master node.
[0026] In an exemplary embodiment, updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0027] If multiple nodes in the primary data center are in an abnormal operating state, a new primary data center is obtained by selecting one disaster recovery data center from at least two disaster recovery data centers.
[0028] The primary data center was designated as a disaster recovery data center.
[0029] In the case where the new primary data center is the second disaster recovery data center, determine the data replication relationship between the primary disaster recovery node and the new primary domain synchronization node in the new primary data center; the new primary domain synchronization node can be any node in the new primary data center.
[0030] In an exemplary embodiment, the primary data center further includes a primary domain control sentinel node; the above-mentioned selection of a disaster recovery data center from at least two disaster recovery data centers to obtain a new primary data center includes:
[0031] One disaster recovery data center is selected from at least two disaster recovery data centers to obtain the voting results;
[0032] Retrieve the voting results of the primary domain control sentinel nodes;
[0033] Obtain the voting results of the disaster recovery domain control sentinel nodes included in each other disaster recovery data center;
[0034] The new primary data center is determined based on the voting results of the primary data center and the voting results of at least two disaster recovery data centers.
[0035] In an exemplary embodiment, the first disaster recovery data center further includes at least one secondary disaster recovery node. When the new primary data center is the first disaster recovery data center, determining the data replication relationship between the new primary data center and each disaster recovery primary node includes:
[0036] The data center identifiers of the primary disaster recovery node and each secondary disaster recovery node are updated to determine the new primary data center as the first disaster recovery data center;
[0037] Determine the data replication relationship between the new primary data center and each disaster recovery master node.
[0038] Secondly, this application also provides a data replication relationship update method, applied to the primary domain control sentinel node of the primary data center in a disaster recovery system. The disaster recovery system further includes at least two disaster recovery data centers, each of which includes a primary disaster recovery node, and the primary data center includes multiple nodes; the method includes:
[0039] Determine the running status of the primary domain replication source node and each primary disaster recovery node. The primary domain replication source node is the node among multiple nodes that has a data replication relationship with each primary disaster recovery node.
[0040] If the primary domain replication source node and / or at least one primary disaster recovery node are in an abnormal operating state, update the data replication relationship of the primary data center.
[0041] Thirdly, this application also provides a disaster recovery system, which includes a main data center and at least two disaster recovery data centers. Each disaster recovery data center includes a disaster recovery domain control sentinel node and a main disaster recovery node. The main data center includes a main domain control sentinel node and multiple nodes.
[0042] Each disaster recovery domain control sentinel node is used to determine the running status of the corresponding primary disaster recovery node and the primary domain replication source node. The primary domain replication source node is the node among multiple nodes that has a data replication relationship with the corresponding primary disaster recovery node.
[0043] Each disaster recovery domain control sentinel node is also used to update the data replication relationship of the corresponding disaster recovery data center when the running status of each primary disaster recovery node and / or primary domain replication source node is abnormal.
[0044] The primary domain control sentinel node is used to determine the running status of the primary domain replication source node and each primary disaster recovery node. The primary domain replication source node is the node among multiple nodes that has a data replication relationship with each primary disaster recovery node.
[0045] The primary domain control sentinel node is also used to update the data replication relationship of the primary data center when the primary domain replication source node and / or at least one primary disaster recovery node are in an abnormal operating state.
[0046] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program implementing some or all of the steps described in any method of the first aspect or any method of the second aspect of this application.
[0047] Fifthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements some or all of the steps described in any method of the first aspect or any method of the second aspect of the embodiments of this application.
[0048] Sixthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements some or all of the steps described in any method of the first aspect or any method of the second aspect of the embodiments of this application.
[0049] The aforementioned data replication relationship update method, disaster recovery system, computer equipment, computer-readable storage medium, and computer program product determine the operating status of the primary disaster recovery node and the primary domain replication source node. The primary domain replication source node is a node among multiple nodes that has a data replication relationship with the primary disaster recovery node. When the operating status of the primary disaster recovery node and / or the primary domain replication source node is abnormal, the data replication relationship of the first disaster recovery data center is updated. Using the data replication relationship update method provided in this application, on the one hand, the primary disaster recovery node can synchronize data from any node in the primary data center, making the selection of the replication source more flexible. On the other hand, it can promptly update the data replication relationship of the first disaster recovery data center when the operating status of the primary disaster recovery node and / or the primary domain replication source node is abnormal. Therefore, it can ensure that the disaster recovery system achieves data disaster recovery based on the updated data replication relationship. It can be seen that the flexible replication source selection mechanism and the timely data replication relationship update mechanism can significantly improve the reliability of the disaster recovery system in terms of data disaster recovery. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This application provides an illustration of an application environment for a data replication relationship update method.
[0052] Figure 2 A flowchart illustrating a data replication relationship update method provided in an embodiment of this application;
[0053] Figure 3 A schematic diagram illustrating the updating of a data replication relationship according to an embodiment of this application;
[0054] Figure 4 A schematic diagram illustrating the updating of data replication relationships in another data replication relationship updating method provided in this application embodiment;
[0055] Figure 5 A schematic diagram illustrating the updating of a data replication relationship, which is another data replication relationship updating method provided in this application embodiment;
[0056] Figure 6 A schematic diagram illustrating the updating of a data replication relationship, which is another data replication relationship updating method provided in this application embodiment;
[0057] Figure 7 A schematic diagram illustrating the updating of a data replication relationship, which is another data replication relationship updating method provided in this application embodiment;
[0058] Figure 8 This is a flowchart illustrating another data replication relationship update method provided in an embodiment of this application. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0060] The data replication relationship update method provided in this application embodiment can be applied to, for example, Figure 1The application environment shown is as follows. The disaster recovery system includes a primary data center and at least two disaster recovery data centers (Disaster Recovery Data Center 1, Disaster Recovery Data Center 2, etc.). Each primary data center includes at least two nodes: a primary domain control sentinel node, a primary node (PM1), and at least one secondary node (PS1, PS2, PS3, etc.). Each disaster recovery data center includes at least two disaster recovery nodes, including a disaster recovery domain control sentinel node, a primary disaster recovery node, and at least one secondary disaster recovery node. Disaster recovery data center 1 includes a primary disaster recovery node B1M1 and at least one secondary disaster recovery node (B1S1, B1S2, etc.), and disaster recovery data center 2 includes a primary disaster recovery node B2M1 and at least one secondary disaster recovery node (B2S1, B2S2, etc.). In the primary data center, each secondary node synchronizes data from the primary node; in the disaster recovery data centers, each secondary disaster recovery node synchronizes data from the primary disaster recovery node, and each primary disaster recovery node synchronizes data from the nodes in the primary data center. Optionally, nodes, disaster recovery nodes, disaster recovery domain control sentinel nodes, and primary domain control sentinel nodes can each be servers. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services. In this embodiment, the primary domain can be understood as the primary data center, and the disaster recovery domain can be understood as a disaster recovery data center.
[0061] In one exemplary embodiment, such as Figure 2 As shown, a data replication relationship update method is provided, which is applied to... Figure 1 The disaster recovery system includes a disaster recovery domain control sentinel node for the first disaster recovery data center. The disaster recovery system includes a primary data center and at least two disaster recovery data centers. The first disaster recovery data center is any one of the at least two disaster recovery data centers. The first disaster recovery data center includes a primary disaster recovery node, and the primary data center includes multiple nodes. The method includes steps 202 to 204. Wherein:
[0062] Step 202: Determine the running status of the primary disaster recovery node and the primary domain replication source node. The primary domain replication source node is the node among multiple nodes that has a data replication relationship with the primary disaster recovery node.
[0063] Since the disaster recovery system includes a primary data center and at least two disaster recovery data centers, the at least two disaster recovery data centers can reduce the risk of data loss in the disaster recovery system if the primary data center is forced to interrupt its service due to unexpected events such as natural disasters, human failures, or network attacks.
[0064] The primary data center refers to the data center in a disaster recovery system that handles core business traffic. At any given time, a disaster recovery system will only have one primary data center.
[0065] The primary data center comprises multiple nodes, including one master node and at least two slave nodes. The master node is responsible for handling data related to core business traffic. The slave nodes are backup nodes used to synchronize data from the master node.
[0066] A disaster recovery data center is a backup data center in a disaster recovery system that is normally in standby mode but maintains data synchronization with the primary data center through data replication.
[0067] The primary disaster recovery node refers to a disaster recovery node in the first disaster recovery data center used to synchronize data from the primary data center. To put it simply, in addition to the primary disaster recovery node, the first disaster recovery data center also includes at least one secondary disaster recovery node, which is a backup node in the first disaster recovery data center used to synchronize data from the primary disaster recovery node.
[0068] A disaster recovery domain control sentinel node is a sentinel node in the primary disaster recovery data center that plays a leading control role in monitoring operational status, making node switching decisions, determining data replication relationships, and repairing anomalies. The disaster recovery domain control sentinel node can communicate and interact with the primary disaster recovery node and each secondary disaster recovery node to determine their operational status.
[0069] It should be noted that the primary data center includes a primary domain control sentinel node, and at least two other disaster recovery data centers, excluding the primary disaster recovery data center, also include control sentinel nodes. The disaster recovery domain control sentinel nodes, the primary domain control sentinel nodes, and the control sentinel nodes in the other disaster recovery data centers are interconnected to share operational status monitoring results.
[0070] Correspondingly, the primary domain control sentinel node refers to a sentinel node in the primary data center that plays a leading control role in monitoring operational status, making node switching decisions, determining data replication relationships, and repairing anomalies. The primary domain control sentinel node can communicate and interact with the primary node and each slave node in the primary data center to determine their operational status.
[0071] Operational status is used to characterize the real-time availability status of the primary disaster recovery node, secondary disaster recovery nodes, and multiple nodes included in the primary data center within the disaster recovery system.
[0072] Data replication refers to the logical relationship between the primary data center and the disaster recovery data center regarding data synchronization. Simply put, data flows from the primary data center to the disaster recovery data center, which backs up the data to achieve synchronization.
[0073] It should be noted that the primary domain replication source node can be any node among multiple nodes that has a data replication relationship with the primary disaster recovery node. That is to say, the primary domain replication source node can be the primary node of the primary data center, or it can be any of the slave nodes of the primary data center.
[0074] Step 204: If the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state, update the data replication relationship of the first disaster recovery data center.
[0075] Since the data replication relationship exists between the primary disaster recovery node and the primary domain replication source node, if the operating status of at least one of the primary disaster recovery node and the primary domain replication source node is abnormal, the data replication relationship needs to be updated to ensure that the data synchronization operation can continue to be executed normally.
[0076] Optionally, an abnormal operating status can be caused by hardware failure, network interruption, service crash, or a response to a shutdown command from the corresponding control sentinel node. The shutdown command can be initiated by the user in the disaster recovery system's management panel targeting the target node. The target node can be a node in the primary data center or a disaster recovery node in the disaster recovery data center.
[0077] The updated data replication relationship of the primary disaster recovery data center may be due to a change in the data flow between disaster recovery nodes within the primary disaster recovery data center, or a change in the data flow between the primary disaster recovery data center and nodes in the external primary data center.
[0078] In the aforementioned data replication relationship update method, the operating status of the primary disaster recovery node and the primary domain replication source node is determined. The primary domain replication source node is a node among multiple nodes that has a data replication relationship with the primary disaster recovery node. If the operating status of the primary disaster recovery node and / or the primary domain replication source node is abnormal, the data replication relationship of the first disaster recovery data center is updated. Using the data replication relationship update method provided in this application embodiment, on the one hand, the primary disaster recovery node can synchronize data from any node in the primary data center, making the selection of the replication source more flexible. On the other hand, it can promptly update the data replication relationship of the first disaster recovery data center when the operating status of the primary disaster recovery node and / or the primary domain replication source node is abnormal. Therefore, it can ensure that the disaster recovery system achieves data disaster recovery based on the updated data replication relationship. It can be seen that the flexible replication source selection mechanism and the timely data replication relationship update mechanism can significantly improve the reliability of the disaster recovery system in terms of data disaster recovery.
[0079] In one exemplary embodiment, each disaster recovery node of each disaster recovery data center and each node of the main data center have their own data center identifier.
[0080] The data center identifier is bound to the corresponding disaster recovery node or the corresponding master node. The data center identifier is used to identify the data center to which the bound node (the disaster recovery node of the disaster recovery data center or the node of the master data center) belongs.
[0081] Optionally, the data center identifier indicates that the bound node with which it is bound is located in the primary data center or in the disaster recovery data center.
[0082] In a straightforward manner, each disaster recovery node or each primary node corresponds to a unique data center identifier. That is to say, there is a unique association between the data center identifier and the bound node, to ensure that there is no situation where a service node is located in both the primary data center and the disaster recovery data center.
[0083] In a straightforward manner, when the primary data center is switched to the updated disaster recovery data center, the data center identifier of each node in the primary data center will also be updated under the action of the primary domain control sentinel node. That is, it will be updated from indicating that each node is located in the primary data center to indicating that each node is located in the updated disaster recovery data center. Correspondingly, when the disaster recovery data center is switched to the updated primary data center, the data center identifier of each disaster recovery node in the disaster recovery data center will also be updated under the action of the disaster recovery domain control sentinel node. That is, it will be updated from indicating that each disaster recovery node is located in the disaster recovery data center to indicating that each disaster recovery node is located in the updated primary data center.
[0084] For example, the data center identifier of each disaster recovery node in the disaster recovery data center can be a "disaster recovery domain" to indicate that each disaster recovery node is located in the disaster recovery data center; the data center identifier of each node in the primary data center can be a "primary domain" to indicate that each node is located in the primary data center. Based on this, a unique association between different types of data centers and different types of nodes is achieved.
[0085] In this embodiment, each disaster recovery node in each disaster recovery data center and each node in the primary data center has its own corresponding data center identifier. This data center identifier can be used to characterize whether a bound node belongs to the primary or disaster recovery data center; that is, the data center identifier can be understood as a logical data center group identifier. Based on this, the existence of the data center identifier allows for the debinding of a disaster recovery node or node from its actual physical location. On the one hand, it makes the data center to which a disaster recovery node or node belongs independent of its actual physical location. Thus, disaster recovery nodes in a disaster recovery data center and nodes in the primary data center can be located in the same data center or in different data centers. On the other hand, when the disaster recovery system needs to expand its architecture, the location of newly added disaster recovery nodes or nodes is not restricted; simply setting the corresponding data center identifier for each new disaster recovery node or node accurately determines its data center affiliation. It can be seen that the existence of the data center identifier improves the flexibility and reliability of the disaster recovery system.
[0086] In one exemplary embodiment, the plurality of nodes includes at least two slave nodes; the primary domain replication source node is a slave node among the plurality of nodes that has a data replication relationship with the primary disaster recovery node.
[0087] In this context, it is easy to understand that for the other disaster recovery data centers in at least two disaster recovery data centers besides the first disaster recovery data center, their primary disaster recovery node also has a data replication relationship with the slave nodes in the primary data center.
[0088] In this embodiment, since the primary domain replication source node is a slave node among multiple nodes that has a data replication relationship with the primary disaster recovery node, the primary node in the primary data center only has a data replication relationship with each slave node, and the primary disaster recovery node in different disaster recovery data centers only has a data replication relationship with the slave nodes of the primary data center. Thus, by avoiding the primary node in the primary data center needing to have data replication relationships with too many primary disaster recovery nodes, which would cause excessive pressure on the primary node, not only can the operating performance of the primary node be improved, but the reliability of the disaster recovery system in terms of data disaster recovery can also be significantly improved.
[0089] In an exemplary embodiment, the primary disaster recovery node of the first disaster recovery data center and the primary disaster recovery nodes of each of the other disaster recovery data centers have data replication relationships with different slave nodes in the primary data center.
[0090] In this embodiment, by ensuring that there is a data replication relationship between the primary disaster recovery node of different disaster recovery data centers and different slave nodes in the primary data center, the phenomenon that the primary disaster recovery node of multiple different disaster recovery data centers has a data replication relationship with a certain slave node is avoided, that is, the phenomenon of uneven data replication relationship is avoided. Thus, not only can the operating pressure of each slave node in the primary data center be reduced, but the risk of data loss caused by single point of failure of slave nodes can also be reduced, significantly improving the reliability of the disaster recovery system in terms of data disaster recovery.
[0091] In an exemplary embodiment, the first disaster recovery data center further includes at least one secondary disaster recovery node. The aforementioned update of the data replication relationship of the first disaster recovery data center in the event that the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0092] If the primary disaster recovery node is in an abnormal operating state, the primary disaster recovery node of the first disaster recovery data center is updated based on at least one secondary disaster recovery node.
[0093] Determine the data replication relationship between the updated primary disaster recovery node and the primary domain standby replication source node, where the primary domain standby replication source node is one of multiple nodes.
[0094] The updated primary disaster recovery node can be one of the at least one secondary disaster recovery nodes that has the best service capability. Optionally, the secondary disaster recovery node with the best service capability can refer to the secondary disaster recovery node with the best operating performance among at least one secondary disaster recovery node, or it can refer to the secondary disaster recovery node whose data synchronization level is closest to that of the primary disaster recovery node before the update.
[0095] The closest data synchronization level to the primary disaster recovery node before the update means that the data difference between the primary disaster recovery node before the update is the smallest, which can also be understood as the smallest difference in data offset.
[0096] In a straightforward manner, the disaster recovery domain control sentinel node can determine the disaster recovery node whose data synchronization level is closest to that of the primary disaster recovery node based on the data synchronization level between each of the at least one disaster recovery node and the primary disaster recovery node, and update the primary disaster recovery node of the first disaster recovery data center based on that disaster recovery node.
[0097] Optionally, the primary domain standby replication source node can be any node other than the primary domain replication source node among multiple nodes. Further, the primary domain standby replication source node can be any slave node other than the primary domain replication source node and the primary node among multiple nodes.
[0098] The primary domain standby replication source node can be used as a synchronization object for the new primary disaster recovery node when the primary disaster recovery node is in an abnormal running state. In other words, the primary domain standby replication source node has a "standby" attribute.
[0099] In a straightforward manner, while determining the data replication relationship between the updated primary disaster recovery node and the primary domain standby replication source node, the data replication relationship between the updated primary disaster recovery node and at least one updated secondary disaster recovery node will also be determined. That is to say, after the primary disaster recovery node of the first disaster recovery data center is switched, a data replication relationship needs to be established between the updated primary disaster recovery node and at least one updated secondary disaster recovery node to ensure that the normal data backup function of the first disaster recovery data center can be realized.
[0100] Optionally, if the primary disaster recovery node is in an abnormal operating state, the disaster recovery domain control sentinel node can repair the primary disaster recovery node so that it can be restored to normal as soon as possible to achieve the data backup function.
[0101] Optionally, after the primary disaster recovery node, which was in an abnormal operating state, recovers, it can become an updated secondary disaster recovery node to synchronize data from the updated primary disaster recovery node.
[0102] For example, such as Figure 3 As shown, assuming the first disaster recovery data center is Disaster Recovery Data Center 1, and the primary disaster recovery node B1M1 is in an abnormal operating state, and assuming the secondary disaster recovery node B1S1 is the updated primary disaster recovery node, the data replication relationship between PS3 in the primary data center of the updated primary disaster recovery node B1S1 is determined. It can be seen that in this situation, because the disaster recovery domain control sentinel node can promptly identify the updated primary disaster recovery node, and can also promptly guide and determine the data replication relationship between the updated primary disaster recovery node and the primary domain standby replication source node of the primary data center, the data backup function of the first disaster recovery data center can be quickly restored, ensuring the continuity of data synchronization.
[0103] In a straightforward manner, since the disaster recovery system includes other disaster recovery data centers in addition to the primary disaster recovery data center, even if the primary disaster recovery system in the primary disaster recovery data center is in an abnormal operating state, there are still other disaster recovery data centers in the disaster recovery system that can take on the function of synchronizing data from the primary data center. Therefore, this "one primary and multiple disaster recovery" design architecture of the disaster recovery system, which consists of one primary data center and at least two disaster recovery data centers, is beneficial to ensuring the reliability of the disaster recovery system and the continuity of data synchronization.
[0104] In this embodiment, when the primary disaster recovery node of the first disaster recovery data center is in an abnormal operating state, the disaster recovery domain control sentinel node elects a secondary disaster recovery node with the best service capability from at least one secondary disaster recovery node, and uses this secondary disaster recovery node as the updated primary disaster recovery node. A data replication relationship is established between the updated primary disaster recovery node and the primary domain backup replication source node, so that the updated primary disaster recovery node and the primary domain backup replication source node can automatically complete the full data synchronization action and subsequent incremental data synchronization action, thereby restoring the normal data backup function of the first disaster recovery data center and significantly improving the reliability of the disaster recovery system in terms of data disaster recovery.
[0105] In an exemplary embodiment, updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0106] If the primary domain replication source node is in an abnormal running state, the primary domain is determined to replace the replication source node; the primary domain replacement replication source node is one of the multiple nodes other than the primary domain replication source node;
[0107] Determine the data replication relationship between the primary disaster recovery node and the primary domain alternative replication source node.
[0108] Optionally, the primary domain replacement replication source node can be any node other than the primary domain replication source node among multiple nodes. Further, the primary domain replacement replication source node can be any slave node other than the primary domain replication source node and the primary node among multiple nodes.
[0109] The primary domain replacement replication source node can be used to replace the original primary domain replication source node in the event that the original primary domain replication source node is in an abnormal running state, so as to establish a data replication relationship with the primary disaster recovery node. In other words, the primary domain replacement replication source node has a "replacement" function.
[0110] Optionally, if the primary domain replication source node is in an abnormal operating state, the primary domain control sentinel node in the primary data center can repair the primary domain replication source node so that it can be restored to normal as soon as possible to achieve the data backup function.
[0111] In one exemplary embodiment, determining the primary domain to replace the replication source node includes:
[0112] Identify at least one candidate node from among multiple nodes that are running normally and do not have a replication relationship.
[0113] Select one candidate node from at least one candidate node to obtain the primary domain replacement replication source node.
[0114] In this process, each candidate node in at least one candidate node can be identified by a serial number. Thus, the disaster recovery domain control sentinel node can select a candidate node from at least one candidate node according to the order of the serial number identification to obtain the primary domain replacement replication source node.
[0115] For example, suppose the primary domain replacement replication source node is any of the slave nodes other than the primary domain replication source node and the primary node. And suppose that in the primary data center, there are slave nodes with serial numbers 2, 3, and 4 that are running normally and have no replication relationship. Then, according to the serial number order, the disaster recovery domain control sentinel node can determine the slave node with serial number 2 as the primary domain replacement replication source node. Correspondingly, if the slave node with serial number 2 becomes the new primary domain replication source node and its running status is abnormal, then the disaster recovery domain control sentinel node can determine the slave node with serial number 3 as the new primary domain replacement replication source node according to the serial number order, and so on.
[0116] For example, such as Figure 4 As shown, assuming the first disaster recovery data center is disaster recovery data center 1, if the primary domain replication source node PM1 is in an abnormal operating state, the data replication relationship between the primary domain alternative replication source node PS3 and the primary disaster recovery node B1M1 is determined. It can be seen that in this situation, because the disaster recovery domain control sentinel node can promptly guide and determine the data replication relationship between the primary domain alternative replication source node and the primary disaster recovery node, the first disaster recovery data center can continue to smoothly synchronize data from the primary data center, ensuring the continuity of data synchronization.
[0117] In this embodiment, when the primary domain replication source node of the primary data center is in an abnormal operating state, the disaster recovery domain control sentinel node identifies a node with a normal operating state and no replication relationship among multiple nodes, obtaining at least one candidate node. Then, one candidate node is selected from the at least one candidate node as the primary domain alternative replication source node. In this way, a data replication relationship is established between the primary disaster recovery node and the primary domain alternative replication source node, so that the primary disaster recovery node and the primary domain alternative replication source node can automatically complete the full data synchronization action and subsequent incremental data synchronization action to restore the normal data backup function of the first disaster recovery data center and significantly improve the reliability of the disaster recovery system in terms of data disaster recovery.
[0118] In an exemplary embodiment, the first disaster recovery data center further includes at least one secondary disaster recovery node. The aforementioned update of the data replication relationship of the first disaster recovery data center in the event that the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0119] If the primary disaster recovery node and at least one secondary disaster recovery node are in an abnormal operating state, repair the primary disaster recovery node and at least one secondary disaster recovery node so that the primary disaster recovery node and at least one secondary disaster recovery node are in a normal operating state.
[0120] Determine the primary domain recovery replication source node; the primary domain recovery replication source node can be any of the multiple nodes.
[0121] Determine the data replication relationship between the primary disaster recovery node and the primary domain recovery replication source node.
[0122] The situation where the main disaster recovery node and at least one secondary disaster recovery node are both in an abnormal state refers to the situation where at least two disaster recovery nodes in the first disaster recovery data center are in an abnormal state.
[0123] Optionally, the primary domain replication source node can be any node other than the primary domain replication source node among multiple nodes. Further, the primary domain replication source node can be any slave node other than the primary domain replication source node and the primary node among multiple nodes.
[0124] The primary domain recovery replication source node can be used as a node in the primary disaster recovery data center that needs to resynchronize data after all disaster recovery nodes in the primary disaster recovery data center have been restored to normal. In other words, the primary domain recovery replication source node can play its role in the scenario of "restoring synchronization" in the primary disaster recovery data center.
[0125] Optionally, if the primary disaster recovery node and at least one secondary disaster recovery node are both in an abnormal operating state, the disaster recovery domain control sentinel node can repair the primary disaster recovery node and at least one secondary disaster recovery node so that the first disaster recovery data center can be restored to normal as soon as possible to realize the data backup function.
[0126] In a straightforward manner, once the primary disaster recovery node and at least one secondary disaster recovery node are both operating normally, the data replication relationship between the primary disaster recovery node and at least one secondary disaster recovery node will also be restored, meaning the primary disaster recovery node will continue to synchronize data to each secondary disaster recovery node.
[0127] After the primary disaster recovery node and at least one secondary disaster recovery node are operating normally, the node roles of at least two disaster recovery nodes included in the first disaster recovery data center can remain unchanged. That is to say, after the disaster recovery nodes are operating normally, the primary disaster recovery node remains the primary disaster recovery node, and the secondary disaster recovery node remains the secondary disaster recovery node. In other words, the internal data flow of the first disaster recovery data center has not changed.
[0128] For example, such as Figure 5As shown, assuming the first disaster recovery data center is disaster recovery data center 1, if the primary disaster recovery node B1M1 and at least one secondary disaster recovery node (B1S1, B1S2, etc.) are all in an abnormal operating state, the disaster recovery domain control sentinel node will repair the primary disaster recovery node B1M1 and at least one secondary disaster recovery node (B1S1, B1S2, etc.) to restore them to normal operation. Furthermore, if the disaster recovery domain control sentinel node determines that the primary domain recovery replication source node is PS3 in the primary data center, it will determine the data replication relationship between the primary domain recovery replication source node PS3 and the primary disaster recovery node B1M1. It can be seen that in this scenario, because the disaster recovery domain control sentinel node can promptly repair all disaster recovery nodes in the first disaster recovery data center even when all disaster recovery nodes in the first disaster recovery data center are abnormal, and promptly guide and determine the data replication relationship between the primary domain recovery replication source node and the primary disaster recovery node, the first disaster recovery data center can quickly restore its normal operating state and continue to smoothly synchronize data from the primary data center, ensuring the continuity of data synchronization.
[0129] In this embodiment, if the primary disaster recovery node and at least one secondary disaster recovery node are both in an abnormal operating state, the data replication relationship of the first disaster recovery data center will automatically terminate due to the shutdown of each disaster recovery node. During this process, the primary data center and other disaster recovery data centers will operate normally without being affected; therefore, the data replication relationship of other disaster recovery data centers does not require additional adjustment. After the primary disaster recovery node and at least one secondary disaster recovery node are both in a normal operating state, the disaster recovery domain control sentinel node will guide the restart of the data replication relationship. First, the data replication relationship between the primary disaster recovery node and each secondary disaster recovery node within the first disaster recovery data center is restored. Then, the disaster recovery domain control sentinel node can arbitrarily select a node in the primary data center as the primary domain recovery replication source node to determine the data replication relationship between the primary disaster recovery node and the primary domain recovery replication source node. At this point, the first disaster recovery data center returns to normal operation and normally realizes the data synchronization function. It can be seen that during this process, the node roles among the disaster recovery nodes within the first disaster recovery data center do not change.
[0130] In an exemplary embodiment, updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0131] If the operating status of multiple nodes is abnormal, select one disaster recovery data center from at least two disaster recovery data centers to obtain a new primary data center;
[0132] The primary data center was designated as a disaster recovery data center.
[0133] With the new primary data center serving as the primary disaster recovery data center, determine the data replication relationship between the new primary data center and each disaster recovery master node.
[0134] The new primary data center refers to the disaster recovery data center whose data synchronization level is closest to that of the primary data center. In other words, the master node of the new primary data center has the closest data synchronization level with the master node of the old primary data center.
[0135] Once the primary data center is designated as the disaster recovery data center, and the primary data center is operating normally, it will become a new disaster recovery data center, and its master node will become the new primary disaster recovery node to synchronize data from the new primary data center to achieve data synchronization.
[0136] Optionally, the primary data center can be designated as a disaster recovery data center by the primary domain control sentinel node updating the data center identifier of the primary data center to indicate that it is a disaster recovery data center. Similarly, if the new primary data center is the first disaster recovery data center, it can also be done by the disaster recovery domain control sentinel node updating the data center identifier of the first disaster recovery data center to indicate that it is the primary data center.
[0137] Optionally, determining the data replication relationship between the new primary data center and each disaster recovery master node can be done by determining the data replication relationship between the new slave nodes in the new primary data center and each disaster recovery master node.
[0138] Optionally, if multiple nodes are in an abnormal operating state, the primary domain control sentinel node of the primary data center can repair multiple nodes so that the primary data center can be restored to normal as soon as possible to realize the data backup function as a new disaster recovery data center.
[0139] Optionally, even if the primary data center recovers from an abnormal state to normal operation, it will continue to operate as a disaster recovery data center and will not switch back to that role. Correspondingly, the primary disaster recovery data center will not switch to its disaster recovery role after the primary data center recovers to normal operation.
[0140] For example, such as Figure 6As shown, assuming the first disaster recovery data center is disaster recovery data center 1, and multiple nodes in the primary data center are all in abnormal operating states, and the new primary data center is the first disaster recovery data center, the primary data center is determined as the new disaster recovery data center. Assuming the primary node PM1 is the new primary disaster recovery node, the disaster recovery domain control sentinel node determines the data replication relationship between the new slave node B1S1 in the first disaster recovery data center and the new primary disaster recovery node PM1, and determines the data replication relationship between the new slave node B1S2 and the primary disaster recovery node B2M1 in disaster recovery data center 2. It can be seen that in this situation, the control sentinel nodes in different data centers can quickly re-determine a new primary data center. Therefore, the data replication relationship in the disaster recovery system is updated in a timely manner, allowing the disaster recovery system to quickly resume normal operation and continue to smoothly synchronize data from the primary data center even if all nodes in the primary data center are abnormal, ensuring the continuity of data synchronization.
[0141] In this embodiment, when multiple nodes are in abnormal operating states and the first disaster recovery data center is a new primary data center, the data replication relationship between the new primary data center and each disaster recovery primary node of other disaster recovery data centers, including the old primary data center, is determined. Thus, by re-determining a new primary data center in the disaster recovery system when multiple nodes of the primary data center are in abnormal states, the data backup function of the disaster recovery system can be ensured to continue to operate normally, significantly improving the reliability of the disaster recovery system in terms of data disaster recovery.
[0142] In an exemplary embodiment, updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes:
[0143] If multiple nodes in the primary data center are in an abnormal operating state, a new primary data center is obtained by selecting one disaster recovery data center from at least two disaster recovery data centers.
[0144] The primary data center was designated as a disaster recovery data center.
[0145] In the case where the new primary data center is the second disaster recovery data center, determine the data replication relationship between the primary disaster recovery node and the new primary domain synchronization node in the new primary data center; the new primary domain synchronization node can be any node in the new primary data center.
[0146] The second disaster recovery data center refers to one of the at least two disaster recovery data centers, excluding the first disaster recovery data center.
[0147] The new primary domain synchronization node can be any node in the new primary data center. Thus, the primary disaster recovery node of the first disaster recovery data center can synchronize data from the primary node of the new primary data center or from the secondary node of the new primary data center.
[0148] The new primary domain synchronization node can be used to establish a data replication relationship between the primary disaster recovery node in the new primary data center and the primary disaster recovery node in at least two new disaster recovery data centers when the operation status of multiple nodes in the original primary data center is abnormal. In other words, the new primary domain synchronization node can play a role in the scenario where the second disaster recovery data center becomes the "new primary domain".
[0149] Optionally, the new primary domain synchronization node can be any of the slave nodes in the new primary data center.
[0150] Optionally, the second disaster recovery data center can be identified as the new primary data center by updating the data center identifier of the second disaster recovery data center to indicate that it is the primary data center through the control sentinel nodes included in the second disaster recovery data center.
[0151] For example, such as Figure 7 As shown, assuming the first disaster recovery data center is disaster recovery data center 1, and multiple nodes in the primary data center are operating abnormally, and the new primary data center is disaster recovery data center 2, the primary data center is designated as the new disaster recovery data center. Assuming the primary node PM1 is the new primary disaster recovery node, the disaster recovery domain control sentinel node determines the data replication relationship between the primary disaster recovery node B1M1 of the first disaster recovery data center and the secondary disaster recovery node B2S1 of disaster recovery data center 2. Meanwhile, the primary domain control sentinel node of the primary data center determines the data replication relationship between the new primary disaster recovery node PM1 and the secondary disaster recovery node B2S2 of disaster recovery data center 2. It can be seen that in this scenario, the control sentinel nodes in different data centers can quickly re-determine a new primary data center. Therefore, the data replication relationship in the disaster recovery system is updated in a timely manner, ensuring that even if all nodes in the primary data center are abnormal, the disaster recovery system can quickly resume normal operation and continue to smoothly synchronize data from the primary data center, ensuring the continuity of data synchronization.
[0152] In this embodiment, when multiple nodes in the primary data center are in abnormal operating states and the second disaster recovery data center is the new primary data center, the data replication relationship between the primary disaster recovery node of the first disaster recovery data center and the new primary domain synchronization node in the new primary data center is determined. Thus, even if multiple nodes in the primary data center are in abnormal states, the new primary data center can be re-determined, ensuring that the data backup function of the disaster recovery system can continue to operate normally, and significantly improving the reliability of the disaster recovery system in terms of data disaster recovery.
[0153] In an exemplary embodiment, the primary data center further includes a primary domain control sentinel node; the above-mentioned selection of a disaster recovery data center from at least two disaster recovery data centers to obtain a new primary data center includes:
[0154] One disaster recovery data center is selected from at least two disaster recovery data centers to obtain the voting results;
[0155] Retrieve the voting results of the primary domain control sentinel nodes;
[0156] Obtain the voting results of the disaster recovery domain control sentinel nodes included in each other disaster recovery data center;
[0157] The new primary data center is determined based on the voting results of the primary data center and the voting results of at least two disaster recovery data centers.
[0158] The new primary data center is determined based on the voting results of the primary data center and the voting results of at least two disaster recovery data centers. Alternatively, the disaster recovery data center with the highest number of votes can be selected as the new primary data center.
[0159] Optionally, if there are at least two disaster recovery data centers with the highest number of votes, the disaster recovery data center that is closest in data synchronization level to the master node of the primary data center can be identified as the new primary data center.
[0160] In this embodiment, when the operating status of multiple nodes in the main data center is abnormal, the main domain control sentinel node of the main data center and the control sentinel nodes included in each disaster recovery data center select one disaster recovery data center from at least two disaster recovery data centers, that is, obtain voting results respectively. Thus, the disaster recovery data center with the highest number of votes can be selected as the new main data center. Since the main data center is selected by voting, it can be ensured that the new main data center has high reliability and that the disaster recovery system can have high continuity in data backup based on the new main data center.
[0161] In an exemplary embodiment, the first disaster recovery data center further includes at least one secondary disaster recovery node. When the new primary data center is the first disaster recovery data center, determining the data replication relationship between the new primary data center and each disaster recovery primary node includes:
[0162] The data center identifiers of the primary disaster recovery node and each secondary disaster recovery node are updated to determine the new primary data center as the first disaster recovery data center;
[0163] Determine the data replication relationship between the new primary data center and each disaster recovery master node.
[0164] In a straightforward manner, the primary domain control sentinel node in the primary data center will also update the data center identifiers of its included primary nodes and each of its secondary nodes.
[0165] In this embodiment, updating the data center identifiers of the primary disaster recovery node and each secondary disaster recovery node enables the disaster recovery domain control sentinel nodes of other disaster recovery data centers and the primary domain control sentinel nodes of the primary data center to determine that the first disaster recovery data center has been switched to the new primary data center. By updating the data identifiers, the data center type to which different nodes belong is clearly defined, realizing the accurate association mapping between different nodes and different data centers, which is conducive to ensuring that the data synchronization function of the disaster recovery system continues to be implemented smoothly.
[0166] In an easily understandable manner, if the second disaster recovery data center is identified as the new primary data center, the disaster recovery domain control sentinel nodes included in the second disaster recovery data center will also update the data center identifiers of their included primary disaster recovery nodes and each of their secondary disaster recovery nodes to confirm that the second disaster recovery data center is the new primary data center.
[0167] In an easy-to-understand manner, when the primary data center is identified as the new disaster recovery data center, the primary domain control sentinel nodes included in the primary data center will also update the data center identifiers of their included primary nodes and each secondary node to confirm that the primary data center is the new disaster recovery data center.
[0168] Optionally, the primary disaster recovery data center may include a sentinel cluster, which includes disaster recovery domain control sentinel nodes; similarly, other disaster recovery data centers may also include a sentinel cluster, which includes primary domain control sentinel nodes. Based on this, the primary disaster recovery data center, other disaster recovery data centers, and the primary data center can all detect each disaster recovery node and its operational status more promptly and accurately.
[0169] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0170] Based on the same inventive concept, such as Figure 8 As shown in the illustration, this application also provides a data replication relationship update method, applied to the primary domain control sentinel node of the primary data center in a disaster recovery system. The disaster recovery system further includes at least two disaster recovery data centers, each of which includes a primary disaster recovery node, and the primary data center includes multiple nodes. The method includes steps 802 to 804. Wherein:
[0171] Step 802: Determine the running status of the primary domain replication source node and each primary disaster recovery node. The primary domain replication source node is the node among multiple nodes that has a data replication relationship with each primary disaster recovery node.
[0172] Step 804: If the primary domain replication source node and / or at least one primary disaster recovery node are in an abnormal operating state, update the data replication relationship of the primary data center.
[0173] The data replication relationship update method for the primary domain control sentinel node of the primary data center in the disaster recovery system provides a solution to the problem that is similar to the solution described in the data replication relationship update method for the disaster recovery domain control sentinel node of the first disaster recovery data center in the disaster recovery system. Therefore, the specific limitations of this embodiment can be found in the limitations above, and will not be repeated here.
[0174] Based on the same inventive concept, embodiments of this application also provide a disaster recovery system, such as... Figure 1 As shown, the disaster recovery system includes a primary data center and at least two disaster recovery data centers. Each disaster recovery data center includes a disaster recovery domain control sentinel node and a primary disaster recovery node. The primary data center includes a primary domain control sentinel node and multiple nodes.
[0175] Each disaster recovery domain control sentinel node is used to determine the running status of the corresponding primary disaster recovery node and the primary domain replication source node. The primary domain replication source node is a node among multiple nodes that has a data replication relationship with the corresponding primary disaster recovery node.
[0176] Each disaster recovery domain control sentinel node is also used to update the data replication relationship of the corresponding disaster recovery data center when the operating status of each primary disaster recovery node and / or primary domain replication source node is abnormal.
[0177] The primary domain control sentinel node is used to determine the operating status of the primary domain replication source node and each primary disaster recovery node. The primary domain replication source node is the node among multiple nodes that has a data replication relationship with each primary disaster recovery node.
[0178] The primary domain control sentinel node is also used to update the data replication relationship of the primary data center when the primary domain replication source node and / or at least one primary disaster recovery node are in an abnormal operating state.
[0179] The solution provided by this disaster recovery system is similar to the solution described in the data replication relationship update method of the disaster recovery domain control sentinel node applied to the first disaster recovery data center in the disaster recovery system. Therefore, the specific limitations of this embodiment can be found in the limitations above, and will not be repeated here.
[0180] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0181] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above-described method embodiments.
[0182] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0183] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0184] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0185] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for updating data replication relationships, characterized in that, A disaster recovery domain control sentinel node is applied to the first disaster recovery data center in a disaster recovery system. The disaster recovery system includes a primary data center and at least two disaster recovery data centers. The first disaster recovery data center is any one of the at least two disaster recovery data centers. The first disaster recovery data center includes a primary disaster recovery node, and the primary data center includes multiple nodes. The method includes: Determine the running status of the primary disaster recovery node and the primary domain replication source node, wherein the primary domain replication source node is a node among the plurality of nodes that has a data replication relationship with the primary disaster recovery node; If the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state, update the data replication relationship of the first disaster recovery data center.
2. The method according to claim 1, characterized in that, The plurality of nodes includes at least two slave nodes; the primary domain replication source node is a slave node among the plurality of nodes that has a data replication relationship with the primary disaster recovery node.
3. The method according to claim 1, characterized in that, The first disaster recovery data center also includes at least one secondary disaster recovery node. The step of updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes: If the primary disaster recovery node is in an abnormal operating state, the primary disaster recovery node of the first disaster recovery data center is updated based on at least one of the secondary disaster recovery nodes. Determine the data replication relationship between the updated primary disaster recovery node and the primary domain standby replication source node, wherein the primary domain standby replication source node is one of the multiple nodes.
4. The method according to claim 1, characterized in that, The step of updating the data replication relationship of the first disaster recovery data center when the operating status of the primary disaster recovery node and / or the primary domain replication source node is abnormal includes: If the primary domain replication source node is in an abnormal running state, a primary domain replacement replication source node is determined; the primary domain replacement replication source node is one of the multiple nodes other than the primary domain replication source node. Determine the data replication relationship between the primary disaster recovery node and the primary domain alternative replication source node.
5. The method according to claim 4, characterized in that, The determination of the primary domain to replace the replication source node includes: Among the multiple nodes, identify the node that is running normally and has no replication relationship to obtain at least one candidate node; One candidate node is selected from at least one of the candidate nodes to obtain the primary domain replacement replication source node.
6. The method according to claim 1, characterized in that, The first disaster recovery data center also includes at least one secondary disaster recovery node. The step of updating the data replication relationship of the first disaster recovery data center when the primary disaster recovery node and / or the primary domain replication source node are in an abnormal operating state includes: If the main disaster recovery node and at least one of the secondary disaster recovery nodes are in an abnormal operating state, the main disaster recovery node and at least one of the secondary disaster recovery nodes shall be repaired so that the main disaster recovery node and at least one of the secondary disaster recovery nodes are in a normal operating state. Determine the primary domain recovery replication source node; the primary domain recovery replication source node is any one of the multiple nodes; Determine the data replication relationship between the primary disaster recovery node and the primary domain recovery replication source node.
7. The method according to claim 1, characterized in that, The step of updating the data replication relationship of the first disaster recovery data center when the operating status of the primary disaster recovery node and / or the primary domain replication source node is abnormal includes: If the operating status of multiple nodes is abnormal, a new primary data center is obtained by selecting one of the at least two disaster recovery data centers. The primary data center was designated as a disaster recovery data center. If the new primary data center is the first disaster recovery data center, determine the data replication relationship between the new primary data center and each disaster recovery master node.
8. The method according to claim 1, characterized in that, The step of updating the data replication relationship of the first disaster recovery data center when the operating status of the primary disaster recovery node and / or the primary domain replication source node is abnormal includes: If the operating status of multiple nodes in the primary data center is abnormal, a new primary data center is obtained by selecting one disaster recovery data center from at least two disaster recovery data centers. The primary data center was designated as a disaster recovery data center. In the case where the new primary data center is the second disaster recovery data center, the data replication relationship between the primary disaster recovery node and the new primary domain synchronization node in the new primary data center is determined; the new primary domain synchronization node can be any node in the new primary data center.
9. The method according to claim 7 or 8, characterized in that, The primary data center also includes a primary domain control sentinel node; the step of selecting one disaster recovery data center from at least two disaster recovery data centers to obtain a new primary data center includes: One disaster recovery data center is selected from at least two disaster recovery data centers to obtain the voting result; Obtain the voting results of the primary domain control sentinel node; Obtain the voting results of the disaster recovery domain control sentinel nodes included in each other disaster recovery data center; A new primary data center is determined based on the voting results corresponding to the primary data center and the voting results of at least two disaster recovery data centers.
10. The method according to claim 7, characterized in that, The first disaster recovery data center also includes at least one secondary disaster recovery node. In the case that the new primary data center is the first disaster recovery data center, determining the data replication relationship between the new primary data center and each disaster recovery primary node includes: The data center identifiers of the primary disaster recovery node and each of the secondary disaster recovery nodes are updated respectively to determine the new primary data center as the first disaster recovery data center; Determine the data replication relationship between the new primary data center and each disaster recovery master node.
11. A method for updating data replication relationships, characterized in that, The method is applied to the primary domain control sentinel node of the primary data center in a disaster recovery system, wherein the disaster recovery system further includes at least two disaster recovery data centers, each of which includes a primary disaster recovery node, and the primary data center includes multiple nodes; the method includes: Determine the operating status of the primary domain replication source node and each of the primary disaster recovery nodes, wherein the primary domain replication source node is the node among the plurality of nodes that has a data replication relationship with each of the primary disaster recovery nodes; If the primary domain replication source node and / or at least one of the primary disaster recovery nodes are in an abnormal operating state, update the data replication relationship of the primary data center.
12. A disaster recovery system, characterized in that, The disaster recovery system includes a main data center and at least two disaster recovery data centers. Each disaster recovery data center includes a disaster recovery domain control sentinel node and a main disaster recovery node. The main data center includes a main domain control sentinel node and multiple nodes. Each of the disaster recovery domain control sentinel nodes is used to determine the running status of the corresponding primary disaster recovery node and primary domain replication source node. The primary domain replication source node is a node among the multiple nodes that has a data replication relationship with the corresponding primary disaster recovery node. Each of the disaster recovery domain control sentinel nodes is also used to update the data replication relationship of the corresponding disaster recovery data center when the operating status of each of the primary disaster recovery nodes and / or the primary domain replication source nodes is abnormal; The primary domain control sentinel node is used to determine the operating status of the primary domain replication source node and each of the primary disaster recovery nodes. The primary domain replication source node is a node among the multiple nodes that has a data replication relationship with each of the primary disaster recovery nodes. The primary domain control sentinel node is also used to update the data replication relationship of the primary data center when the primary domain replication source node and / or at least one of the primary disaster recovery nodes are in an abnormal operating state.