CN117499210A - Dual-activity cluster arbitration method and device, computer equipment and storage medium - Google Patents

Dual-activity cluster arbitration method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117499210A
CN117499210A CN202311457447.7A CN202311457447A CN117499210A CN 117499210 A CN117499210 A CN 117499210A CN 202311457447 A CN202311457447 A CN 202311457447A CN 117499210 A CN117499210 A CN 117499210A
Authority
CN
China
Prior art keywords
data center
link
arbitration
host
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311457447.7A
Other languages
Chinese (zh)
Inventor
赵琰
赵鹏
邢永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311457447.7A priority Critical patent/CN117499210A/en
Publication of CN117499210A publication Critical patent/CN117499210A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0894Policy-based network configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to a dual-activity cluster arbitration method, a dual-activity cluster arbitration 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; responding to the disconnection of the network between the first data center and the 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, and 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 comparison results; and acquiring an arbitration policy, and confirming an arbitration result according to the comparison result and the arbitration policy. The method can improve the reliability and stability of the dual-active clusters and better cope with the disconnection scene of the dual-active clusters.

Description

Dual-activity cluster arbitration method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of storage systems, and in particular, to a dual-active cluster arbitration method, apparatus, computer device, and storage medium.
Background
Along with the integration of information technology into hundreds of industries and the integration of information technology into people's daily lives, storage systems play an increasingly important role in key businesses in various industries, and enterprises have unprecedented demands for business continuity. Especially in the fields of communication, finance, medical treatment, government offices, logistics, electronic commerce and the like, the service interruption of a storage system can cause important data loss, enterprise credit is greatly reduced, and huge economic loss is caused. Therefore, ensuring business continuity is critical to the construction of the storage system, and thus dual activity technology should occur in this context.
The dual-Active technology has been widely accepted in the storage field and commonly known as the Active-Active technology. The dual-activity technology provides flexible and powerful data disaster recovery function for users, can realize real-time synchronous data replication between two data centers, real-time service running state monitoring and fault switching, and ensures that users can realize on-line service switching across the data centers and service load sharing.
The scene of brain fracture is specific to the situation that a link between double active data centers fails. The failure scenario may cause the storage devices of the dual active data center to be invisible to each other, which is a split brain. After the occurrence of brain fracture, arbitration equipment is generally required to provide arbitration service for the dual-active clusters, the data centers which have been disconnected or are not successfully taken over the clusters are removed, the data center which is the first to preempt arbitration is used as a new leader, a new storage cluster view is formed by the new leader, and the dual-active clusters are managed.
Enterprises need to ensure that critical business systems will operate properly at any time to avoid business disruption and loss. However, in some scenarios, a link down of a dual active data center may lead to a problem that it is not possible to determine which data center can take over the cluster normally. For example: the data center a and the data center B are connected to the respective switches, respectively, and the hosts are also connected to the switches. At this time, if the switch connected to the data center B fails, the data center a and the data center B are invisible to each other when the switch fails, a split brain scene occurs, and the two data centers contend for arbitration rights through IP arbitration, respectively. Assuming that the final B obtains the arbitration right, the competing arbitration is successful; all nodes in data center a will exit the cluster. However, at this point, since switch B has failed, there is no connection between data center B and host B, which can lead to a disruption of traffic in this scenario.
Therefore, it is needed to propose a dual-active cluster arbitration method, device, computer equipment and storage medium capable of improving the reliability and stability of the dual-active clusters and better coping with the disconnection scenario of the dual-active clusters.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a dual-active cluster arbitration method, apparatus, computer device, and storage medium that can improve reliability and stability of the dual-active clusters and better cope with the disconnection scenario of the dual-active clusters.
In a first aspect, a dual-active cluster arbitration method is provided, the dual-active cluster including a first data center and a second data center, the method comprising:
acquiring first host link information and first link state information, and constructing a first network topology according to the first host link information;
responding to the disconnection of the network between the first data center and the 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, and 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 comparison results;
and acquiring an arbitration policy, and confirming an arbitration result according to the comparison result and the arbitration policy.
In one embodiment, the 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:
comparing the second network topology with the first network topology to obtain a link comparison result;
comparing the second link state information with the first link state information to obtain a state comparison result;
the link comparison result is used for representing the link connection state between the first data center and the host computer and the link connection state comprises a connection state and a disconnection state; the state comparison result is used for representing the link stability degree between the first data center and the second data center and the host.
In one embodiment, the arbitration policy includes a link policy and a state policy, and the determining an arbitration result according to the comparison result and the arbitration policy includes:
obtaining a link connection state between the first data center and/or the second data center and the host according to the link comparison result;
responding to that a link between the first data center and a host is in a connection state and a link between the second data center and the host is in a disconnection state, and confirming that the first data center contends for arbitration;
Responding to that a link between the second data center and the host is in a connection state and a link between the first data center and the host is in a disconnection state, and confirming that the second data center contends for arbitration;
and responding to the connection state of the links between the first data center and the second data center and the host, and confirming an arbitration result according to the state comparison result and the state strategy.
In one embodiment, the arbitration policy includes a master-slave policy, and the determining the arbitration result according to the state comparison result and the state policy includes:
comparing the link stability degree between the first data center and the host computer with the link stability degree between the second data center and the host computer according to the state comparison result;
in response to the link stability between the first data center and the host being greater than the link stability between the second data center and the host, confirming that the first data center contends for arbitration;
in response to the link stability between the second data center and the host being greater than the link stability between the first data center and the host, confirming that the second data center contends for arbitration;
And responding to the link stability degree between the first data center and the host computer to be equal to the link stability degree between the second data center and the host computer, acquiring the master-slave site information of the dual-active cluster, and confirming an arbitration result according to the master-slave site information and master-slave strategy.
In one embodiment, the master-slave site information includes that the first data center is a master site and the second data center is a slave site, or that the second data center is a master site and the first data center is a slave site, and the determining the arbitration result according to the master-slave site information and the master-slave policy includes:
and in response to the link stability degree between the first data center and the host being equal to the link stability degree between the second data center and the host, confirming that the primary site contention arbitration is successful.
In one embodiment, the method further comprises:
setting anti-shake time, and regarding the arbitration requests sent by the first data center and the second data center received in the anti-shake time range as reaching an arbitration end at the same time.
In one embodiment, the method further comprises:
responding to the arbitration result that the first data center contends for arbitration success and the second data center contends for arbitration failure, and selecting the first data center to take over the dual-activity cluster;
And responding to the arbitration result that the second data center contends for arbitration success and the first data center contends for arbitration failure, and selecting the second data center to take over the dual-active cluster.
In a second aspect, there is provided a dual active cluster arbitration device, the device comprising:
an acquisition construction module for acquiring first host link information and first link state information and constructing a first network topology according to the first host link information,
the acquisition construction module is further used for responding to the disconnection of the network between the first data center and the 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;
the receiving comparison module is used for receiving arbitration requests sent by the first data center and the second data center, and 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 comparison results;
and the acquisition judgment module is used for acquiring an arbitration strategy and confirming an arbitration result according to the comparison result and the arbitration strategy.
In a third aspect, a computer device is provided, the computer device comprising one or more processors; and a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution 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.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the dual active cluster arbitration method according to any of the first aspects above.
According to the dual-activity cluster arbitration method, the dual-activity cluster arbitration device, the computer equipment and the storage medium, the comparison result is obtained by comparing the first network topology and the first link state information before the network connection of the first data center and the second data center is disconnected with the second network topology and the second link state information after the network connection is disconnected; and determining an arbitration result according to the comparison result and the arbitration policy, so as to better cope with the disconnection scene of the dual-active cluster and improve the reliability and stability of the dual-active cluster.
Drawings
FIG. 1 is a flow diagram of a dual active cluster arbitration method in one embodiment;
FIG. 2 is a general flow diagram of a dual active cluster arbitration method in one embodiment;
FIG. 3 is a block diagram of a dual active cluster arbitration device according to another embodiment;
fig. 4 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Example 1
In one embodiment, as shown in fig. 1, a dual-active cluster arbitration method is provided, the dual-active cluster including a first data center and a second data center, the method comprising:
acquiring first host link information and first link state information, and constructing a first network topology according to the first host link information;
responding to the disconnection of the network between the first data center and the 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, and 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 comparison results;
and acquiring an arbitration policy, and confirming an arbitration result according to the comparison result and the arbitration policy.
Specifically, comparing the first network topology and the first link state information before the network connection of the first data center and the second data center is disconnected with the second network topology and the second link state information after the network connection is disconnected to obtain a comparison result; and determining an arbitration result according to the comparison result and the arbitration policy, so as to better cope with the disconnection scene of the dual-active cluster and improve the reliability and stability of the dual-active cluster.
Specifically, the common dual-active clusters are mainly in the following network topology modes:
main and standby type: in this topology, one data center is responsible for handling real-time traffic as a primary site, while the other data center is used as a backup site for disaster recovery and data backup. The main site and the standby site are connected through a special line or the Internet, and data are synchronized in real time or near real time.
Ex-situ multiple activity: this topology allows two data centers to handle traffic simultaneously, and clients can choose to connect to the nearest data center based on the proximity principle. The main site and the standby site are connected through a special line or the Internet to synchronize data in real time or near real time.
Ring form: this topology forms a ring network from a plurality of data centers, each of which can handle traffic and synchronize data in real time. If one data center fails, the data may continue to be processed on other data centers.
Three data centers: in this topology, three data centers are used for high availability and disaster recovery. Two data centers process traffic simultaneously, while the third data center acts as a hot backup, backing up data and keeping the data synchronized.
Specifically, in the process of building the dual-active cluster, network devices such as a switch or a router are used, and link information between the switch and a host, between the switch and a data center can be obtained through the network devices. The method comprises the following steps:
the data center can be integrated with network equipment (such as a switch and a router), and can acquire link state information such as link connection state, network delay, packet loss rate and the like in the following manner;
1. Common ways to obtain host link information using simple network management protocols are using a snmpget command or using simple network management protocol tool software. For example, the snmpget command is used to obtain the MAC address of the host to which the corresponding port is connected on the switch, as well as other necessary information;
2. a common way to obtain host link information using a command line interface is to look up an address resolution table through a command by logging into the command line interface of the switch, and find the IP address of the host connected to the designated port; corresponding to the IP address, a command is used to find the corresponding host MAC address and other necessary information.
Specifically, the obtained host link information may be used to construct a network topology; the related indicators such as network delay and packet loss rate may represent link state information, i.e., the quality of the network connection.
Specifically, when IP arbitration is deployed, IP arbitration and network communication of the dual active cluster may be established through endpoint communication, and the network topology and master-slave site information are saved locally to the IP arbitration.
In one embodiment, the 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:
Comparing the second network topology with the first network topology to obtain a link comparison result;
comparing the second link state information with the first link state information to obtain a state comparison result;
the link comparison result is used for representing the link connection state between the first data center and the host computer and the link connection state comprises a connection state and a disconnection state; the state comparison result is used for representing the link stability degree between the first data center and the second data center and the host.
Specifically, link state information of a data center is acquired every time period through an IP arbitration heartbeat mechanism, and maintenance is carried out on the IP arbitration local according to the acquired link state information; and evaluating the network quality in the latest time period according to the link state information. And evaluating the stability degree of the link according to the difference value of the current link state information and the link state information of the previous period. The purpose of comparing the link state information is to reduce the influence of network instability caused by network fluctuation in the arbitration period, and is the guarantee of one arbitration right judgment.
Specifically, the current link connection state and the link stability degree are obtained by comparing the network topology before and after the disconnection of the network connection between the data centers with the link state information, so as to judge the arbitration result according to the arbitration policy.
In one embodiment, as shown in fig. 2, the arbitration policy includes a link policy and a state policy, and the determining the arbitration result according to the comparison result and the arbitration policy includes:
obtaining a link connection state between the first data center and/or the second data center and the host according to the link comparison result;
responding to that a link between the first data center and a host is in a connection state and a link between the second data center and the host is in a disconnection state, and confirming that the first data center contends for arbitration;
responding to that a link between the second data center and the host is in a connection state and a link between the first data center and the host is in a disconnection state, and confirming that the second data center contends for arbitration;
and responding to the connection state of the links between the first data center and the second data center and the host, and confirming an arbitration result according to the state comparison result and the state strategy.
Specifically, the arbitration result is judged according to the link strategy and the link comparison result, and the data center with normal link is preferentially used as the leader for taking over the dual-active cluster, so that the condition of service interruption is avoided.
In one embodiment, the arbitration policy includes a master-slave policy, and the determining the arbitration result according to the state comparison result and the state policy includes:
comparing the link stability degree between the first data center and the host computer with the link stability degree between the second data center and the host computer according to the state comparison result;
in response to the link stability between the first data center and the host being greater than the link stability between the second data center and the host, confirming that the first data center contends for arbitration;
in response to the link stability between the second data center and the host being greater than the link stability between the first data center and the host, confirming that the second data center contends for arbitration;
and responding to the link stability degree between the first data center and the host computer to be equal to the link stability degree between the second data center and the host computer, acquiring the master-slave site information of the dual-active cluster, and confirming an arbitration result according to the master-slave site information and master-slave strategy.
Specifically, when the link connection between the data center and the host is in a normal state, judging an arbitration result according to a state comparison result and a state strategy, taking the data center with better link stability as a leader for taking over the dual-active cluster, and ensuring the network quality under the service state of the dual-active cluster on the basis of avoiding service interruption.
In one embodiment, the master-slave site information includes that the first data center is a master site and the second data center is a slave site, or that the second data center is a master site and the first data center is a slave site, and the determining the arbitration result according to the master-slave site information and the master-slave policy includes:
and in response to the link stability degree between the first data center and the host being equal to the link stability degree between the second data center and the host, confirming that the primary site contention arbitration is successful.
In one embodiment, the method further comprises:
setting anti-shake time, and regarding the arbitration requests sent by the first data center and the second data center received in the anti-shake time range as reaching an arbitration end at the same time.
Specifically, because the links from the data center to the arbitration end may be different in length, the time for the arbitration request to reach the arbitration end is sequential, and the arbitration request in the anti-shake time range is regarded as reaching the arbitration end at the same time by setting the anti-shake time, so that the arbitration end is prevented from directly taking the data center from which the arbitration request arrives first as a leader for taking over the dual-activity cluster.
Specifically, setting the anti-shake time includes, but is not limited to, the first data center being equivalent to the second data center:
first kind: setting the first data center and the second data center to send arbitration request only once;
responding to the first arbitration request sent by the first data center, and judging whether a second arbitration request sent by the second data center is received after waiting for a preset time;
and in response to receiving a second arbitration request sent by the second data center, treating the first arbitration request and the second arbitration request as reaching an arbitration end at the same time.
Second kind: the arbitration request sent by the first data center comprises first flag information, and the arbitration request sent by the second data center comprises second flag information;
the number of arbitration requests sent by the first data center and the second data center is not limited;
responding to a first arbitration request sent by a first data center, and judging whether a second arbitration request sent by a second data center is received or not according to mark information in the arbitration request after waiting for a preset time;
and in response to receiving a second arbitration request sent by the second data center, treating the first arbitration request and the second arbitration request as reaching an arbitration end at the same time.
Third kind: setting the first data center and the second data center to send arbitration request only once;
responding to disconnection of the network connection between the first data center and the second data center, and receiving an arbitration request within a preset time;
in response to receiving the first and second arbitration requests, the first and second arbitration requests are treated as arriving at the arbitrator simultaneously.
Fourth kind: the arbitration request sent by the first data center comprises first flag information, and the arbitration request sent by the second data center comprises second flag information;
the number of arbitration requests sent by the first data center and the second data center is not limited;
responding to disconnection of the network connection between the first data center and the second data center, and receiving an arbitration request within a preset time;
in response to receiving the arbitration request, the flag information includes first flag information and second flag information, and the first arbitration request and the second arbitration request are considered to arrive at the arbitrator simultaneously.
In one embodiment, the method further comprises:
responding to the arbitration result that the first data center contends for arbitration success and the second data center contends for arbitration failure, and selecting the first data center to take over the dual-activity cluster;
And responding to the arbitration result that the second data center contends for arbitration success and the first data center contends for arbitration failure, and selecting the second data center to take over the dual-active cluster.
It should be understood that, although the steps in the flowcharts of fig. 1 and 2 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1, 2 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of the other steps or sub-steps of other steps.
Example two
In one embodiment, as shown in fig. 3, there is provided a dual active cluster arbitration device, the device comprising:
an acquisition construction module for acquiring first host link information and first link state information and constructing a first network topology according to the first host link information,
The acquisition construction module is further used for responding to the disconnection of the network between the first data center and the 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;
the receiving comparison module is used for receiving arbitration requests sent by the first data center and the second data center, and 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 comparison results;
and the acquisition judgment module is used for acquiring an arbitration strategy and confirming an arbitration result according to the comparison result and the arbitration strategy.
In one embodiment, the receiving comparison module is further configured to:
comparing the second network topology with the first network topology to obtain a link comparison result;
comparing the second link state information with the first link state information to obtain a state comparison result;
the link comparison result is used for representing the link connection state between the first data center and the host computer and the link connection state comprises a connection state and a disconnection state; the state comparison result is used for representing the link stability degree between the first data center and the second data center and the host.
In one embodiment, the arbitration policy includes a link policy and a status policy, and the acquisition judgment module is further configured to:
obtaining a link connection state between the first data center and/or the second data center and the host according to the link comparison result;
responding to that a link between the first data center and a host is in a connection state and a link between the second data center and the host is in a disconnection state, and confirming that the first data center contends for arbitration;
responding to that a link between the second data center and the host is in a connection state and a link between the first data center and the host is in a disconnection state, and confirming that the second data center contends for arbitration;
and responding to the connection state of the links between the first data center and the second data center and the host, and confirming an arbitration result according to the state comparison result and the state strategy.
In one embodiment, the arbitration policy includes a master-slave policy, and the acquisition judgment module is further configured to:
comparing the link stability degree between the first data center and the host computer with the link stability degree between the second data center and the host computer according to the state comparison result;
In response to the link stability between the first data center and the host being greater than the link stability between the second data center and the host, confirming that the first data center contends for arbitration;
in response to the link stability between the second data center and the host being greater than the link stability between the first data center and the host, confirming that the second data center contends for arbitration;
and responding to the link stability degree between the first data center and the host computer to be equal to the link stability degree between the second data center and the host computer, acquiring the master-slave site information of the dual-active cluster, and confirming an arbitration result according to the master-slave site information and master-slave strategy.
In one embodiment, the master-slave site information includes that the first data center is a master site and the second data center is a slave site, or that the second data center is a master site and the first data center is a slave site, and the acquiring and judging module is further configured to:
and in response to the link stability degree between the first data center and the host being equal to the link stability degree between the second data center and the host, confirming that the primary site contention arbitration is successful.
In one embodiment, the apparatus further comprises:
the setting module is used for setting anti-shake time and regarding arbitration requests sent by the first data center and the second data center received in the anti-shake time range as reaching an arbitration end at the same time.
In one embodiment, the apparatus further comprises:
a selection module, wherein the selection module is used for responding to the arbitration result that the first data center contends for arbitration success and the second data center contends for arbitration failure, selecting the first data center to take over the dual-active cluster,
the selection module is further used for selecting the second data center to take over the dual-activity cluster in response to the arbitration result that the second data center is successful in competing for arbitration and the first data center is failed in competing for arbitration.
For specific limitations of the dual active cluster arbitration device, reference may be made to the above limitation of the dual active cluster arbitration method, and no further description is given here. The modules in the dual-active cluster arbitration device can be realized in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Example III
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
acquiring first host link information and first link state information, and constructing a first network topology according to the first host link information;
responding to the disconnection of the network between the first data center and the 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, and 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 comparison results;
and acquiring an arbitration policy, and confirming an arbitration result according to the comparison result and the arbitration policy.
In one embodiment, the processor when executing the computer program further performs the steps of:
comparing the second network topology with the first network topology to obtain a link comparison result;
Comparing the second link state information with the first link state information to obtain a state comparison result;
the link comparison result is used for representing the link connection state between the first data center and the host computer and the link connection state comprises a connection state and a disconnection state; the state comparison result is used for representing the link stability degree between the first data center and the second data center and the host.
In one embodiment, the processor when executing the computer program further performs the steps of:
obtaining a link connection state between the first data center and/or the second data center and the host according to the link comparison result;
responding to that a link between the first data center and a host is in a connection state and a link between the second data center and the host is in a disconnection state, and confirming that the first data center contends for arbitration;
responding to that a link between the second data center and the host is in a connection state and a link between the first data center and the host is in a disconnection state, and confirming that the second data center contends for arbitration;
And responding to the connection state of the links between the first data center and the second data center and the host, and confirming an arbitration result according to the state comparison result and the state strategy.
In one embodiment, the processor when executing the computer program further performs the steps of:
comparing the link stability degree between the first data center and the host computer with the link stability degree between the second data center and the host computer according to the state comparison result;
in response to the link stability between the first data center and the host being greater than the link stability between the second data center and the host, confirming that the first data center contends for arbitration;
in response to the link stability between the second data center and the host being greater than the link stability between the first data center and the host, confirming that the second data center contends for arbitration;
and responding to the link stability degree between the first data center and the host computer to be equal to the link stability degree between the second data center and the host computer, acquiring the master-slave site information of the dual-active cluster, and confirming an arbitration result according to the master-slave site information and master-slave strategy.
In one embodiment, the processor when executing the computer program further performs the steps of:
and in response to the link stability degree between the first data center and the host being equal to the link stability degree between the second data center and the host, confirming that the primary site contention arbitration is successful.
In one embodiment, the processor when executing the computer program further performs the steps of:
setting anti-shake time, and regarding the arbitration requests sent by the first data center and the second data center received in the anti-shake time range as reaching an arbitration end at the same time.
In one embodiment, the processor when executing the computer program further performs the steps of:
responding to the arbitration result that the first data center contends for arbitration success and the second data center contends for arbitration failure, and selecting the first data center to take over the dual-activity cluster;
and responding to the arbitration result that the second data center contends for arbitration success and the first data center contends for arbitration failure, and selecting the second data center to take over the dual-active cluster.
The program instructions, when read and executed by the one or more processors, may further perform operations corresponding to the steps in the foregoing method embodiments, and reference may be made to the foregoing description, which is not repeated herein. Referring to FIG. 4, which illustrates an architecture of a computer device, may include, in particular, 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 may be communicatively coupled via a communication bus 430.
The processor 410 may be implemented by a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided in the present application.
The Memory 420 may be implemented in the form of Read Only Memory (ROM), random access Memory (Random Access Memory, RAM), static storage devices, dynamic storage devices, etc. The memory 420 may store an operating system 421 for controlling the operation of the computer device 400, and a Basic Input Output System (BIOS) 422 for controlling the low-level operation of the computer device 400. In addition, a web browser 423, data storage management 424, and an icon font processing system 425, etc. may also be stored. The icon font processing system 425 may be an application program that implements the operations of the foregoing steps in the embodiments of the present application. In general, when the technical solutions provided in the present application are implemented by software or firmware, relevant program codes are stored in the memory 420 and invoked by the processor 410 for execution.
The input/output interface 413 is used to connect to an input/output module to realize information input and output. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
The network interface 414 is used to connect communication modules (not shown) to enable communication interactions of the device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 430 includes a path to transfer information between various components of the device (e.g., processor 410, video display adapter 411, disk drive 412, input/output interface 413, network interface 414, and memory 420).
In addition, the computer apparatus 400 may also obtain information of specific acquisition conditions from the virtual resource object acquisition condition information database 441 for making condition judgment, and so on.
It should be noted that although the above-described computer device 400 illustrates only a processor 410, a video display adapter 411, a disk drive 412, an input/output interface 413, a network interface 414, a memory 420, a bus 430, etc., the computer device may include other components necessary to achieve proper operation in a particular implementation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the present application, and not all the components shown in the drawings.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and include several instructions to cause a computer device (which may be a personal computer, a cloud server, or a network device, etc.) to perform the methods described in the various embodiments or some parts of the embodiments of the present application.
Example IV
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring first host link information and first link state information, and constructing a first network topology according to the first host link information;
responding to the disconnection of the network between the first data center and the 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, and 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 comparison results;
and acquiring an arbitration policy, and confirming an arbitration result according to the comparison result and the arbitration policy.
In one embodiment, the computer program when executed by the processor further performs the steps of:
comparing the second network topology with the first network topology to obtain a link comparison result;
comparing the second link state information with the first link state information to obtain a state comparison result;
the link comparison result is used for representing the link connection state between the first data center and the host computer and the link connection state comprises a connection state and a disconnection state; the state comparison result is used for representing the link stability degree between the first data center and the second data center and the host.
In one embodiment, the computer program when executed by the processor further performs the steps of:
obtaining a link connection state between the first data center and/or the second data center and the host according to the link comparison result;
Responding to that a link between the first data center and a host is in a connection state and a link between the second data center and the host is in a disconnection state, and confirming that the first data center contends for arbitration;
responding to that a link between the second data center and the host is in a connection state and a link between the first data center and the host is in a disconnection state, and confirming that the second data center contends for arbitration;
and responding to the connection state of the links between the first data center and the second data center and the host, and confirming an arbitration result according to the state comparison result and the state strategy.
In one embodiment, the computer program when executed by the processor further performs the steps of:
comparing the link stability degree between the first data center and the host computer with the link stability degree between the second data center and the host computer according to the state comparison result;
in response to the link stability between the first data center and the host being greater than the link stability between the second data center and the host, confirming that the first data center contends for arbitration;
In response to the link stability between the second data center and the host being greater than the link stability between the first data center and the host, confirming that the second data center contends for arbitration;
and responding to the link stability degree between the first data center and the host computer to be equal to the link stability degree between the second data center and the host computer, acquiring the master-slave site information of the dual-active cluster, and confirming an arbitration result according to the master-slave site information and master-slave strategy.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and in response to the link stability degree between the first data center and the host being equal to the link stability degree between the second data center and the host, confirming that the primary site contention arbitration is successful.
In one embodiment, the computer program when executed by the processor further performs the steps of:
setting anti-shake time, and regarding the arbitration requests sent by the first data center and the second data center received in the anti-shake time range as reaching an arbitration end at the same time.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Responding to the arbitration result that the first data center contends for arbitration success and the second data center contends for arbitration failure, and selecting the first data center to take over the dual-activity cluster;
and responding to the arbitration result that the second data center contends for arbitration success and the first data center contends for arbitration failure, and selecting the second data center to take over the dual-active cluster.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can 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), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A dual-active cluster arbitration method, the dual-active cluster comprising a first data center and a second data center, the method comprising:
acquiring first host link information and first link state information, and constructing a first network topology according to the first host link information;
responding to the disconnection of the network between the first data center and the 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, and 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 comparison results;
and acquiring an arbitration policy, and confirming an arbitration result according to the comparison result and the arbitration policy.
2. The method of claim 1, wherein 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 comprises:
comparing the second network topology with the first network topology to obtain a link comparison result;
comparing the second link state information with the first link state information to obtain a state comparison result;
the link comparison result is used for representing the link connection state between the first data center and the host computer and the link connection state comprises a connection state and a disconnection state; the state comparison result is used for representing the link stability degree between the first data center and the second data center and the host.
3. The method of claim 2, wherein the arbitration policy comprises a link policy and a status policy, and wherein the validating the arbitration result based on the comparison and the arbitration policy comprises:
obtaining a link connection state between the first data center and/or the second data center and the host according to the link comparison result;
responding to that a link between the first data center and a host is in a connection state and a link between the second data center and the host is in a disconnection state, and confirming that the first data center contends for arbitration;
responding to that a link between the second data center and the host is in a connection state and a link between the first data center and the host is in a disconnection state, and confirming that the second data center contends for arbitration;
and responding to the connection state of the links between the first data center and the second data center and the host, and confirming an arbitration result according to the state comparison result and the state strategy.
4. A method according to claim 3, wherein the arbitration policy comprises a master-slave policy, and said validating the arbitration result based on the status comparison result and the status policy comprises:
Comparing the link stability degree between the first data center and the host computer with the link stability degree between the second data center and the host computer according to the state comparison result;
in response to the link stability between the first data center and the host being greater than the link stability between the second data center and the host, confirming that the first data center contends for arbitration;
in response to the link stability between the second data center and the host being greater than the link stability between the first data center and the host, confirming that the second data center contends for arbitration;
and responding to the link stability degree between the first data center and the host computer to be equal to the link stability degree between the second data center and the host computer, acquiring the master-slave site information of the dual-active cluster, and confirming an arbitration result according to the master-slave site information and master-slave strategy.
5. The method of claim 4, wherein the master-slave site information includes the first data center being a master site and the second data center being a slave site, or the second data center being a master site and the first data center being a slave site, the validating arbitration results based on the master-slave site information and master-slave policy comprising:
And in response to the link stability degree between the first data center and the host being equal to the link stability degree between the second data center and the host, confirming that the primary site contention arbitration is successful.
6. The method according to claim 1, wherein the method further comprises:
setting anti-shake time, and regarding the arbitration requests sent by the first data center and the second data center received in the anti-shake time range as reaching an arbitration end at the same time.
7. The method according to claim 1, wherein the method further comprises:
responding to the arbitration result that the first data center contends for arbitration success and the second data center contends for arbitration failure, and selecting the first data center to take over the dual-activity cluster;
and responding to the arbitration result that the second data center contends for arbitration success and the first data center contends for arbitration failure, and selecting the second data center to take over the dual-active cluster.
8. A dual active cluster arbitration device, the device comprising:
an acquisition construction module for acquiring first host link information and first link state information and constructing a first network topology according to the first host link information,
The acquisition construction module is further used for responding to the disconnection of the network between the first data center and the 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;
the receiving comparison module is used for receiving arbitration requests sent by the first data center and the second data center, and 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 comparison results;
and the acquisition judgment module is used for acquiring an arbitration strategy and confirming an arbitration result according to the comparison result and the arbitration strategy.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the dual active cluster arbitration method according to any of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the dual active cluster arbitration method of any of claims 1 to 7.
CN202311457447.7A 2023-11-03 2023-11-03 Dual-activity cluster arbitration method and device, computer equipment and storage medium Pending CN117499210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311457447.7A CN117499210A (en) 2023-11-03 2023-11-03 Dual-activity cluster arbitration method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311457447.7A CN117499210A (en) 2023-11-03 2023-11-03 Dual-activity cluster arbitration method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117499210A true CN117499210A (en) 2024-02-02

Family

ID=89668486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311457447.7A Pending CN117499210A (en) 2023-11-03 2023-11-03 Dual-activity cluster arbitration method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117499210A (en)

Similar Documents

Publication Publication Date Title
US10020980B2 (en) Arbitration processing method after cluster brain split, quorum storage apparatus, and system
US10983880B2 (en) Role designation in a high availability node
CN113014634B (en) Cluster election processing method, device, equipment and storage medium
CN106330475B (en) Method and device for managing main and standby nodes in communication system and high-availability cluster
CN106940699B (en) Synchronous processing method, device, server and system for memory data
CN107508694B (en) Node management method and node equipment in cluster
US20180077007A1 (en) Redundant storage solution
CN111459749A (en) Prometous-based private cloud monitoring method and device, computer equipment and storage medium
JP6431197B2 (en) Snapshot processing methods and associated devices
CN106331081B (en) Information synchronization method and device
CN112527567A (en) System disaster tolerance method, device, equipment and storage medium
CN115396296A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN103559188B (en) Metadata management method and management system
CN109257396A (en) A kind of distributed lock dispatching method and device
JP4612714B2 (en) Data processing method, cluster system, and data processing program
CN110674192A (en) Redis high-availability VIP (very important person) drifting method, terminal and storage medium
CN113703946A (en) Application recovery method and device, electronic equipment and computer readable storage medium
CN117370316A (en) High availability management method and device for database, electronic equipment and storage medium
CN113254205A (en) Load balancing system, method and device, electronic equipment and storage medium
CN107291575B (en) Processing method and equipment for data center fault
CN117499210A (en) Dual-activity cluster arbitration method and device, computer equipment and storage medium
CN107087021B (en) Master-slave server determination method and device
CN114840495A (en) Database cluster split-brain prevention method, storage medium and device
CN111338848B (en) Failure application copy processing method and device, computer equipment and storage medium
CN110413686B (en) Data writing method, device, equipment and storage medium

Legal Events

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