CN115801554A - Main/standby switching communication method and device, electronic equipment and storage medium - Google Patents

Main/standby switching communication method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115801554A
CN115801554A CN202211608172.8A CN202211608172A CN115801554A CN 115801554 A CN115801554 A CN 115801554A CN 202211608172 A CN202211608172 A CN 202211608172A CN 115801554 A CN115801554 A CN 115801554A
Authority
CN
China
Prior art keywords
target
node
cluster
equipment
target equipment
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
CN202211608172.8A
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 Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202211608172.8A priority Critical patent/CN115801554A/en
Publication of CN115801554A publication Critical patent/CN115801554A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a communication method and device for main-standby switching, electronic equipment and a storage medium, wherein the method comprises the following steps: when the target equipment is detected to be abnormal, acquiring a target node from a configuration cluster of the target equipment; the target node refers to a node which has undergone main/standby switching; judging whether the target node is a master node or not, and if the target node is judged to be the master node, adding a target address into a routing table of the target equipment; when the target equipment operates again, acquiring the current channel serial number of the target equipment from the log file of the target equipment; resetting the current channel serial number of the target equipment based on the current channel serial number of the opposite-end communication party to obtain a reset channel serial number of the target equipment; the opposite-end communication party establishes a communication relation with the target equipment in advance; and establishing communication between the target equipment and the opposite-end communication party according to the reset channel serial number and the target address of the target equipment.

Description

Main/standby switching communication method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a master/slave switching communication method and apparatus, an electronic device, and a storage medium.
Background
At present, people's daily life is increasingly unable to leave a network, but because equipment for providing communication service is easy to break down, once the equipment breaks down, the network can not normally provide communication service for users, and therefore each equipment for communication service can be backed up, so that when some equipment breaks down, a main-standby switching scheme can be executed in time to switch to standby equipment.
In the prior art, when a network device fails, network data can be manually switched from the failed network device to another intact standby device, so as to realize normal use of communication services.
However, because the active-standby switching is performed manually, the recovery time of the network device is slow, and the network communication rate of the user is affected.
Disclosure of Invention
Based on the defects of the prior art, the application provides a master-slave switching communication method and device, an electronic device and a storage medium, so as to solve the problem that the recovery time of a network device is slow due to the fact that the master-slave switching is executed manually in the prior art.
In order to achieve the above object, the present application provides the following technical solutions:
a first aspect of the present application provides a primary/standby switching communication method, including:
when the target equipment is detected to be abnormal, acquiring a target node from a configuration cluster of the target equipment; the target node refers to a node which has undergone active-standby switching;
judging whether the target node is a main node or not;
if the target node is judged to be the main node, adding a target address in a routing table of the target equipment;
when the target equipment operates again, acquiring the current channel serial number of the target equipment from the log file of the target equipment;
resetting the current channel serial number of the target equipment based on the current channel serial number of the opposite-end communication party to obtain a reset channel serial number of the target equipment; the opposite-end communication party establishes a communication relation with the target equipment in advance;
and establishing communication between the target equipment and the opposite-end communication party according to the reset channel serial number of the target equipment and the target address.
Optionally, in the foregoing master-slave switching communication method, before the obtaining a target node from a configuration cluster of a target device when detecting that the target device is abnormal, the method further includes:
acquiring a target cluster and a target address;
configuring the target address in the target cluster;
taking the configured target cluster as a configuration cluster;
and configuring the configuration cluster on a target device.
Optionally, in the foregoing master-slave switching communication method, after determining whether the target node is a master node, the method further includes:
if the target node is judged to be a non-main node, stopping running the target equipment;
and deleting the target address from the routing table of the target device.
Optionally, in the above communication method for active/standby switching, the obtaining a target node from a configuration cluster of the target device includes:
and acquiring a target node from the configuration cluster of the target equipment by using the election rule in the configuration cluster.
A second aspect of the present application provides a master/slave switching communication device, including:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a target node from a configuration cluster of target equipment when the target equipment is detected to be abnormal; the target node refers to a node which has undergone active-standby switching;
the judging unit is used for judging whether the target node is a main node or not;
an adding unit, configured to add a target address to a routing table of the target device if it is determined that the target node is the master node;
a second obtaining unit, configured to obtain a current channel serial number of the target device from a log file of the target device after the target device is operated again;
the resetting unit is used for resetting the current channel serial number of the target equipment based on the current channel serial number of the opposite-end communication party to obtain the reset channel serial number of the target equipment; the opposite-end communication party establishes a communication relation with the target equipment in advance;
and the establishing unit is used for establishing the communication between the target equipment and the opposite-end communication party according to the reset channel serial number of the target equipment and the target address.
Optionally, in the above primary/secondary switching communication device, the method further includes:
a third obtaining unit, configured to obtain a target cluster and a target address;
a first configuration unit, configured to configure the target address in the target cluster;
the unit is used for taking the configured target cluster as a configuration cluster;
and the second configuration unit is used for configuring the configuration cluster on the target equipment.
Optionally, in the above primary/secondary switching communication device, the method further includes:
a stopping unit, configured to stop running the target device if it is determined that the target node is a non-master node;
and the deleting unit is used for deleting the target address from the routing table of the target equipment.
Optionally, in the foregoing master-slave switching communication apparatus, the first obtaining unit includes:
and the fourth obtaining unit is used for obtaining the target node from the configuration cluster of the target equipment by using the election rule in the configuration cluster.
A third aspect of the present application provides an electronic device comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the processor is specifically configured to implement the active/standby switching communication method according to any one of the above items.
A fourth aspect of the present application provides a computer storage medium for storing a computer program, which when executed, is configured to implement a primary-secondary switching communication method as described in any one of the above.
According to the communication method for master-slave switching, automatic master-slave switching after equipment is abnormal is achieved through the pre-configured cluster. When the target equipment is detected to be abnormal, a target node is obtained from a configuration cluster of the target equipment, wherein the target node refers to a node which has undergone master-slave switching, whether the target node is a master node or not is judged, if the target node is judged to be the master node, a target address is added to a routing table of the target equipment, then after the target equipment operates again, a current channel serial number of the target equipment is obtained from a log file of the target equipment, and then the current channel serial number of the target equipment is reset based on the current channel serial number of an opposite-end communication party, so that a reset channel serial number of the target equipment is obtained. And finally, establishing communication between the target equipment and the opposite-end communication party according to the reset channel serial number and the target address of the target equipment. Therefore, the main-standby switching is not realized in a manual mode, but the abnormal main-standby switching is realized through a pre-configured cluster, so that the abnormal recovery time is effectively shortened, and the network communication efficiency is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a communication method for active/standby switching according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a configuration method for a cluster according to an embodiment of the present application;
fig. 3 is a flowchart of another active-standby switching communication method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a master/slave switching communication device according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In this application, 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 phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
An embodiment of the present application provides a communication method for active/standby switching, which specifically includes the following steps, as shown in fig. 1:
s101, when the target equipment is detected to be abnormal, acquiring a target node from a configuration cluster of the target equipment.
The target node refers to a node which is subjected to active-standby switching. It should be noted that, when it is checked that the target device fails or is restored from a failure to a normal operation, a node in the configuration cluster of the target device may also change (for example, a master node goes down or a new node is added, etc.), at this time, a switching script of the configuration cluster may be triggered to autonomously perform switching between the master node and the standby node for the target device, so that other devices may be used to replace the target device for performing communication, thereby solving the influence of manual intervention and shortening the failure recovery time.
Specifically, the target device refers to websphere mq, where websphere mq is a middleware product oriented to message passing, and differences between different communication protocols can be shielded through websphere mq, so that complexity of network programming can be simplified to the greatest extent. Through the configuration of MQ, the programs of the two communication parties can independently run in a loose coupling mode, the positions and the states of the two communication parties do not need to be concerned, and the two communication parties only need to be contacted with each other in a message-driven or message-triggered mode.
The configuration cluster refers to a keepalive cluster, wherein the keepalive cluster is service software which guarantees high availability of the cluster in cluster management and is used for preventing single-point failure. The Keepalived is used for detecting the state of the server, if one web server is down or works and fails, the Keepalived detects the state, the failed server is removed from the system, meanwhile, other servers are used for replacing the work of the server, and the Keepalived automatically adds the abnormal server into the server group after the abnormal server works normally.
Optionally, in another embodiment of the present application, before step S101, the target device needs to be configured into a cluster in advance, so as shown in fig. 2, a method for configuring a cluster provided in another embodiment of the present application includes the following steps:
s201, acquiring a target cluster and a target address.
Specifically, the target cluster refers to a Keepalived cluster, and the target address refers to a VIP address.
S202, configuring the target address in the target cluster.
It should be noted that, in order to implement high availability of the target device in the target cluster, in this embodiment of the present application, the VIP needs to be configured in the virtual _ ipaddress of the target cluster, that is, the VIP needs to be configured in the configuration file of the target cluster, and meanwhile, the switching script used in the primary/standby switching needs to be configured in the notify _ master and notify _ backup, that is, the configuration file of the target cluster, so that when the target device is abnormal in the following process, the automatic primary/standby switching of the target device is implemented by executing the switching script in the target cluster.
And S203, taking the configured target cluster as a configuration cluster.
And S204, configuring the configuration cluster on the target equipment.
Specifically, keepalive clusters are configured on the websphere mq master/slave device, and meanwhile, configuration files of the configuration clusters need to be stored in a routing table of the target device, so that the keepalive clusters are really configured on the websphere mq master/slave device.
Optionally, in another embodiment of the present application, a specific implementation manner of obtaining the target node from the configuration cluster of the target device in step S101 includes:
and acquiring the target node from the configuration cluster of the target equipment by using the election rule in the configuration cluster.
Specifically, in the keepalive cluster having one master node and a plurality of standby nodes, a master-standby switching node is selected mainly through a node "priority" and a weight value, wherein a node with a higher "priority" becomes the master node in the cluster, and other nodes are all the standby nodes. Optionally, after a common failure occurs in the master node, "indirect election" may be performed between the backup nodes, and then a new service scheme for the master node to dock the cluster is selected according to the calculation of the priority and the weight of the backup nodes.
S102, judging whether the target node is a main node or not.
It should be noted that the target node may carry a flag indicating whether the target node is a master node, so that whether the target node is a master node may be determined based on the flag of the target node. If the target node is determined to be the master node, it means that the slave node is switched to the master node in the configuration cluster of the target device to ensure high availability of the target device, so step S103 needs to be executed,
s103, adding a target address in a routing table of the target device.
It should be noted that when the target device is abnormal, the target device needs to access another device through a new internet access address to implement normal communication, so that the target address needs to be added in the routing table of the target device in advance to implement that the target device accesses the third party.
Specifically, the target address refers to a VIP (virtual IP address), where the VIP is a virtual IP address, and is an IP address that is not connected to a specific computer or a Network Interface Card (NIC) in a computer, and is mainly used to perform switching between different hosts, and one common use case of the virtual IP is application in high availability (HighAvailabilityHA) of a system, and in order to improve high availability of external services of the system, a master-slave mode is used to perform high-availability configuration. When the host machine providing the service is down, the service is switched to the standby machine to continue providing the service to the outside. All the users cannot feel, in this case, the IP address of the system for providing service to the client is a virtual IP, and when the host is down, the virtual IP drifts to the standby machine for continuous use.
And S104, when the target equipment operates again, acquiring the current channel serial number of the target equipment from the log file of the target equipment.
It should be noted that, the target device may replace the target device with another device for communication only after being restarted, but when the target device is restarted, the channel serial number of the target device may be disordered, so that the target device cannot perform communication normally.
And S105, resetting the current channel serial number of the target equipment based on the current channel serial number of the opposite-end communication party to obtain the reset channel serial number of the target equipment.
The opposite-end communication party establishes a communication relation with the target equipment in advance. It should be noted that, when each websphere mq device is configured, a communication relationship is established with another websphere mq device in advance, so as to prevent that, when one of the websphere mq devices is in an abnormal condition, the other websphere mq device may replace the websphere mq device in the abnormal condition to perform communication work, and the channel sequence numbers of the two websphere mq devices are consistent to perform effective communication, therefore, in this embodiment of the present application, step S105 needs to be performed to obtain the reset channel sequence number of the target device that is consistent with the current channel sequence number of the opposite-end communication party.
S106, communication between the target equipment and the opposite-end communication party is established according to the reset channel serial number and the target address of the target equipment.
It should be noted that the channel serial number may enable information to be efficiently and reliably transmitted in a channel, and therefore in the embodiment of the present application, a communication pipe between the target device and the peer-to-peer communication party may be established first based on resetting the channel serial number and the target address, and then the target device may implement communication with the peer-to-peer communication party through the target address, so as to effectively improve reliability and availability of the system, and greatly shorten time for fault recovery, thereby further effectively improving efficiency of network communication, and greatly reducing influence of communication on a user side.
According to the communication method for master-slave switching, automatic master-slave switching after equipment is abnormal is achieved through the pre-configured cluster. When the target equipment is detected to be abnormal, a target node is obtained from a configuration cluster of the target equipment, wherein the target node refers to a node which has undergone master-slave switching, whether the target node is a master node or not is judged, if the target node is judged to be the master node, a target address is added to a routing table of the target equipment, then after the target equipment operates again, a current channel serial number of the target equipment is obtained from a log file of the target equipment, and then the current channel serial number of the target equipment is reset based on the current channel serial number of an opposite-end communication party, so that a reset channel serial number of the target equipment is obtained. And finally, establishing communication between the target equipment and the opposite-end communication party according to the reset channel serial number and the target address of the target equipment. Therefore, the main-standby switching is not realized in a manual mode, but the abnormal main-standby switching is realized through a pre-configured cluster, so that the abnormal recovery time is effectively shortened, and the network communication efficiency is effectively improved.
Another embodiment of the present application provides another active/standby switching communication method, as shown in fig. 3, including the following steps:
s301, when the target device is detected to be abnormal, the target node is obtained from the configuration cluster of the target device.
The target node refers to a node which is subjected to active-standby switching.
It should be noted that, for the specific implementation of step S301, reference may be made to step S101 in the foregoing method embodiment, and details are not described here again.
S302, whether the target node is a main node or not is judged.
It should be noted that, for the specific implementation of step S302, reference may be made to step S102 in the foregoing method embodiment, and details are not described here again.
If it is determined that the target node is the master node, step S305 is executed. If the target node is determined to be a non-master node, step S303 is executed.
And S303, stopping running the target equipment.
It should be noted that, when it is determined that the target node is a non-master node, the target node is determined to be a slave node, and the slave node exists only as a backup form and does not provide any access for communication, so that the target device needs to be stopped from being executed, and unnecessary resource waste is avoided.
S304, deleting the target address from the routing table of the target device.
When configuring the destination device, the destination address is added to the configuration file in the routing table, and the slave node is a node that does not provide any access for communication, and therefore the destination address does not function as an access gateway, and therefore the destination address needs to be deleted from the routing table of the destination device.
S305, adding a target address in a routing table of the target device.
It should be noted that, for the specific implementation of step S305, reference may be made to step S103 in the foregoing method embodiment, and details are not described here again.
S306, when the target device operates again, the current channel serial number of the target device is obtained from the log file of the target device.
It should be noted that, for the specific implementation of step S306, reference may be made to step S104 in the foregoing method embodiment, and details are not described here again.
S307, based on the current channel serial number of the opposite-end communication party, resetting the current channel serial number of the target equipment to obtain the reset channel serial number of the target equipment.
And the opposite-end communication party establishes a communication relation with the target equipment in advance.
It should be noted that, in the specific implementation of step S307, reference may be made to step S105 in the foregoing method embodiment, and details are not described here again.
S308, communication between the target device and the opposite-end communication party is established according to the reset channel serial number and the target address of the target device.
It should be noted that, for the specific implementation of step S308, reference may be made to step S106 in the foregoing method embodiment, and details are not described here again.
Another embodiment of the present application provides a communication device for active/standby switching, as shown in fig. 4, including:
a first obtaining unit 401, configured to obtain a target node from a configuration cluster of a target device when detecting that an abnormality occurs in the target device.
The target node refers to a node where active-standby switching has occurred.
A determining unit 402, configured to determine whether the target node is a master node.
An adding unit 403, configured to add a destination address to the routing table of the destination device if it is determined that the destination node is the master node.
A second obtaining unit 404, configured to obtain a current channel serial number of the target device from a log file of the target device after the target device is restarted.
A resetting unit 405, configured to reset the current channel serial number of the target device based on the current channel serial number of the peer-to-peer communication party, to obtain a reset channel serial number of the target device.
And the opposite-end communication party establishes a communication relation with the target equipment in advance.
The establishing unit 406 is configured to establish communication between the target device and the peer communication party according to the reset channel sequence number and the target address of the target device.
It should be noted that, for the specific working process of the foregoing units in the embodiment of the present application, reference may be made to step S101 to step S106 in the foregoing method embodiment, which is not described herein again.
Optionally, in a communication device for active/standby switching provided in another embodiment of the present application, the method further includes:
and the third acquisition unit is used for acquiring the target cluster and the target address.
A first configuration unit for configuring the target address in the target cluster.
And the unit is used for taking the configured target cluster as a configuration cluster.
And the second configuration unit is used for configuring the configuration cluster on the target equipment.
It should be noted that, for the specific working processes of each unit provided in the foregoing embodiments of the present application, corresponding steps in the foregoing method embodiments may be referred to accordingly, and are not described herein again.
Optionally, in a communication device for active/standby switching provided in another embodiment of the present application, the method further includes:
and the stopping unit is used for stopping running the target equipment if the target node is judged to be the non-main node.
And the deleting unit is used for deleting the target address from the routing table of the target equipment.
It should be noted that, for the specific working processes of each unit provided in the foregoing embodiments of the present application, corresponding steps in the foregoing method embodiments may be correspondingly referred to, and details are not described here again.
Optionally, in a communication device with active/standby switching provided in another embodiment of the present application, a first obtaining unit 401 includes:
and the fourth obtaining unit is used for obtaining the target node from the configuration cluster of the target device by using the election rule in the configuration cluster.
It should be noted that, for the specific working processes of each unit provided in the foregoing embodiments of the present application, corresponding steps in the foregoing method embodiments may be referred to accordingly, and are not described herein again.
Another embodiment of the present application provides an electronic device, as shown in fig. 5, including:
a memory 501 and a processor 502.
The memory 501 is used for storing programs.
The processor 502 is configured to execute a program, and when the program is executed, the program is specifically configured to implement a primary/standby switching communication method according to any of the above-mentioned embodiments.
Another embodiment of the present application provides a computer storage medium, which is used to store a computer program, and when the computer program is executed, the computer program is used to implement a primary/standby switching communication method as provided in any one of the above embodiments.
Computer storage media, including persistent and non-persistent, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A master-slave switching communication method is characterized by comprising the following steps:
when detecting that target equipment is abnormal, acquiring a target node from a configuration cluster of the target equipment; the target node refers to a node which has undergone active-standby switching;
judging whether the target node is a main node or not;
if the target node is judged to be the main node, adding a target address in a routing table of the target equipment;
when the target equipment operates again, acquiring the current channel serial number of the target equipment from the log file of the target equipment;
resetting the current channel serial number of the target equipment based on the current channel serial number of the opposite-end communication party to obtain a reset channel serial number of the target equipment; the opposite-end communication party establishes a communication relation with the target equipment in advance;
and establishing communication between the target equipment and the opposite-end communication party according to the reset channel serial number of the target equipment and the target address.
2. The method according to claim 1, wherein before the obtaining the target node from the configuration cluster of the target device when the target device is detected to be abnormal, the method further comprises:
acquiring a target cluster and a target address;
configuring the target address in the target cluster;
taking the configured target cluster as a configuration cluster;
and configuring the configuration cluster on a target device.
3. The method of claim 1, wherein after determining whether the target node is a master node, further comprising:
if the target node is judged to be a non-main node, stopping running the target equipment;
and deleting the target address from the routing table of the target device.
4. The method of claim 1, wherein obtaining the target node from the configured cluster of target devices comprises:
and acquiring a target node from the configuration cluster of the target equipment by using the election rule in the configuration cluster.
5. A master-slave switching communication device, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a target node from a configuration cluster of target equipment when the target equipment is detected to be abnormal; the target node refers to a node which has undergone active-standby switching;
the judging unit is used for judging whether the target node is a main node or not;
an adding unit, configured to add a target address to a routing table of the target device if it is determined that the target node is the master node;
a second obtaining unit, configured to obtain a current channel serial number of the target device from a log file of the target device after the target device is operated again;
the resetting unit is used for resetting the current channel serial number of the target equipment based on the current channel serial number of the opposite-end communication party to obtain the reset channel serial number of the target equipment; the opposite-end communication party establishes a communication relation with the target equipment in advance;
and the establishing unit is used for establishing the communication between the target equipment and the opposite-end communication party according to the reset channel serial number of the target equipment and the target address.
6. The apparatus of claim 5, further comprising:
a third obtaining unit, configured to obtain a target cluster and a target address;
a first configuration unit, configured to configure the target address in the target cluster;
the unit is used for taking the configured target cluster as a configuration cluster;
and the second configuration unit is used for configuring the configuration cluster on the target equipment.
7. The apparatus of claim 5, further comprising:
a stopping unit, configured to stop running the target device if it is determined that the target node is a non-master node;
and the deleting unit is used for deleting the target address from the routing table of the target equipment.
8. The apparatus of claim 5, wherein the first obtaining unit comprises:
and the fourth obtaining unit is used for obtaining the target node from the configuration cluster of the target equipment by using the election rule in the configuration cluster.
9. An electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the active/standby switching communication method according to any one of claims 1 to 4.
10. A computer storage medium storing a computer program which, when executed, implements a master-slave switching communication method according to any one of claims 1 to 4.
CN202211608172.8A 2022-12-14 2022-12-14 Main/standby switching communication method and device, electronic equipment and storage medium Pending CN115801554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211608172.8A CN115801554A (en) 2022-12-14 2022-12-14 Main/standby switching communication method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211608172.8A CN115801554A (en) 2022-12-14 2022-12-14 Main/standby switching communication method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115801554A true CN115801554A (en) 2023-03-14

Family

ID=85419337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211608172.8A Pending CN115801554A (en) 2022-12-14 2022-12-14 Main/standby switching communication method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115801554A (en)

Similar Documents

Publication Publication Date Title
US11163653B2 (en) Storage cluster failure detection
US9450700B1 (en) Efficient network fleet monitoring
CN106933843B (en) Database heartbeat detection method and device
CN111917846A (en) Kafka cluster switching method, device and system, electronic equipment and readable storage medium
WO2016202051A1 (en) Method and device for managing active and backup nodes in communication system and high-availability cluster
CN107508694B (en) Node management method and node equipment in cluster
CN111130835A (en) Data center dual-active system, switching method, device, equipment and medium
CN112737944B (en) Bfd-based peer-link state detection method, device and medium
WO2017071384A1 (en) Message processing method and apparatus
CN114116912A (en) Method for realizing high availability of database based on Keepalived
CN112887367B (en) Method, system and computer readable medium for realizing high availability of distributed cluster
CN111488247B (en) High availability method and equipment for managing and controlling multiple fault tolerance of nodes
CN113596195B (en) Public IP address management method, device, main node and storage medium
CN111953808A (en) Data transmission switching method of dual-machine dual-active architecture and architecture construction system
CN115801554A (en) Main/standby switching communication method and device, electronic equipment and storage medium
CN111884919B (en) Method, device, equipment and readable medium for clearing invalid virtual IP
CN116302716A (en) Cluster deployment method and device, electronic equipment and computer readable medium
CN112491633B (en) Fault recovery method, system and related components of multi-node cluster
CN114840495A (en) Database cluster split-brain prevention method, storage medium and device
CN109753292B (en) Method and device for deploying multiple applications in multiple single instance database service
JP2006285453A (en) Information processor, information processing method, and information processing program
CN114629778A (en) IP multimedia service fault processing method, electronic equipment and storage medium
CN107783855B (en) Fault self-healing control device and method for virtual network element
CN109617761B (en) Method and device for switching main server and standby server
KR100793446B1 (en) Method for processing fail-over and returning of duplication telecommunication system

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