A dual-active cluster arbitration method and device, computer equipment and storage medium

By acquiring and comparing the network topology and link status information of the active-active data center, the arbitration problem of the active-active cluster when the link is disconnected is solved, ensuring the reliability and stability of the data center and avoiding business interruption.

CN117499210BActive Publication Date: 2026-08-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311457447.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2026-08-25
Estimated Expiration
2043-11-03

AI Technical Summary

Technical Problem

When the link between two active-active data centers is lost, it is impossible to determine which data center can take over the cluster normally, leading to business interruption.

Method used

By acquiring network topology and link status information between data centers, comparisons and policy judgments are made to determine the arbitration result to ensure the reliability and stability of data centers.

Benefits of technology

It improves the reliability and stability of the active-active cluster in disconnection scenarios, thus avoiding business interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117499210B_ABST
    Figure CN117499210B_ABST
Patent Text Reader

Abstract

The application relates to a dual-active cluster arbitration method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring first host link information and first link state information, and constructing a first network topology according to the first host link information; in response to disconnection of a network between a first data center and a second data center, acquiring second host link information and second link state information, and constructing a second network topology according to the second host link information; receiving arbitration requests sent by the first data center and the second data center, comparing the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtaining a comparison result; acquiring an arbitration strategy, and confirming an arbitration result according to the comparison result and the arbitration strategy. The method can improve the reliability and stability of the dual-active cluster, and better cope with the disconnection scene of the dual-active cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage system technology, and in particular to a dual-active cluster arbitration method, apparatus, computer equipment, and storage medium. Background Technology

[0002] As information technology permeates all industries and integrates into people's daily lives, storage systems are playing an increasingly vital role in the critical operations of various sectors. Enterprises are facing unprecedented demands for business continuity. Particularly in telecommunications, finance, healthcare, government offices, logistics, and e-commerce, business interruptions in storage systems can lead to the loss of critical data, severely damage corporate reputation, and cause enormous economic losses. Therefore, ensuring business continuity is crucial for storage system construction, and it is against this backdrop that active-active technology has emerged.

[0003] Active-active technology, also known as dual-active technology, has gained widespread recognition in the storage field. It provides users with flexible and powerful data disaster recovery capabilities, enabling real-time data synchronization and replication between two data centers, real-time monitoring of business operation status, and failover. This ensures users can perform online business switching and load balancing across data centers.

[0004] This section specifically addresses the split-brain scenario, where a link failure occurs between active-active data centers. This failure causes storage devices in the active-active data centers to become invisible to each other; this phenomenon is known as split-brain. After a split-brain occurs, an arbitration device is generally needed to provide arbitration services to the active-active cluster, removing the data center that has disconnected or failed to take over the cluster. The data center that first seizes the arbitration role becomes the new leader, and a new storage cluster view is formed based on this new leader to manage the active-active cluster.

[0005] Enterprises need to ensure that critical business systems operate normally at all times to avoid business disruptions and losses. However, in some scenarios, a disconnection in a dual-active data center link can lead to uncertainty about which data center can properly take over the cluster. For example, data center A and data center B are each connected to their respective switches, and hosts are also connected to these switches. If the switch connected to data center B fails, data centers A and B become invisible to each other, resulting in a split-brain scenario. The two data centers will then compete for arbitration through IP arbitration. Assuming B ultimately wins the arbitration, all nodes in data center A will exit the cluster. However, since switch B has failed, there is no connection between data center B and host B, leading to business interruption in this scenario.

[0006] Therefore, there is an urgent need to propose an arbitration method, device, computer equipment, and storage medium for active-active clusters that can improve the reliability and stability of active-active clusters and better cope with disconnection scenarios of active-active clusters. Summary of the Invention

[0007] Therefore, it is necessary to provide an arbitration method, apparatus, computer equipment, and storage medium for active-active clusters that can improve the reliability and stability of active-active clusters and better cope with disconnection scenarios of active-active clusters, in order to address the above-mentioned technical problems.

[0008] Firstly, a dual-active cluster arbitration method is provided, wherein the dual-active cluster includes a first data center and a second data center, and the method includes:

[0009] Obtain the first host link information and the first link status information, and construct the first network topology based on the first host link information;

[0010] In response to the network disconnection between the first data center and the second data center, the system obtains the second host link information and the second link status information, and constructs the second network topology based on the second host link information.

[0011] Receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain the comparison results;

[0012] Obtain the arbitration strategy and confirm the arbitration result based on the comparison results and the arbitration strategy.

[0013] In one embodiment, the step of comparing the second network topology and the second link state information with the first network topology and the first link state information, respectively, to obtain a comparison result includes:

[0014] The second network topology is compared with the first network topology to obtain the link comparison results;

[0015] The second link status information is compared with the first link status information to obtain a status comparison result;

[0016] The link comparison result is used to indicate the link connection status between the first data center and the second data center and the host, and the link connection status includes a connected status and a disconnected status; the status comparison result is used to indicate the link stability between the first data center and the second data center and the host.

[0017] In one embodiment, the arbitration strategy includes a link strategy and a state strategy, and confirming the arbitration result based on the comparison result and the arbitration strategy includes:

[0018] Based on the link comparison results, the link connection status between the first data center and / or the second data center and the host is obtained;

[0019] In response to the link between the first data center and the host being in a connected state, and the link between the second data center and the host being in a disconnected state, the arbitration of the contention between the first data center and the host is confirmed to be successful;

[0020] In response to the link between the second data center and the host being in a connected state, and the link between the first data center and the host being in a disconnected state, the arbitration of the contention between the second data center and the host is confirmed to be successful;

[0021] In response to the fact that the links between the first data center and the second data center and the host are both in a connected state, the arbitration result is confirmed based on the state comparison result and the state policy.

[0022] In one embodiment, the arbitration strategy includes a master-slave strategy, and confirming the arbitration result based on the state comparison result and the state strategy includes:

[0023] Based on the state comparison results, the link stability between the first data center and the host is compared with the link stability between the second data center and the host;

[0024] If the link stability between the first data center and the host is higher than that between the second data center and the host, the arbitration of the contention between the first data center and the host is confirmed to be successful.

[0025] If the link stability between the second data center and the host is higher than that between the first data center and the host, the arbitration of the contention between the second data center and the host is confirmed to be successful.

[0026] In response to the link stability between the first data center and the host being equal to the link stability between the second data center and the host, the master-slave site information of the dual-active cluster is obtained, and the arbitration result is confirmed based on the master-slave site information and the master-slave policy.

[0027] In one embodiment, the master-slave site information includes either the first data center being the master site and the second data center being the slave site, or the second data center being the master site and the first data center being the slave site. The step of confirming the arbitration result based on the master-slave site information and the master-slave policy includes:

[0028] In response to the link stability between the first data center and the host being equal to that between the second data center and the host, the arbitration of the main site contention is confirmed as successful.

[0029] In one embodiment, the method further includes:

[0030] Set a stabilization time, and treat arbitration requests sent by the first data center and the second data center received within the stabilization time range as arriving at the arbitration end simultaneously.

[0031] In one embodiment, the method further includes:

[0032] In response to the arbitration result that the first data center wins the arbitration and the second data center fails the arbitration, the first data center is selected to take over the dual-active cluster;

[0033] In response to the arbitration result that the second data center wins the arbitration and the first data center loses the arbitration, the second data center is selected to take over the dual-active cluster.

[0034] Secondly, a dual-active cluster arbitration device is provided, the device comprising:

[0035] The module for acquiring the first host link information and the first link status information is used to acquire the first host link information and construct the first network topology based on the first host link information.

[0036] The acquisition and construction module is also used to acquire second host link information and second link status information in response to the network disconnection between the first data center and the second data center, and to construct a second network topology based on the second host link information;

[0037] The receiving comparison module is used to receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain a comparison result.

[0038] The determination module is used to obtain the arbitration strategy and confirm the arbitration result based on the comparison result and the arbitration strategy.

[0039] Thirdly, a computer device is provided, the computer device including one or more processors; and a memory associated with the one or more processors, the memory for storing program instructions, which, when read and executed by the one or more processors, perform the steps of the dual-active cluster arbitration method as described in any of the first aspects above.

[0040] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the steps of the dual-active cluster arbitration method as described in any one of the first aspects above.

[0041] The aforementioned dual-active cluster arbitration method, apparatus, computer equipment, and storage medium compare the first network topology and first link status information before the network connection between the first data center and the second data center is disconnected with the second network topology and second link status information after the network connection is disconnected to obtain a comparison result; and determine the arbitration result based on the comparison result and arbitration strategy, thereby better handling the disconnection scenario of the dual-active cluster and improving the reliability and stability of the dual-active cluster. Attached Figure Description

[0042] Figure 1 This is a flowchart illustrating a dual-active cluster arbitration method in one embodiment;

[0043] Figure 2 Here is a flowchart of the overall process of the dual-active cluster arbitration method in one embodiment;

[0044] Figure 3 This is a structural block diagram of a dual-active cluster arbitration device in another embodiment;

[0045] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0047] Example 1

[0048] In one embodiment, such as Figure 1 As shown, a dual-active cluster arbitration method is provided, wherein the dual-active cluster includes a first data center and a second data center, and the method includes:

[0049] Obtain the first host link information and the first link status information, and construct the first network topology based on the first host link information;

[0050] In response to the network disconnection between the first data center and the second data center, the system obtains the second host link information and the second link status information, and constructs the second network topology based on the second host link information.

[0051] Receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain the comparison results;

[0052] Obtain the arbitration strategy and confirm the arbitration result based on the comparison results and the arbitration strategy.

[0053] Specifically, the comparison results are obtained by comparing the first network topology and first link status information before the network connection between the first data center and the second data center is disconnected with the second network topology and second link status information after the network connection is disconnected; the arbitration result is determined based on the comparison result and the arbitration strategy, so as to better cope with the disconnection scenario of the dual-active cluster and improve the reliability and stability of the dual-active cluster.

[0054] Specifically, common active-active clusters mainly employ the following network topologies:

[0055] Primary / Backup: In this topology, one data center acts as the primary site to handle real-time business, while another data center acts as the backup site for disaster recovery and data backup. The primary and backup sites are connected via a dedicated line or the internet to synchronize data in real-time or near real-time.

[0056] Multi-site active-active topology: This topology allows two data centers to process business simultaneously, and clients can choose to connect to the nearest data center based on proximity. The primary and backup sites are also connected via dedicated lines or the Internet to synchronize data in real time or near real time.

[0057] Ring topology: This topology connects multiple data centers in a ring network, where each data center can process business and synchronize data in real time. If one data center fails, data can continue to be processed on other data centers.

[0058] Three-Datacenter Topology: In this topology, three data centers are used for high availability and disaster recovery. Two data centers handle business simultaneously, while the third data center acts as a hot backup, backing up data and keeping it synchronized.

[0059] Specifically, the setup of a dual-active cluster involves using network devices such as switches or routers. These devices can be used to obtain link information between the switches and hosts, and between the switches and the data center. Details are as follows:

[0060] Data centers can be integrated with network devices (such as switches and routers) to obtain link status information such as link connection status, network latency, and packet loss rate in the following ways;

[0061] 1. Common ways to obtain host link information using Simple Network Management Protocol (SMMP) include using the snmpget command or using SMMP tools. For example, the snmpget command can be used to obtain the MAC address and other necessary information of the host connected to the corresponding port on the switch;

[0062] 2. A common way to obtain host link information using the command-line interface is to log in to the switch's command-line interface, use commands to view the address resolution table, and find the IP address of the host connected to the specified port; corresponding to that IP address, use commands to find the corresponding host MAC address and other necessary information.

[0063] Specifically, the host link information obtained above can be used to construct the network topology; network latency and packet loss rate and other related indicators can represent link status information, that is, the quality of network connection.

[0064] Specifically, when deploying IP arbitration, network communication between IP arbitration and the dual-active cluster can be established through endpoint communication, and the network topology and master / slave site information can be saved locally to IP arbitration.

[0065] In one embodiment, the step of comparing the second network topology and the second link state information with the first network topology and the first link state information, respectively, to obtain a comparison result includes:

[0066] The second network topology is compared with the first network topology to obtain the link comparison results;

[0067] The second link status information is compared with the first link status information to obtain a status comparison result;

[0068] The link comparison result is used to indicate the link connection status between the first data center and the second data center and the host, and the link connection status includes a connected status and a disconnected status; the status comparison result is used to indicate the link stability between the first data center and the second data center and the host.

[0069] Specifically, through the IP arbitration heartbeat mechanism, link status information from the data center is acquired periodically and maintained locally on the IP arbitration platform. The network quality of the link status information within the most recent time period is assessed. The stability of the link is evaluated based on the difference between the current link status information and the link status information from a previous period. Comparing the link status information aims to reduce the impact of network instability caused by network fluctuations during arbitration, thus ensuring the validity of the arbitration decision.

[0070] Specifically, by comparing the network topology and link status information before and after the network connection between data centers is disconnected, the current link connection status and link stability can be obtained, so as to determine the arbitration result according to the arbitration strategy.

[0071] In one implementation, such as Figure 2As shown, the arbitration strategy includes a link strategy and a state strategy. Confirming the arbitration result based on the comparison result and the arbitration strategy includes:

[0072] Based on the link comparison results, the link connection status between the first data center and / or the second data center and the host is obtained;

[0073] In response to the link between the first data center and the host being in a connected state, and the link between the second data center and the host being in a disconnected state, the arbitration of the contention between the first data center and the host is confirmed to be successful;

[0074] In response to the link between the second data center and the host being in a connected state, and the link between the first data center and the host being in a disconnected state, the arbitration of the contention between the second data center and the host is confirmed to be successful;

[0075] In response to the fact that the links between the first data center and the second data center and the host are both in a connected state, the arbitration result is confirmed based on the state comparison result and the state policy.

[0076] Specifically, the arbitration result is determined based on the link policy and link comparison results, and the data center with normal links is given priority to take over the leader of the dual-active cluster to avoid business interruption.

[0077] In one implementation, the arbitration strategy includes a master-slave strategy, and confirming the arbitration result based on the state comparison result and the state strategy includes:

[0078] Based on the state comparison results, the link stability between the first data center and the host is compared with the link stability between the second data center and the host;

[0079] If the link stability between the first data center and the host is higher than that between the second data center and the host, the arbitration of the contention between the first data center and the host is confirmed to be successful.

[0080] If the link stability between the second data center and the host is higher than that between the first data center and the host, the arbitration of the contention between the second data center and the host is confirmed to be successful.

[0081] In response to the link stability between the first data center and the host being equal to the link stability between the second data center and the host, the master-slave site information of the dual-active cluster is obtained, and the arbitration result is confirmed based on the master-slave site information and the master-slave policy.

[0082] Specifically, when the link connections between the data center and the host are in normal condition, the arbitration result is determined based on the state comparison results and state policy. The data center with better link stability is selected as the leader to take over the active-active cluster, ensuring network quality under the active-active cluster service state while avoiding service interruption.

[0083] In one implementation, the master-slave site information includes the first data center being the master site and the second data center being the slave site, or the second data center being the master site and the first data center being the slave site. The step of confirming the arbitration result based on the master-slave site information and the master-slave policy includes:

[0084] In response to the link stability between the first data center and the host being equal to that between the second data center and the host, the arbitration of the main site contention is confirmed as successful.

[0085] In one embodiment, the method further includes:

[0086] Set a stabilization time, and treat arbitration requests sent by the first data center and the second data center received within the stabilization time range as arriving at the arbitration end simultaneously.

[0087] Specifically, since the link length from the data center to the arbitration end may vary, the arbitration requests may arrive at the arbitration end at different times. By setting a de-jitter time, the arbitration requests within the de-jitter time range are regarded as arriving at the arbitration end at the same time, thus preventing the arbitration end from directly taking the data center whose arbitration request arrives first as the leader to take over the dual-active cluster.

[0088] Specifically, the stabilization time can be set in ways including but not limited to the following, where the first data center is equivalent to the second data center:

[0089] Option 1: Configure the first and second data centers to send only one arbitration request each;

[0090] Upon receiving a first arbitration request from the first data center, wait a preset time and then determine whether a second arbitration request from the second data center has been received.

[0091] In response to receiving a second arbitration request from the second data center, the first arbitration request and the second arbitration request are considered to have arrived at the arbitration end simultaneously.

[0092] The second type: the arbitration request sent by the first data center contains the first identification information, and the arbitration request sent by the second data center contains the second identification information;

[0093] There is no limit to the number of arbitration requests sent to the first data center and the second data center;

[0094] Upon receiving a first arbitration request from the first data center, after waiting for a preset time, determine whether a second arbitration request from the second data center has been received based on the flag information in the arbitration request.

[0095] In response to receiving a second arbitration request from the second data center, the first arbitration request and the second arbitration request are considered to have arrived at the arbitration end simultaneously.

[0096] The third option is to configure the first and second data centers to send only one arbitration request each.

[0097] In response to the network connection between the first data center and the second data center being disconnected, an arbitration request will be received within a preset time.

[0098] In response to receiving the first arbitration request and the second arbitration request, the first arbitration request and the second arbitration request shall be deemed to have arrived at the arbitration party simultaneously.

[0099] The fourth type: the arbitration request sent by the first data center contains the first identification information, and the arbitration request sent by the second data center contains the second identification information;

[0100] There is no limit to the number of arbitration requests sent to the first data center and the second data center;

[0101] In response to the network connection between the first data center and the second data center being disconnected, an arbitration request will be received within a preset time.

[0102] In response to the receipt of the arbitration request, including the first and second flag information, the first and second arbitration requests are considered to have arrived at the arbitration end simultaneously.

[0103] In one embodiment, the method further includes:

[0104] In response to the arbitration result that the first data center wins the arbitration and the second data center fails the arbitration, the first data center is selected to take over the dual-active cluster;

[0105] In response to the arbitration result that the second data center wins the arbitration and the first data center loses the arbitration, the second data center is selected to take over the dual-active cluster.

[0106] It should be understood that, although Figure 1 , Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 , Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0107] Example 2

[0108] In one embodiment, such as Figure 3 As shown, a dual-active cluster arbitration device is provided, the device comprising:

[0109] The module for acquiring the first host link information and the first link status information is used to acquire the first host link information and construct the first network topology based on the first host link information.

[0110] The acquisition and construction module is also used to acquire second host link information and second link status information in response to the network disconnection between the first data center and the second data center, and to construct a second network topology based on the second host link information;

[0111] The receiving comparison module is used to receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain a comparison result.

[0112] The determination module is used to obtain the arbitration strategy and confirm the arbitration result based on the comparison result and the arbitration strategy.

[0113] In one embodiment, the receiving comparison module is further configured to:

[0114] The second network topology is compared with the first network topology to obtain the link comparison results;

[0115] The second link status information is compared with the first link status information to obtain a status comparison result;

[0116] The link comparison result is used to indicate the link connection status between the first data center and the second data center and the host, and the link connection status includes a connected status and a disconnected status; the status comparison result is used to indicate the link stability between the first data center and the second data center and the host.

[0117] In one implementation, the arbitration strategy includes a link strategy and a state strategy, and the acquisition and judgment module is further configured to:

[0118] Based on the link comparison results, the link connection status between the first data center and / or the second data center and the host is obtained;

[0119] In response to the link between the first data center and the host being in a connected state, and the link between the second data center and the host being in a disconnected state, the arbitration of the contention between the first data center and the host is confirmed to be successful;

[0120] In response to the link between the second data center and the host being in a connected state, and the link between the first data center and the host being in a disconnected state, the arbitration of the contention between the second data center and the host is confirmed to be successful;

[0121] In response to the fact that the links between the first data center and the second data center and the host are both in a connected state, the arbitration result is confirmed based on the state comparison result and the state policy.

[0122] In one implementation, the arbitration strategy includes a master-slave strategy, and the acquisition and judgment module is further configured to:

[0123] Based on the state comparison results, the link stability between the first data center and the host is compared with the link stability between the second data center and the host;

[0124] If the link stability between the first data center and the host is higher than that between the second data center and the host, the arbitration of the contention between the first data center and the host is confirmed to be successful.

[0125] If the link stability between the second data center and the host is higher than that between the first data center and the host, the arbitration of the contention between the second data center and the host is confirmed to be successful.

[0126] In response to the link stability between the first data center and the host being equal to the link stability between the second data center and the host, the master-slave site information of the dual-active cluster is obtained, and the arbitration result is confirmed based on the master-slave site information and the master-slave policy.

[0127] In one embodiment, the master-slave site information includes the first data center being the master site and the second data center being the slave site, or the second data center being the master site and the first data center being the slave site. The acquisition and judgment module is further configured to:

[0128] In response to the link stability between the first data center and the host being equal to that between the second data center and the host, the arbitration of the main site contention is confirmed as successful.

[0129] In one embodiment, the device further includes:

[0130] The setting module is used to set the anti-shake time and to treat arbitration requests sent by the first data center and the second data center received within the anti-shake time range as arriving at the arbitration end simultaneously.

[0131] In one embodiment, the device further includes:

[0132] The selection module, as shown, is used in response to the arbitration result being that the first data center successfully contests the arbitration and the second data center fails to contest the arbitration, to select the first data center to take over the dual-active cluster.

[0133] The selection module is also used to select the second data center to take over the active-active cluster in response to the arbitration result that the second data center wins the arbitration and the first data center fails the arbitration.

[0134] Specific limitations regarding the dual-active cluster arbitration device can be found in the limitations of the dual-active cluster arbitration method described above, and will not be repeated here. Each module in the aforementioned dual-active cluster arbitration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0135] Example 3

[0136] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0137] Obtain the first host link information and the first link status information, and construct the first network topology based on the first host link information;

[0138] In response to the network disconnection between the first data center and the second data center, the system obtains the second host link information and the second link status information, and constructs the second network topology based on the second host link information.

[0139] Receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain the comparison results;

[0140] Obtain the arbitration strategy and confirm the arbitration result based on the comparison results and the arbitration strategy.

[0141] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0142] The second network topology is compared with the first network topology to obtain the link comparison results;

[0143] The second link status information is compared with the first link status information to obtain a status comparison result;

[0144] The link comparison result is used to indicate the link connection status between the first data center and the second data center and the host, and the link connection status includes a connected status and a disconnected status; the status comparison result is used to indicate the link stability between the first data center and the second data center and the host.

[0145] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0146] Based on the link comparison results, the link connection status between the first data center and / or the second data center and the host is obtained;

[0147] In response to the link between the first data center and the host being in a connected state, and the link between the second data center and the host being in a disconnected state, the arbitration of the contention between the first data center and the host is confirmed to be successful;

[0148] In response to the link between the second data center and the host being in a connected state, and the link between the first data center and the host being in a disconnected state, the arbitration of the contention between the second data center and the host is confirmed to be successful;

[0149] In response to the fact that the links between the first data center and the second data center and the host are both in a connected state, the arbitration result is confirmed based on the state comparison result and the state policy.

[0150] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0151] Based on the state comparison results, the link stability between the first data center and the host is compared with the link stability between the second data center and the host;

[0152] If the link stability between the first data center and the host is higher than that between the second data center and the host, the arbitration of the contention between the first data center and the host is confirmed to be successful.

[0153] If the link stability between the second data center and the host is higher than that between the first data center and the host, the arbitration of the contention between the second data center and the host is confirmed to be successful.

[0154] In response to the link stability between the first data center and the host being equal to the link stability between the second data center and the host, the master-slave site information of the dual-active cluster is obtained, and the arbitration result is confirmed based on the master-slave site information and the master-slave policy.

[0155] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0156] In response to the link stability between the first data center and the host being equal to that between the second data center and the host, the arbitration of the main site contention is confirmed as successful.

[0157] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0158] Set a stabilization time, and treat arbitration requests sent by the first data center and the second data center received within the stabilization time range as arriving at the arbitration end simultaneously.

[0159] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0160] In response to the arbitration result that the first data center wins the arbitration and the second data center fails the arbitration, the first data center is selected to take over the dual-active cluster;

[0161] In response to the arbitration result that the second data center wins the arbitration and the first data center loses the arbitration, the second data center is selected to take over the dual-active cluster.

[0162] When the program instructions are read and executed by the one or more processors, they can also perform operations corresponding to the steps in the above method embodiments, as described above, and will not be repeated here. (Reference) Figure 4 This exemplifies the architecture of a computer device, which may include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420 can communicate with each other via a communication bus 430.

[0163] The processor 410 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.

[0164] The memory 420 can be implemented as a read-only memory (ROM), random access memory (RAM), static storage device, dynamic storage device, etc. The memory 420 can store the operating system 421 for controlling the operation of the computer device 400, and the basic input / output system (BIOS) 422 for controlling the low-level operations of the computer device 400. Additionally, it can store a web browser 423, data storage management 424, and an icon font processing system 425, etc. The aforementioned icon font processing system 425 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 420 and executed by the processor 410.

[0165] Input / output interface 413 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0166] Network interface 414 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0167] Bus 430 includes a pathway for transmitting information between various components of the device, such as processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420.

[0168] In addition, the computer device 400 can also obtain information on specific acquisition conditions from the virtual resource object acquisition condition information database 441 for condition judgment, etc.

[0169] It should be noted that although the computer device 400 described above only shows a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, a memory 420, and a bus 430, in specific implementations, the computer device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.

[0170] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, cloud server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0171] Example 4

[0172] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0173] Obtain the first host link information and the first link status information, and construct the first network topology based on the first host link information;

[0174] In response to the network disconnection between the first data center and the second data center, the system obtains the second host link information and the second link status information, and constructs the second network topology based on the second host link information.

[0175] Receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain the comparison results;

[0176] Obtain the arbitration strategy and confirm the arbitration result based on the comparison results and the arbitration strategy.

[0177] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0178] The second network topology is compared with the first network topology to obtain the link comparison results;

[0179] The second link status information is compared with the first link status information to obtain a status comparison result;

[0180] The link comparison result is used to indicate the link connection status between the first data center and the second data center and the host, and the link connection status includes a connected status and a disconnected status; the status comparison result is used to indicate the link stability between the first data center and the second data center and the host.

[0181] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0182] Based on the link comparison results, the link connection status between the first data center and / or the second data center and the host is obtained;

[0183] In response to the link between the first data center and the host being in a connected state, and the link between the second data center and the host being in a disconnected state, the arbitration of the contention between the first data center and the host is confirmed to be successful;

[0184] In response to the link between the second data center and the host being in a connected state, and the link between the first data center and the host being in a disconnected state, the arbitration of the contention between the second data center and the host is confirmed to be successful;

[0185] In response to the fact that the links between the first data center and the second data center and the host are both in a connected state, the arbitration result is confirmed based on the state comparison result and the state policy.

[0186] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0187] Based on the state comparison results, the link stability between the first data center and the host is compared with the link stability between the second data center and the host;

[0188] If the link stability between the first data center and the host is higher than that between the second data center and the host, the arbitration of the contention between the first data center and the host is confirmed to be successful.

[0189] If the link stability between the second data center and the host is higher than that between the first data center and the host, the arbitration of the contention between the second data center and the host is confirmed to be successful.

[0190] In response to the link stability between the first data center and the host being equal to the link stability between the second data center and the host, the master-slave site information of the dual-active cluster is obtained, and the arbitration result is confirmed based on the master-slave site information and the master-slave policy.

[0191] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0192] In response to the link stability between the first data center and the host being equal to that between the second data center and the host, the arbitration of the main site contention is confirmed as successful.

[0193] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0194] Set a stabilization time, and treat arbitration requests sent by the first data center and the second data center received within the stabilization time range as arriving at the arbitration end simultaneously.

[0195] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0196] In response to the arbitration result that the first data center wins the arbitration and the second data center fails the arbitration, the first data center is selected to take over the dual-active cluster;

[0197] In response to the arbitration result that the second data center wins the arbitration and the first data center loses the arbitration, the second data center is selected to take over the dual-active cluster.

[0198] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0199] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0200] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A dual-active cluster arbitration method, wherein the dual-active cluster comprises a first data center and a second data center, characterized in that, The method includes: Obtain the first host link information and the first link status information, and construct the first network topology based on the first host link information; In response to the network disconnection between the first data center and the second data center, the system obtains the second host link information and the second link status information, and constructs the second network topology based on the second host link information. Receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain the comparison results; Obtain the arbitration strategy and confirm the arbitration result based on the comparison results and the arbitration strategy.

2. The method according to claim 1, characterized in that, The step of comparing the second network topology and the second link state information with the first network topology and the first link state information respectively to obtain the comparison result includes: The second network topology is compared with the first network topology to obtain the link comparison results; The second link status information is compared with the first link status information to obtain a status comparison result; The link comparison result is used to indicate the link connection status between the first data center and the second data center and the host, and the link connection status includes a connected status and a disconnected status; the status comparison result is used to indicate the link stability between the first data center and the second data center and the host.

3. The method according to claim 2, characterized in that, The arbitration strategy includes a link strategy and a state strategy. Confirming the arbitration result based on the comparison result and the arbitration strategy includes: Based on the link comparison results, the link connection status between the first data center and / or the second data center and the host is obtained; In response to the link between the first data center and the host being in a connected state, and the link between the second data center and the host being in a disconnected state, the arbitration of the contention between the first data center and the host is confirmed to be successful; In response to the link between the second data center and the host being in a connected state, and the link between the first data center and the host being in a disconnected state, the arbitration of the contention between the second data center and the host is confirmed to be successful; In response to the fact that the links between the first data center and the second data center and the host are both in a connected state, the arbitration result is confirmed based on the state comparison result and the state policy.

4. The method according to claim 3, characterized in that, The arbitration strategy includes a master-slave strategy, and the step of confirming the arbitration result based on the state comparison result and the state strategy includes: Based on the state comparison results, the link stability between the first data center and the host is compared with the link stability between the second data center and the host; If the link stability between the first data center and the host is higher than that between the second data center and the host, the arbitration of the contention between the first data center and the host is confirmed to be successful. If the link stability between the second data center and the host is higher than that between the first data center and the host, the arbitration of the contention between the second data center and the host is confirmed to be successful. In response to the link stability between the first data center and the host being equal to the link stability between the second data center and the host, the master-slave site information of the dual-active cluster is obtained, and the arbitration result is confirmed based on the master-slave site information and the master-slave policy.

5. The method according to claim 4, characterized in that, The master-slave site information includes either the first data center being the master site and the second data center being the slave site, or the second data center being the master site and the first data center being the slave site. The step of confirming the arbitration result based on the master-slave site information and the master-slave policy includes: In response to the link stability between the first data center and the host being equal to that between the second data center and the host, the arbitration of the main site contention is confirmed as successful.

6. The method according to claim 1, characterized in that, The method further includes: Set a stabilization time, and treat arbitration requests sent by the first data center and the second data center received within the stabilization time range as arriving at the arbitration end simultaneously.

7. The method according to claim 1, characterized in that, The method further includes: In response to the arbitration result that the first data center wins the arbitration and the second data center fails the arbitration, the first data center is selected to take over the dual-active cluster; In response to the arbitration result that the second data center wins the arbitration and the first data center loses the arbitration, the second data center is selected to take over the dual-active cluster.

8. A dual-active cluster arbitration device, characterized in that, The device includes: The module for acquiring the first host link information and the first link status information is used to acquire the first host link information and construct the first network topology based on the first host link information. The acquisition and construction module is also used to acquire second host link information and second link status information in response to the network disconnection between the first data center and the second data center, and to construct a second network topology based on the second host link information; The receiving comparison module is used to receive arbitration requests sent by the first data center and the second data center, compare the second network topology and the second link state information with the first network topology and the first link state information respectively, and obtain a comparison result. The determination module is used to obtain the arbitration strategy and confirm the arbitration result based on the comparison result and the arbitration strategy.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the dual-active cluster arbitration method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the dual-active cluster arbitration method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for managing double active storage arrays

    CN106909307A

  • Link determination method, device and equipment, and computer readable storage medium

    CN111884932A