Data transmission optimization method, data transmission system, gateway device and storage medium
Patent Information
- Application Number
- CN202610872312.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-09-22
AI Technical Summary
[0005]本申请的主要目的在于提供一种数据传输优化方法、数据传输系统、网关设备及存储介质,旨在解决现有的RDMA传输技术在跨数据中心的数据传输场景中,难以适配长距离传输的时延特性造成性能劣化,无法满足数据中心对高带宽、高可靠跨域数据传输需求的技术问题
通过发送端网关对RDMA数据报文的类型识别(顺序、乱序、重复)及第一响应信息的即时生成,能够在跨域传输的较长往返时延(RTT)环境下,避免因等待远端确认而导致的发送端网卡资源长时间占用或过早触发超时重传,从而显著提升发送端的传输效率和资源利用率。并且,在报文类型为顺序报文时立即转发至接收端网关,并结合接收端网关的本地缓存池镜像缓存机制,使得接收端网关能够就近存储待确认数据,为后续可能的本地重传提供基础,减少了跨域重传的带宽消耗与时延。进一步地,接收端网关对目的主机发送的第二响应信息的拦截,阻断了传统端到端确认机制的冗长反馈路径,使得传输状态反馈能够通过网关侧的快速处理完成,缩短了控制平面的响应周期。在跨数据中心的长距离数据传输场景中,通过发送端网关与接收端网关的协同代理,解决了长距离传输中因时延特性导致的性能劣化问题,实现了对长距离RDMA传输性能的有效优化,可以在不修改端侧硬件及传输协议的前提下,实现高带宽、高可靠的跨域长距离数据传输,有利于满足数据中心的高性能传输需求。
Smart Images

Figure CN122802120A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data transmission technology, and in particular to a data transmission optimization method, a data transmission system, a gateway device, and a storage medium. Background Technology
[0002] With the rapid development of cloud computing, big data, and large-scale artificial intelligence models, single data centers face limitations in computing power, power supply, and heat dissipation for network-intensive applications such as large-scale model training and distributed intelligent computing. Mainstream cloud service technologies are gradually expanding computing clusters to multi-campus and cross-regional deployments. Multi-data center collaboration enables more flexible cross-domain resource scheduling, efficient disaster recovery backup, and higher transmission reliability. Remote Direct Memory Access / RDMA over Converged Ethernet v2 (RDMA / RoCEv2) is widely used in high-performance data transmission scenarios in data centers due to its advantages such as good protocol compatibility, high bandwidth, and low CPU usage.
[0003] However, in cross-data center data transmission scenarios, the link distance is long, and the round-trip time (RTT) often exceeds the preset long-distance latency threshold. Existing RDMA transmission technology is difficult to adapt to the latency characteristics of such long-distance data transmission, resulting in a significant decrease in effective throughput, increased transmission latency, and low retransmission efficiency, thus failing to meet the data center's demand for high-bandwidth, high-reliability cross-domain data transmission. Specifically, after the sending network card sends a data packet, it needs to wait for one round-trip time (RTT) to receive an acknowledgment packet. Due to hardware limitations, the network card's retransmission timeout (RTO) cannot match the long RTT, causing a large number of data packets to be retransmitted ineffectively due to triggering the timeout retransmission mechanism. Furthermore, when packet loss or packet corruption occurs on the link, the traditional Go-Back-N (GBN) retransmission mechanism will trigger a large number of redundant retransmissions of data packets, resulting in wasted link bandwidth and increased congestion, thereby affecting data transmission performance.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a data transmission optimization method, a data transmission system, a gateway device, and a storage medium, aiming to solve the technical problem that existing RDMA transmission technology is difficult to adapt to the latency characteristics of long-distance transmission in cross-data center data transmission scenarios, resulting in performance degradation and failing to meet the data center's demand for high-bandwidth, high-reliability cross-domain data transmission.
[0006] Firstly, to achieve the above objectives, this application proposes a data transmission optimization method applied to a sending gateway in cross-domain transmission, wherein the sending gateway is the gateway of the data center where the source host is located; the data transmission optimization method includes: Receive the RDMA data packet sent by the source host and determine the packet type of the RDMA data packet; the packet type is one of sequential packet, out-of-order packet, and duplicate packet; A first response message is generated based on the message type and sent to the source host. If the message type is a sequential message, the RDMA data message is forwarded to the receiving gateway. The receiving gateway is the gateway of the data center where the destination host is located. The receiving gateway mirrors and caches the RDMA data packet in its local cache pool before forwarding it to the destination host, and intercepts the second response information sent by the destination host; the second response information is generated and sent by the destination host based on the received RDMA data packet.
[0007] In one embodiment, the first response information is a fast acknowledgment (ACK) or a fast negative acknowledgment (NACK); the step of generating the first response information according to the message type and sending it to the source host includes: If the message type is an out-of-order message, the RDMA data message is buffered; If the target packet corresponding to the out-of-order packet is not received within a preset time period, a fast negative acknowledgment (NACK) message is generated and sent to the source host to trigger the source host to retransmit; the sequence number of the target packet is the expected sequence number corresponding to the RDMA data packet. If a target packet corresponding to the RDMA data packet is received within a preset time period, the target packet and the RDMA data packet are reassembled into a sequential packet, and a fast acknowledgment (ACK) message is generated and sent to the source host. If the message type is a duplicate message, the RDMA data message is discarded, and a fast acknowledgment (ACK) message is generated and sent to the source host.
[0008] In one embodiment, the step of determining the message type of the RDMA data message includes: Extract message features from the RDMA data message; the message features include at least the message sequence number; Extract the expected sequence number corresponding to the RDMA data packet from the session information of the pre-established streaming session; The message sequence number in the message characteristics is compared with the expected message sequence number, and the message type of the RDMA data message is determined based on the comparison result. Specifically, if the comparison result indicates that the message sequence number in the message features is consistent with the expected message sequence number, then the message type of the RDMA data message is a sequential message; if the comparison result indicates that the message sequence number in the message features is greater than the expected message sequence number, then the message type of the RDMA data message is an out-of-order message; if the comparison result indicates that the message sequence number in the message features is less than the expected message sequence number, then the message type of the RDMA data message is a duplicate message.
[0009] In one embodiment, the data transmission optimization method further includes: If the local cache occupancy rate exceeds a preset threshold, a congestion notification message is generated and sent to the source host to limit the sending rate of the source host.
[0010] In one embodiment, after the receiving gateway mirrors and caches the RDMA data packet in its local cache pool before forwarding it to the destination host, the method further includes: If the receiving gateway does not receive the second response information from the destination host within a preset time period, or if the second response information is a retransmission request message, the receiving gateway triggers near-end retransmission and searches the local cache pool according to the abnormal message sequence number in the retransmission request message. If the search is successful, the retrieved RDMA data message is retransmitted to the destination host. Receive a retransmission request message sent by the receiving gateway; the retransmission request message is sent by the receiving gateway when the local cache pool is not found. The retransmission request message is forwarded to the source host to trigger the source host to perform a remote retransmission.
[0011] In one embodiment, the receiving gateway uses a circular queue to mirror and cache the RDMA data packets. The head of the circular queue stores the oldest data packet, and the tail of the circular queue stores the latest data packet. A hash table of the RDMA data packets is also established for retrieval. When the local cache pool is full, the oldest data packet is deleted from the head of the circular queue to update the queue.
[0012] Secondly, to achieve the above objectives, this application proposes a data transmission optimization method applied to a receiving gateway in cross-domain transmission, wherein the receiving gateway is the gateway of the data center where the destination host is located; the data transmission optimization method includes: Receive RDMA data packets sent by the sending gateway; the sending gateway is the gateway of the data center where the source host is located; The RDMA data packet is forwarded to the destination host after being cached locally, and the second response information sent by the destination host is intercepted; the second response information is generated and sent by the destination host based on the received RDMA data packet. The RDMA data packet is sent from the source host to the sending gateway, and forwarded by the sending gateway when it determines that the message type of the RDMA data packet is a sequential message; the message type is one of sequential message, out-of-order message, and duplicate message; The sending gateway also generates a first response message based on the message type and sends it to the source host.
[0013] Thirdly, to achieve the above objectives, this application also proposes a data transmission system, including a source host, a sending gateway, a receiving gateway, and a destination host. The sending gateway is the gateway of the data center where the source host is located, and the receiving gateway is the gateway of the data center where the destination host is located. The sending gateway and the receiving gateway are communicatively connected to realize cross-domain data transmission. The sending gateway is used to execute the steps of the data transmission optimization method described in the first aspect above, and the receiving gateway is used to execute the steps of the data transmission optimization method described in the second aspect above.
[0014] Fourthly, to achieve the above objectives, this application also proposes a gateway device, the gateway device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data transmission optimization method as described above.
[0015] Fifthly, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the data transmission optimization method described above.
[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the data transmission optimization method described above.
[0017] One or more technical solutions proposed in this application have at least the following technical effects: By identifying the type of RDMA data packets (sequential, out-of-order, duplicate) and generating the first response information in real time at the sending gateway, the long round-trip time (RTT) environment of cross-domain transmission can avoid prolonged occupation of sending network card resources or premature timeout retransmissions caused by waiting for remote confirmation, thus significantly improving the transmission efficiency and resource utilization of the sending end. Furthermore, when the packet type is sequential, it is immediately forwarded to the receiving gateway. Combined with the receiving gateway's local cache pool mirroring mechanism, the receiving gateway can store the data to be confirmed nearby, providing a basis for possible subsequent local retransmissions and reducing bandwidth consumption and latency of cross-domain retransmissions. Moreover, the receiving gateway's interception of the second response information sent by the destination host blocks the lengthy feedback path of the traditional end-to-end confirmation mechanism, allowing transmission status feedback to be completed quickly at the gateway side, shortening the response cycle of the control plane. In long-distance data transmission scenarios across data centers, the collaborative proxying of the sending and receiving gateways solves the performance degradation problem caused by latency characteristics in long-distance transmission, effectively optimizing the performance of long-distance RDMA transmission. It can achieve high-bandwidth, high-reliability cross-domain long-distance data transmission without modifying the end-side hardware and transmission protocol, which is conducive to meeting the high-performance transmission needs of data centers. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is one of the flowcharts provided for an embodiment of the data transmission optimization method of this application; Figure 2 This is a schematic diagram of the architecture of the data transmission system provided in the embodiments of this application; Figure 3 A schematic diagram of flow table management provided for an embodiment of this application; Figure 4 This is a schematic diagram of the data transmission process provided in an embodiment of this application; Figure 5 This is a schematic diagram illustrating the process of generating the first response information provided in an embodiment of this application; Figure 6 This is a schematic diagram of the data transmission process provided in an embodiment of this application; Figure 7This is one of the schematic diagrams illustrating a data transmission interaction example provided in the embodiments of this application; Figure 8 This is the second schematic diagram illustrating a data transmission interaction example provided in the embodiments of this application; Figure 9 A schematic diagram illustrating a data interaction example for fast packet loss retransmission provided in this application embodiment; Figure 10 This is the second flowchart illustrating the data transmission optimization method of this application. Figure 11 This is a schematic diagram of the structure of the data transmission system provided in the embodiments of this application; Figure 12 This is a schematic diagram of the device structure of the hardware operating environment involved in the data transmission optimization method in this application embodiment.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The main solution of this application embodiment is: to adapt to the performance requirements of long-distance RDMA transmission, to achieve efficient transmission of RDMA traffic across data centers and RDMA traffic within a domain without modifying the network card hardware and driver protocols of the source host and the destination host, while being completely transparent to the infrastructure within the data center, and without modifying the network card hardware and driver protocols of the source host and the destination host, and to optimize data transmission based on the gateway proxy of the data center.
[0025] First, it should be noted that the key technical terms involved in the various embodiments of this application include: RDMA: Remote Direct Memory Access; RoCEv2: RDMA over Converged Ethernet v2, Remote Direct Memory Access over Generation 2 Converged Ethernet; RTT: Round-Trip Time; ACK: Acknowledgment message; NACK: Negative Acknowledgment, indicating that the message was not received or that an error occurred; SACK: Selective Acknowledgment, used to indicate segments received discontinuously; Fast ACK: Fast Acknowledgment, a fast acknowledgment message sent by the gateway agent; Fast NACK: Fast Negative Acknowledgment, a fast negative acknowledgment message sent by the gateway agent; RTO: Retransmission Timeout, the retransmission timeout period; SrcQP: Source Queue Pair, in RDMA transmission technology, refers to the transmit queue pair of the communication endpoints; DstQP: Destination Queue Pair, in RDMA transmission technology, refers to the receive queue pair of the communication endpoint; PSN: Packet Sequence Number, used for packet ordering in RDMA / TCP; ePSN: Expected Packet Sequence Number, the expected sequence number of the next packet to be received; sPSN: sent Packet Sequence Number, the expected sequence number of the next packet to be sent; lPSN: Last Received Packet Sequence Number; lACK: Last Received ACK Packet Sequence Number.
[0026] Existing RDMA transmission technology struggles to adapt to the latency characteristics of long-distance transmission in cross-data center data transmission scenarios. This leads to numerous invalid retransmissions of data packets due to timeout retransmission mechanisms and redundant retransmissions, resulting in degraded transmission performance. Intra-data center edge-side selective retransmission algorithms suffer significant performance degradation in wide area network scenarios involving cross-data centers due to on-chip cache space limitations. Intra-network selective retransmission schemes require reserved cache at the switch to accommodate a bandwidth-delay product (BDP) of data, but the required BDP is extremely large in long-distance, high-bandwidth scenarios, which is severely limited by the switch's on-chip SRAM cache resources.
[0027] To address this, this application provides a solution for optimizing transmission performance in long-distance transmission scenarios across data centers by utilizing data center gateway proxies. Specifically, the sender gateway switch (SGS) is the gateway in the data center where the source host resides, responsible for Fast ACK proxying, out-of-order buffering, and Fast NACK fast packet loss detection and notification for RDMA data streams; the receiver gateway switch (RGS) is the gateway in the data center where the destination host resides, responsible for packet mirroring buffering, real ACK interception, local fast retransmission, and fallback handling for buffer misses.
[0028] The sending gateway maintains a pseudo-receive buffer. For ordered packets, it directly sends a Fast ACK to trigger the sending end to release network card resources and forward the packets to the receiving gateway. For out-of-order packets, it buffers them and sends a Fast NACK if the expected packet is not received within a preset window time to trigger packet retransmission.
[0029] The receiving gateway mirrors and caches received packets, maintaining a data backup pool. When it receives a NACK / SACK response from the receiving end, it retrieves the data from its local cache and performs a fast local retransmission. Upon receiving an ACK response from the receiving end, it releases the corresponding cache space. When the receiving gateway's cache is insufficient or a cache miss occurs, a fallback mechanism is employed, forwarding the packet loss request through the sending gateway to the source end for remote retransmission. This mechanism is also compatible with RDMA end-to-end congestion control, ensuring stable and efficient transmission in high-bandwidth, long-latency, and shallow-buffered scenarios.
[0030] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or gateway device capable of performing the above functions. The following description uses a gateway device as an example to illustrate this embodiment and the subsequent embodiments.
[0031] Specifically, this application provides a data transmission optimization method applied to a sending gateway in cross-domain transmission. The sending gateway is the gateway of the data center where the source host resides, and the source host is the data sender. (Refer to...) Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data transmission optimization method of this application.
[0032] In this embodiment, the data transmission optimization method includes steps S10 to S20: Step S10: Receive the RDMA data packet sent by the source host and determine the packet type of the RDMA data packet; the packet type is one of sequential packet, out-of-order packet, and duplicate packet; Step S20: Generate a first response message according to the message type and send it to the source host; and if the message type is a sequential message, forward the RDMA data message to the receiving gateway; the receiving gateway is the gateway of the data center where the destination host is located. The receiving gateway mirrors and caches the RDMA data packet in its local cache pool before forwarding it to the destination host, and intercepts the second response information sent by the destination host; the second response information is generated and sent by the destination host based on the received RDMA data packet.
[0033] It should be noted that a gateway (including sending and receiving gateways) can be an edge network device deployed at the egress of the source data center, such as a router with intelligent processing capabilities or a dedicated accelerator card. Its core function is to proxy the host's handling of transport layer acknowledgment and retransmission logic. A host includes a source host and a destination host. The source host is the data sender, and the destination host is the data receiver. The source host can be a server, called a source server; similarly, the destination host can also be a server, called a destination server. The data center where the source host resides can also be called the source data center, and similarly, the data center where the destination host resides can also be called the destination data center. It should be understood that the same host can be both a source host and a destination host; therefore, the same gateway device can be both a sending gateway and a receiving gateway.
[0034] Specifically, the sending gateway receives RDMA data packets from the source host and determines the packet type, which can be one of three: ordered packet, out-of-order packet, or duplicate packet. An RDMA data packet refers to a data packet encapsulated according to the RMDA / RoCEv2 protocol, containing a packet sequence number (PSN) used to identify the data order. The packet type is a status classification based on a comparison between the PSN and the expected sequence number (ePSN) maintained by the sending gateway, used to guide the sending gateway's fast response strategy.
[0035] It is understandable that RDMA data packets are sent by the source host and forwarded to the sending gateway through multiple levels of switches within the source data center.
[0036] Furthermore, the sending end receives the RDMA data packet sent by the source host, determines its packet type, and then, based on the near-end proxy response mechanism of the sending end gateway, generates a first response message according to the packet type of the RDMA data packet and sends it to the source host to respond to the RDMA data packet sent by the source host.
[0037] It is understandable that the generated first response information can be the same or different depending on the message type. As an example, if the RDMA data message is a sequential message or a duplicate message, a FastACK message is generated and sent to the source host as the first response information to trigger the source host to release network card resources; if the RDMA data message is an out-of-order message, a Fast NACK message is generated and sent to the source host as the first response information to trigger the source host to retransmit lost packets.
[0038] When the RDMA data packet is a sequential packet, a first response message is generated and sent to the source host to trigger the source host to release network card resources, thereby realizing near-end response proxy. At the same time, the RDMA data packet is forwarded to the receiving gateway.
[0039] As can be understood, the destination host is the data receiver, and the receiving gateway is the gateway of the data center where the destination host resides. The receiving gateway receives the RDMA data packets sent by the sending gateway, mirrors and caches the received RDMA data packets in its local cache pool, forwards them to the destination host, and intercepts the second response information sent by the destination host. This second response information is generated and sent by the destination host based on the received RDMA data packets.
[0040] In this process, the RDMA data packet sent by the receiving gateway is forwarded through multiple levels of switches in the destination data center to reach the destination host. The destination host generates a second response message based on the received RDMA data packet and sends it to the receiving gateway. As one embodiment, the destination host also determines the packet type of the received RDMA data packet and generates a second response message based on the packet type, which is then sent to the receiving gateway. This second response message is either an acknowledgment message (ACK) or a negative acknowledgment message (NACK).
[0041] The receiving gateway caches the received RDMA data packets to prepare for possible packet loss and retransmission. If the second response information is a negative acknowledgment (NACK), the gateway retransmits the packets to the destination host based on the RDMA data packets cached in the local cache pool.
[0042] It should be noted that the role of the first response information is to replace the remote receiving host in providing immediate feedback to the source host, thereby shielding the sending end from the impact of long cross-domain latency. The receiving gateway, as the proxy cache node on the destination side, blocks the traditional long-path feedback by intercepting the second response information, terminating the ACK or NACK information that originally needed to be transmitted back across the wide area network at the gateway side, and turning the retransmission process directly controlled by the gateway.
[0043] In one embodiment, refer to Figure 2 The illustrated cross-data center data transmission system architecture includes a source data center and a destination data center. The source data center is the data sender, and the destination data center is the data receiver. The system also includes a DCI (Data Center Interconnect) switch, which refers to a network technology or device that connects multiple data centers. In this embodiment, the DCI switch is a gateway device for cross-domain transmission, including a sending gateway and a receiving gateway.
[0044] Furthermore, the gateway device has a buffer pool for caching RDMA data packets. Internally, the gateway uses a data bus for communication, while RDMA data packets between data centers are transmitted via a data flow diagram. During data flow transmission, the gateway acts as an acknowledgment agent, generating acknowledgment / negative acknowledgment (NACK / ACK) messages as control flow for data transmission or retransmission. Additionally, the gateway device maintains the sequence number of the RDMA data packets through a flow table.
[0045] Data centers are interconnected through gateways. In the specific data transmission process, after the RDMA data packet is sent from the source host network card, it is forwarded through multiple levels of switches within the data center to the sending gateway, which then forwards it to the receiving gateway. The receiving gateway then forwards it to the destination data center, where it is forwarded through multiple levels of switches to the receiving server network card, and finally reaches the application.
[0046] The gateway mainly consists of two parts: a long-distance transmission proxy and basic functions. The long-distance transmission proxy is primarily used to proxy responses to RDMA-related signals, enabling near-end acknowledgment and feedback, rapid packet loss detection and recovery, and ensuring reliable data transmission. Examples include fast ACK confirmation, fast NACK notification, and fast packet loss retransmission based on packet buffering. Basic functions include session management, buffer management, queue scheduling, flow control, and dynamic flow scheduling, providing fundamental services for the long-distance transmission proxy.
[0047] for Figure 2 The flow table in the system shown is referenced. Figure 3The flow table management shown here uses a gateway with ports, including a port DcnPort facing the data center and a port IntPort facing the WAN. For RDMA flows from the data center, Fast NAK and Fast ACK strategies are adopted, and the flow table rules are defined as follows: RDMA flows originating from the data center side, i.e., RDMA packets flowing into the data center from the DcnPort, are defined as DTI (Data Center to Internet) flows; RDMA flows entering the data center from the WAN side, i.e., RDMA packets flowing into the data center from the IntPort, are defined as ITD (Internet to Data Center) flows.
[0048] For RDMA flows in the DTI direction, the flow table accurately includes information such as source IP (local data center A), destination IP, source QP, destination QP, source ePSN, and destination ePSN to enable the gateway to identify RDMA data flows from the DTI direction. This provides a basis for subsequent proxy functions to determine out-of-order delivery and construct control packets. It can also identify the corresponding control packet flow (ACK / NACK packets) in the DTI direction, distinguishing them based on the IP and QP numbers in the reverse direction (source IP (peer data center B), destination IP, source QP, destination QP). For RDMA flows in the ITD direction, the flow table includes information such as source IP (peer data center B), destination IP, source QP, destination QP, source ePSN, and destination ePSN to enable the gateway to identify RDMA data packets from the ITD direction. It can also identify the corresponding control packet flow (ACK / NAK packets) in the ITD direction, distinguishing them based on the IP and QP numbers in the reverse direction (source IP (local data center A), destination IP, source QP, destination QP).
[0049] Furthermore, referring to Figure 4 The data transmission process shown involves the sending network interface card (NIC) sending an RDMA stream to the sending gateway. The sending gateway generates a Fast ACK / Fast NACK response based on the packet type of the RDMA data stream and sends it to the sending NIC to trigger the source host to release NIC resources. If the RDMA data stream is a sequential packet, the sending gateway sends it to the receiving gateway. The receiving gateway forwards the received RDMA data stream to the receiving NIC. The receiving NIC generates an ACK / NACK / SACK response based on the packet type of the received RDMA data stream and sends it to the receiving gateway. The receiving gateway then intercepts the response information sent by the receiving NIC.
[0050] By migrating the transmission acknowledgment point from the remote host to the gateways at both ends, the impact of high latency in long-distance transmission on the source-end transmission performance is effectively isolated, significantly improving the effective throughput and stability of cross-data center RDMA transmission.
[0051] In this embodiment, by identifying the type of RDMA data packets (sequential, out-of-order, duplicate) and generating the first response information in real time at the sending gateway, the long round-trip time (RTT) environment of cross-domain transmission can avoid prolonged occupation of sending network card resources or premature timeout retransmission due to waiting for remote confirmation, thereby significantly improving the transmission efficiency and resource utilization of the sending end. Furthermore, when the packet type is sequential, it is immediately forwarded to the receiving gateway. Combined with the receiving gateway's local cache pool mirroring mechanism, the receiving gateway can store the data to be confirmed nearby, providing a basis for possible subsequent local retransmissions and reducing bandwidth consumption and latency of cross-domain retransmissions. Moreover, the receiving gateway's interception of the second response information sent by the destination host blocks the lengthy feedback path of the traditional end-to-end confirmation mechanism, allowing transmission status feedback to be completed quickly at the gateway side, shortening the response cycle of the control plane. In long-distance data transmission scenarios across data centers, the collaborative proxying of the sending and receiving gateways solves the performance degradation problem caused by latency characteristics in long-distance transmission, effectively optimizing the performance of long-distance RDMA transmission. It can achieve high-bandwidth, high-reliability cross-domain long-distance data transmission without modifying the end-side hardware and transmission protocol, which is conducive to meeting the high-performance transmission needs of data centers.
[0052] As a possible implementation, the message type is identified based on the message features extracted from the RDMA data message. Therefore, step S10 may include steps S11-S13: Step S11: Extract message features from the RDMA data message; the message features include at least the message sequence number; Step S12: Extract the expected message sequence number corresponding to the RDMA data packet from the session information of the pre-established streaming session; Step S13: Compare the message sequence number in the message features with the expected message sequence number, and determine the message type of the RDMA data message based on the comparison result; Specifically, if the comparison result indicates that the message sequence number in the message features is consistent with the expected message sequence number, then the message type of the RDMA data message is a sequential message; if the comparison result indicates that the message sequence number in the message features is greater than the expected message sequence number, then the message type of the RDMA data message is an out-of-order message; if the comparison result indicates that the message sequence number in the message features is less than the expected message sequence number, then the message type of the RDMA data message is a duplicate message.
[0053] When determining the message type of an RDMA data packet, firstly, message features are extracted from the RDMA data packet. These features include at least the PSN (Personal Sequence Number). Then, the expected sequence number (ePSN) corresponding to the RDMA data packet is extracted from the session information of the pre-established flow session. By comparing the extracted PSN with the expected sequence number (ePSN) managed in the flow session, the message type of the RDMA data packet is determined based on the comparison result.
[0054] Specifically, if the comparison result indicates that the extracted PSN is consistent with the expected ePSN, then the RDMA data message is a sequential message; if the comparison result indicates that the extracted PSN is inconsistent with the expected ePSN, and the extracted PSN is greater than the expected ePSN, then the RDMA data message is an out-of-order message; if the comparison result indicates that the extracted PSN is inconsistent with the expected ePSN, and the extracted PSN is less than the expected ePSN, then the RDMA data message is a duplicate message.
[0055] In one embodiment, the packet sequence number (PSN) is extracted by parsing the Base Transport Header (BTH) of the RDMA data packet. During the connection establishment phase, the gateway records the flow status of the data stream corresponding to the RDMA data packet and initializes the ePSN for comparison with the packet sequence number to determine the packet type of the RDMA data packet.
[0056] Understandably, the first response information generated by the sending gateway is either a Fast ACK or a Fast NACK. Specifically, if the packet type is a sequential or duplicate packet, a Fast ACK is generated and sent to the source host. At the same time, duplicate packets are discarded, and sequential packets are forwarded to the receiving gateway. If the packet type is an out-of-order packet, a Fast NACK is generated and sent to the source host to trigger packet retransmission at the source.
[0057] In one embodiment, reference is made to Figure 5The process of generating the first response information, as shown, involves the sending end extracting message characteristics after receiving an RDMA data packet. These characteristics include the message timestamp, IP address, port number, message sequence number (PSN), and payload. If a flow session has been established, the expected sequence number (ePSN) is retrieved from the session information. The PSN is compared with the ePSN. If the PSN and ePSN are equal, the message is in order and is forwarded to the receiving gateway. An ACK is then generated and sent to the source host. If the PSN is less than the ePSN, the message is a duplicate and is discarded. An ACK is then generated and sent to the source host. If the PSN is greater than the ePSN, the message is out of order and is stored in a buffer pool, awaiting out-of-order reordering.
[0058] As one implementation, if the first response information generated by the sending gateway is a fast acknowledgment message ACK or a fast negative acknowledgment message NACK, step S20 may further include steps S21 to S24: Step S21: If the message type is an out-of-order message, the RDMA data message is buffered; Step S22: If the target packet corresponding to the out-of-order packet is not received within a preset time period, a fast negative acknowledgment (NACK) message is generated and sent to the source host to trigger the source host to retransmit; the sequence number of the target packet is the expected sequence number corresponding to the RDMA data packet. Step S23: If the target packet corresponding to the RDMA data packet is received within a preset time period, the target packet and the RDMA data packet are reassembled into a sequential packet, and a fast acknowledgment information ACK is generated and sent to the source host. Step S24: If the message type is a duplicate message, discard the RDMA data message and generate a fast acknowledgment (ACK) message to send to the source host.
[0059] It should be noted that the fast acknowledgment (ACK) and fast negative acknowledgment (NACK) messages generated by the sending end are acknowledgment / negative acknowledgment messages consistent with the standard RDMA ACK / NACK format. The fast acknowledgment (ACK) message is used to notify the source host that its transmitted data packets have been successfully taken over by the gateway, allowing the source host to release the network interface card (NIC) resources in the transmit buffer. The fast negative acknowledgment (NACK) message is used to notify the source host to perform targeted packet retransmission more quickly than the standard RTO timeout when packet loss is detected.
[0060] Specifically, if the RDMA data packet is an out-of-order packet, the RDMA data packet is buffered and stored in a buffer pool. A timer of preset duration is started. If the target packet corresponding to the out-of-order packet is not received within the timer's window, a fast negative acknowledgment (NACK) is generated and sent to the source host to trigger retransmission. The sequence number of the target packet is the expected sequence number (ePSN) of the RDMA data packet. If the target packet is received within the timer's window, the target packet and the RDMA data packet are reassembled to obtain the corresponding ordered packet. A fast acknowledgment (ACK) is generated and sent to the source host. Simultaneously, the reassembled ordered packet is forwarded to the receiving gateway, and the buffer resources are released.
[0061] If the RDMA data packet is a duplicate packet, the duplicate packet is discarded, and a fast acknowledgment (ACK) message is generated and sent to the source host.
[0062] In a typical RDMA data packet transmission process, if packet loss occurs during the RDMA stream sent by the sending network card (NIC), the receiving NIC will respond with a NACK message upon receiving the out-of-order packet, notifying the sending NIC to retransmit the lost packet. For example, if the transmitted RDMA stream sequence is (PSN100, PSN101, PSN102), and the PSN101 packet is lost in transit, the stream sequence arriving at the receiving NIC will be (PSN100, PSN102). Upon receiving the PSN102 packet, the receiving NIC will consider it an out-of-order packet and will respond with a NACK message to the sending NIC. If packets are lost in the network, the sending NIC will receive the NACK message after one RTT (Round-Trip Time) delay.
[0063] In cross-domain transmission, an RTT exceeding 10ms leads to low efficiency in RDMA packet loss retransmission and a significant decrease in effective throughput. In this embodiment, the sending gateway records the expected packet sequence number (ePSN) for each session stream. When the received packet sequence number (PSN) equals the ePSN, it indicates that the packet is a normally ordered packet; when the received packet sequence number (PSN) is less than the ePSN, it indicates that it is a duplicate packet; and when the received packet sequence number (PSN) is greater than the ePSN, it indicates that it is an out-of-order packet.
[0064] When an out-of-order packet is received, it is first inserted into the buffer pool (if the buffer pool is full, the packet is discarded). Simultaneously, a background timer is started to periodically check the timestamp of the first out-of-order packet in the buffer pool to determine if it exceeds the timer's timeout window threshold. If it does, it is considered a packet loss, and a fast NACK packet is sent to the sending network interface card. The sequence number in the NACK packet is filled with the ePSN. The timer's timeout window threshold and the check period for the out-of-order packet timestamps in the buffer pool are both configurable parameters.
[0065] If the received packet PSN equals the ePSN, and there are packets in the buffer pool that are consecutive to the ePSN, it means that the out-of-order delivery has been corrected. In this case, the consecutive packets are reassembled into sequential packets and forwarded to the receiving gateway. The buffer pool memory resources are released, and the ePSN is updated to the PSN of the last consecutive packet in the reassembled sequential packets plus 1.
[0066] Specifically, refer to Figure 6 The data transmission process shown, based on the extracted message characteristics of RDMA data packets, retrieves the ePSN from the session information when a stream session has been established, and compares the extracted sequence number PSN from the message characteristics with the retrieved ePSN to determine the message type. In this embodiment, the message type also includes retransmission messages.
[0067] If the PSN is less than the ePSN, it is a duplicate message and is discarded. If the PSN is equal to the ePSN, it is a sequential message. The buffer pool is then searched to see if there are any consecutive messages with the received sequential message. If consecutive messages exist, it means that the sequential message is a retransmitted lost message, i.e., a retransmitted message. It is reassembled with the consecutive messages in the buffer to obtain the correct sequential message, and the reassembled sequential message is forwarded. The ePSN is set to the PSN of the last message in the consecutive messages + 1. If there are no consecutive messages with the sequential message in the buffer pool, the sequential message is forwarded, and the ePSN is set to ePSN + 1, which means that the expected message sequence number is incremented by 1 as the next message to be received.
[0068] Furthermore, if the PSN is greater than the ePSN, it is considered an out-of-order packet. For out-of-order packets, if the buffer pool is not full, the packet is stored in the buffer pool; if the buffer pool is full, the packet is discarded. After storing the out-of-order packet in the buffer pool or discarding the packet, a timer is started in the background to perform out-of-order window detection. If the expected sequence number ePSN is not received within the timer's time window, a NACK is sent to the source host to trigger the source host to retransmit. The sequence number in the NACK is configured to be the expected sequence number ePSN.
[0069] Considering the possibility of packet loss during the process of sending ACK to the sending network card, which may cause the sending network card to send duplicate packets, fault tolerance processing has been added. That is, when the sequence number PSN of the RDMA data packet is less than the ePSN, in addition to discarding the duplicate packet, an ACK needs to be generated and fed back to the sending network card to avoid invalid retransmission.
[0070] In one feasible implementation, the gateway supports congestion control compatibility and supports explicit congestion marking when forwarding packets or generating Fast ACK messages. Therefore, the data transmission optimization method provided in this application embodiment may further include step S01: Step S01: If the local cache occupancy rate exceeds a preset threshold, a congestion notification message is generated and sent to the source host to limit the sending rate of the source host.
[0071] In other words, when the gateway's cache exceeds a threshold, it generates a congestion notification message and sends it to the source host. This works in conjunction with the congestion control protocol to limit the source host's transmission rate and prevent gateway congestion-induced crashes. The local cache refers to the buffer where the sending or receiving gateway stores data packets awaiting forwarding or retransmission. The congestion notification message can be a CNP (Congestion Notification Packet) message from the RoCEv2 protocol, which alleviates network congestion by notifying the source host to reduce its transmission rate.
[0072] As one example, the gateway monitors the buffer usage of each priority queue in real time. When it detects that buffer backlog is caused by link failure or slow receiving end, and the local buffer occupancy rate reaches a preset threshold, such as 85%, the gateway generates a CNP message and sends it to the source host. After receiving the CNP message, the source host reduces its sending rate according to the DCQCN algorithm, thereby avoiding data loss caused by gateway buffer overflow.
[0073] As another embodiment, after the sending gateway proxies the ACK response, the sending host's network interface card (NIC) will release local cache resources. If the packet is lost during WAN transmission and the gateway device restarts or crashes, data recovery can be achieved through connection reset mechanisms or application-layer retransmission. This is suitable for gateway device deployment environments with high availability, redundant backups, and other reliability guarantees.
[0074] Reference Figure 7The following is an example of data transmission interaction: First, the sending end (source host) sends PSN100 / 101 / 102. Since the PSN is as expected, the sending gateway sends an ACK response of ACK101 / 102 / 103. After the packet reaches the receiving end (destination host), the receiving end replies with ACK101 / 102 / 103, which the receiving gateway intercepts. Next, the sending end sends PSN102. The sending gateway determines that the PSN is not as expected and identifies it as a duplicate packet, so it sends a new ACK103. Then, the sending end sends PSN104. Since the PSN is not as expected, the sending gateway determines it is an out-of-order packet and buffers it. The sending end then sends PSN103. The sending gateway determines that the PSN is as expected and is consecutive to the buffered PSN104, so it performs out-of-order reordering. Finally, the sending gateway forwards the rearranged PSN103 / 104 message to the receiving end and replies with ACK104 / 105.
[0075] The receiving end replies with ACK104 / 105, and the receiving gateway intercepts the ACK104 / 105 response from the receiving end.
[0076] Furthermore, referring to Figure 8 In another data transmission interaction example shown, the sending end (source host) sends PSN100 / 101. The PSN is as expected, and the sending gateway directly forwards it to the receiving end (receiving gateway). The sending end sends PSN103 / 104. The PSN is not as expected and is out of order. The sending gateway first buffers the PSN103 / 104. The sending end continues to send PSN102. The PSN is as expected and is consecutive to the buffered out-of-order PSN103 / 104. The sending gateway performs out-of-order rearrangement and sends the rearranged PSN102 / 103 / 104 to the receiving end in order, and releases the buffered packets. The sending end sends message PSN105, and the PSN is as expected. The sending gateway forwards it directly to the receiving end. The sending end sends messages PSN106 / 107 / 108, but PSN106 is lost during transmission. After receiving PSN107 / 108, the sending gateway buffers the message and starts a timer. After the buffer timer expires, the sending gateway sends a PSN106 packet loss notification to the sending end. After receiving the packet loss notification, the sending end retransmits the PSN106 message. After receiving PSN106, the sending gateway performs out-of-order reordering and sends the reordered PSN106 / 107 / 108 messages to the sending end in order, and releases the buffered messages. The sending end sends messages PSN109 / 110, and the PSN is as expected. The sending gateway forwards them directly to the receiving end.
[0077] Fast NACK notifications are applicable to near-end packet loss scenarios. When packet loss occurs at the remote end, the lost packets need to be quickly retransmitted at the receiving gateway. Specifically, the receiving gateway mirrors and caches received data packets in a buffer pool. The receiving gateway's buffer pool can store packets exceeding the remote link latency. When packet loss occurs at the remote end, the receiving network interface card (NIC) replies with a NACK or SACK packet. Upon receiving the NACK or SACK packet, the receiving gateway retrieves the lost packet from the mirror buffer pool and retransmits it to the receiving end. Simultaneously, upon receiving the ACK packet, the receiving gateway releases the corresponding mirror buffer space.
[0078] Based on this, after the receiving gateway mirrors and caches the RDMA data packet in its local buffer pool and forwards it to the destination host, steps S301-S302 may also be included: If the receiving gateway does not receive the second response information from the destination host within a preset time period, or if the second response information is a retransmission request message, the receiving gateway triggers near-end retransmission and searches the local cache pool according to the abnormal message sequence number in the retransmission request message. If the search is successful, the retrieved RDMA data message is retransmitted to the destination host. Step S301: Receive a retransmission request message sent by the receiving gateway; the retransmission request message is sent by the receiving gateway when the local cache pool is not found. Step S302: Forward the retransmission request message to the source host to trigger the source host to perform remote retransmission.
[0079] Specifically, the receiving gateway allocates a buffer pool of a certain size. When it receives an RDMA data packet, it saves the packet to the buffer pool. If the buffer pool is full, it deletes some old buffers and then saves the new data packet, and forwards the received RDMA data packet to the receiving destination host. If the receiving gateway does not receive the second response information from the destination host within a preset time period, or if the received second response information is a retransmission request packet, it triggers a near-end retransmission. Based on the sequence number of the abnormal packet in the received retransmission request, it searches for packets in the mirrored buffer in its local buffer pool. If the search is successful, the retrieved packet is retransmitted to the destination for appending. Otherwise, it sends a retransmission request packet to the sending gateway to trigger a far-end retransmission. The far-end retransmission is a fallback mechanism.
[0080] It should be noted that the retransmission request message is either a NACK or SACK message. When the receiving gateway receives a NACK or SACK message, it searches its buffer pool based on the sequence number (PSN) of the abnormal message in the message. If a message with a matching sequence number is found, it is retrieved from the buffer and retransmitted. For NACK messages, all messages in the transmission buffer with a PSN greater than or equal to that in the NACK message need to be retransmitted; for SACK messages, only messages with the specified PSN in the SACK message need to be retransmitted. If no matching message is found, the NACK or SACK message is forwarded to the sending gateway, which then forwards it to the sending network interface card (NIC), triggering a remote retransmission as a fallback.
[0081] Considering that NACK or SACK packets may be lost or not sent, the receiving gateway needs to implement a network interface card (NIC) RTO (Retransmission Timeout) retransmission mechanism. This means that after forwarding a packet to the receiving end, the receiving gateway starts a timeout retransmission timer. If an ACK is received within the timeout period, the timer is restarted; otherwise, if no ACK is received after the timeout expires, all packets without ACK confirmation are forwarded to the receiving NIC.
[0082] Because the receiving gateway may experience multiple scenarios triggering packet forwarding simultaneously—including receiving packets from upstream and forwarding them downstream, retransmitting packets after receiving NACK or SACK signals, and retransmitting packets after the RTO timeout—a buffer-based queue-based sending method is used to ensure that packets are forwarded in order and without duplication. Specifically, when forwarding packets from the egress queue, the sPSN and lPSN are retrieved from the stream session and compared with the sequence number of the forwarded packet. If the sPSN is less than or equal to the lPSN, the packet needs to be forwarded, and the corresponding packet is retrieved from the buffer pool and forwarded downstream. If the sPSN is greater than the lPSN, the data stream forwarding is complete and no further forwarding is needed. After a packet is forwarded downstream, the sending end increments the sPSN. Upon receiving a NACK or SACK signal, the sPSN needs to be reset to the PSN corresponding to the NACK or SACK signal. Similarly, upon the RTO timeout, the sPSN needs to be reset to the PSN corresponding to the lACK signal.
[0083] In one implementation, the receiving gateway uses a circular queue for mirrored caching of RDMA data packets, following a first-in-first-out (FIFO) data structure to achieve circular reuse of limited physical memory. The head of the circular queue stores the oldest data packet, and the tail of the circular queue stores the newest data packet. A hash table of RDMA data packets is also established for retrieval. When the local cache pool is full, the oldest data packet is deleted from the head of the circular queue, and a newly received data packet is inserted at the tail of the queue to update the queue.
[0084] Understandably, hash tables are used to establish a fast mapping index between data packets and memory addresses. They contain hash key-value pairs for each data packet. The hash key-value pairs are generated or calculated using the session stream identifier (stream ID) and the packet sequence number (PSN) as the key, and the memory address of the data packet in the cache pool as the value.
[0085] The receiving gateway allocates a fixed-size circular buffer for each RDMA data packet. When a new packet arrives, it is placed at the tail of the queue and recorded in a hash table. When the buffer is full, the oldest data packet is removed directly from the head, and the corresponding index entry is deleted from the hash table. This mechanism effectively matches the bandwidth-delay product (BDP) of the wide area network, ensuring that the most valuable retransmitted data is cached within limited memory.
[0086] In one embodiment, reference is made to Figure 9 The data interaction example shown is a fast packet loss retransmission at the receiving end gateway. The sending end (source host) sends a packet PSN100 / 101 / 102. After being forwarded by the sending end gateway, it is buffered at the receiving end gateway and forwarded again. After reaching the receiving end (destination host), the receiving end replies with an ACK101 / 102 / 103 response. The receiving end gateway intercepts this ACK and releases the packet buffer of PSN100 / 101 / 102. The sender continues to send PSN103. Similarly, after being forwarded by the sender's gateway, it is buffered at the receiver's gateway and forwarded again. Packet loss occurs during the forwarding process to the receiver. The sender then sends PSN104 / 105. After being forwarded by the sender's gateway, it is buffered at the receiver's gateway and forwarded again. Upon reaching the receiver, the receiver detects out-of-order packets and replies with NACK / SACK103. After receiving NACK / SACK103, the receiver's gateway retrieves and retransmits PSN103 / 104 / 105 packets from its buffer, and the packet loss is repaired.
[0087] Furthermore, after receiving the PSN103 / 104 / 105 message, the receiving end replies with an ACK104 / 105 / 106 response. The receiving gateway intercepts this ACK and releases the message buffer for PSN103 / 104 / 105. The sending end continues to send the PSN106 / 107 / 108 message. After being forwarded by the sending gateway, the message is buffered at the receiving gateway and forwarded again. Upon reaching the receiving end, the sending end replies with an ACK107 / 108 / 109 response. The receiving gateway intercepts this ACK and releases the message buffer for PSN106 / 107 / 108.
[0088] Understandably, if packet loss occurs during the forwarding of PSN103 to the receiving gateway, the receiving gateway, upon receiving NACK / SACK103, will search the cached data packets in its buffer pool and will not find a matching packet. In this case, it will send NACK / SACK103 to the sending gateway, which will then forward it to the source host, triggering the source host to remotely retransmit the PSN103 packet.
[0089] It should be noted that, in Figures 7 to 9 In this system, both the sending gateway and the receiving gateway are gateway gateways used by data centers (i.e., data center A and data center B) for network acceleration, and the transmission distance between them exceeds 1000 km.
[0090] In this embodiment, a long-distance RDMA transmission optimization scheme that is transparent to the end side is constructed by employing a gateway collaborative proxy mechanism at both ends of the cross-domain transmission. On the one hand, this scheme utilizes the fast ACK proxy mechanism of the sending gateway to decouple the dependency between the source host's sending rate and the long latency of the wide area network. This not only releases the source host's network card resources in advance but also effectively avoids invalid retransmissions caused by RTO timeouts. On the other hand, by utilizing the local caching and near-end retransmission mechanism of the receiving gateway, the end-to-end retransmission across the wide area network is transformed into a local area network retransmission within the data center, greatly reducing packet loss recovery latency. Simultaneously, combined with dynamic congestion control and efficient ring buffer management, without modifying existing network card hardware and protocol stacks, real ACKs are intercepted and NACK / SACK responses are provided locally, reducing cross-domain retransmission overhead and significantly improving the effective throughput and reliability of RDMA transmission in cross-data center scenarios. This meets the stringent requirements of high-bandwidth, low-latency data interaction in scenarios such as intelligent computing centers.
[0091] Furthermore, embodiments of this application also provide a data transmission optimization method applied to a receiving gateway, which is the gateway of the data center where the destination host is located, and the destination host is the data receiver. (Refer to...) Figure 10 , Figure 10 This is a flowchart illustrating another embodiment of the data transmission optimization method of this application.
[0092] In this embodiment, the data transmission optimization method includes steps S1-S2: Step S1: Receive RDMA data packets sent by the sending gateway; the sending gateway is the gateway of the data center where the source host is located. Step S2: After the RDMA data packet is cached locally, it is forwarded to the destination host, and the second response information sent by the destination host is intercepted; the second response information is generated and sent by the destination host based on the received RDMA data packet. The RDMA data packet is sent from the source host to the sending gateway, and forwarded by the sending gateway when it determines that the message type of the RDMA data packet is a sequential message; the message type is one of sequential message, out-of-order message, and duplicate message; The sending gateway also generates a first response message based on the message type and sends it to the source host.
[0093] Receive RDMA data packets sent by the sending gateway, where the sending gateway is the gateway of the data center where the source host is located, and the source host is the sender of the RDMA data packets. Buffer the RDMA data packets locally and forward them to the destination host, and intercept the second response information sent by the destination host.
[0094] The RDMA data packet is sent from the source host to the sending gateway, and the sending gateway forwards it to the receiving gateway if it determines that the packet type is a sequential packet. The sending gateway also generates a first response message and sends it to the source host according to the packet type of the RDMA data packet.
[0095] In other words, the source host sends an RDMA data packet to the sending gateway. The sending gateway receives the RDMA data packet and determines its packet type, which can be one of three: sequential, out-of-order, or duplicate. Based on the packet type, the sending gateway generates a first response message and sends it to the source host. If the packet type is determined to be sequential, the sending gateway forwards the RDMA data packet to the receiving gateway. Upon receiving the RDMA data packet, the receiving gateway mirrors and caches it in its local cache pool and forwards it to the destination host. Upon receiving the RDMA data packet, the destination host generates a second response message based on its packet type and sends it to the receiving gateway. The receiving gateway intercepts the destination host's second response message to prevent the acknowledgment message from entering the WAN backhaul path, thus achieving data transmission termination proxying.
[0096] It should be understood that the data transmission optimization method for the receiving gateway provided in this application can be referred to in conjunction with the data transmission optimization method for the sending gateway described in the above embodiments, and will not be repeated here.
[0097] In this embodiment, by deploying gateway devices at the entry and exit points of the two data centers in cross-domain transmission to implement a collaborative response proxy, efficient termination and localized processing of cross-domain RDMA transmission are achieved. Specifically, firstly, the transmission feedback path is simplified and converged. The receiving gateway intercepts the second response information (such as ACK / NACK) generated by the destination host, cutting off the long-distance feedback loop that originally needed to cross the wide area network into local control plane processing on the gateway side. This eliminates the delay amplification effect of long RTT on transmission acknowledgment, allowing the state changes of the receiving end to be fed back to the sending proxy in real time. Secondly, the latency of near-end retransmission is eliminated. Relying on the local mirror cache pool and hash retrieval mechanism, the receiving gateway can directly extract the lost packets from the local cache for retransmission when packet loss is detected (such as receiving NACK / SACK or not receiving ACK after timeout). This transforms the end-to-end retransmission across the wide area network into a fast local area network recovery within the data center, greatly improving packet loss recovery efficiency and significantly enhancing transmission reliability and real-time performance. Finally, through a circular queue and a first-in-first-out dynamic elimination mechanism, the receiving gateway efficiently adapts to the high bandwidth delay product (BDP) requirements of long-distance transmission with limited hardware cache resources. This avoids the problem of limited retransmission windows caused by insufficient capacity of traditional end-side caches, thus achieving a perfect adaptation to the requirements of high bandwidth, low latency cross-domain data transmission without modifying the destination host hardware.
[0098] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the data transmission optimization method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0099] This application also provides a data transmission system; please refer to... Figure 11 The data transmission system includes: The system consists of a source host, a sending gateway, a receiving gateway, and a destination host. The sending gateway is the gateway of the data center where the source host is located, and the receiving gateway is the gateway of the data center where the destination host is located. The sending gateway and the receiving gateway communicate with each other to enable cross-domain data transmission.
[0100] Furthermore, the source host is the data sender, the destination host is the data receiver, and the sending gateway is used to execute the steps of the data transmission optimization method applied to the sending gateway as described in the above embodiments. Correspondingly, the receiving gateway is used to execute the steps of the data transmission optimization method applied to the receiving gateway as described in the above embodiments.
[0101] The data transmission system provided in this application, employing the data transmission optimization method described in the above embodiments, can solve the technical problem that existing RDMA transmission technology, in cross-data center data transmission scenarios, struggles to adapt to the latency characteristics of long-distance transmission, leading to performance degradation and failing to meet the data center's requirements for high-bandwidth, high-reliability cross-domain data transmission. Compared with the prior art, the beneficial effects of the data transmission system provided in this application are the same as those of the data transmission optimization method provided in the above embodiments, and other technical features of the data transmission system are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0102] This application provides a gateway device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the data transmission optimization method in the above embodiments.
[0103] The following is for reference. Figure 12 The diagram illustrates a structural schematic of a gateway device suitable for implementing embodiments of this application. The gateway device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 12 The gateway device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0104] like Figure 12As shown, the gateway device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the gateway device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the gateway device to communicate wirelessly or wiredly with other devices to exchange data. While gateway devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0105] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0106] The gateway device provided in this application, by implementing the data transmission optimization method in the above embodiments, can solve the technical problem that existing RDMA transmission technology, in cross-data center data transmission scenarios, is difficult to adapt to the latency characteristics of long-distance transmission, resulting in performance degradation and failing to meet the data center's requirements for high-bandwidth, high-reliability cross-domain data transmission. Compared with the prior art, the beneficial effects of the gateway device provided in this application are the same as those of the data transmission optimization method provided in the above embodiments, and other technical features in this gateway device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0107] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0108] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0109] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the data transmission optimization method in the above embodiments.
[0110] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0111] The aforementioned computer-readable storage medium may be included in the gateway device; or it may exist independently and not be assembled into the gateway device.
[0112] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the gateway device, cause the gateway device to: Receive RDMA data packets sent by the source host and determine the packet type of the RDMA data packets; the packet type is one of sequential packet, out-of-order packet, and duplicate packet; A first response message is generated based on the message type and sent to the source host. If the message type is a sequential message, the RDMA data message is forwarded to the receiving gateway. The receiving gateway is the gateway of the data center where the destination host is located. The receiving gateway mirrors and caches the RDMA data packet in its local cache pool before forwarding it to the destination host, and intercepts the second response information sent by the destination host; the second response information is generated and sent by the destination host based on the received RDMA data packet.
[0113] Alternatively, receive RDMA data packets sent by the sending gateway; the sending gateway is the gateway of the data center where the source host is located. The RDMA data packet is forwarded to the destination host after being cached locally, and the second response information sent by the destination host is intercepted; the second response information is generated and sent by the destination host based on the received RDMA data packet. The RDMA data packet is sent from the source host to the sending gateway, and forwarded by the sending gateway when it determines that the message type of the RDMA data packet is a sequential message; the message type is one of sequential message, out-of-order message, and duplicate message; The sending gateway also generates a first response message based on the message type and sends it to the source host.
[0114] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0116] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0117] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described data transmission optimization method. This addresses the technical problem that existing RDMA transmission technologies, in cross-data center data transmission scenarios, struggle to adapt to the latency characteristics of long-distance transmission, leading to performance degradation and failing to meet the data center's requirements for high-bandwidth, high-reliability cross-domain data transmission. Compared to existing technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the data transmission optimization method provided in the above embodiments, and will not be elaborated upon here.
[0118] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data transmission optimization method described above.
[0119] The computer program product provided in this application can solve the technical problem that existing RDMA transmission technology is difficult to adapt to the latency characteristics of long-distance transmission in cross-data center data transmission scenarios, resulting in performance degradation and failing to meet the data center's requirements for high-bandwidth, high-reliability cross-domain data transmission. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the data transmission optimization method provided in the above embodiments, and will not be repeated here.
[0120] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A data transmission optimization method, characterized in that, A sending gateway used for cross-domain transmission, wherein the sending gateway is the gateway of the data center where the source host is located; The data transmission optimization method includes: Receive the RDMA data packet sent by the source host and determine the packet type of the RDMA data packet; the packet type is one of sequential packet, out-of-order packet, and duplicate packet; A first response message is generated based on the message type and sent to the source host. If the message type is a sequential message, the RDMA data message is forwarded to the receiving gateway. The receiving gateway is the gateway of the data center where the destination host is located. The receiving gateway mirrors and caches the RDMA data packet in its local cache pool before forwarding it to the destination host, and intercepts the second response information sent by the destination host; the second response information is generated and sent by the destination host based on the received RDMA data packet.
2. The data transmission optimization method as described in claim 1, characterized in that, The first response information is either a fast acknowledgment (ACK) or a fast negative acknowledgment (NACK); the step of generating the first response information according to the message type and sending it to the source host includes: If the message type is an out-of-order message, the RDMA data message is buffered; If the target packet corresponding to the out-of-order packet is not received within a preset time period, a fast negative acknowledgment (NACK) message is generated and sent to the source host to trigger the source host to retransmit; the sequence number of the target packet is the expected sequence number corresponding to the RDMA data packet. If a target packet corresponding to the RDMA data packet is received within a preset time period, the target packet and the RDMA data packet are reassembled into a sequential packet, and a fast acknowledgment (ACK) message is generated and sent to the source host. If the message type is a duplicate message, the RDMA data message is discarded, and a fast acknowledgment (ACK) message is generated and sent to the source host.
3. The data transmission optimization method as described in claim 1, characterized in that, The step of determining the message type of the RDMA data message includes: Extract message features from the RDMA data message; the message features include at least the message sequence number; Extract the expected sequence number corresponding to the RDMA data packet from the session information of the pre-established streaming session; The message sequence number in the message characteristics is compared with the expected message sequence number, and the message type of the RDMA data message is determined based on the comparison result. Specifically, if the comparison result indicates that the message sequence number in the message features is consistent with the expected message sequence number, then the message type of the RDMA data message is a sequential message; if the comparison result indicates that the message sequence number in the message features is greater than the expected message sequence number, then the message type of the RDMA data message is an out-of-order message; if the comparison result indicates that the message sequence number in the message features is less than the expected message sequence number, then the message type of the RDMA data message is a duplicate message.
4. The data transmission optimization method as described in claim 1, characterized in that, The data transmission optimization method further includes: If the local cache occupancy rate exceeds a preset threshold, a congestion notification message is generated and sent to the source host to limit the sending rate of the source host.
5. The data transmission optimization method according to any one of claims 1 to 4, characterized in that, After the receiving gateway mirrors and caches the RDMA data packet in its local cache pool before forwarding it to the destination host, the method further includes: If the receiving gateway does not receive the second response information from the destination host within a preset time period, or if the second response information is a retransmission request message, the receiving gateway triggers near-end retransmission and searches the local cache pool according to the abnormal message sequence number in the retransmission request message. If the search is successful, the retrieved RDMA data message is retransmitted to the destination host. Receive a retransmission request message sent by the receiving gateway; the retransmission request message is sent by the receiving gateway when the local cache pool is not found. The retransmission request message is forwarded to the source host to trigger the source host to perform a remote retransmission.
6. The data transmission optimization method as described in claim 5, characterized in that, The receiving gateway uses a circular queue to mirror and cache the RDMA data packets. The head of the circular queue stores the oldest data packet, and the tail of the circular queue stores the latest data packet. A hash table of the RDMA data packets is also established for retrieval. When the local cache pool is full, the oldest data packet is deleted from the head of the circular queue to update the queue.
7. A data transmission optimization method, characterized in that, A receiving gateway used for cross-domain transmission, wherein the receiving gateway is the gateway of the data center where the destination host is located; The data transmission optimization method includes: Receive RDMA data packets sent by the sending gateway; the sending gateway is the gateway of the data center where the source host is located; The RDMA data packet is forwarded to the destination host after being cached locally, and the second response information sent by the destination host is intercepted; the second response information is generated and sent by the destination host based on the received RDMA data packet. The RDMA data packet is sent from the source host to the sending gateway, and forwarded by the sending gateway when it determines that the message type of the RDMA data packet is a sequential message; the message type is one of sequential message, out-of-order message, and duplicate message; The sending gateway also generates a first response message based on the message type and sends it to the source host.
8. A data transmission system, characterized in that, It includes a source host, a sending gateway, a receiving gateway, and a destination host. The sending gateway is the gateway of the data center where the source host is located, and the receiving gateway is the gateway of the data center where the destination host is located. The sending gateway and the receiving gateway are communicatively connected to realize cross-domain data transmission; the sending gateway is used to execute the steps of the data transmission optimization method as described in any one of claims 1 to 6, and the receiving gateway is used to execute the steps of the data transmission optimization method as described in claim 7.
9. A gateway device, characterized in that, The gateway device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data transmission optimization method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the data transmission optimization method as described in any one of claims 1 to 7.