[go: up one dir, main page]

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.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan 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 Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan 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.一种通信优化方法,其特征在于,预先创建共享通信磁盘,所述共享通信磁盘用于多个节点间通过磁盘通信模式进行消息传输,所述多个节点包括第一节点和第二节点,所述方法包括:1. A communication optimization method, characterized in that a shared communication disk is created in advance, and the shared communication disk is used for message transmission between multiple nodes through a disk communication mode, and the multiple nodes include a first node and a second node. , the method includes: 所述第一节点通过网络通信模式与所述第二节点进行消息传输;The first node performs message transmission with the second node through a network communication mode; 若出现网络故障,所述第一节点判断预设时间内所述网络是否恢复正常;If a network failure occurs, the first node determines whether the network is back to normal within a preset time; 若是,则所述第一节点通过所述网络通信模式与所述第二节点进行消息传输;若否,所述第一节点将所述网络通信模式切换为所述磁盘通信模式,利用所述共享通信磁盘与所述第二节点进行消息传输。If yes, the first node performs message transmission with the second node through the network communication mode; if not, the first node switches the network communication mode to the disk communication mode, using the shared The communication disk performs message transmission with the second node. 2.根据权利要求1所述的方法,其特征在于,所述共享通信磁盘中包括多个消息槽,所述消息槽用于存储所述节点的未处理消息,所述利用所述共享通信磁盘与所述第二节点进行消息传输,包括:2 . The method according to claim 1 , wherein the shared communication disk includes a plurality of message slots, the message slots are used to store unprocessed messages of the node, and the use of the shared communication disk Perform message transmission with the second node, including: 所述第一节点将发送消息写入所述第二节点对应的消息槽;The first node writes the sending message into the message slot corresponding to the second node; 所述第一节点轮询所述第一节点的未处理消息;the first node polls the first node for unprocessed messages; 若所述第一节点获取所述第二节点针对于所述发送消息的返回消息,结束本次与所述第二节点的消息传输。If the first node obtains the return message from the second node for the sent message, the message transmission with the second node ends this time. 3.根据权利要求2所述的方法,其特征在于,所述第一节点将发送消息写入所述第二节点对应的消息槽,包括:3. The method according to claim 2, wherein the first node writes the sending message into the message slot corresponding to the second node, comprising: 所述第一节点根据所述第二节点对应的消息槽的标识,将发送消息写入所述第二节点对应的消息槽;所述第二节点对应的消息槽的标识包括目标节点标识和目标通道标识,所述目标节点标识为所述第二节点的节点标识,所述目标通道标识为所述第一节点发送所述发送消息给所述第二节点所用通道的通道标识。The first node writes the 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 includes the target node identifier and the 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.根据权利要求2所述的方法,其特征在于,所述第二节点对应的消息槽包括多个子消息槽,不同的子消息槽用于存储所述第一节点发送给所述第二节点的不同的发送消息,所述第一节点将发送消息写入所述第二节点对应的消息槽,包括:4 . The method according to claim 2 , wherein the message slot corresponding to the second node comprises a plurality of sub-message slots, and different sub-message slots are used to store the messages sent by the first node to the second node. 5 . different sending messages, the first node writes the sending message into the message slot corresponding to the second node, including: 所述第一节点根据所述第二节点对应的消息槽中子消息槽的标识,将发送消息写入所述第二节点对应的消息槽;所述第二节点对应的消息槽中子消息槽的标识包括目标节点标识、目标通道标识和发送消息顺序,所述目标节点标识为所述第二节点的节点标识,所述目标通道标识为所述第一节点发送所述发送消息给所述第二节点所用通道的通道标识,所述发送消息顺序为所述第一节点发送给所述第二节点的多条发送消息的顺序。The first node writes the sent message into the 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 sub-message slot in the message slot corresponding to the second node The identifier includes the target node identifier, the target channel identifier and the sequence of sending messages, the target node identifier is the node identifier of the second node, and the target channel identifier is the first node sending the sending message to the first node. The channel identifier of the channel used by the two nodes, and the sequence of sending messages is the sequence of multiple sending messages sent by the first node to the second node. 5.根据权利要求1-4任意一项所述的方法,其特征在于,所述方法还包括:5. The method according to any one of claims 1-4, wherein the method further comprises: 在所述第一节点利用所述共享通信磁盘与所述第二节点进行消息传输的过程中,所述第一节点判断所述网络是否恢复正常;During the process that the first node uses the shared communication disk to transmit a message with the second node, the first node determines whether the network is back to normal; 若是,则所述第一节点将所述磁盘通信模式切换为所述网络通信模式,通过所述网络通信模式与所述第二节点进行消息传输;若否,则利用所述共享通信磁盘与所述第二节点进行消息传输。If yes, then 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; if not, uses the shared communication disk to communicate with all The second node performs message transmission. 6.一种通信优化装置,其特征在于,所述装置包括:预先建立模块、第一消息传输模块、判断模块和第二消息传输模块;6. A communication optimization device, characterized in that the device comprises: a pre-establishment module, a first message transmission module, a judgment module and a second message transmission module; 所述预先建立模块,用于预先创建共享通信磁盘,所述共享通信磁盘用于多个节点间通过磁盘通信模式进行消息传输,所述多个节点包括第一节点和第二节点;The pre-establishing module is used to pre-create a shared communication disk, and the shared communication disk is used for message transmission between multiple nodes through a disk communication mode, and the multiple nodes include a first node and a second node; 所述第一消息传输模块,用于所述第一节点通过网络通信模式与所述第二节点进行消息传输;the first message transmission module, used for the first node to perform message transmission with the second node through a network communication mode; 所述判断模块,用于若出现网络故障,所述第一节点判断预设时间内所述网络是否恢复正常;The judging module is configured to judge, by the first node, whether the network has returned to normal within a preset time if a network failure occurs; 所述第一消息传输模块,用于若所述预设时间内所述网络恢复正常,则所述第一节点通过所述网络通信模式与所述第二节点进行消息传输;the first message transmission module, configured to transmit the message between the first node and the second node through the network communication mode if the network returns to normal within the preset time; 所述第二消息传输模块,用于若所述预设时间内所述网络未恢复正常,所述第一节点将所述网络通信模式切换为所述磁盘通信模式,利用所述共享通信磁盘与所述第二节点进行消息传输。The second message transmission module is configured to, if the network does not return to normal within the preset time, the first node to switch the network communication mode to the disk communication mode, and use the shared communication disk to communicate with each other. The second node performs message transmission. 7.根据权利要求6所述的装置,其特征在于,所述共享通信磁盘中包括多个消息槽,所述消息槽用于存储所述节点的未处理消息,所述第二消息传输模块,用于:7. The apparatus according to claim 6, wherein the shared communication disk comprises a plurality of message slots, the message slots are used to store unprocessed messages of the node, and the second message transmission module, Used for: 所述第一节点将发送消息写入所述第二节点对应的消息槽;The first node writes the sending message into the message slot corresponding to the second node; 所述第一节点轮询所述第一节点的未处理消息;the first node polls the first node for unprocessed messages; 若所述第一节点获取所述第二节点针对于所述发送消息的返回消息,结束本次与所述第二节点的消息传输。If the first node obtains the return message from the second node for the sent message, the message transmission with the second node ends this time. 8.根据权利要求7所述的装置,其特征在于,所述第二消息传输模块,用于:8. The apparatus according to claim 7, wherein the second message transmission module is configured to: 所述第一节点根据所述第二节点对应的消息槽的标识,将发送消息写入所述第二节点对应的消息槽;所述第二节点对应的消息槽的标识包括目标节点标识和目标通道标识,所述目标节点标识为所述第二节点的节点标识,所述目标通道标识为所述第一节点发送所述发送消息给所述第二节点所用通道的通道标识。The first node writes the sent 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 includes the target node identifier and the 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.根据权利要求7所述的装置,其特征在于,所述第二节点对应的消息槽包括多个子消息槽,不同的子消息槽用于存储所述第一节点发送给所述第二节点的不同的发送消息,所述第一消息传输模块,用于:9 . The apparatus according to claim 7 , wherein the message slot corresponding to the second node comprises a plurality of sub-message slots, and different sub-message slots are used to store the messages sent by the first node to the second node. 10 . The different sending messages, the first message transmission module is used for: 所述第一节点根据所述第二节点对应的消息槽中子消息槽的标识,将发送消息写入所述第二节点对应的消息槽;所述第二节点对应的消息槽中子消息槽的标识包括目标节点标识、目标通道标识和发送消息顺序,所述目标节点标识为所述第二节点的节点标识,所述目标通道标识为所述第一节点发送所述发送消息给所述第二节点所用通道的通道标识,所述发送消息顺序为所述第一节点发送给所述第二节点的多条发送消息的顺序。The first node writes the sent message into the 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 sub-message slot in the message slot corresponding to the second node The identifier includes the target node identifier, the target channel identifier and the sequence of sending messages, the target node identifier is the node identifier of the second node, and the target channel identifier is the first node sending the sending message to the first node. The channel identifier of the channel used by the two nodes, and the sequence of sending messages is the sequence of multiple sending messages sent by the first node to the second node. 10.根据权利要求6-9任意一项所述的装置,其特征在于,所述判断模块,还用于:10. The device according to any one of claims 6-9, wherein the judgment module is further configured to: 在所述第一节点利用所述共享通信磁盘与所述第二节点进行消息传输的过程中,所述第一节点判断所述网络是否恢复正常;During the process that the first node uses the shared communication disk to transmit a message with the second node, the first node determines whether the network is back to normal; 所述第二消息传输模块,用于若所述网络恢复正常,则所述第一节点将所述磁盘通信模式切换为所述网络通信模式,通过所述网络通信模式与所述第二节点进行消息传输;The second message transmission module is configured to, if the network returns to normal, the first node to switch the disk communication mode to the network communication mode, and to communicate with the second node through the network communication mode. message transmission; 所述第一消息传输模块,用于若所述网络未恢复正常,则利用所述共享通信磁盘与所述第二节点进行消息传输。The first message transmission module is configured to use the shared communication disk to perform message transmission with the second node if the network does not return to 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 浪潮电子信息产业股份有限公司 A kind of lock information transmission method of DLM 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 浪潮电子信息产业股份有限公司 A kind of lock information transmission method of DLM 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
EP3543870B1 (en) Exactly-once transaction semantics for fault tolerant fpga based transaction systems
CN107465767B (en) Data synchronization method and system
CN106330475B (en) A method and device for managing active and standby nodes in a communication system and a high-availability cluster
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
JP5366177B2 (en) Slot interface access device, method and program thereof, and redundant configuration and alternative method of main device
CN109976941B (en) A data recovery method and device
CN110677282B (en) Hot backup method of distributed system and distributed system
CN114625489B (en) Access request response method, device and distributed system
CN115277379B (en) Distributed lock disaster recovery processing method and device, electronic equipment and storage medium
CN112612769A (en) File processing method, device and storage medium
CN112612653B (en) A business recovery method, device, arbitration server and storage system
WO2017071384A1 (en) Message processing method and apparatus
CN101262479A (en) A network file sharing method, server and network file sharing system
EP2774323B1 (en) Method, communication system and non-transitory computer readable medium for optimizing network performance after a temporary loss of connection
CN113794765B (en) Network gate load balancing method and device based on file transmission
CN113890817A (en) Communication optimization method and device
CN117857660B (en) Data transmission protocol self-adaption method, system, equipment and medium
CN110351122B (en) Disaster recovery method, device, system and electronic equipment
CN114422335A (en) Communication method, communication device, server and storage medium
WO2017016196A1 (en) Data synchronization method, apparatus, and system
US10536875B2 (en) System and method for seamless TCP connection handoff
CN117370316A (en) High availability management method and device for database, electronic equipment and storage medium
CN117201507A (en) Cloud platform switching method and device, electronic equipment and storage medium
CN116962156A (en) Data backup method and related 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220104

RJ01 Rejection of invention patent application after publication