Backup disaster recovery method and distributed system

By selecting the highest priority backup control node in the distributed system and receiving the configuration information generated by it, the system paralysis caused by the failure of the control node in the region is solved, cross-region backup disaster recovery is achieved, and the system stability and security is improved.

CN120389940APending Publication Date: 2025-07-29HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410299377.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-01-29
Filing Date
2024-03-14
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

When all control nodes in a region fail, the distributed system cannot work properly, causing the entire system to be paralyzed.

Method used

When the first configuration gateway determines that the first control node is faulty, the second control node with the highest priority is selected from the N candidate backup control nodes and receives the configuration information generated by it, ensuring that the data node can load the configuration information normally, and realize cross-region backup disaster recovery.

Benefits of technology

It improves the stability and security of data services provided by distributed systems to ensure that the system can still operate normally when the control node fails.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120389940A_ABST
    Figure CN120389940A_ABST
Patent Text Reader

Abstract

The invention provides a backup disaster recovery method and a distributed system. In the method, a first distributed system comprises a first configuration gateway, a first control node and a first data node, the first configuration gateway determines that the first control node has a fault, and determines a second control node in a second distributed system as a backup control node from N candidate backup control nodes corresponding to a first area, the priority of the second control node is higher than that of other nodes except the second control node in the N candidate backup control nodes. And the first configuration gateway receives first configuration information sent by a second configuration gateway in the second distributed system, the first configuration information is generated by the second control node according to a first configuration parameter corresponding to the first area, and the first configuration gateway sends the first configuration information to the first data node. Through the scheme, a cross-regional backup disaster recovery method can be realized, so that the stability and the security of data service provided by a distributed system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross - Reference to Related Applications

[0002] This application claims the priority of a Chinese patent application with the application number 202410121628.0 and the application title "Distributed Domain Name Resolution System" submitted to the National Intellectual Property Administration of the People's Republic of China on January 29, 2024. The entire content thereof is incorporated herein by reference. Technical Field

[0003] This application relates to the field of cloud computing technology, and particularly to a backup and disaster recovery method and a distributed system. Background Art

[0004] A region is the basic unit and container for providing cloud services in cloud computing. Regions can be divided based on dimensions such as geographical location and network latency. Resources such as elastic computing, block storage, and object storage are shared within the same region.

[0005] When data transmission is based on the peer-to-peer (P2P) technology, a distributed system can be deployed within a region. The distributed system can include a configuration gateway, a control node, and a data node. Among them, the configuration gateway is used to receive configuration parameters sent by the user through the management node and send the received configuration parameters to the control node within this region. The control node is used to calculate the configuration information that the data node can load based on the received configuration parameters and other data. The data node can load the configuration information sent by the control node and provide data plane services. For example, the data plane services can include domain name resolution, gateway forwarding, etc.

[0006] Generally, multiple control nodes are deployed in the distributed system within a region. Therefore, the failure of a single control node will not affect the overall business of the region. However, when all the control nodes within a region fail, since the control plane in the distributed system cannot work properly, the entire distributed system will be paralyzed. Summary of the Invention

[0007] This application provides a backup and disaster recovery method and a distributed system, which are used to provide a cross-region backup and disaster recovery solution and improve the security of the data service provided by the distributed system in the region.

[0008] In a first aspect, the present application provides a backup and disaster recovery method, which can be executed by a first distributed system. The first distributed system includes a first configuration gateway, a first control node, and a first data node. The first control node is used to control and manage the first data node. The first distributed system is used to provide data services for a first area. The method includes: the first configuration gateway determines that the first control node fails; the first configuration gateway determines a second control node as a backup control node from N candidate backup control nodes corresponding to the first area. The second distributed system includes a second configuration gateway, the second control node, and a second data node. The second distributed system is used to provide data services for a second area. The priority of the second control node is higher than the priority of other nodes except the second control node among the N candidate backup control nodes. Here, N is a positive integer. The first configuration gateway receives first configuration information sent by the second configuration gateway. The first configuration information is generated by the second control node according to first configuration parameters corresponding to the first area; the first configuration gateway sends the first configuration information to the first data node.

[0009] In the above method, N areas can be backups for the first area. Then, when the first configuration gateway determines that the first control node fails, it can determine the second control node from the N candidate backup control nodes in the N areas that are backups for the first area. The priority of the second control node is higher than the priority of other nodes except the second control node among the N candidate backup control nodes. Then, the determined second control node can accurately provide the function of backing up the first area. The first configuration gateway receives the first configuration information sent by the second configuration gateway in the second area where the second control node is located. The first configuration information is generated by the second control node according to the first configuration parameters corresponding to the first area. The first configuration gateway sends the obtained first configuration information to the first data node. Thus, the first data node can normally load the configuration information of the first area, ensuring the normal operation of the first distributed system, implementing a cross - area backup and disaster recovery method, and thus improving the stability and security of the distributed system in providing data services.

[0010] In a possible design, the first configuration gateway determines the second control node as the backup control node from the N candidate backup control nodes corresponding to the first area, including: the first configuration gateway determines the priorities of the N candidate backup control nodes according to the backup adaptability of the N areas to which the N candidate backup control nodes belong for backing up the first area; the first configuration gateway determines the second control node as the backup control node according to the priorities of the N candidate backup control nodes.

[0011] With this design, the first configuration gateway can determine the priorities of the N candidate backup control nodes according to the backup adaptation degrees of the N regions for the first region, so that the second region to which the second control node determined according to the priorities belongs is a region with a higher backup adaptation degree for the first region, ensuring the accuracy of backing up for the first region.

[0012] In a possible design, the second control node is an available control node.

[0013] With this design, when the first configuration gateway determines the second control node from the N candidate backup control nodes, it can select the available control node with a higher priority than other nodes among the N candidate backup control nodes, further ensuring that the determined second control node can calculate the configuration information for the first region.

[0014] Optionally, in this application, the availability of the second control node includes: the second control node can provide sufficient computing power to calculate the configuration information for the first region, and the second configuration gateway in the second distributed system to which the second control node belongs can communicate normally with the first configuration gateway.

[0015] In a possible design, the method further includes: the first configuration gateway receives the second configuration information sent by the third configuration gateway, the second configuration information is generated by the third control node according to the first configuration parameter, the third distributed system includes the third configuration gateway, the third control node and the third data node, the third distributed system is used to provide data services for the third region, and the N candidate backup control nodes include the third control node.

[0016] With this design, multiple distributed systems in multiple regions can back up the first region. For example, the first configuration gateway can receive the first configuration information sent by the second configuration gateway, and the first configuration gateway can also receive the second configuration information sent by the third configuration gateway. Both the first configuration information and the second configuration information are configuration information generated according to the first configuration parameter corresponding to the first region, further improving the security of cross-region backup and disaster recovery.

[0017] In a possible design, the N candidate backup control nodes belong to N regions, each of the N regions includes a candidate backup control node, and the N regions are used to back up the first region; the method further includes: the first configuration gateway obtains the backup adaptation degrees of the M regions for backing up the first region, the M regions include the second region, and M is a positive integer greater than or equal to N; the first configuration gateway determines the N regions according to the backup adaptation degrees of the M regions for backing up the first region.

[0018] With this design, the first configuration gateway can determine N regions for backing up the first region from M regions according to the backup fitness of the M regions for backing up the first region, so that the determined N regions are suitable for backing up the first region.

[0019] In a possible design, the first configuration gateway obtaining the backup fitness of the M regions for backing up the first region includes: receiving the backup fitness of the M regions for backing up the first region sent by the M configuration gateways of the M regions.

[0020] In a possible design, the N candidate backup control nodes belong to N regions, each of the N regions includes one candidate backup control node, and the N regions are used for backing up the first region; the method further includes: the first configuration gateway obtaining the backup fitness between every two of the Q regions, the Q regions including the first region and the second region, and Q being a positive integer greater than N; the first configuration gateway determining the N regions according to the backup fitness between every two of the Q regions.

[0021] With this design, the first configuration gateway can obtain the backup fitness between every two of the Q regions, the Q regions including the first region and the second region, and the first configuration gateway can determine N regions for backing up the first region according to the backup fitness between every two of the Q regions, so as to ensure that the regions for backing up each region among the Q regions are all N different regions, avoid one region backing up more than N regions, and evenly utilize the computing power of the Q regions.

[0022] In a possible design, the backup fitness between every two of the Q regions includes the backup fitness of the target region for backing up any region other than the target region among the Q regions, and the target region is any region other than the first region among the Q regions; the first configuration gateway obtaining the backup fitness between any two of the Q regions includes: the first configuration gateway receiving the backup fitness of the target region for backing up any region other than the target region among the Q regions sent by the target configuration gateway of the target region.

[0023] In a possible design, the backup adaptability between every two of the Q regions includes the backup adaptability of the first region backing up the M regions, where the M regions are the regions among the Q regions other than the first region; the first configuration gateway obtaining the backup adaptability between any two of the Q regions includes: the first configuration gateway sending a detection signal to the M configuration gateways of the M regions based on a preset period; the first configuration gateway determining the connectivity and detection delay between the first configuration gateway and the M configuration gateways according to the responses of the M configuration gateways to the detection signal; the first configuration gateway determining the backup adaptability of the first region backing up the M regions according to the connectivity and detection delay between the first configuration gateway and the M configuration gateways.

[0024] With this design, the first configuration gateway can determine the connectivity and detection delay between the first configuration gateway and other configuration gateways by sending a detection signal to the configuration gateways of other regions, and then determine the backup adaptability of the first region backing up other regions. When determining the backup relationship between regions based on the backup adaptability determined in this way, the region providing backup and the region receiving backup can communicate normally, and the communication delay is low, improving the accuracy and efficiency of backup and disaster recovery.

[0025] In a possible design, before the first configuration gateway determines that the first control node fails, the method further includes: the first configuration gateway determining that the first control node is a candidate backup control node corresponding to the fourth region; the first configuration gateway obtaining the third configuration parameter corresponding to the fourth region.

[0026] With this design, when the first region backs up the fourth region, the first configuration gateway in the first region can obtain the third configuration parameter corresponding to the fourth region, so as to be able to provide backup services for the fourth region in a timely manner.

[0027] In a possible design, the method further includes: the first configuration gateway sending the third configuration parameter to the first control node; the first control node generating third configuration information according to the third configuration parameter and sending the third configuration information to the first configuration gateway; the first configuration gateway sending the third configuration information to the fourth configuration gateway in the fourth region.

[0028] With this design, when the first area is backing up the fourth area, the first configuration gateway can send the third configuration parameters corresponding to the fourth area to the first control node. As a result, the first control node can calculate the third configuration information that can be loaded by the fourth data nodes in the fourth area. The first configuration gateway sends the third configuration information generated by the first control node to the fourth configuration gateway. Thus, even if the control node in the fourth area fails, the fourth distributed system in the fourth area can obtain the third configuration information in a timely manner, ensuring the normal operation of the fourth distributed system.

[0029] In a second aspect, the present application provides a distributed system, which may include a first configuration gateway, a first control node, and a first data node. The first control node is used to control and manage the first data node, and the distributed system is used to provide data services for the first area;

[0030] The first configuration gateway is configured to determine that the first control node fails; determine a second control node as the backup control node from the N candidate backup control nodes corresponding to the first area. The second distributed system includes a second configuration gateway, the second control node, and second data nodes. The second distributed system is used to provide data services for the second area, and the priority of the second control node is higher than the priority of other nodes except the second control node among the N candidate backup control nodes. Here, N is a positive integer; receive the first configuration information sent by the second configuration gateway, where the first configuration information is generated by the second control node according to the first configuration parameters corresponding to the first area; send the first configuration information to the first data node.

[0031] The first data node is used to load the first configuration information.

[0032] In a possible design, the first configuration gateway is specifically configured to: determine the priorities of the N candidate backup control nodes according to the backup adaptability of the N areas to which the N candidate backup control nodes belong for backing up the first area; determine the second control node as the backup control node according to the priorities of the N candidate backup control nodes.

[0033] In a possible design, the second control node is an available control node.

[0034] In a possible design, the first configuration gateway is further configured to: receive second configuration information sent by a third configuration gateway, where the second configuration information is generated by a third control node according to the first configuration parameters. The third distributed system includes the third configuration gateway, the third control node, and third data nodes. The third distributed system is used to provide data services for the third area, and the N candidate backup control nodes include the third control node.

[0035] In a possible design, the N candidate backup control nodes belong to N regions, each of the N regions includes one candidate backup control node, and the N regions are used for backing up the first region.

[0036] The first configuration gateway is further configured to: obtain the backup adaptability of M regions for backing up the first region, where the M regions include the second region, and M is a positive integer greater than or equal to N; determine the N regions according to the backup adaptability of the M regions for backing up the first region.

[0037] In a possible design, the first configuration gateway is specifically configured to: receive the backup adaptability of the M regions for backing up the first region sent by the M configuration gateways of the M regions.

[0038] In a possible design, the N candidate backup control nodes belong to N regions, each of the N regions includes one candidate backup control node, and the N regions are used for backing up the first region.

[0039] The first configuration gateway is further configured to: obtain the backup adaptability between every two of the Q regions, where the Q regions include the first region and the second region, and Q is a positive integer greater than N; determine the N regions according to the backup adaptability between every two of the Q regions.

[0040] In a possible design, the backup adaptability between every two of the Q regions includes the backup adaptability of a target region for backing up any one of the Q regions other than the target region, and the target region is any one of the Q regions other than the first region.

[0041] The first configuration gateway is specifically configured to: receive the backup adaptability of the target region for backing up any one of the Q regions other than the target region sent by the target configuration gateway of the target region.

[0042] In a possible design, the backup adaptability between every two of the Q regions includes the backup adaptability of the first region for backing up the M regions, and the M regions are the regions other than the first region among the Q regions.

[0043] The first configuration gateway is specifically configured to: send a detection signal to the M configuration gateways in the M regions based on a preset period; determine the connectivity and detection delay between the first configuration gateway and the M configuration gateways according to the responses of the M configuration gateways to the detection signal; and determine the backup adaptability of the first region as the backup for the M regions according to the connectivity and detection delay between the first configuration gateway and the M configuration gateways.

[0044] In a possible design, the first configuration gateway is further configured to: before determining that the first control node fails, determine the first control node as a candidate backup control node corresponding to the fourth region, and obtain the third configuration parameter corresponding to the fourth region.

[0045] In a possible design, the first configuration gateway is further configured to: send the third configuration parameter to the first control node; receive the third configuration information sent by the first control node, and send the third configuration information to the fourth configuration gateway in the fourth region;

[0046] The first control node is configured to: generate the third configuration information according to the third configuration parameter.

[0047] In a third aspect, the present application provides a computing device cluster, which includes at least one computing device, and each computing device includes a plurality of functional modules; the plurality of functional modules in the at least one computing device interact with each other, so that the computing device cluster implements the methods executed by the first distributed system in the first aspect and its various embodiments. For example, the computing device can be used to implement the methods executed by the first configuration gateway in the first aspect and its various embodiments, or implement the methods executed by the first control node in the first aspect and its various embodiments. The plurality of functional modules in each computing device can be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules can be arbitrarily combined or divided based on the specific implementation.

[0048] In a fourth aspect, the present application provides a computing device cluster, which includes at least one computing device, and each computing device includes a processor and a memory. The processor of the at least one computing device is configured to execute the content stored in the memory of the at least one computing device, so that the computing device cluster executes the methods executed by the first distributed system in the first aspect and its various embodiments. For example, the computing device can be used to execute the methods executed by the first configuration gateway in the first aspect and its various embodiments, or execute the methods executed by the first control node in the first aspect and its various embodiments.

[0049] Fifth aspect, the present application further provides a computer program product containing instructions. When the computer program product runs on a cluster of computing devices, it causes the cluster of computing devices to execute the method performed by the first distributed system in any of the above aspects and their respective embodiments.

[0050] Sixth aspect, the present application further provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a cluster of computing devices, it causes the cluster of computing devices to execute the method performed by the first distributed system in any of the above aspects and their respective embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic structural diagram of a distributed system in a region;

[0052] Figure 2 It is a schematic architecture diagram of a distributed system applicable to an embodiment of the present application;

[0053] Figure 3 It is an example diagram of the backup adaptability between every two regions among multiple regions provided by an embodiment of the present application;

[0054] Figure 4 It is a schematic diagram of determining a backup region according to the backup adaptability provided by an embodiment of the present application;

[0055] Figure 5 It is an example diagram of the backup adaptability between every two regions among multiple regions provided by an embodiment of the present application;

[0056] Figure 6 It is a flowchart of a backup and disaster recovery method provided by an embodiment of the present application;

[0057] Figure 7 It is a flowchart of a backup and disaster recovery method provided by an embodiment of the present application;

[0058] Figure 8 It is a schematic structural diagram of a computing device provided by an embodiment of the present application;

[0059] Figure 9 It is a schematic structural diagram of a computing device provided by an embodiment of the present application;

[0060] Figure 10 It is a schematic structural diagram of a cluster of computing devices provided by an embodiment of the present application;

[0061] Figure 11 It is a schematic diagram of the connection mode of computing devices in a cluster of computing devices provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings. Among them, in the description of the embodiments of this application, hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.

[0063] It should be understood that in the embodiments of this application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, at least one (item) of a, b, or c may represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c may be single or multiple.

[0064] A region may be a basic unit for providing cloud services divided based on dimensions such as geographical location and network latency. A distributed system may be deployed within the region for data transmission. Figure 1 It is a schematic structural diagram of a distributed system in a region. Refer to Figure 1 , this distributed system may include a configuration gateway, a control node, and a data node. Among them, the configuration gateway is used to receive the configuration parameters corresponding to this region. For example, a user may set the configuration parameters corresponding to this region in the user interface corresponding to the management node, and the management node sends the configuration parameters of this region to the configuration gateway of this region. The control node, also known as the control plane node, is used to calculate the configuration information that the data node can load based on the received configuration parameters and other data. The data node, also known as the data plane node, is used to load the configuration information sent by the control node and provide data plane services for users. For example, the data plane services may include domain name resolution, gateway forwarding, etc.

[0065] Optionally, the control plane functions of the distributed system can be executed by a cluster of control nodes, which includes multiple control nodes. The data plane functions of the distributed system can be executed by a cluster of data nodes, which includes multiple data nodes. For ease of description, in the following introduction of the embodiments of this application, it is described by taking the control nodes as an example to execute the control plane functions and the data nodes as an example to execute the data plane functions. It can be understood that in specific implementation, the functions executed by the control nodes in the embodiments of this application can be executed by a cluster of control nodes, and the functions executed by the data nodes in the embodiments of this application can be executed by a cluster of data nodes.

[0066] Reference Figure 1 , in this distributed system, when a single control node fails, the other control nodes in the distributed system can still continue to work, and then the distributed system can still normally provide data services. However, when all the control nodes in the distributed system fail, the data nodes cannot obtain the loadable configuration information, and then the entire distributed system will be paralyzed.

[0067] Based on the above problems, the embodiments of this application provide a backup and disaster recovery method. The backup and disaster recovery method provided by the embodiments of this application will be introduced below with reference to the accompanying drawings.

[0068] Figure 2 is a schematic diagram of the architecture of a distributed system applicable to the embodiments of this application. Refer to Figure 2 , Figure 2 , it is shown by taking the distributed system deployed in 3 regions as an example. The first distributed system is deployed in Region 1, and the first distributed system includes a first configuration gateway, a first control node, and a first data node. The second distributed system is deployed in Region 2, and the second distributed system includes a second configuration gateway, a second control node, and a second data node. The third distributed system is deployed in Region 3, and the third distributed system includes a third configuration gateway, a third control node, and a third data node. The configuration gateway, control node, and data node in the same region are within the same peer-to-peer (P2P) network, and the configuration gateway, control node, and data node can transmit data based on P2P technology. Refer to Figure 2 , taking the process of the first distributed system in Region 1 providing data services as an example, a user can configure Region 1 through the user interface corresponding to the management node (such as the control plane console). The management node generates the configuration parameters corresponding to Region 1 according to the user settings. The management node sends the configuration parameters corresponding to Region 1 to the first configuration gateway. The first configuration gateway sends the configuration parameters to the first control node. The first control node generates configuration information according to the configuration parameters and sends the generated configuration information to the first data node. The first data node loads the configuration information to provide data services.

[0069] Reference Figure 2In the embodiments of the present application, multiple configuration gateways in multiple regions are within the same P2P network. Any two configuration gateways within this P2P network can communicate with each other, so that the configuration gateways in different regions can achieve cross-region data interaction through this P2P network. For example, the first configuration gateway can receive the first configuration information sent by the second configuration gateway. The first configuration information can be the configuration information generated by the second control node according to the first configuration parameters corresponding to the first region. In this way, the second region can back up the first region.

[0070] It should be noted that the multiple configuration gateways in multiple regions forming a P2P network is only an example rather than a limitation. In specific implementation, this P2P network can also include more nodes. For example, the multiple configuration gateways in multiple regions and multiple control nodes can be within the same P2P network, or the multiple configuration gateways in multiple regions, multiple control nodes, and multiple data nodes can be within the same P2P network. It can be understood that when the nodes included in the P2P network are different, the interaction methods between nodes in different regions are also different. Specifically, when the multiple configuration gateways in multiple regions form a P2P network, cross-region data interaction is executed by multiple configuration gateways; when the multiple configuration gateways in multiple regions and multiple control nodes are within the same P2P network, the configuration gateway or control node in any region can perform data interaction with the configuration gateway or control node in other regions; when the multiple configuration gateways in multiple regions, multiple control nodes, and multiple data nodes are within the same P2P network, any two devices in multiple regions can perform data interaction. In specific implementation, the architecture of the P2P network can be set according to the scenario or business requirements, and the embodiments of the present application do not limit this. In the following embodiments, it is described with the multiple configuration gateways in multiple regions being within the same P2P network.

[0071] In the embodiments of the present application, the configuration gateway, the control node, and the data node can all be implemented by software or by hardware. Exemplarily, the implementation method of the configuration gateway is introduced next. Similarly, the implementation methods of the control node and the data node can refer to the implementation method of the configuration gateway.

[0072] As an example of a software functional unit, the configuration gateway can include code running on a computing instance. Among them, the computing instance can be at least one of computing devices such as a physical host (computing device), a virtual machine, and a container. Further, the above computing devices can be one or more. For example, the configuration gateway can include code running on multiple hosts / virtual machines / containers.

[0073] As an example of configuring a gateway as a hardware functional unit, the configured gateway may include at least one computing device, such as a server, etc. Alternatively, the configured gateway may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0074] The distributed system provided by the embodiments of the present application may be a domain name system (DNS), or the distributed system in the embodiments of the present application may also be a system or device with separated control plane and data plane based on P2P technology, such as a load balancer, an application programming interface (API) gateway, a global server load balance (GSLB) system, etc.

[0075] In the backup and disaster recovery method provided by the embodiments of the present application, Q regions may form a cluster for mutual backup, where Q is a positive integer. Each of the Q regions may back up other regions among the Q regions, or in other words, the distributed system of each of the Q regions may back up the distributed systems of other regions among the Q regions. The Q regions include a first region. In implementation, N regions among the Q regions may be set to back up the first region, and the first region backs up N regions among the Q regions, where N is a positive integer less than Q. In the embodiments of the present application, at most N regions back up one region, and one region backs up at most N regions. For example, when N is 2, it means that 2 regions back up the first region, and the first region backs up the other 2 regions. The value of N may be an empirical value set by technicians, or the value of N may be a user-defined value, or the value of N may be a value determined according to the service scenario. The embodiments of the present application do not limit this. It can be understood that in the cluster composed of Q regions, based on the backup and disaster recovery method provided by the embodiments of the present application, at most N control nodes of the regions are allowed to fail.

[0076] Take Figure 2Taking the first distributed system shown as an example of implementing the backup and disaster recovery method provided by the embodiments of the present application, the first configuration gateway can determine N regions for backing up the first region from a cluster composed of Q regions, and the first configuration gateway can also determine which N regions in the cluster the first region backs up.

[0077] In an optional implementation manner, the first configuration gateway obtains the backup adaptability between every two of the Q regions, and determines N regions for backing up the first region and the N regions backed up by the first region according to the backup adaptability between every two of the Q regions. Among them, the backup adaptability between every two of the Q regions includes the backup adaptability of the first region for backing up other regions except the first region among the Q regions, and the backup adaptability of M regions except the first region among the Q regions for backing up other regions respectively, where M is a positive integer less than Q.

[0078] For example, Figure 3 is an example diagram of the backup adaptability between every two of six regions provided by the embodiments of the present application. Refer to Figure 3 , Figure 3 In which, taking Q as 6 as an example, R1 - R6 are six different regions. Figure 3 In the values in the column corresponding to R1 within the dotted circle in [[ID]] are the backup adaptabilities of R1 for backing up R2 - R5, and the values in the row corresponding to R1 within the solid circle in [[ID]] are the backup adaptabilities of R2 - R5 for backing up R1 respectively. Similarly, the values in the column corresponding to R2 are the backup adaptabilities of R2 for backing up R1, R3 - R5, and the values in the row corresponding to R2 are the backup adaptabilities of R1, R3 - R5 for backing up R1 respectively, and so on. In the embodiments of the present application, the configuration gateway in R1 can calculate the backup adaptabilities of R1 for backing up R2 - R5 according to the detection signal, and the configuration gateway in R2 can calculate the backup adaptabilities of R2 for backing up R1, R3 - R5 according to the detection signal. That is to say, Figure 3 the values in each column in [[ID]] are calculated by the configuration gateway in a region, and after each configuration gateway calculates the Figure 3 values in a column of backup adaptabilities shown in [[ID]], it can send the backup adaptabilities calculated by this configuration gateway to the configuration gateways of other regions respectively, so that the configuration gateway of each region can obtain the backup adaptabilities between every two regions as shown in Figure 3 .

[0079] In an embodiment of the present application, when the first configuration gateway determines the backup adaptability for backing up the other M regions except the first region among the Q regions, the first configuration gateway may send a detection signal to the M configuration gateways of the M regions based on a preset period. After receiving the detection signal, the M configuration gateways may respond to the detection signal, such as sending a response signal to the first configuration gateway. The first configuration gateway may determine the connectivity and detection delay between the first configuration gateway and the M configuration gateways according to the responses of the M configuration gateways to the detection signal; the first configuration gateway determines the backup adaptability between the M regions and the first region according to the connectivity and detection delay between the first configuration gateway and the M configuration gateways.

[0080] For example, the first configuration gateway sends a detection signal to the second configuration gateway. If the first configuration gateway receives a response from the second configuration gateway to the detection signal, then the first configuration gateway and the second configuration gateway are connected. If the first configuration gateway does not receive a response from the second configuration gateway to the detection signal, then the first configuration gateway and the second configuration gateway are not connected. In practice, "1" may be used to indicate that the first configuration gateway and the second configuration gateway are connected, and "0" may be used to indicate that the first configuration gateway and the second configuration gateway are not connected. When the first configuration gateway receives a response from the second configuration gateway to the detection signal, it may also determine the detection delay according to the time when the detection signal is sent and the time when the response signal is received. In practice, multiple thresholds may be set to quantify the detection delay. For example, when the detection delay is less than 2 ms, the value corresponding to the detection delay is "1", and when the detection delay is less than 5 ms, the value corresponding to the detection delay is "0.8". The first configuration gateway may determine the backup adaptability between the second configuration gateway and the first configuration gateway according to the connectivity and detection delay between the first configuration gateway and the second configuration gateway. For example, the backup adaptability may be a value between 0 and 1, and the larger the value, the higher the backup adaptability between the second configuration gateway and the first configuration gateway.

[0081] It should be noted that determining the backup adaptability according to the connectivity and detection delay in the above embodiment is only an example rather than a limitation. In practice, the backup adaptability may also be determined according to more other parameters. For example, the other parameters may be parameters carried in the response signal, such as health-related parameters, etc. The other parameters may also be hardware or software-related parameters of the control node in the distributed system to which the configuration gateway sending the response signal belongs, etc. The embodiments of the present application do not limit this. In addition, the embodiments of the present application do not limit the calculation method by which the configuration gateway calculates the backup adaptability according to the connectivity and detection delay. For example, the calculation method may be a linear function or a neural network model, etc.

[0082] In an embodiment of the present application, the first configuration gateway may also receive the backup adaptability sent by the configuration gateways of other regions except the first region among the Q regions. The backup adaptability sent by each configuration gateway is the backup adaptability for which the region to which the configuration gateway belongs backs up other regions except this region among the Q regions. Correspondingly, after the first configuration gateway determines the backup adaptability for which the first region backs up the other M regions except the first region among the Q regions, it also sends the backup adaptability for which the first region backs up the other M regions to the M configuration gateways of the other M regions.

[0083] After the first configuration gateway obtains the backup adaptability between every two regions among the Q regions, it may determine N regions according to the backup adaptability between every two regions among the Q regions. In implementation, the first configuration gateway may determine, in the order from high to low of the priorities of the Q regions, the N regions corresponding to each region for backing up this region, and further determine the N regions corresponding to the region to which the first configuration gateway belongs for backing up this region. For example, Figure 4 is a schematic diagram for determining a backup region according to the backup adaptability provided by an embodiment of the present application. Refer to Figure 4 , Figure 4 which shows the backup adaptability between every two regions among 6 regions. Among them, the values in the first row represent the backup adaptability for which R2 - R6 back up R1, the values in the second row represent the backup adaptability for which R1, R3 - R6 back up R2, and so on. Determine the backup regions corresponding to each region in the order of R1, R2, R3, R4, R5, R6. Assume N is 2. As Figure 4 shown, when selecting the regions for backing up R1, select R3 corresponding to the highest backup adaptability 1 and R6 corresponding to the backup adaptability 0.6 from R2 - R6 for backing up R1; when selecting the regions for backing up R2, select R3 corresponding to the highest backup adaptability 1 and R5 corresponding to the backup adaptability 0.6 for backing up R2; when selecting the regions for backing up R3, select R6 corresponding to the highest backup adaptability 1 and R2 corresponding to the backup adaptability 0.8 for backing up R3; when selecting the regions for backing up R4, since the highest backup adaptability R3 has backed up R1 and R2, and one region can back up at most 2 regions, select R1 corresponding to the backup adaptability 0.8 and R2 corresponding to the backup adaptability 0.7 for backing up R4; when selecting the regions for backing up R5, since the highest backup adaptability R2 has backed up R3 and R4, and R3 with a backup adaptability of 0.9 has backed up R1 and R2, select R4 with a backup adaptability of 1 and R1 with a backup adaptability of 0.4 for backing up R5; when selecting the regions for backing up R6, since the highest 0.9 corresponding to R1 has backed up R4 and R5, select R4 with a backup adaptability of 0.4 and R5 with a backup adaptability of 0.6 for backing up R6.

[0084] Based on Figure 4 Based on the backup adaptation degrees of every two regions among the six regions shown, it is possible to respectively determine for which two regions each of the regions R1 - R6 is used for backup. Then, in addition to obtaining the configuration parameters corresponding to its own region, the configuration gateway in each region can also obtain the configuration parameters of the two regions backed up by this region. Moreover, the control node in each region also needs to calculate the configuration parameters corresponding to the two regions other than its own region. As shown in the reference Figure 4 , the control node in each region also needs to calculate the configuration parameters of other regions according to the following corresponding relationships between regions: R1: {R4, R5}, R2: {R3, R4}, R3: {R1, R2}, R4: {R5, R6}, R5: {R2, R6}, R6: {R1, R3}.

[0085] Based on Figure 4 Based on the backup adaptation degrees of every two regions among the six regions shown, it is possible to respectively determine the two regions corresponding to each of the regions R1 - R6 for backing up this region. Then, when the control node in a region fails, the configuration gateway in this region can orderly obtain the configuration parameters calculated by the control nodes of other regions according to the following corresponding relationships between regions: R1: {R3, R6}, R2: {R3, R5}, R3: {R6, R2}, R4: {R1, R2}, R5: {R4, R1}, R6: {R5, R4}.

[0086] It should be noted that in the above embodiments, determining the backup regions corresponding to each region in the order of R1 - R6 can avoid duplication of the backup regions corresponding to multiple regions. In the backup and disaster recovery method provided in the embodiments of the present application, the priorities of multiple regions can also be set according to other methods. For example, the priorities of regions can be determined according to parameters such as the service types in the regions. For the configuration gateways of the regions ranked in the top N positions in descending order of priority among Q regions, after obtaining the backup adaptation degrees of other regions backing up the region to which the configuration gateway belongs, the configuration gateway can determine the backup regions corresponding to the region to which the configuration gateway belongs. For example, based on Figure 4 the backup adaptation degrees of every two regions among the six regions shown, when the first configuration gateway belongs to R1, since the backup regions corresponding to R1 are determined preferentially, the first configuration gateway can determine the two regions for backing up R1 after obtaining the backup adaptation degrees of R2 - R6 backing up R1; and when the first configuration gateway belongs to R2, the first configuration gateway can determine the two regions for backing up R2 after obtaining the backup adaptation degrees of R1, R3 - R6 backing up R2, without considering whether there will be duplication with the backup regions corresponding to other regions.

[0087] It can be understood that in the embodiments of the present application, the first configuration gateway may send a detection signal based on a preset period to determine the backup adaptability of the first area as a backup for other areas. Correspondingly, the configuration gateways of other areas may also determine the backup adaptability based on a preset period and send the determined backup adaptability to the first configuration gateway. Then, the first configuration gateway may periodically determine N areas for backing up the first area and N areas for which the first area serves as a backup area. That is to say, in practice, the determination of the backup area by the first configuration gateway is a dynamic process. When the first configuration gateway determines that the first control node fails, it may obtain the N areas determined in the previous period for backing up the first area. Alternatively, in some other optional embodiments, the embodiments of the present application may also trigger the process of determining the backup area in other ways. For example, when the first configuration gateway determines that the first control node fails, the first configuration gateway may obtain the backup adaptability of other areas for backing up the first area and determine N areas for backing up the first area, thereby ensuring the accuracy of the N areas determined for backing up the first area at this time.

[0088] In the backup and disaster recovery method provided by the embodiments of the present application, since the backup adaptability of other areas obtained by the first configuration gateway for backing up the first area is sent by the configuration gateways of other areas to the first configuration gateway. For example, the second configuration gateway of the second area sends the backup adaptability of the second area for backing up other areas except the second area among Q areas to the first configuration gateway. If the second configuration gateway fails, the second configuration gateway cannot send the backup adaptability of the second area for backing up other areas except the second area among Q areas. At this time, Figure 4 the backup adaptability obtained by the first configuration gateway may be missing a column of values, and the first configuration gateway cannot determine the N backup areas corresponding to the first area. In this case, the user can manually set the backup adaptability of the second area for backing up other areas through the user interface corresponding to the management node. The management node may send the backup adaptability of the second area for backing up other areas set by the user to the first configuration gateway, and then the first configuration gateway may determine the N backup areas corresponding to the first area according to the method described above.

[0089] In some embodiments, the user can also manually set the backup relationship between multiple areas through the user interface corresponding to the management node, such as Figure 5 the backup adaptability for every two of 6 areas. The user can set the backup adaptability of multiple areas for backing up R1, the backup adaptability of multiple areas for backing up R2, and so on. For the convenience of the user to set, the user can set the backup adaptability of R1 for backing up R2 to 1, indicating that R1 can back up R2, and the backup adaptability of R1 for backing up R2 to 0, indicating that R1 cannot back up R2. For example, Figure 5 the user can set the backup adaptability between each two areas respectively, and the management node will Figure 5After the backup adaptation degrees of every two of the six regions shown are sent to the configuration gateways of the six regions, the configuration gateway of each region can determine the backup region corresponding to this region and for which regions this region provides backup.

[0090] It should be noted that the solution for the configuration gateway provided in the embodiments of this application to determine the backup adaptation degree through the detection signal can be combined with the solution of user-defined backup adaptation degree. That is to say, Figure 4 taking [example] as an example, among the five columns of backup adaptation degrees corresponding to R2 - R6 received by the first configuration gateway, the value of each column of backup adaptation degree can be determined by other configuration gateways through the detection signal or can be a user-defined value. Optionally, the priority of the user-defined backup adaptation degree is higher than that of the backup adaptation degree determined by the configuration gateway. When the first configuration gateway receives both the backup adaptation degree generated by the configuration gateway and the user-defined backup adaptation degree at the same time, the user-defined backup adaptation degree is preferentially used. Through this design, a solution for the failure of the configuration gateway can be provided to further improve security. At the same time, a solution for manually controlling the backup relationship of multiple regions is provided, which is convenient for users to control while ensuring security.

[0091] After the first configuration gateway determines the N regions for backing up the first region, when the first control node in the first distributed system of the first region fails, the first configuration gateway can obtain the configuration information sent by the configuration gateways in the N regions for backing up the first region to ensure the continuous operation of the system. And, after the first configuration gateway determines the N regions for which the first region serves as a backup region, the first distributed system provides backup services for the N regions for which the first region serves as a backup region. Next, the backup disaster recovery method for other regions to back up the first region and the backup disaster recovery method for the first region to back up other regions in the embodiments of this application will be introduced respectively.

[0092] First, taking the second region backing up the first region as an example, the backup disaster recovery method when the first control node in the first distributed system fails will be introduced. Figure 6 This is a flowchart of a backup disaster recovery method provided in the embodiments of this application. Refer to Figure 6 and this method includes the following steps:

[0093] S601: The first configuration gateway determines that the first control node fails and determines the second control node as the backup control node from the N candidate backup control nodes corresponding to the first region.

[0094] In the embodiments of this application, the N backup regions corresponding to the first region can be understood as that N regions back up the first region, the N distributed systems in the N regions back up the first distributed system in the first region, and the control nodes in the N regions are the N candidate backup control nodes corresponding to the first region.

[0095] The first configuration gateway determines that the first control node fails, such as when the first configuration gateway determines that it cannot communicate with the first control node normally, or when the first configuration gateway receives a failure report sent by the first control node. The first configuration gateway may determine a second control node as a backup control node from the N candidate backup control nodes corresponding to the first area, where the priority of the second control node is higher than that of the other nodes except the second control node among the N candidate backup control nodes.

[0096] Optionally, the first configuration gateway may determine the priorities of the N candidate backup control nodes according to the backup adaptability of the N areas to which the N candidate backup control nodes belong for backing up the first area. For example, referring to Figure 4 , taking the first configuration gateway belonging to R1 as an example, R3 and R6 back up R1, and the control nodes in R3 and R6 are the 2 candidate backup control nodes corresponding to R1. The first configuration gateway determines the priority of the control node in R3 as a candidate backup control node according to the backup adaptability of R3 for backing up R1, and the first configuration gateway determines the priority of the control node in R6 as a candidate backup control node according to the backup adaptability of R6 for backing up R1. For example, the first configuration gateway may use the backup adaptability of the area to which the candidate backup control node belongs for backing up the first area as the priority value of the candidate backup control node. Then, the priority value of the control node in R3 is 1, and the priority value of the control node in R6 is 0.6, where the larger the value, the higher the priority.

[0097] When the first configuration gateway determines a backup control node from the N candidate backup control nodes corresponding to the first area, it may determine the candidate backup control node with the highest priority and availability among the N candidate backup control nodes in descending order of the priorities of the candidate backup control nodes. Among them, a control node is available if the control node can provide sufficient computing power to calculate the configuration information for the first area and the configuration gateway in the distributed system to which the control node belongs can communicate with the first configuration gateway normally.

[0098] For example, when the priority value of the control node in R3 is 1 and the priority value of the control node in R6 is 0.6, the first configuration gateway may select the control node in R3 as the backup control node.

[0099] S602: The first configuration gateway receives the first configuration information sent by the second configuration gateway.

[0100] In the embodiment of the present application, the second area to which the second configuration gateway belongs is used to back up the first area. Then, in addition to obtaining the configuration parameters of the second area, referring to Figure 6For the steps indicated by the dashed line in the figure, the second configuration gateway also needs to obtain the first configuration parameters corresponding to the first region, where the first configuration parameters are parameters generated by the management node according to the configurations and requirements input by the user. The second configuration gateway sends the first configuration parameters to the second control node in the second region, and the second control node generates the first configuration information according to the first configuration parameters. The first configuration information is the configuration information that can be loaded by the first data nodes in the first region. Optionally, the second control node may calculate the first configuration information according to the first configuration parameters and the basic data of the first region, where the basic data may include, for example, geographical location data, health status, latency and other data. The second control node sends the first configuration information to the second configuration gateway, and the second configuration gateway sends the first configuration information to the first configuration gateway.

[0101] In some embodiments, after obtaining the first configuration parameters corresponding to the first region, the second configuration gateway may store the first configuration parameters corresponding to the first region. After determining that the first control node fails, the first configuration gateway may send an indication message to the second configuration gateway, where the indication message is used to indicate that the first control node in the first region has failed. The second configuration gateway may, after receiving the indication message sent by the first configuration gateway, send the stored first configuration parameters to the second control node. The second control node generates the first configuration information according to the first configuration parameters and sends the first configuration information to the second configuration gateway, and the second configuration gateway sends the first configuration information to the first configuration gateway. Through this solution, the second control node can calculate the first configuration information when the backup function of the second control node is required, saving the computing power of the second control node.

[0102] In other embodiments, after obtaining the first configuration parameters corresponding to the first region, the second configuration gateway may directly send the first configuration parameters to the second control node. The second control node generates the first configuration information according to the first configuration parameters, and the second control node sends the first configuration information to the second configuration gateway. The second configuration gateway may directly send the first configuration information to the first configuration gateway, or the second configuration gateway may send the first configuration information to the first configuration gateway after receiving the indication message sent by the first configuration gateway, where the indication message is used to indicate that the first control node in the first region has failed.

[0103] S603: The first configuration gateway sends the first configuration information to the first data node.

[0104] After receiving the first configuration information, the first configuration gateway may send the first configuration information to the first data nodes in the first region through the P2P network in the first region, and the first data nodes may load the first configuration information to provide data services for users.

[0105] In the embodiments of the present application, the configuration gateways in the N regions backed up for the first region can all obtain the first configuration parameters corresponding to the first region, and the N candidate backup control nodes in the N regions can all generate configuration information according to the first configuration parameters. The first configuration gateway can receive the configuration information sent by the N configuration gateways, further improving the system security. For example, if the N regions backed up for the first region include the third region, then the third configuration gateway in the third region can obtain the first configuration parameters corresponding to the first region. The third configuration gateway can send the first configuration parameters to the third control node in the third region. The third control node generates the second configuration information according to the first configuration parameters. The third control node sends the second configuration information to the third configuration gateway. The third configuration gateway sends the second configuration information to the first configuration gateway, thereby realizing that the third region backs up the first region. In specific implementation, the functions performed by the third configuration gateway and the third control node when the third region backs up the first region can refer to Figure 6 the introduction of the functions performed by the second configuration gateway and the second control node in the embodiments shown. Details will not be repeated for the same parts.

[0106] The following takes the backup of the fourth region by the first region as an example for illustration. When the first control node in the first region does not fail, the first control node serves as a candidate backup control node corresponding to the fourth region, and the first distributed system can back up the fourth distributed system in the fourth region, as Figure 7 is a flowchart of a backup and disaster recovery method provided by an embodiment of the present application. Refer to Figure 7 , and the method includes the following steps:

[0107] S701: The first configuration gateway determines that the first control node is a candidate backup control node corresponding to the fourth region.

[0108] The first configuration gateway determines that the first region backs up the N regions according to the method introduced above. The N regions include the fourth region. Then the first control node in the first region is one of the N candidate backup control nodes corresponding to the fourth region. Then the first distributed system needs to back up the fourth distributed system in the fourth region.

[0109] S702: The first configuration gateway obtains the second configuration parameters corresponding to the fourth region.

[0110] After the user configures the fourth region on the user interface corresponding to the management node, the management node can generate and send down the second configuration parameters corresponding to the fourth region. The fourth configuration gateway in the fourth region obtains the second configuration parameters corresponding to the fourth region. Since the first region backs up the fourth region, the first configuration gateway in the first region also obtains the second configuration parameters corresponding to the fourth region.

[0111] S703: The first configuration gateway sends the second configuration parameter corresponding to the fourth region to the first control node.

[0112] In some embodiments, after obtaining the second configuration parameter corresponding to the fourth region, the first configuration gateway may directly send the second configuration parameter to the second control node.

[0113] In other embodiments, after obtaining the second configuration parameter corresponding to the fourth region, the first configuration gateway may store the second configuration parameter corresponding to the fourth region. After the fourth configuration gateway determines that the fourth control node in the fourth region fails, it may send an indication message to the first configuration gateway, and the indication message is used to indicate that the fourth control node in the fourth region has failed. The first configuration gateway may send the stored second configuration parameter to the first control node after receiving the indication message sent by the fourth configuration gateway.

[0114] S704: The first control node generates the third configuration information according to the second configuration parameter.

[0115] The first control node generates the third configuration information according to the second configuration parameter, and the third configuration information is the configuration information that can be loaded by the fourth data node in the fourth region. Optionally, the first control node may calculate the third configuration information according to the second configuration parameter and the basic data of the fourth region, where the basic data may include, for example, geographical location data, health status, latency and other data.

[0116] S705: The first control node sends the third configuration information to the first configuration gateway.

[0117] After generating the third configuration information, if the first control node determines according to the identifier of the third configuration parameter that the third configuration parameter corresponds to the fourth region instead of the configuration parameter corresponding to its own region, the first control node may send the third configuration information to the first configuration gateway.

[0118] S706: The first configuration gateway sends the third configuration information to the fourth configuration gateway in the fourth region.

[0119] Optionally, after receiving the third configuration information sent by the first control node, the first configuration gateway may directly send the third configuration information to the fourth configuration gateway, or the first configuration gateway may send the third configuration information to the fourth configuration gateway after receiving the indication message sent by the fourth configuration gateway, where the indication message is used to indicate that the fourth control node in the fourth region has failed.

[0120] The embodiment of the present application further provides a computing device, and the computing device may be used to execute the functions of the first configuration gateway in the above embodiments.

[0121] Such asFigure 8 The structural schematic diagram of a computing device provided by an embodiment of this application. As Figure 8 shown, the computing device includes:

[0122] A processing module 801, configured to determine that a first control node in a first distributed system to which a first configuration gateway belongs fails; and determine a second control node as a backup control node from N candidate backup control nodes corresponding to a first area.

[0123] Wherein, the second distributed system includes a second configuration gateway, a second control node, and second data nodes, the second distributed system is used to provide data services for a second area, the priority of the second control node is higher than the priority of other nodes except the second control node among the N candidate backup control nodes, and N is a positive integer.

[0124] A communication module 802, configured to receive first configuration information sent by the second configuration gateway, and send the first configuration information to a first data node.

[0125] Wherein, the first configuration information is generated by the second control node according to first configuration parameters corresponding to the first area.

[0126] In some embodiments, the processing module 801 is specifically configured to: determine the priorities of the N candidate backup control nodes according to the backup adaptation degrees of the N areas to which the N candidate backup control nodes belong for backing up the first area, and determine the second control node as the backup control node according to the priorities of the N candidate backup control nodes.

[0127] In some embodiments, the processing module 801 is further configured to: receive second configuration information sent by a third configuration gateway, the second configuration information is generated by a third control node according to the first configuration parameters, the third distributed system includes the third configuration gateway, the third control node, and third data nodes, the third distributed system is used to provide data services for a third area, and the N candidate backup control nodes include the third control node.

[0128] In some embodiments, the N candidate backup control nodes belong to N areas, each of the N areas includes one candidate backup control node, and the N areas are used to back up the first area; the processing module 801 is further configured to: obtain the backup adaptation degrees of M areas for backing up the first area, the M areas include the second area, and M is a positive integer greater than or equal to N; and determine the N areas according to the backup adaptation degrees of the M areas for backing up the first area.

[0129] In some embodiments, the communication module 802 is specifically configured to: receive the backup adaptation degrees of the M regions for backing up the first region sent by the M configuration gateways of the M regions.

[0130] In some embodiments, the N candidate backup control nodes belong to N regions, each of the N regions includes one candidate backup control node, and the N regions are used for backing up the first region; the processing module 801 is further configured to: obtain the backup adaptation degrees between every two of the Q regions, the Q regions include the first region and the second region, and Q is a positive integer greater than N; determine the N regions according to the backup adaptation degrees between every two of the Q regions.

[0131] In some embodiments, the backup adaptation degree between every two of the Q regions includes the backup adaptation degree of a target region for backing up any region other than the target region among the Q regions, and the target region is any region other than the first region among the Q regions; the communication module 802 is specifically configured to: receive the backup adaptation degree of the target region for backing up any region other than the target region among the Q regions sent by the target configuration gateway of the target region.

[0132] In some embodiments, the backup adaptation degree between every two of the Q regions includes the backup adaptation degree of the first region for backing up the M regions, and the M regions are the regions other than the first region among the Q regions; the processing module 801 is specifically configured to: send a detection signal to the M configuration gateways of the M regions based on a preset period; determine the connectivity and detection delay between the first configuration gateway and the M configuration gateways according to the responses of the M configuration gateways to the detection signal; determine the backup adaptation degree of the first region for backing up the M regions according to the connectivity and detection delay between the first configuration gateway and the M configuration gateways.

[0133] In some embodiments, the processing module 801 is further configured to: before determining that the first control node fails, determine that the first control node is the candidate backup control node corresponding to the fourth region; obtain the third configuration parameter corresponding to the fourth region.

[0134] In some embodiments, the communication module 802 is further configured to: send the third configuration parameter to the first control node; receive the third configuration information sent by the first control node, and send the third configuration information to the fourth configuration gateway in the fourth region, where the third configuration information is generated by the first control node according to the third configuration parameter.

[0135] It should be noted that the processing module can be implemented by software or by hardware. Exemplarily, possible implementation manners of the processing module will be introduced hereinafter.

[0136] As an example of a software functional unit, the processing module may include code running on a computing instance. Wherein, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above computing instance may be one or more. For example, the processing module may include code running on multiple hosts / virtual machines / containers.

[0137] As an example of a hardware functional unit, the processing module may include at least one computing device, such as a server, etc. Alternatively, the processing module may also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Wherein, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0138] It should be noted that in other embodiments, the computing device may further include more or fewer modules, and any module is used to execute any step in the backup and disaster recovery method. The step responsible for implementation by any module in the computing device can be specified as needed, and the embodiments of the present application do not limit this.

[0139] The embodiments of the present application further provide a computing device. As Figure 9 shown, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.

[0140] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation,Figure 9 It is represented by only one line in the figure, but it does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 100 (e.g., the memory 106, the processor 104, the communication interface 108).

[0141] The processor 104 may include any one or more of processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0142] The memory 106 may include volatile memory, such as random access memory (RAM). The processor 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0143] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the foregoing processing modules, thereby implementing the backup and disaster recovery method. That is, the memory 106 stores instructions for executing the backup and disaster recovery method.

[0144] Alternatively, the memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the first control node or the first data node in the embodiments of the present application, thereby implementing the backup and disaster recovery method.

[0145] The communication interface 108 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement the functions of the foregoing communication module, or to implement the communication between the computing device 100 and other devices or communication networks.

[0146] The embodiments of the present application further provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0147] Such as Figure 10As shown, the computing device cluster includes at least one computing device 100. The at least one computing device 100 is used to implement the functions of the first distributed system in the embodiments of the present application. The memories in different computing devices 100 in the computing device cluster may store different instructions for performing partial functions of the first distributed system. For example, some computing devices 100 in the computing device cluster are used to perform the functions of the first configuration gateway, some computing devices 100 in the computing device cluster are used to perform the functions of the first control node, and some computing devices 100 in the computing device cluster are used to perform the functions of the first data node.

[0148] It should be noted that the functions of the first configuration gateway in the embodiments of the present application may also be implemented by multiple computing devices 100. The memories 106 in the multiple computing devices 100 may store the same instructions for performing the functions of the first configuration gateway in the backup and disaster recovery method, or the memories 106 in the multiple computing devices 100 may also store partial instructions for performing the functions of the first configuration gateway in the backup and disaster recovery method respectively. Then, the combination of the multiple computing devices 100 can jointly execute the functions of the first configuration gateway in the backup and disaster recovery method. Similarly, the functions of the first control node and the first data node may also be implemented by multiple computing devices, and the repeated parts will not be elaborated here.

[0149] In some possible implementation manners, one or more computing devices in the computing device cluster may be connected through a network. Among them, the network may be a wide area network or a local area network, etc. Figure 11 A possible implementation manner is shown. As Figure 11 shown, two computing devices 100A and 100B are connected through a network. Specifically, they are connected to the network through the communication interfaces in each computing device. It should be understood that Figure 11 the functions of the computing device 100A shown in

[0150] Based on the above embodiments, the embodiments of the present application further provide a computer program product containing instructions. The computer program product may be a software or program product containing instructions that can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, it causes the at least one computing device to execute the backup and disaster recovery method provided by the embodiments of the present application.

[0151] Based on the above embodiments, an embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state drive), etc. The computer-readable storage medium includes instructions that direct the computing device to execute the backup and disaster recovery method.

[0152] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0153] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0154] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0156] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the scope of protection of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.

Claims

1. A backup and disaster recovery method, characterized in that, Applied to a first distributed system, the first distributed system includes a first configuration gateway, a first control node, and a first data node. The first control node is used to control and manage the first data node. The first distributed system is used to provide data services for a first area. The method includes: The first configuration gateway determines that the first control node has failed; The first configuration gateway determines a second control node as a backup control node from N candidate backup control nodes corresponding to the first area. A second distributed system includes a second configuration gateway, the second control node, and a second data node. The second distributed system is used to provide data services for a second area. The priority of the second control node is higher than the priorities of other nodes among the N candidate backup control nodes except the second control node. Herein, N is a positive integer; The first configuration gateway receives first configuration information sent by the second configuration gateway. The first configuration information is generated by the second control node according to first configuration parameters corresponding to the first area; The first configuration gateway sends the first configuration information to the first data node.

2. The method according to claim 1, wherein The first configuration gateway determines a second control node as a backup control node from N candidate backup control nodes corresponding to the first area, including: The first configuration gateway determines the priorities of the N candidate backup control nodes according to the backup adaptability degrees of the N areas to which the N candidate backup control nodes belong for backing up the first area; The first configuration gateway determines the second control node as the backup control node according to the priorities of the N candidate backup control nodes.

3. The method according to claim 2, characterized in that, The second control node is an available control node.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The first configuration gateway receives second configuration information sent by a third configuration gateway. The second configuration information is generated by a third control node according to the first configuration parameters. A third distributed system includes the third configuration gateway, the third control node, and a third data node. The third distributed system is used to provide data services for a third area. The N candidate backup control nodes include the third control node.

5. The method according to any one of claims 1-4, characterized in that, The N candidate backup control nodes belong to N areas. Each of the N areas includes one candidate backup control node. The N areas are used to back up the first area; The method further includes: The first configuration gateway obtains the backup adaptability degrees of M areas for backing up the first area. The M areas include the second area. M is a positive integer greater than or equal to N; The first configuration gateway determines the N areas according to the backup adaptability degrees of the M areas for backing up the first area.

6. The method according to claim 5, wherein The first configuration gateway obtains the backup adaptability degrees of M areas for backing up the first area, including: Receiving the backup adaptability degrees of the M areas for backing up the first area sent by M configuration gateways of the M areas.

7. The method according to any one of claims 1-4, characterized in that, The N candidate backup control nodes belong to N regions, each of the N regions includes a candidate backup control node, and the N regions are used to back up the first region; The method further includes: The first configuration gateway obtains the backup adaptability between every two of the Q regions, the Q regions include the first region and the second region, and Q is a positive integer greater than N; The first configuration gateway determines the N regions according to the backup adaptability between every two of the Q regions.

8. The method according to claim 7, wherein The backup adaptability between every two of the Q regions includes the backup adaptability of the target region backing up any region other than the target region among the Q regions, and the target region is any region other than the first region among the Q regions; The first configuration gateway obtains the backup adaptability between any two of the Q regions, including: The first configuration gateway receives the backup adaptability sent by the target configuration gateway of the target region for backing up any region other than the target region among the Q regions.

9. The method according to claim 7 or 8, characterized in that, The backup adaptability between every two of the Q regions includes the backup adaptability of the first region backing up M regions, and the M regions are the regions other than the first region among the Q regions; The first configuration gateway obtains the backup adaptability between any two of the Q regions, including: The first configuration gateway sends a detection signal to the M configuration gateways of the M regions based on a preset period; The first configuration gateway determines the connectivity and detection delay between the first configuration gateway and the M configuration gateways according to the responses of the M configuration gateways to the detection signal; The first configuration gateway determines the backup adaptability of the first region backing up the M regions according to the connectivity and detection delay between the first configuration gateway and the M configuration gateways.

10. The method according to any one of claims 1-9, characterized in that, Before the first configuration gateway determines that the first control node fails, the method further includes: The first configuration gateway determines that the first control node is the candidate backup control node corresponding to the fourth region; The first configuration gateway obtains the third configuration parameter corresponding to the fourth region.

11. The method according to claim 10, characterized in that, The method further includes: The first configuration gateway sends the third configuration parameter to the first control node; The first control node generates third configuration information according to the third configuration parameter and sends the third configuration information to the first configuration gateway; The first configuration gateway sends the third configuration information to the fourth configuration gateway in the fourth region.

12. A distributed system, characterized in that, The distributed system includes a first configuration gateway, a first control node, and a first data node. The first control node is used to control and manage the first data node, and the distributed system is used to provide data services for the first region; The first configuration gateway is used to determine that the first control node fails; determine a second control node as a backup control node from N candidate backup control nodes corresponding to the first region. The second distributed system includes a second configuration gateway, the second control node, and second data nodes, and the second distributed system is used to provide data services for a second region. The priority of the second control node is higher than the priorities of other nodes among the N candidate backup control nodes except the second control node, where N is a positive integer; receive first configuration information sent by the second configuration gateway, where the first configuration information is generated by the second control node according to first configuration parameters corresponding to the first region; and send the first configuration information to the first data node. The first data node is used to load the first configuration information.

13. The system according to claim 12, wherein Specifically, the first configuration gateway is used to: Determine the priorities of the N candidate backup control nodes according to the backup adaptability of the N regions to which the N candidate backup control nodes belong for backing up the first region. Determine the second control node as the backup control node according to the priorities of the N candidate backup control nodes.

14. The system according to claim 13, wherein The second control node is an available control node.

15. The system according to any one of claims 12-14, characterized in that, The first configuration gateway is further used to: Receive second configuration information sent by a third configuration gateway, where the second configuration information is generated by a third control node according to the first configuration parameters. The third distributed system includes the third configuration gateway, the third control node, and third data nodes, and the third distributed system is used to provide data services for a third region. The N candidate backup control nodes include the third control node.

16. The system according to any one of claims 12-15, characterized in that, The N candidate backup control nodes belong to N regions, each of the N regions includes one candidate backup control node, and the N regions are used to back up the first region. The first configuration gateway is further used to: Obtain the backup adaptability of M regions for backing up the first region, where the M regions include the second region, and M is a positive integer greater than or equal to N. Determine the N regions according to the backup adaptability of the M regions for backing up the first region.

17. The system according to claim 16, wherein Specifically, the first configuration gateway is used to: Receive the backup adaptability of the M regions for backing up the first region sent by the M configuration gateways of the M regions.

18. The system according to any one of claims 12 - 15, characterized in that, The N candidate backup control nodes belong to N regions, each of the N regions includes one candidate backup control node, and the N regions are used to back up the first region. The first configuration gateway is further used to: Obtain the backup adaptability between every two of Q regions, where the Q regions include the first region and the second region, and Q is a positive integer greater than N. Determine the N regions according to the backup adaptability between every two of the Q regions.

19. The system according to claim 18, wherein The backup adaptation degree between every two of the Q regions includes the backup adaptation degree for the target region to back up any one of the Q regions other than the target region, where the target region is any one of the Q regions other than the first region; The first configuration gateway is specifically configured to: Receive the backup adaptation degree sent by the target configuration gateway of the target region for the target region to back up any one of the Q regions other than the target region.

20. The system according to claim 18 or 19, characterized in that, The backup adaptation degree between every two of the Q regions includes the backup adaptation degree for the first region to back up M regions, where the M regions are the regions among the Q regions other than the first region; The first configuration gateway is specifically configured to: Send a detection signal to the M configuration gateways of the M regions based on a preset period; Determine the connectivity and detection delay between the first configuration gateway and the M configuration gateways according to the responses of the M configuration gateways to the detection signal; Determine the backup adaptation degree for the first region to back up the M regions according to the connectivity and detection delay between the first configuration gateway and the M configuration gateways.

21. The system according to any one of claims 12 - 20, characterized in that, The first configuration gateway is further configured to: Before determining that the first control node fails, determine that the first control node is a candidate backup control node corresponding to the fourth region, and obtain the third configuration parameter corresponding to the fourth region.

22. The system according to claim 21, wherein The first configuration gateway is further configured to: send the third configuration parameter to the first control node; receive the third configuration information sent by the first control node, and send the third configuration information to the fourth configuration gateway in the fourth region; The first control node is configured to: generate the third configuration information according to the third configuration parameter.

23. A cluster of computing devices, characterized in that, Comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1-11.

24. A computer program product comprising instructions, characterized in that, When the instructions are run by the computing device cluster, the computing device cluster executes the method according to any one of claims 1-11.

25. A computer-readable storage medium, characterized in that, Comprising computer program instructions, when the computer program instructions are executed by the computing device cluster, the computing device cluster executes the method according to any one of claims 1-11.