CN114422470A - Address processing method and device, electronic equipment and storage medium - Google Patents

Address processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114422470A
CN114422470A CN202111621062.0A CN202111621062A CN114422470A CN 114422470 A CN114422470 A CN 114422470A CN 202111621062 A CN202111621062 A CN 202111621062A CN 114422470 A CN114422470 A CN 114422470A
Authority
CN
China
Prior art keywords
address
availability
current
standby
user
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
CN202111621062.0A
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111621062.0A priority Critical patent/CN114422470A/en
Publication of CN114422470A publication Critical patent/CN114422470A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • 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/30Decision processes by autonomous network management units using voting and bidding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2557Translation policies or rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The embodiment of the invention provides an address processing method, an address processing device, electronic equipment and a storage medium, wherein a main address of an address provider and a first address availability of the main address are obtained through a working node of a distributed disaster recovery system, if the first address availability is smaller than a preset availability threshold value, the availability of the main address is lower, a standby address of the address provider and a second address availability of the standby address are obtained, a current address of an address user is obtained, if the second address availability is larger than or equal to the preset availability threshold value, the working node of the disaster recovery system can send an address processing request to the address user according to a comparison relation, so that the address user can carry out address switching or keep the current address according to the address processing request, the problem of repeated development such as switching the same address is avoided, and meanwhile, the address with higher availability is screened out by configuring the availability threshold value, and furthermore, the effectiveness and the usability of address switching are improved by using the address with higher availability.

Description

Address processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an address processing method based on a distributed disaster recovery system, an address processing apparatus based on a distributed disaster recovery system, an electronic device, and a computer-readable storage medium.
Background
The disaster recovery system is characterized in that two or more sets of IT systems with the same function are established in different places far away from each other, health status monitoring and function switching can be performed among the IT systems, when one system stops working due to accidents (such as fire, earthquake and the like), the whole application system can be switched to the other place, so that the system functions can continue to work normally, the disaster recovery technology is a component of high-availability technology of the system, the disaster recovery system emphasizes processing of the influence of the external environment on the system, particularly the influence of disastrous events on the whole IT node, and a node-level system recovery function is provided.
Most address providers provide multiple sets of addresses, based on the needs of the disaster recovery system, for example, the address provider may provide a primary address and a backup address, or one primary address and a plurality of backup addresses, while in the prior art, when the disaster recovery system is in a normal working state, the address user calls the primary address provided by the address provider, when the disaster recovery system is in an abnormal working state, the address user can call the standby address provided by the address provider, however, the simple way of calling the address according to the working state may cause the problems of unavailable called address or poor availability, when the address provider and the plurality of address users have a communication relationship, the plurality of address users simultaneously request address switching, and problems of repeated development and resource waste such as switching of the same address are easily caused.
Disclosure of Invention
Embodiments of the present invention provide an address processing method and apparatus based on a distributed disaster recovery system, an electronic device, and a computer-readable storage medium, so as to solve or partially solve the problems of low availability of a called address, repeated development, and resource waste during address switching based on a disaster recovery system.
The embodiment of the invention discloses an address processing method based on a distributed disaster recovery system, wherein the distributed disaster recovery system comprises a plurality of nodes, the nodes comprise working nodes, and the method comprises the following steps:
the working node acquires a primary address of an address provider and a first address availability of the primary address;
if the first address availability of the main address is smaller than a preset availability threshold value, the working node acquires a standby address of the address provider and a second address availability of the standby address;
the working node acquires the current address of an address user corresponding to the address provider;
if the second address availability of the standby address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the standby address, so that the address user performs address switching or maintains the current address according to the address processing request.
Optionally, the method further comprises:
if the first address availability of the master address is greater than or equal to a preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the master address, so that the address user performs address switching or maintains the current address according to the address processing request.
Optionally, the address processing request includes an address holding request and an address switching request, and the working node sends the address processing request to the address user according to a comparison relationship between the current address and the master address, so that the address user performs address switching or holds the current address according to the address processing request, including:
the working node acquires a current address name of the current address and a main address name of the main address;
if the current address name is the same as the main address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the main address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the main address according to the address switching request.
Optionally, the sending, by the working node, an address processing request to the address user according to the comparison relationship between the current address and the standby address, so that the address user performs address switching or maintains the current address according to the address processing request, includes:
the working node acquires a current address name of the current address and a standby address name of the standby address;
if the current address name is the same as the standby address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the standby address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the standby address according to the address switching request.
Optionally, if the current address name is different from the backup address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request, including:
if the current address name is different from the plurality of standby address names, the working node acquires each second address availability corresponding to the plurality of standby address names and sorts the standby addresses according to the size of each second address availability;
and the working node selects a standby address as a target standby address according to the sequence of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address into the target standby address according to the address switching request.
Optionally, the number of nodes further includes at least one backup node, and the method further includes:
and if the working node is detected to be down, selecting any one standby node from the at least one standby node as a target working node.
Optionally, the method further comprises:
and when the working node recovers to work normally, the working node is automatically converted into a target standby node.
The embodiment of the invention discloses a distributed disaster recovery system, which comprises a plurality of nodes, and the disaster recovery system comprises:
the first address availability rate acquisition module is used for acquiring a main address of an address provider and a first address availability rate of the main address by the working node;
a second address availability rate obtaining module, configured to, if a first address availability rate of the primary address is smaller than a preset availability rate threshold, obtain, by the working node, a backup address of the address provider and a second address availability rate of the backup address;
a current address obtaining module, configured to obtain, by the work node, a current address of an address user corresponding to the address provider;
and the first address processing module is used for sending an address processing request to the address user according to the comparison relationship between the current address and the standby address if the second address availability of the standby address is greater than or equal to the preset availability threshold value, so that the address user performs address switching or maintains the current address according to the address processing request.
Optionally, the disaster recovery system further includes:
and the second address processing module is used for sending an address processing request to the address user according to the comparison relationship between the current address and the main address if the first address availability of the main address is greater than or equal to a preset availability threshold value, so that the address user performs address switching or maintains the current address according to the address processing request.
Optionally, the address processing request includes an address holding request and an address switching request, and the second address processing module is specifically configured to:
the working node acquires a current address name of the current address and a main address name of the main address;
if the current address name is the same as the main address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the main address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the main address according to the address switching request.
Optionally, the first address processing module includes:
a standby address name obtaining submodule, configured to obtain a current address name of the current address and a standby address name of the standby address;
a current address holding submodule, configured to send an address holding request to the address user if the current address name is the same as the standby address name, so that the address user holds the current address according to the address holding request;
and the current address switching submodule is used for sending an address switching request to the address user if the current address name is different from the standby address name, so that the address user switches the current address to the standby address according to the address switching request.
Optionally, the current address switching submodule is specifically configured to:
if the current address name is different from the plurality of standby address names, acquiring each second address availability corresponding to the plurality of standby address names, and sequencing the standby addresses according to the size of each second address availability;
and the working node selects a standby address as a target standby address according to the sequence of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address into the target standby address according to the address switching request.
Optionally, the plurality of nodes further include at least one standby node, and the disaster recovery system further includes:
and the target working node determining module is used for selecting any one standby node from the at least one standby node as a target working node if the working node is detected to be down.
Optionally, the disaster recovery system further includes:
and the target standby node conversion module is used for automatically converting the working node into the target standby node when the working node recovers to work normally.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Also disclosed is a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform a method according to an embodiment of the invention.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the distributed disaster recovery system comprises a plurality of nodes, a working node of the node acquires a primary address of an address provider and a first address availability of the primary address, compares the first address availability with the primary address with a preset availability threshold, determines that the availability of the primary address is low if the first address availability of the primary address is less than the preset availability threshold, the working node needs to acquire a standby address of the address provider and a second address availability of the standby address and acquires a current address of an address user corresponding to the address provider, and if the second address availability of the standby address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to a comparison relationship between the current address and the standby address so as to enable the address user to perform address switching or maintain the current address according to the address processing request, the address with higher availability is screened out by comparing the first address availability with the second address availability, the current address is compared with the master address or the standby address with higher availability, the working node can send an address processing request to an address provider according to the comparison relation so that the address provider can keep the current address or automatically switch the address, the problem of repeated development of switching the same address is avoided, meanwhile, the address with higher availability is screened out by configuring the availability threshold, and the effectiveness and the availability of address switching are improved by using the address with higher availability.
Drawings
Fig. 1 is a flowchart illustrating steps of an address processing method based on a distributed disaster recovery system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of an address processing method based on a distributed disaster recovery system according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of an address processing method based on a distributed disaster recovery system according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating steps of an address processing method based on a distributed disaster recovery system according to an embodiment of the present invention;
fig. 5 is a block diagram of an address processing apparatus based on a distributed disaster recovery system according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device provided in an embodiment of the invention;
fig. 7 is a schematic diagram of a computer-readable medium provided in an embodiment of the invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
With the continuous development of science and technology, in order to deal with various unexpected situations of a computer system, for example, when the computer system suffers from irresistible natural disasters such as fire, flood, earthquake, war and the like, and human disasters such as computer crime, computer virus, power failure, network/communication failure, hardware/software errors, human operation errors and the like, a disaster recovery system capable of protecting the data security of a user is designed, uninterrupted application service is provided for the user, and a data storage and backup function is realized. The disaster recovery system can be divided into data disaster recovery and application disaster recovery, and the data disaster recovery means that a remote data system is established, and the system is an available copy of local key application data. When the local data and the whole application system have disasters, the system at least stores a piece of available data of key services in different places. The data can be completely copied in real time with the local production data, or slightly behind the local data, but certainly is available, the main technologies adopted by the method are data backup and data copying technologies, so-called application disaster recovery, a set of complete backup application systems (which can be mutual backup) equivalent to the local production system are established in different places on the basis of data disaster recovery, the establishment of such a system is relatively complex, not only is a copy of available data needed, but also resources including networks, hosts, applications, even IP and the like and good coordination among the resources are needed, the main technologies of the method comprise load balancing and clustering technologies, the data disaster recovery is the basis of the application disaster recovery, and the application disaster recovery is the target of the data disaster recovery.
However, in the existing disaster recovery system, an address provider may provide multiple sets of addresses, such as one main address and one standby address, or multiple standby addresses of one main address, an address user may directly call the main address, and only when the main address is unavailable, the address user may call the corresponding standby address, however, the direct calling of the main address or the standby address may cause poor availability or unavailability of the called main address or standby address, and when there are multiple address users requesting address switching, not only repeated development may be easily caused, but also when the determination criteria of address availability are inconsistent, problems that a part of called addresses is available and a part of called addresses is unavailable may occur. Therefore, the existing disaster recovery system cannot accurately select the address with the optimal availability from a plurality of sets of addresses of the address provider.
In view of this, one of the core invention points of the embodiments of the present invention is that a working node of a node acquires a primary address of an address provider and a first address availability of the primary address, and compares the first address availability of the primary address with a preset availability threshold, if the first address availability of the primary address is smaller than the preset availability threshold, it is determined that the availability of the primary address is low, the working node needs to acquire a backup address of the address provider and a second address availability of the backup address, and acquires a current address of an address user corresponding to the address provider, and if the second address availability of the backup address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to a comparison relationship between the current address and the backup address, so that the address user performs address switching or maintains the current address according to the address processing request, the address with higher availability is screened out by comparing the first address availability with the second address availability, the current address is compared with the master address or the standby address with higher availability, the working node can send an address processing request to an address provider according to the comparison relation so that the address provider can keep the current address or automatically switch the address, the problem of repeated development of switching the same address is avoided, meanwhile, the address with higher availability is screened out by configuring the availability threshold, and the effectiveness and the availability of address switching are improved by using the address with higher availability.
Referring to fig. 1, a flowchart illustrating steps of an address processing method based on a distributed disaster recovery system according to an embodiment of the present invention is shown, where the distributed disaster recovery system includes a plurality of nodes, and the nodes include working nodes, and the method specifically includes the following steps:
step 101, the working node acquires a primary address of an address provider and a first address availability of the primary address;
in the embodiment of the invention, the disaster recovery system can determine the working node through the zookeeper cluster, then use the working node to obtain the primary address of the address provider, and then calculate the first address availability of the primary address by using the address availability calculation model.
Optionally, the distributed system reliable coordination system (zookeeper) is a distributed, open source distributed application coordination service, which is software providing a consistent service for distributed applications, and the provided functions include: the method comprises the following steps of configuration maintenance, domain name service, distributed synchronization, group service and the like, wherein the ZooKeeper aims at packaging complex key services which are easy to make mistakes, providing a simple and easy-to-use interface and a system with high performance and stable functions for a user, and the basic operation process of the ZooKeeper comprises the following steps: 1. electing a Leader; 2. synchronizing data; 3. there are many algorithms in the process of electing Leader, but the electing standard to be achieved is consistent; 4. the Leader needs to have the highest execution ID, like root authority; 5. most machines in the cluster respond and accept the selected Leader.
In specific implementation, the plurality of nodes further include at least one standby node, the disaster recovery system may acquire the working node through a consistency algorithm of the temporary nodes of the zookeeper, and implement that if the working node is detected to be down, any standby node is selected from the at least one standby node as a target working node, and when the working node returns to normal operation, the working node is automatically converted into the target standby node.
As an example, each zookeeper node in a zookeeper cluster needs to be deployed on different servers, fig. 2 in the specification shows a process of data processing between each zookeeper node and each disaster-tolerant service in a disaster-tolerant system, and a standby node of a zookeeper is created by one disaster-tolerant service, so that one disaster-tolerant service can be deployed in each machine room of A, B, C three areas, and a set of zookeeper cluster is respectively built, a consistency algorithm of temporary nodes of zookeeper ensures that only one disaster-tolerant service works, when a working node is down, one of the other two standby nodes can be selected as a target working node to continue working, the down working node automatically becomes a standby node after being recovered, and then a real-time data synchronization function of zookeeper is used to ensure that each disaster-tolerant service node can acquire the same data, which specifically realizes the following processes:
1. when a certain disaster recovery service A finds that no temporary node exists in the zookeeper, other disaster recovery services B, C are actively detected, and the detection time is recorded;
2. if the disaster tolerance service B or the disaster tolerance service C cannot be detected, the node is promoted to be a main node, and a temporary node is created in the zookeeper;
3. if the detection records exist, voting is initiated to other services, and the voting information carries all the detection records;
4. when the node receives voting information of all detected nodes or the waiting time is exceeded, electing the node with the largest detection service quantity as a main node, if the quantity of the nodes is the same, electing the node with the shortest time consumption as the main node, and creating a temporary node in the zookeeper by the main node;
5. when the temporary node is created, the vote and the time consumption condition of the temporary node are judged, if the vote is more than the current vote or the vote is the same and consumes less time, the current main node is replaced, and therefore the condition that the system cannot acquire the address of the address provider in time after the work node is down is avoided through the consistency algorithm of the zookeeper cluster and the data backup synchronization function.
Referring to fig. 3 in the specification, a working cooperation process between the disaster recovery system and an address provider and an address consumer is shown, where the address provider may provide a primary address and a plurality of backup addresses for the address consumer or an address detector, and when a disaster recovery service working node of the disaster recovery system obtains the primary address of the address provider, a first address availability of the primary address may be calculated by using an address availability calculation module. The address user can call the main address of the service provider by default, provide the current address needing address switching for the address detector, and switch according to the notified switching address when the address detector notifies that the address switching is needed.
Specifically, the disaster recovery system may obtain a home address of the address provider, and characteristic parameters corresponding to the address provider, such as a unit cycle (C), an Access Success Rate (ASR), and the number of times of a predetermined value (TV), and input the characteristic parameters of the address provider to the address availability calculation model according to a requirement of the address user, may output a first address availability corresponding to the home address, such as 30%, 40%, 50%, and so on.
The calculation method of the address availability calculation model can be as follows: overall, a (availability) — ST (success number)/[ ST (success number) + FT (failure number) ].
Wherein ST (success number) is the number of times the Access Success Rate (ASR) is greater than a predetermined value (TV) within a unit cycle (C). FT (number of failures) is the number of times that an Access Success Rate (ASR) is less than a predetermined value (TV) within a unit period (C), the unit period (C, generally 30 minutes) is averagely divided into a plurality of unit times (t, generally 1 minute), the Access Success Rate (ASR) is a ratio of successful accesses per unit time (t, generally 10 accesses), the Access Success Rate (ASR) is AST (number of successful accesses)/[ AST (number of successful accesses) + AFT (number of failed accesses) ], the access timeout time (timeout) needs to be weighted according to the average timeout time (t1) of the service user and the average processing time (t2) of the service provider, and the weight is determined according to the actual processing time of the user.
As an example, when the address user requests the page response to be fast, the weight of t1 needs to be increased, and the weight of t2 needs to be decreased, for example, when timeout is t1 × 0.8+ t2 × 0.2, let C be 30 minutes and t be 1 minute, 10 visits are made per unit time, where in the first t, AST is 10 and AFT is 0, if TV is 0.9, ASR is 1> TV is 0.9 and ST is ST +1, and if TV is 1.1, ASR is 1 < TV 1.1 and FT is FT + 1.
Step 102, if the first address availability of the primary address is smaller than a preset availability threshold, the working node acquires a standby address of the address provider and a second address availability of the standby address;
in the embodiment of the present invention, the preset availability threshold may be an availability preset by a technician according to an actual requirement or a design purpose, for example, the preset availability threshold may be set to 45%, 50%, 55%, and so on.
In an embodiment of the present invention, after the disaster recovery system obtains the primary address and the first address availability of the address provider, and determines that the first address availability of the primary address is smaller than the preset availability threshold, the working node of the disaster recovery system may obtain the backup address of the address provider, and then input the characteristic parameter corresponding to the backup address into the address availability calculation model to obtain the second address availability of the backup address.
As an example, the address provider provides a main address and three backup addresses, where the three backup addresses are a backup address a, a backup address B, and a backup address C, respectively, and then the disaster recovery system monitors the main address of the address provider in real time through the address detector, inputs characteristic parameters of the main address into the address availability calculation module, outputs a first address availability of 30%, determines that the first address availability is less than a preset availability threshold of 40%, and then the working node of the disaster recovery system acquires the backup address a, the backup address B, and the backup address C of the address user, and second address availability corresponding to the backup address a, the backup address B, and the backup address C, respectively, of 30%, 35%, and 45%.
103, the working node acquires the current address of an address user corresponding to the address provider;
in the embodiment of the present invention, after the working node of the disaster recovery system acquires the primary address, the first address availability rate corresponding to the primary address, the standby address, and the second address availability rate corresponding to the standby address, the working node may acquire the current address of the address user corresponding to the address provider.
And 104, if the second address availability of the standby address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the standby address, so that the address user performs address switching according to the address processing request or maintains the current address.
In the embodiment of the present invention, the comparison relationship between the current address of the address user and the backup address of the address provider may be whether the address name of the current address is the same as the address name of the backup address, the address processing request may include an address switching request and an address holding request, and the address processing request is associated with the comparison relationship.
In a specific implementation, if the second address availability of the standby address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the standby address, so that the address user performs address switching or maintains the current address according to the address processing request.
In an embodiment of the present invention, after acquiring a primary address and a first address availability of an address provider, a disaster recovery system determines that the first address availability of the primary address is greater than or equal to a preset availability threshold, if the first address availability of the primary address is greater than or equal to the preset availability threshold and an address name of a current address is different from an address name of the primary address, it indicates that the current address needs to be switched to the primary address, and if the first address availability of the primary address is greater than or equal to the preset availability threshold but the address name of the current address is the same as the address name of the primary address, it indicates that the current address is the primary address, and then the current address is maintained.
In a specific implementation, the disaster recovery system may obtain a current address name of a current address and a main address name of a main address, and if the current address name is the same as the main address name, may send an address holding request to an address user, so that the address user holds the current address according to the address holding request, and if the current address name is not the same as the main address name, may send an address switching request to the address user, so that the address user switches the current address into the main address according to the address switching request.
Specifically, if the current address name is different from the plurality of main address names, the first address availability rates corresponding to the main address names can be obtained, the main addresses are sorted according to the second address availability rates, the working node selects the main addresses according to the sequence of the main addresses as target main addresses, and an address switching request is sent to an address user, so that the address user switches the current address into the target main addresses according to the address switching request.
As an example, an address provider provides a main address and three backup addresses, where the three backup addresses are a backup address a, a backup address B, and a backup address C, respectively, and then the disaster recovery system monitors the main address of the address provider in real time through an address detector, inputs characteristic parameters of the main address into an address availability calculation module, outputs a first address availability of 50%, determines that the first address availability is greater than a preset availability threshold of 40%, obtains an address name d corresponding to the main address, determines that a current address i is different from the address name d, and sends an address switching request to an address user, and the address user receives the address switching request to switch the current address into the main address.
In another embodiment of the present invention, if the second address availability of the standby address is greater than or equal to the preset availability threshold and the address name of the current address is different from the address name of the standby address, it indicates that the current address needs to be switched to the standby address, and if the second address availability of the standby address is greater than or equal to the preset availability threshold and the address name of the current address is the same as the address name of the standby address, it indicates that the current address is the standby address, and the current address is maintained.
In a specific implementation, the disaster recovery system may obtain a current address name of a current address and a backup address name of a backup address, and if the current address name is the same as the backup address name, may send an address holding request to an address user, so that the address user holds the current address according to the address holding request, and if the current address name is not the same as the backup address name, may send an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request.
Specifically, if the current address name is different from the multiple spare address names, the availability ratios of the second addresses corresponding to the multiple spare address names can be obtained, the spare addresses are sorted according to the availability ratios of the second addresses, the working node selects the spare addresses according to the sequence of the spare addresses as target spare addresses, and an address switching request is sent to an address user, so that the address user switches the current address into the target spare address according to the address switching request.
As an example, the address provider provides a main address and three backup addresses, the three backup addresses are respectively a backup address a, a backup address B, and a backup address C, the disaster recovery system monitors the main address of the address provider in real time through the address detector, inputs characteristic parameters of the main address into the address availability calculation module, outputs a first address availability of 30%, determines that the first address availability is less than a preset availability threshold value of 40%, respectively obtains the backup address a, the backup address B, and the backup address C, and second address availability corresponding to the backup address a, the backup address B, and the backup address C of 35%, 40%, and 50%, determines that the second address availability corresponding to the backup address B and the backup address C is greater than or equal to the preset availability threshold value, then obtains a current address i of the address provider, an address name B of the backup address B, and an address name a of the backup address C, and if the current address i is determined to be different from the address name B and the address name a, sequencing the standby address B and the standby address C according to the size of the availability of the second address: the standby address B is larger than or equal to the standby address C, then the working nodes of the disaster recovery system can acquire the standby addresses B in sequence and use the standby addresses B as target standby addresses, then an address switching request is sent to an address user, and the address user receives the address switching request and switches the current address to the target standby address.
In another embodiment of the present invention, after the disaster recovery system acquires the primary address and determines that the first address availability of the primary address is smaller than the preset availability threshold, the disaster recovery system acquires the backup address and the second availability of the backup address, and if the second address availability of the backup address is smaller than the preset availability threshold, it indicates that the primary address and the backup address of the address provider are unavailable, and the disaster recovery system maintains the current address without address switching.
In the embodiment of the invention, the distributed disaster recovery system comprises a plurality of nodes, a working node of the node acquires a primary address of an address provider and a first address availability of the primary address, compares the first address availability with the primary address with a preset availability threshold, determines that the availability of the primary address is low if the first address availability of the primary address is less than the preset availability threshold, the working node needs to acquire a standby address of the address provider and a second address availability of the standby address and acquires a current address of an address user corresponding to the address provider, and if the second address availability of the standby address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to a comparison relationship between the current address and the standby address so as to enable the address user to perform address switching or maintain the current address according to the address processing request, the address with higher availability is screened out by comparing the first address availability with the second address availability, the current address is compared with the master address or the standby address with higher availability, the working node can send an address processing request to an address provider according to the comparison relation so that the address provider can keep the current address or automatically switch the address, the problem of repeated development of switching the same address is avoided, meanwhile, the address with higher availability is screened out by configuring the availability threshold, and the effectiveness and the availability of address switching are improved by using the address with higher availability.
In order to make the technical solutions of the embodiments of the present invention better understood by those skilled in the art, the embodiments of the present invention are described below by way of an example and with reference to the flowchart shown in fig. 4 of the specification:
s41, the disaster recovery system may use the address detector to monitor the primary address in real time, obtain the characteristic parameter of the primary address, input the characteristic parameter to the address availability calculation module to calculate the first address availability of the primary address, and then determine whether the first address availability is greater than or equal to the preset availability threshold.
And S42, if the first address availability is larger than or equal to the preset availability threshold, judging whether the address name of the primary address is the same as the current address name of the address user, if so, sending an address holding request to an address provider by the disaster recovery system to hold the current address, and if not, sending an address switching request to the address provider by the disaster recovery system to inform the address provider to switch the current address into the primary address.
S43, if the first address availability is smaller than the preset availability threshold, each backup address is monitored in real time, characteristic parameters of each backup address are obtained, the characteristic parameters are input to the address availability calculation module to calculate the second address availability of each backup address, and then whether the second address availability of each backup address is larger than or equal to the preset availability threshold is judged.
And S44, if the second address availability of each backup address is greater than or equal to the preset availability threshold, judging whether the address name of the backup address is the same as the current address name of the address user, if so, sending an address holding request to an address provider by the disaster recovery system to hold the current address, and if not, sending an address switching request to the address provider by the disaster recovery system to inform the address provider of switching the current address into the backup address.
And S45, if the second address availability of each spare address is less than the preset availability threshold, the disaster recovery system sends an address holding request to the address provider to hold the current address.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 5, a block diagram of a distributed disaster recovery system provided in an embodiment of the present invention is shown, where the disaster recovery system includes a plurality of nodes, and may specifically include the following modules:
a first address availability obtaining module 501, configured to obtain, by the work node, a primary address of an address provider and a first address availability of the primary address;
a second address availability obtaining module 502, configured to, if the first address availability of the primary address is smaller than a preset availability threshold, obtain, by the working node, a standby address of the address provider and a second address availability of the standby address;
a current address obtaining module 503, configured to obtain, by the work node, a current address of an address user corresponding to the address provider;
a first address processing module 504, configured to, if a second address availability of the backup address is greater than or equal to the preset availability threshold, send, by the working node, an address processing request to the address user according to a comparison relationship between the current address and the backup address, so that the address user performs address switching according to the address processing request or maintains the current address.
In an optional embodiment of the present invention, the disaster recovery system further includes:
and the second address processing module is used for sending an address processing request to the address user according to the comparison relationship between the current address and the main address if the first address availability of the main address is greater than or equal to a preset availability threshold value, so that the address user performs address switching or maintains the current address according to the address processing request.
In an optional embodiment of the present invention, the address processing request includes an address holding request and an address switching request, and the second address processing module is specifically configured to:
the working node acquires a current address name of the current address and a main address name of the main address;
if the current address name is the same as the main address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the main address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the main address according to the address switching request.
In an optional embodiment of the invention, the first address processing module comprises:
a backup address name obtaining submodule, configured to obtain, by the working node, a current address name of the current address and a backup address name of the backup address;
a current address holding submodule, configured to send, by the working node, an address holding request to the address user if the current address name is the same as the standby address name, so that the address user holds the current address according to the address holding request;
and the current address switching submodule is used for sending an address switching request to the address user by the working node if the current address name is different from the standby address name so as to enable the address user to switch the current address into the standby address according to the address switching request.
In an optional embodiment of the present invention, the current address switching sub-module is specifically configured to:
if the current address name is different from the plurality of standby address names, the working node acquires each second address availability corresponding to the plurality of standby address names and sorts the standby addresses according to the size of each second address availability;
and the working node selects a standby address as a target standby address according to the sequence of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address into the target standby address according to the address switching request.
In an optional embodiment of the present invention, the plurality of nodes further includes at least one standby node, and the disaster recovery system further includes:
and the target working node determining module is used for selecting any one standby node from the at least one standby node as a target working node if the working node is detected to be down.
In an optional embodiment of the present invention, the disaster recovery system further includes:
and the target standby node conversion module is used for automatically converting the working node into the target standby node when the working node recovers to work normally.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In addition, an electronic device is further provided in an embodiment of the present invention, as shown in fig. 6, and includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
the working node acquires a primary address of an address provider and a first address availability of the primary address;
if the first address availability of the main address is smaller than a preset availability threshold value, the working node acquires a standby address of the address provider and a second address availability of the standby address;
the working node acquires the current address of an address user corresponding to the address provider;
if the second address availability of the standby address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the standby address, so that the address user performs address switching or maintains the current address according to the address processing request.
In an optional embodiment of the present invention, further comprising:
if the first address availability of the master address is greater than or equal to a preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the master address, so that the address user performs address switching or maintains the current address according to the address processing request.
In an optional embodiment of the present invention, the address processing request includes an address holding request and an address switching request, and the working node sends the address processing request to the address user according to a comparison relationship between the current address and the primary address, so that the address user performs address switching or holds the current address according to the address processing request, including:
the working node acquires a current address name of the current address and a main address name of the main address;
if the current address name is the same as the main address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the main address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the main address according to the address switching request.
In an optional embodiment of the present invention, the sending, by the working node, an address processing request to the address user according to a comparison relationship between the current address and the backup address, so that the address user performs address switching or maintains the current address according to the address processing request, includes:
the working node acquires a current address name of the current address and a standby address name of the standby address;
if the current address name is the same as the standby address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the standby address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the standby address according to the address switching request.
In an optional embodiment of the present invention, if the current address name is different from the backup address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request, including:
if the current address name is different from the plurality of standby address names, the working node acquires each second address availability corresponding to the plurality of standby address names and sorts the standby addresses according to the size of each second address availability;
and the working node selects a standby address as a target standby address according to the sequence of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address into the target standby address according to the address switching request.
In an optional embodiment of the invention, the number of nodes further comprises at least one backup node, and the method further comprises:
and if the working node is detected to be down, selecting any one standby node from the at least one standby node as a target working node.
In an optional embodiment of the present invention, further comprising:
and when the working node recovers to work normally, the working node is automatically converted into a target standby node.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
As shown in fig. 7, in another embodiment provided by the present invention, a computer-readable storage medium 701 is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the address processing method based on the distributed disaster recovery system described in the foregoing embodiment.
In another embodiment provided by the present invention, a computer program product containing instructions is further provided, which when run on a computer, causes the computer to execute the address processing method based on the distributed disaster recovery system described in the foregoing embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An address processing method based on a distributed disaster recovery system, wherein the distributed disaster recovery system includes a plurality of nodes, and the nodes include working nodes, the method comprising:
the working node acquires a primary address of an address provider and a first address availability of the primary address;
if the first address availability of the main address is smaller than a preset availability threshold value, the working node acquires a standby address of the address provider and a second address availability of the standby address;
the working node acquires the current address of an address user corresponding to the address provider;
if the second address availability of the standby address is greater than or equal to the preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the standby address, so that the address user performs address switching or maintains the current address according to the address processing request.
2. The method of claim 1, further comprising:
if the first address availability of the master address is greater than or equal to a preset availability threshold, the working node sends an address processing request to the address user according to the comparison relationship between the current address and the master address, so that the address user performs address switching or maintains the current address according to the address processing request.
3. The method according to claim 2, wherein the address processing request includes an address holding request and an address switching request, and the working node sends the address processing request to the address user according to the comparison relationship between the current address and the primary address, so that the address user performs address switching or holds the current address according to the address processing request, including:
the working node acquires a current address name of the current address and a main address name of the main address;
if the current address name is the same as the main address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the main address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the main address according to the address switching request.
4. The method according to claim 3, wherein the working node sends an address processing request to the address user according to the comparison relationship between the current address and the backup address, so that the address user performs address switching or maintains the current address according to the address processing request, comprising:
the working node acquires a current address name of the current address and a standby address name of the standby address;
if the current address name is the same as the standby address name, the working node sends an address holding request to the address user, so that the address user holds the current address according to the address holding request;
if the current address name is different from the standby address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the standby address according to the address switching request.
5. The method according to claim 4, wherein if the current address name is not the same as the backup address name, the working node sends an address switching request to the address user, so that the address user switches the current address to the backup address according to the address switching request, and the method comprises:
if the current address name is different from the plurality of standby address names, the working node acquires each second address availability corresponding to the plurality of standby address names and sorts the standby addresses according to the size of each second address availability;
and the working node selects a standby address as a target standby address according to the sequence of the standby addresses, and sends an address switching request to the address user, so that the address user switches the current address into the target standby address according to the address switching request.
6. The method of claim 1, wherein the number of nodes further comprises at least one backup node, the method further comprising:
and if the working node is detected to be down, selecting any one standby node from the at least one standby node as a target working node.
7. The method of claim 6, further comprising:
and when the working node recovers to work normally, the working node is automatically converted into a target standby node.
8. A distributed disaster recovery system, wherein said disaster recovery system comprises a plurality of nodes, said disaster recovery system comprising:
the first address availability rate acquisition module is used for acquiring a main address of an address provider and a first address availability rate of the main address by the working node;
a second address availability rate obtaining module, configured to, if a first address availability rate of the primary address is smaller than a preset availability rate threshold, obtain, by the working node, a backup address of the address provider and a second address availability rate of the backup address;
a current address obtaining module, configured to obtain, by the work node, a current address of an address user corresponding to the address provider;
and the address processing module is used for sending an address processing request to the address user according to the comparison relationship between the current address and the standby address if the second address availability of the standby address is greater than or equal to the preset availability threshold value, so that the address user performs address switching or maintains the current address according to the address processing request.
9. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing a program stored on the memory, implementing the method of any of claims 1-7.
10. A computer-readable storage medium having stored thereon instructions, which when executed by one or more processors, cause the processors to perform the method of any one of claims 1-7.
CN202111621062.0A 2021-12-27 2021-12-27 Address processing method and device, electronic equipment and storage medium Pending CN114422470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111621062.0A CN114422470A (en) 2021-12-27 2021-12-27 Address processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111621062.0A CN114422470A (en) 2021-12-27 2021-12-27 Address processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114422470A true CN114422470A (en) 2022-04-29

Family

ID=81270575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111621062.0A Pending CN114422470A (en) 2021-12-27 2021-12-27 Address processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114422470A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263661A (en) * 2011-07-21 2011-11-30 苏州阔地网络科技有限公司 Backup switching method of user sessions and system thereof
CN102739799A (en) * 2012-07-04 2012-10-17 合一网络技术(北京)有限公司 Distributed communication method in distributed application
WO2018035766A1 (en) * 2016-08-24 2018-03-01 深圳天珑无线科技有限公司 Network abnormality processing method and system
CN111800348A (en) * 2019-04-09 2020-10-20 中兴通讯股份有限公司 Load balancing method and device
CN112217843A (en) * 2019-07-09 2021-01-12 阿里巴巴集团控股有限公司 Service unit switching method, system and equipment
CN112491700A (en) * 2020-12-14 2021-03-12 成都颜创启新信息技术有限公司 Network path adjusting method, system, device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263661A (en) * 2011-07-21 2011-11-30 苏州阔地网络科技有限公司 Backup switching method of user sessions and system thereof
CN102739799A (en) * 2012-07-04 2012-10-17 合一网络技术(北京)有限公司 Distributed communication method in distributed application
WO2018035766A1 (en) * 2016-08-24 2018-03-01 深圳天珑无线科技有限公司 Network abnormality processing method and system
CN111800348A (en) * 2019-04-09 2020-10-20 中兴通讯股份有限公司 Load balancing method and device
CN112217843A (en) * 2019-07-09 2021-01-12 阿里巴巴集团控股有限公司 Service unit switching method, system and equipment
CN112491700A (en) * 2020-12-14 2021-03-12 成都颜创启新信息技术有限公司 Network path adjusting method, system, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US9021065B2 (en) Automated topology formation in dynamic distributed environments
CN108737132B (en) Alarm information processing method and device
TWI701916B (en) Method and device for self-recovering management ability in distributed system
CN111158962B (en) Remote disaster recovery method, device and system, electronic equipment and storage medium
CN107508694B (en) Node management method and node equipment in cluster
JP2002108728A (en) Method for inserting fault information and provider facility
CN109802986B (en) Equipment management method, system, device and server
CN111130835A (en) Data center dual-active system, switching method, device, equipment and medium
CN112333249B (en) Business service system and method
CN112003721B (en) Method and device for realizing high availability of large data platform management node
CN109873714B (en) Cloud computing node configuration updating method and terminal equipment
CN111104239A (en) Hard disk fault processing method, system and device for distributed storage cluster
CN112217847A (en) Micro service platform, implementation method thereof, electronic device and storage medium
Tomás et al. Disaster recovery layer for distributed openstack deployments
CN107426012B (en) Fault recovery method and device based on super-fusion architecture
CN113326100A (en) Cluster management method, device and equipment and computer storage medium
CN114422470A (en) Address processing method and device, electronic equipment and storage medium
CA2241861C (en) A scheme to perform event rollup
CN113254245A (en) Fault detection method and system for storage cluster
CN111309515B (en) Disaster recovery control method, device and system
CN111414247A (en) Server switching method, device, management node and storage medium
CN114338670A (en) Edge cloud platform and three-level cloud control platform for internet traffic with same
CN112948177A (en) Disaster recovery backup method and device, electronic equipment and storage medium
CN114327911A (en) Remote multi-activity implementation method of distributed service cluster and distributed service system
CN108228328B (en) Stream task implementation method and device and electronic equipment

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