CN113890817A - Communication optimization method and device - Google Patents

Communication optimization method and device Download PDF

Info

Publication number
CN113890817A
CN113890817A CN202110994883.2A CN202110994883A CN113890817A CN 113890817 A CN113890817 A CN 113890817A CN 202110994883 A CN202110994883 A CN 202110994883A CN 113890817 A CN113890817 A CN 113890817A
Authority
CN
China
Prior art keywords
node
message
identifier
network
disk
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
CN202110994883.2A
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110994883.2A priority Critical patent/CN113890817A/en
Publication of CN113890817A publication Critical patent/CN113890817A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a communication optimization method and a communication optimization device, wherein a first node performs message transmission with a second node through a network communication mode, when a network fault occurs, the first node judges whether the network is recovered to be normal within a preset time, if so, the first node continues to perform message transmission with the second node through a network communication model, if not, the unloading shared storage pool event of a storage pool is not triggered, the network communication mode is switched to a disk communication mode, namely, the message transmission is performed through a pre-established shared communication disk and the second node through the disk communication mode. Therefore, when a fault which cannot be recovered within a preset time occurs in the network, message transmission is realized by pre-establishing a redundant communication link, namely sharing a communication disk, so that the fault tolerance rate of the network fault is increased, the service of the virtual machine in a production environment is enabled to run normally, the influence of unavailability of a storage pool caused by the network fault is reduced, and the high availability of the cluster is realized.

Description

Communication optimization method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a communication optimization method and apparatus.
Background
The shared storage pool of the virtualization management platform adopts an Oracle Cluster File System Version 2 (OCFS 2) to realize shared storage, wherein the OCFS2 has the key characteristics of providing File concurrent access control and ensuring integrity, so that the server can access the local File System without considering the problem of data concurrency.
The Distributed Lock Manager (DLM) is a key for implementing file access control, and through a Lock interface provided by the Distributed Lock Manager, consistent access to files is ensured, and the integrity of data reading and writing is ensured.
In the related technology, the mutual communication among the DLM nodes depends on the management network to perform network communication so as to synchronize the lock messages, including operations of lock message query, remote lock acquisition, lock degradation and the like. However, when a network failure occurs, such as a network outage, an IP conflict, and the like, an offload shared storage pool (fence umount) event of the storage pool is triggered after more than 120 seconds, so that the storage on the node is unavailable, and problems such as a downtime, a service interruption, and the like occur, and the high availability of the cluster cannot be realized.
Disclosure of Invention
In order to solve the above problems, the present application provides a communication optimization method and apparatus, which are used to avoid a nonce umount event from occurring when a network failure occurs, and ensure high availability of a cluster.
Based on this, the embodiment of the application discloses the following technical scheme:
in one aspect, an embodiment of the present application provides a communication optimization method, where a shared communication disk is created in advance, the shared communication disk is used for performing message transmission between multiple nodes in a disk communication mode, where the multiple nodes include a first node and a second node, and the method includes:
the first node transmits messages with the second node through a network communication mode;
if the network fault occurs, the first node judges whether the network is recovered to be normal within a preset time;
if so, the first node transmits a message with the second node through the network communication mode; if not, the first node switches the network communication mode to the disk communication mode, and performs message transmission with the second node by using the shared communication disk.
Optionally, the shared communication disk includes a plurality of message slots, where the message slots are used to store unprocessed messages of the nodes, and the performing, by using the shared communication disk, message transmission with the second node includes:
the first node writes a sending message into a message slot corresponding to the second node;
the first node polling the first node for unprocessed messages;
and if the first node acquires the return message of the second node aiming at the sent message, ending the message transmission with the second node.
Optionally, the writing, by the first node, a sending message into the message slot corresponding to the second node includes:
the first node writes a sending message into the message slot corresponding to the second node according to the identifier of the message slot corresponding to the second node; the identifier of the message slot corresponding to the second node comprises a target node identifier and a target channel identifier, the target node identifier is the node identifier of the second node, and the target channel identifier is the channel identifier of the channel used by the first node to send the sending message to the second node.
Optionally, the message slot corresponding to the second node includes a plurality of sub message slots, where different sub message slots are used to store different sending messages sent by the first node to the second node, and the writing of the sending message by the first node into the message slot corresponding to the second node includes:
the first node writes a sending message into a message slot corresponding to the second node according to the identifier of the sub-message slot in the message slot corresponding to the second node; the identifier of the sub-message slot in the message slot corresponding to the second node comprises a target node identifier, a target channel identifier and a message sending sequence, wherein the target node identifier is the node identifier of the second node, the target channel identifier is the channel identifier of the channel used by the first node for sending the message to the second node, and the message sending sequence is the sequence of a plurality of messages sent by the first node to the second node.
Optionally, the method further includes:
in the process that the first node utilizes the shared communication disk to transmit messages with the second node, the first node judges whether the network is normal or not;
if so, the first node switches the disk communication mode to the network communication mode, and performs message transmission with the second node through the network communication mode; and if not, the shared communication disk is utilized to transmit the message with the second node.
In another aspect, an embodiment of the present application provides a communication optimization apparatus, where the apparatus includes: the system comprises a pre-establishing module, a first message transmission module, a judging module and a second message transmission module;
the pre-establishing module is used for pre-establishing a shared communication disk, the shared communication disk is used for message transmission among a plurality of nodes in a disk communication mode, and the plurality of nodes comprise a first node and a second node;
the first message transmission module is configured to perform message transmission between the first node and the second node through a network communication mode;
the judging module is used for judging whether the network is recovered to be normal within a preset time by the first node if the network fails;
the first message transmission module is configured to, if the network recovers to be normal within the preset time, perform message transmission between the first node and the second node through the network communication mode;
the second message transmission module is configured to, if the network does not return to normal within the preset time, switch the network communication mode to the disk communication mode by the first node, and perform message transmission with the second node by using the shared communication disk.
Optionally, the shared communication disk includes a plurality of message slots, where the message slots are used to store unprocessed messages of the nodes, and the second message transmission module is used to:
the first node writes a sending message into a message slot corresponding to the second node;
the first node polling the first node for unprocessed messages;
and if the first node acquires the return message of the second node aiming at the sent message, ending the message transmission with the second node.
Optionally, the second message transmission module is configured to:
the first node writes a sending message into the message slot corresponding to the second node according to the identifier of the message slot corresponding to the second node; the identifier of the message slot corresponding to the second node comprises a target node identifier and a target channel identifier, the target node identifier is the node identifier of the second node, and the target channel identifier is the channel identifier of the channel used by the first node to send the sending message to the second node.
Optionally, the message slot corresponding to the second node includes a plurality of sub message slots, different sub message slots are used to store different sending messages sent by the first node to the second node, and the first message transmission module is configured to:
the first node writes a sending message into a message slot corresponding to the second node according to the identifier of the sub-message slot in the message slot corresponding to the second node; the identifier of the sub-message slot in the message slot corresponding to the second node comprises a target node identifier, a target channel identifier and a message sending sequence, wherein the target node identifier is the node identifier of the second node, the target channel identifier is the channel identifier of the channel used by the first node for sending the message to the second node, and the message sending sequence is the sequence of a plurality of messages sent by the first node to the second node.
Optionally, the determining module is further configured to:
in the process that the first node utilizes the shared communication disk to transmit messages with the second node, the first node judges whether the network is normal or not;
the second message transmission module is configured to, if the network is recovered to be normal, switch the disk communication mode to the network communication mode by the first node, and perform message transmission with the second node through the network communication mode;
and the first message transmission module is used for transmitting the message with the second node by using the shared communication disk if the network is not recovered to be normal.
Compared with the prior art, the technical scheme of the application has the advantages that:
the method comprises the steps that a first node transmits messages with a second node through a network communication mode, when a network fault occurs, the first node judges whether the network is recovered to be normal within preset time, if yes, the first node continues to transmit the messages with the second node through a network communication model, if not, the unloading shared storage pool event of a storage pool is not triggered, the network communication mode is switched to a disk communication mode, and the messages are transmitted with the second node through a pre-established shared communication disk through the disk communication mode. Therefore, when a fault which cannot be recovered within a preset time occurs in the network, message transmission is realized by pre-establishing a redundant communication link, namely sharing a communication disk, so that the fault tolerance rate of the network fault is increased, the service of the virtual machine in a production environment is enabled to run normally, the influence of unavailability of a storage pool caused by the network fault is reduced, and the high availability of the cluster is realized.
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 described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a communication optimization method provided in the present application;
fig. 2 is a schematic diagram of a shared communication disk including a plurality of message slots according to an embodiment of the present application;
fig. 3 is a schematic diagram of a communication optimization apparatus provided in the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the 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.
A communication optimization method provided in the embodiment of the present application is described below with reference to fig. 1. Referring to fig. 1, which is a flowchart of a communication optimization method provided in the present application, the method may include the following steps 101-104.
S101: the first node performs message transmission with the second node through a network communication mode.
The first node transmits messages to the second node through a network communication mode, such as a Transmission Control Protocol/Internet Protocol (TCP/IP) network, so as to ensure a higher communication rate and reduce message delay.
Any transmission mode may be selected for message transmission, and the present application is not particularly limited.
S102: if the network fault occurs, the first node judges whether the network is recovered to be normal within the preset time, if so, the S103 is executed; if not, S104 is executed.
If a network fault occurs, for example, the sent network data packet is not processed in time, the quality of network communication is less than a quality threshold, the state of the network device is in a down state, and the like, so that the message transmission between the first node and the second node fails, at this time, it may be determined whether the network can be recovered to normal within a preset time.
The preset time represents the maximum interruption time that can be tolerated in the message process, such as 30 seconds, and the first node and the second node have not completed message transmission beyond the preset time, which may affect the overall operation state of the cluster system.
S103: the first node performs message transmission with the second node through a network communication mode.
And if the network recovery is successful, the first node continues to adopt the network communication mode to carry out message transmission with the second node.
S104: the first node switches the network communication mode into a disk communication mode, and performs message transmission with the second node by using the shared communication disk.
If the network is not successfully recovered, the message transmission needs to be performed in a mode with higher reliability, that is, the network communication mode is switched to the disk communication mode, and the first node performs message transmission with the second node through the pre-established shared communication disk.
It should be noted that, in order to implement message transmission between multiple nodes through a disk communication mode, when creating a File Storage (CFS) Storage domain, a node, a shared data disk for storing data, and a shared communication disk for message transmission between multiple nodes through a disk communication mode may be selected. And reserving the disk communication space of the node on the shared communication disk through a formatting stage.
As a possible implementation manner, the shared communication disk includes a plurality of message slots, each message slot stores unprocessed messages of a node (such as the first node or the second node), and the following description specifically describes that the first node performs message transmission with the second node by using the shared communication disk.
S1041: and the first node writes the sending message into a message slot corresponding to the second node.
When the first node wants to send the sending message to the second node through the disk communication mode, the sending message is written into a message slot corresponding to the second node, and the second node is waited for processing.
And the second node reads the sending message sent by the first node from the corresponding message slot, processes the message and writes the return message aiming at the sending message into the message slot corresponding to the first node.
S1042: the first node polls the first node for unprocessed messages.
The first node polls its unprocessed messages from the corresponding message slot, i.e., messages that other nodes (e.g., the second node) sent to the first node but the first node has not yet been processed.
S1043: and if the first node acquires a return message of the second node aiming at the sent message, ending the message transmission with the second node.
And if the first node acquires a return message of the second node aiming at the sent message, the message transmission between the first node and the second node is finished, and one-time message communication is completed.
According to the technical scheme, the first node performs message transmission with the second node through a network communication mode, when a network fault occurs, the first node judges whether the network is recovered to be normal within preset time, if so, the first node continues to perform message transmission with the second node through a network communication model, if not, the unloading shared storage pool event of the storage pool is not triggered, the network communication mode is switched to a disk communication mode, and the message transmission is performed with the second node through a pre-established shared communication disk through the disk communication mode. Therefore, when a fault which cannot be recovered within a preset time occurs in the network, message transmission is realized by pre-establishing a redundant communication link, namely sharing a communication disk, so that the fault tolerance rate of the network fault is increased, the service of the virtual machine in a production environment is enabled to run normally, the influence of unavailability of a storage pool caused by the network fault is reduced, and the high availability of the cluster is realized.
As a possible implementation, each node includes a plurality of message slots, and different message slots are used for storing messages used by the node for message transmission with different nodes. Referring to fig. 2, this figure is a schematic diagram of a shared communication disk including multiple message slots according to an embodiment of the present application. In fig. 2, message transmission is performed between 5 nodes in a disk mode, and the following description will be given taking as an example message transmission between node3 (first node) and node1 (second node) in a disk mode.
If the node3 performs message transmission with the node1 in the disk mode, the node3 writes the sending message into the message slot a corresponding to the node1 according to the identifier of the message slot a. The identifier of the message slot a includes a target node identifier and a target channel identifier, where the target node identifier is a node identifier of the node1, such as node1, and the target channel identifier is a channel identifier corresponding to the channel 3 used by the node3 to send the message to the node1, such as ch 3.
Further, if each message slot includes a plurality of sub message slots, different sub message slots are used for storing different sending messages sent by the first node to the second node, with reference to fig. 2, taking message slot B as an example, the message slot is used for receiving a sending message sent by node 4 at node 1. Message slot B includes N sub-message slots, with the other message slots working in the same way.
At this time, if the node3 performs message transmission with the node1 in the disk mode, the node3 writes the transmission message into the sub-message slot0 in the message slot corresponding to the node1 according to the identifier of the sub-message slot (for example, the sub-message slot 0) in the message slot corresponding to the node 1. The identifier of the sub-message slot0 includes a target node identifier, a target channel identifier, and a message sending sequence, where the target node identifier is a node identifier of the node1, such as node1, the target channel identifier is a channel identifier corresponding to the channel 3 used by the node3 to send the send message to the node1, such as ch3, if the send message is the first message sent by the node3 to the node1, the message sending sequence may be represented as slot0, and if the send message is the first message sent by the node3 to the node1, the message sending sequence may be represented as slot 1. The concurrent transmission of the messages can be realized by the plurality of sub-message slots and the matching of the sending message sequence.
As a possible implementation manner, in the process of executing S104, that is, in the process of performing message transmission between the first node and the second node by using the shared communication disk, the first node determines whether the network is recovered to be normal, for example, the network communication mode is an o2net module in the kernel, the o2net module continuously and periodically establishes socket connection, after the network is recovered, the o2net module establishes socket connection and successfully performs handshake, at this time, the disk communication mode may be switched to the network communication mode, and the first node performs message transmission with the second node through the network communication mode. And if the network cannot be recovered, the first node continues to utilize the shared communication disk to carry out message transmission with the second node.
As a possible implementation manner, if the first node and the second node cannot perform message transmission in the disk communication mode for more than a certain period of time, for example, 120 seconds, in the process of executing S104, the nonce umount event is executed.
In order to make the technical solutions provided by the embodiments of the present application clearer, the following describes an example of a communication optimization method provided by the embodiments of the present application with reference to fig. 2.
The node3 transmits a first sending message to the node1 through a network communication mode, if the node3 detects that the network fails and the network cannot recover to normal within 30 seconds, the node3 switches the network communication mode to a disk communication mode at this time, the node3 writes the first sending message into a message slot corresponding to the identifier [ node1, ch3, slot0], wherein the slot0 is the 0 th sub message slot included in the message slot a, the node3 finishes sending the first sending message, and if a second sending message is sent to the node1 again, the node3 writes the second sending message into a message slot corresponding to the identifier [ node1, ch3, slot1 ].
When the node1 detects that the network for transmitting messages with the node3 fails and the network cannot be recovered to normal within 30 seconds, the node1 puts the message slot a into the round-robin list to start polling, reads a first sending message sent by the node3 from a sub-message slot corresponding to [ node1, ch3, slot0], and writes a first return message for the first sending message into a message slot corresponding to the identifier [ node3, ch1, slot0] after the first sending message is processed. And if the second sending message is read from the sub message slot corresponding to the identifier [ node1, ch3, slot1], after the second sending message is processed, writing the second return message aiming at the second sending message into the message slot corresponding to the identifier [ node3, ch1, slot1 ].
In addition to the communication optimization method provided in the embodiments of the present application, a communication optimization apparatus is also provided, as shown in fig. 3, the apparatus includes: a pre-establishing module 301, a first message transmission module 302, a judging module 303 and a second message transmission module 304;
the pre-establishing module 301 is configured to pre-establish a shared communication disk, where the shared communication disk is used for performing message transmission between multiple nodes in a disk communication mode, and the multiple nodes include a first node and a second node;
the first message transmission module 302 is configured to perform message transmission between the first node and the second node through a network communication mode;
the determining module 303 is configured to, if a network failure occurs, determine, by the first node, whether the network is recovered to be normal within a preset time;
the first message transmission module 302 is configured to, if the network recovers to be normal within the preset time, perform message transmission between the first node and the second node through the network communication mode;
the second message transmission module 304 is configured to, if the network does not return to normal within the preset time, switch the network communication mode to the disk communication mode by the first node, and perform message transmission with the second node by using the shared communication disk.
As a possible implementation manner, the shared communication disk includes a plurality of message slots, where the message slots are used to store unprocessed messages of the nodes, and the second message transmission module 304 is configured to:
the first node writes a sending message into a message slot corresponding to the second node;
the first node polling the first node for unprocessed messages;
and if the first node acquires the return message of the second node aiming at the sent message, ending the message transmission with the second node.
As a possible implementation manner, the second message transmission module 304 is configured to:
the first node writes a sending message into the message slot corresponding to the second node according to the identifier of the message slot corresponding to the second node; the identifier of the message slot corresponding to the second node comprises a target node identifier and a target channel identifier, the target node identifier is the node identifier of the second node, and the target channel identifier is the channel identifier of the channel used by the first node to send the sending message to the second node.
As a possible implementation manner, the message slot corresponding to the second node includes a plurality of sub message slots, different sub message slots are used to store different sending messages sent by the first node to the second node, and the first message transmission module 302 is configured to:
the first node writes a sending message into a message slot corresponding to the second node according to the identifier of the sub-message slot in the message slot corresponding to the second node; the identifier of the sub-message slot in the message slot corresponding to the second node comprises a target node identifier, a target channel identifier and a message sending sequence, wherein the target node identifier is the node identifier of the second node, the target channel identifier is the channel identifier of the channel used by the first node for sending the message to the second node, and the message sending sequence is the sequence of a plurality of messages sent by the first node to the second node.
As a possible implementation manner, the determining module 303 is further configured to:
in the process that the first node utilizes the shared communication disk to transmit messages with the second node, the first node judges whether the network is normal or not;
the second message transmission module 304 is configured to, if the network is recovered to be normal, switch the disk communication mode to the network communication mode by the first node, and perform message transmission with the second node through the network communication mode;
the first message transmission module 302 is configured to, if the network is not recovered to be normal, perform message transmission with the second node by using the shared communication disk.
According to the technical scheme, the first node performs message transmission with the second node through a network communication mode, when a network fault occurs, the first node judges whether the network is recovered to be normal within preset time, if so, the first node continues to perform message transmission with the second node through a network communication model, if not, the unloading shared storage pool event of the storage pool is not triggered, the network communication mode is switched to a disk communication mode, and the message transmission is performed with the second node through a pre-established shared communication disk through the disk communication mode. Therefore, when a fault which cannot be recovered within a preset time occurs in the network, message transmission is realized by pre-establishing a redundant communication link, namely sharing a communication disk, so that the fault tolerance rate of the network fault is increased, the service of the virtual machine in a production environment is enabled to run normally, the influence of unavailability of a storage pool caused by the network fault is reduced, and the high availability of the cluster is realized.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the units and modules described as separate components may or may not be physically separate. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is directed to embodiments of the present application and it is noted that numerous modifications and adaptations may be made by those skilled in the art without departing from the principles of the present application and are intended to be within the scope of the present application.

Claims (10)

1. A communication optimization method is characterized in that a shared communication disk is created in advance, the shared communication disk is used for message transmission among a plurality of nodes in a disk communication mode, the plurality of nodes comprise a first node and a second node, and the method comprises the following steps:
the first node transmits messages with the second node through a network communication mode;
if the network fault occurs, the first node judges whether the network is recovered to be normal within a preset time;
if so, the first node transmits a message with the second node through the network communication mode; if not, the first node switches the network communication mode to the disk communication mode, and performs message transmission with the second node by using the shared communication disk.
2. The method of claim 1, wherein the shared communication disk includes a plurality of message slots, and wherein the message slots are used for storing unprocessed messages of the nodes, and wherein the using the shared communication disk for message transmission with the second node comprises:
the first node writes a sending message into a message slot corresponding to the second node;
the first node polling the first node for unprocessed messages;
and if the first node acquires the return message of the second node aiming at the sent message, ending the message transmission with the second node.
3. The method of claim 2, wherein the first node writes a send message into a message slot corresponding to the second node, comprising:
the first node writes a sending message into the message slot corresponding to the second node according to the identifier of the message slot corresponding to the second node; the identifier of the message slot corresponding to the second node comprises a target node identifier and a target channel identifier, the target node identifier is the node identifier of the second node, and the target channel identifier is the channel identifier of the channel used by the first node to send the sending message to the second node.
4. The method of claim 2, wherein the message slot corresponding to the second node comprises a plurality of sub-message slots, different sub-message slots are used for storing different sending messages sent by the first node to the second node, and the first node writes the sending messages into the message slot corresponding to the second node, including:
the first node writes a sending message into a message slot corresponding to the second node according to the identifier of the sub-message slot in the message slot corresponding to the second node; the identifier of the sub-message slot in the message slot corresponding to the second node comprises a target node identifier, a target channel identifier and a message sending sequence, wherein the target node identifier is the node identifier of the second node, the target channel identifier is the channel identifier of the channel used by the first node for sending the message to the second node, and the message sending sequence is the sequence of a plurality of messages sent by the first node to the second node.
5. The method according to any one of claims 1-4, further comprising:
in the process that the first node utilizes the shared communication disk to transmit messages with the second node, the first node judges whether the network is normal or not;
if so, the first node switches the disk communication mode to the network communication mode, and performs message transmission with the second node through the network communication mode; and if not, the shared communication disk is utilized to transmit the message with the second node.
6. An apparatus for communication optimization, the apparatus comprising: the system comprises a pre-establishing module, a first message transmission module, a judging module and a second message transmission module;
the pre-establishing module is used for pre-establishing a shared communication disk, the shared communication disk is used for message transmission among a plurality of nodes in a disk communication mode, and the plurality of nodes comprise a first node and a second node;
the first message transmission module is configured to perform message transmission between the first node and the second node through a network communication mode;
the judging module is used for judging whether the network is recovered to be normal within a preset time by the first node if the network fails;
the first message transmission module is configured to, if the network recovers to be normal within the preset time, perform message transmission between the first node and the second node through the network communication mode;
the second message transmission module is configured to, if the network does not return to normal within the preset time, switch the network communication mode to the disk communication mode by the first node, and perform message transmission with the second node by using the shared communication disk.
7. The apparatus of claim 6, wherein the shared communication disk comprises a plurality of message slots, and wherein the message slots are configured to store unprocessed messages for the nodes, and wherein the second message transmission module is configured to:
the first node writes a sending message into a message slot corresponding to the second node;
the first node polling the first node for unprocessed messages;
and if the first node acquires the return message of the second node aiming at the sent message, ending the message transmission with the second node.
8. The apparatus of claim 7, wherein the second message transmission module is configured to:
the first node writes a sending message into the message slot corresponding to the second node according to the identifier of the message slot corresponding to the second node; the identifier of the message slot corresponding to the second node comprises a target node identifier and a target channel identifier, the target node identifier is the node identifier of the second node, and the target channel identifier is the channel identifier of the channel used by the first node to send the sending message to the second node.
9. The apparatus of claim 7, wherein the message slot corresponding to the second node comprises a plurality of sub-message slots, different sub-message slots are used for storing different sending messages sent by the first node to the second node, and the first message transmission module is configured to:
the first node writes a sending message into a message slot corresponding to the second node according to the identifier of the sub-message slot in the message slot corresponding to the second node; the identifier of the sub-message slot in the message slot corresponding to the second node comprises a target node identifier, a target channel identifier and a message sending sequence, wherein the target node identifier is the node identifier of the second node, the target channel identifier is the channel identifier of the channel used by the first node for sending the message to the second node, and the message sending sequence is the sequence of a plurality of messages sent by the first node to the second node.
10. The apparatus according to any one of claims 6-9, wherein the determining module is further configured to:
in the process that the first node utilizes the shared communication disk to transmit messages with the second node, the first node judges whether the network is normal or not;
the second message transmission module is configured to, if the network is recovered to be normal, switch the disk communication mode to the network communication mode by the first node, and perform message transmission with the second node through the network communication mode;
and the first message transmission module is used for transmitting the message with the second node by using the shared communication disk if the network is not recovered to be normal.
CN202110994883.2A 2021-08-27 2021-08-27 Communication optimization method and device Pending CN113890817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110994883.2A CN113890817A (en) 2021-08-27 2021-08-27 Communication optimization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110994883.2A CN113890817A (en) 2021-08-27 2021-08-27 Communication optimization method and device

Publications (1)

Publication Number Publication Date
CN113890817A true CN113890817A (en) 2022-01-04

Family

ID=79011181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110994883.2A Pending CN113890817A (en) 2021-08-27 2021-08-27 Communication optimization method and device

Country Status (1)

Country Link
CN (1) CN113890817A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117459372A (en) * 2023-11-22 2024-01-26 深圳计算科学研究院 Fault processing method, device, equipment and medium for network connection

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090063486A1 (en) * 2007-08-29 2009-03-05 Dhairesh Oza Data replication using a shared resource
CN109246182A (en) * 2018-07-26 2019-01-18 郑州云海信息技术有限公司 A kind of Distributed Lock Manager and its implementation
CN111756826A (en) * 2020-06-12 2020-10-09 浪潮电子信息产业股份有限公司 DLM lock information transmission method and related device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090063486A1 (en) * 2007-08-29 2009-03-05 Dhairesh Oza Data replication using a shared resource
CN109246182A (en) * 2018-07-26 2019-01-18 郑州云海信息技术有限公司 A kind of Distributed Lock Manager and its implementation
CN111756826A (en) * 2020-06-12 2020-10-09 浪潮电子信息产业股份有限公司 DLM lock information transmission method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117459372A (en) * 2023-11-22 2024-01-26 深圳计算科学研究院 Fault processing method, device, equipment and medium for network connection

Similar Documents

Publication Publication Date Title
US7518983B2 (en) Proxy response apparatus
CN110601903B (en) Data processing method and device based on message queue middleware
CN110032478B (en) Method, device and system for real-time synchronization of data of main and standby centers and storage medium
US20130205017A1 (en) Computer failure monitoring method and device
CN102394914A (en) Cluster brain-split processing method and device
CN109639512B (en) Hot backup method of VTS multi-sensor information comprehensive processing system
CN113965578B (en) Election method, device, equipment and storage medium of master node in cluster
CN112612769A (en) File processing method, device and storage medium
CN107357800A (en) A kind of database High Availabitity zero loses solution method
CN111355569A (en) Time synchronization method, device, system, node and readable storage medium
CN113890817A (en) Communication optimization method and device
CN112564990B (en) Management method for switching audio management server
EP2774323B1 (en) Method, communication system and non-transitory computer readable medium for optimizing network performance after a temporary loss of connection
CN117370316A (en) High availability management method and device for database, electronic equipment and storage medium
CN113794765A (en) Gate load balancing method and device based on file transmission
CN110351122B (en) Disaster recovery method, device, system and electronic equipment
CN111241200B (en) Master-slave synchronous processing method and device based on SQLite database
CN111756826A (en) DLM lock information transmission method and related device
CN112491633B (en) Fault recovery method, system and related components of multi-node cluster
CN114422335A (en) Communication method, communication device, server and storage medium
CN114301763A (en) Distributed cluster fault processing method and system, electronic device and storage medium
CN110890989A (en) Channel connection method and device
CN110716827A (en) Hot backup method suitable for distributed system and distributed system
KR100793446B1 (en) Method for processing fail-over and returning of duplication telecommunication system
CN115643237B (en) Data processing system for conference

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