Wide area network TCP congestion control method and system based on advanced packet loss feedback
Through the early packet loss feedback mechanism in the WAN, the congestion control loop is shortened, and the problem of lag in the congestion feedback in the WAN is solved, faster congestion response and more efficient bandwidth utilization are achieved, and it is suitable for long-distance network scenarios.
Patent Information
- Application Number
- CN202410886184.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-03
AI Technical Summary
In the wide area network scenario, the existing TCP congestion control algorithms cannot effectively solve the problem of delay and bandwidth loss due to long round trip delays, especially for short and long flows.
Using the method based on early packet loss feedback, the RDN notification message and CWR_REQ message are generated at the transit device to inform the sending side of congestion in advance, shorten the congestion control loop, reduce packet loss delay, and ensure the design through the principle of congestion control level. The pre-control logic does not interfere with the original behavior.
It significantly reduces the congestion control delay, enables the sender to perceive congestion more timely and responds, reduces subsequent packet loss, improves the accuracy of fast retransmission and bandwidth utilization, especially in the one-way long service flow scenario, And provide a reliable speed reduction mechanism without increasing load.
Smart Images

Figure CN119052180A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of TCP congestion control, and in particular to a wide area network TCP congestion control method and system based on early packet loss feedback. Background Art
[0002] With the rapid development of communication technology and the growing demand for high-speed transmission, the bandwidth of WAN links has increased year by year. At the same time, the issue of how to effectively control congestion in high-bandwidth WANs has become increasingly prominent. The traffic composition in WANs is complex, including not only short flows that are sensitive to delay (such as live broadcasts, voice, etc.), but also long flows that are sensitive to flow completion time (such as file transfers, financial services, etc.). These two types of traffic will be affected to varying degrees when encountering packet loss caused by congestion: short flows need to retransmit data, resulting in at least doubling of delay; long flows will lose a section of data and enter congestion control to slow down, and will exit the congestion control state only after the lost data is completely retransmitted, resulting in an increase in flow completion time. In the long-distance WAN scenario, the round-trip delay tends to be a large value, which brings about the lag of congestion feedback. In this case, for short-flow packet loss, the delay caused by retransmission will greatly degrade the performance. For long-flow packet loss, because a considerable amount of data will be lost and there is no accurate retransmission sequence number guidance, the sender needs a long time to exit congestion control, resulting in bandwidth loss. Due to chip area limitations and high SRAM costs, the current commercial switch cache in the WAN cannot match the bandwidth it supports well, which also means that congestion packet loss is quite common in the WAN.
[0003] The existing WAN TCP congestion control algorithm mainly collects congestion signals in the network so that the sender can execute the corresponding action. These congestion signals can be packet loss, delay, and bandwidth, but they all have a problem. When congestion occurs, the data packet carrying information needs to reach the receiving end first, and then return to the sending end through ACK to be responded. In this way, at least 1 RTT is required since the congestion occurs, which cannot solve the congestion control in the WAN scenario with long round-trip delay. In order to optimize the congestion control in the WAN scenario, it seems possible to redesign the congestion control algorithm, but considering that the TCP congestion control system has been developed for decades, it is very difficult to design a new control system completely independently and consider the fairness problem of coexistence with traditional TCP traffic. It is a feasible and effective solution to shorten the congestion control loop and reduce the congestion feedback delay while retaining the original to a certain extent. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above existing problems, the present invention is proposed. Therefore, the present invention provides a wide area network TCP congestion control method based on early packet loss feedback to solve the congestion control problem in a wide area network scenario with a long round-trip delay.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a wide area network TCP congestion control method based on early packet loss feedback, comprising: establishing a TCP connection between a sending end and a receiving end, the sending end sending a TCP data message to the receiving end;
[0008] The transfer device receives the TCP data message and forwards it. If the egress queue buffer reaches the discard threshold during forwarding, it marks that the TCP flow in the corresponding direction has message loss, discards the TCP data message and generates an RDN notification message.
[0009] The transfer device sends the RDN notification message to the sending end, and the sending end receives and marks the corresponding data message as lost, and enters the congestion control state;
[0010] The sender retransmits the data packet carrying the CWR flag, and the transit device receives the RDN loop response from the sender and clears the congestion flag of the corresponding TCP flow.
[0011] As a preferred solution of the wide area network TCP congestion control method based on early packet loss feedback described in the present invention, generating an RDN notification message includes:
[0012] The RDN notification message includes a DROP_NOTIFY message and a CWR_REQ message;
[0013] When the transit device receives a data packet, if there is no current buffering capability to forward the data packet, the data packet to be discarded is generated into a DROP_NOTIFY message through field editing, including:
[0014] The TCP payload and TCP option of the data packet are discarded, and only the transport layer and previous headers are retained;
[0015] exchanging a quadruple of the data packets, the quadruple comprising a destination IP address, a source IP address, a destination port number, and a source port number;
[0016] Recalculate the IP header and TCP header checksum;
[0017] The data message is rerouted and placed in a high priority queue of an egress port for forwarding with priority.
[0018] As a preferred solution of the wide area network TCP congestion control method based on early packet loss feedback described in the present invention, wherein: the CWR_REQ message includes:
[0019] A congestion marking hash table is designed at the transit device. When packet loss occurs at the transit device and a DROP_NOTIFY message is generated, the congestion hash table value of the corresponding TCP flow is set to 1.
[0020] Based on the ACK returned by the receiving end, the relay device receives the TCP ACK message;
[0021] Read the congestion hash table key value of the reverse TCP flow corresponding to the TCP ACK message, that is, the value of the four-tuple;
[0022] If the value is 1, the TCP ACK message is made to carry CWR_REQ information, the CWR_REQ message is generated, and is forwarded to the sending end.
[0023] As a preferred solution of the wide area network TCP congestion control method based on early packet loss feedback described in the present invention, wherein: the sending end receives and marks the corresponding data message as lost, and enters the congestion control state includes:
[0024] The sender responds to the DROP_NOTIFY and CWR_REQ messages arriving from the relay device;
[0025] The DROP_NOTIFY message carries the packet loss sequence number information, and the sending end enters the fast retransmission phase. The CWR_REQ message notifies the sending end that packet loss has occurred, and the sending end enters the window reduction phase;
[0026] The congestion control states include CA_Open, CA_Disorder, CA_CWR, CA_Recovery and CA_Loss, which respectively represent no congestion, disorder, receiving auxiliary congestion feedback, fast retransmission and timeout retransmission, and are marked as 0 to 4;
[0027] The sender responds to the congestion in advance. When the sender responds to the first level congestion control loop, the new congestion control level is congState new It is expressed as:
[0028] congState new=max{congState old ,congState′}
[0029] Among them, congState old represents the original congestion control level, and congState′ represents the target congestion control level of the first-level congestion control loop.
[0030] As a preferred solution of the wide area network TCP congestion control method based on early packet loss feedback described in the present invention, wherein: the sending end retransmits the data message carrying the CWR mark including:
[0031] When the sender receives the DROP_NOTIFY message, it marks the message segment with the corresponding sequence number as lost by traversing the queue, and calculates the end sequence number based on the IP header and TCP header response fields and the start sequence number of the message, expressed as:
[0032] payload_len=ip·tot_len-4·ip·ihl-4·tcp.th_off
[0033] seq end =seq start +payload_len-1
[0034] Among them, ip·tot_len indicates the total length of the IP packet, ip·ihl indicates the total length of the IP header, tcp.th_off indicates the TCP payload offset, payload_len indicates the TCP payload length, and seqstart indicates the starting sequence number of the lost packet carried in the DROP_NOTIFY message;
[0035] If the marking is successful, the sender attempts to enter CA_Recovery while following the congestion control level principle, otherwise the sender attempts to enter CA_CWR;
[0036] The sender notifies the transit device that it has responded to the DROP_NOTIFY or CWR_REQ message and adds a CWR mark to the retransmitted TCP data message.
[0037] As a preferred solution of the wide area network TCP congestion control method based on early packet loss feedback described in the present invention, wherein: the sending end enters CA_CWR including:
[0038] The sender sets the variable responseMark, and when responding to the CWR_REQ message, assigns the value of responseMark to the sequence number SND.NXT of the next new data segment to be sent;
[0039] Before entering CWR_REQ, determine whether the current smallest unconfirmed sequence number SND.UNA is greater than responseMark. If so, respond to the control; otherwise, skip the response.
[0040] As a preferred solution of the wide area network TCP congestion control method based on early packet loss feedback described in the present invention, wherein: the sending end performs early congestion response further includes:
[0041] After the sending end responds to the early congestion feedback, the transfer device is notified to clear the notification status in the congestion hash table;
[0042] The sender maintains a state variable RDN_state to indicate whether it is currently in the response state of the first-level congestion control loop. The value of RDN_state is 1, indicating that it is in the response state, and the value of RDN_state is 0, indicating that it is not in the response state.
[0043] When exiting congestion control, that is, the congestion control level is less than 2, if the current RDN_State value is 1, RDN_State is set to 0.
[0044] In a second aspect, the present invention provides a wide area network TCP congestion control system based on early packet loss feedback, comprising:
[0045] A communication module, used to establish a TCP connection between a sending end and a receiving end, wherein the sending end sends a TCP data message to the receiving end;
[0046] A message generation module is used to receive the TCP data message at the transfer device and forward it. If the egress queue cache reaches the discard threshold during forwarding, it marks that the TCP flow in the corresponding direction has message loss, discards the TCP data message and generates an RDN notification message;
[0047] A control module, used for the transfer device to send the RDN notification message to the sending end, and the sending end receives and marks the corresponding data message as lost, and enters a congestion control state;
[0048] The response module is used for the sender to respond to the congestion notification and retransmit the data message carrying the CWR flag. The transit device receives the RDN loop that the sender has responded to and clears the congestion flag of the corresponding TCP flow.
[0049] In a third aspect, the present invention provides an electronic device, comprising:
[0050] Memory and processor;
[0051] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the wide area network TCP congestion control method based on early packet loss feedback are implemented.
[0052] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the wide area network TCP congestion control method based on early packet loss feedback.
[0053] Compared with the prior art, the present invention has the following beneficial effects: the present invention designs a shorter early packet loss feedback control loop, which can significantly reduce the control delay under the long-distance characteristics of the wide area network, so that the sender can perceive the congestion and respond more promptly, reducing the occurrence of subsequent packet loss; by occupying less reverse link resources, the sender is accurately assisted to retransmit the lost data segments, so that the sender can recover from fast retransmission faster, and the improvement is particularly obvious in the use scenario of unidirectional long business flow; when the packet loss notification is lost due to reverse link congestion or other reasons, the present invention can still allow the sender to enter speed reduction in advance through the auxiliary notification mechanism without increasing any load, forming a reliable control mechanism; the principle of congestion control level is proposed and followed, so that the designed front-end control logic will not interfere with the original congestion control behavior, reflecting good robustness and practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0055] Figure 1 It is a schematic diagram of the overall process of a wide area network TCP congestion control method based on early packet loss feedback according to an embodiment of the present invention;
[0056] Figure 2 A schematic diagram of a two-level control system architecture of a wide area network TCP congestion control method based on early packet loss feedback according to an embodiment of the present invention;
[0057] Figure 3 A schematic diagram of the workflow of a wide area network TCP congestion control method based on early packet loss feedback according to an embodiment of the present invention;
[0058] Figure 4 A schematic diagram of a simulation experiment architecture of a wide area network TCP congestion control method based on early packet loss feedback according to an embodiment of the present invention;
[0059] Figure 5 A schematic diagram of Google WebSearch traffic distribution of a wide area network TCP congestion control method based on early packet loss feedback according to an embodiment of the present invention;
[0060] Figure 6 A schematic diagram of Facebook Hadoop traffic distribution of a wide area network TCP congestion control method based on early packet loss feedback according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0062] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0063] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0064] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0065] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0066] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0067] Example 1
[0068] Reference Figure 1-3 , as an embodiment of the present invention, provides a wide area network TCP congestion control method based on early packet loss feedback, comprising:
[0069] S101, a TCP connection is established between a sending end and a receiving end, and the sending end sends a TCP data message to the receiving end.
[0070] It should be noted that considering the problem that long flows in wide area networks cannot accurately locate lost data segments during fast retransmission, a two-level control architecture with early feedback of packet loss is designed. A shorter congestion loop, RDN, is used to notify the sender of congestion in advance, while the second level is a congestion control algorithm to handle congestion that cannot be handled by the first level. The implementation of the first-level control loop lies in the interaction between the sender and the transfer device. The data transfer device detects the occurrence of packet loss and notifies the sender in advance through the control loop. The sender responds to it in a timely manner, identifies the lost segment and enters the fast retransmission stage for accurate retransmission.
[0071] S102, the transfer device receives the TCP data message and forwards it. If the egress queue buffer reaches the discard threshold during forwarding, it is marked that the TCP flow in the corresponding direction has message loss, the TCP data message is discarded and an RDN notification message is generated.
[0072] Preferably, generating the RDN notification message includes:
[0073] RDN notification messages include DROP_NOTIFY messages and CWR_REQ messages;
[0074] The transit device implements a reliable logic of notifying the receiving end of congestion packet loss. When the transit device receives a data packet, if there is no buffering capability to forward the data packet, the data packet that should be discarded is generated into a DROP_NOTIFY message through field editing, including:
[0075] Discard the TCP payload and TCP options of the data packet, and only keep the transport layer and previous headers;
[0076] The four-tuple of the exchanged data packet includes the destination IP address, source IP address, destination port number and source port number;
[0077] Recalculate the IP header and TCP header checksum;
[0078] Reroute the data message and put it into the high priority queue of the egress port for forwarding first.
[0079] It should be noted that after the above steps, the resulting DROP_NOTIFY message will be routed back to the sender at the cost of a small overhead (less than 60 bytes) on the reverse link, and will carry the sequence number information of the lost packet. This notification will be earlier than the round-trip delay from the transit device to the receiving end than the congestion control in which the receiving end participates, thus achieving an advance notification.
[0080] Since not all transit devices in the reverse link support the mechanism implemented by the present invention, after a transit device supporting RDN generates a DROP_NOTIFY message, if congestion occurs in the reverse link, the DROP_NOTIFY message may be discarded, resulting in the congestion information failing to reach the sender in advance. To address this problem, the present invention also implements a reliable auxiliary notification mechanism CWR_REQ to ensure that congestion information can be transmitted to the sender when packet loss occurs.
[0081] The implementation of CWR_REQ requires the maintenance of a congestion marking hash table at the transit device. The key value of the hash table is a four-tuple of (source IP address, destination IP address, source port number, destination port number), which is the identifier of a TCP flow in one direction. The value is 0 or 1, indicating whether the flow in that direction needs to be notified of congestion and packet loss in the current situation. 0 means no, and 1 means yes. Considering that the concurrency of flows in different application scenarios is different, the size of the hash table should also be adjusted according to the actual situation. Since each increase in the hash table only brings 1 bit of overhead, the concurrency of the flow that can be carried is proportional to the size of the hash table when there is no hash conflict, so it can better adapt to the transit device cache in normal WAN scenarios.
[0082] Preferably, a congestion marking hash table is designed at the transit device. When packet loss occurs at the transit device and a DROP_NOTIFY message is generated, the congestion hash table value of the corresponding TCP flow is set to 1. When the sender responds to the control or the transit device receives a message with a TCP FIN mark, the congestion hash table value of the corresponding TCP flow is set to 0.
[0083] Based on the ACK returned by the receiving end, the relay device receives the TCP ACK message;
[0084] Read the congestion hash table key value of the reverse TCP flow corresponding to the TCP ACK message, that is, the value of the four-tuple;
[0085] If the value is 1, the TCP ACK message carries the CWR_REQ information, generates a CWR_REQ message, and forwards it to the sender.
[0086] It should be noted that the above process can ensure that the sender is reliably notified of the occurrence of congestion before receiving the advance congestion feedback without causing overhead to the network.
[0087] In order to distinguish the DROP_NOTIFY message from the CWR_REQ message, the reserved field of the TCP header is used. It is located after the data offset field, at bits 101 to 106. Since only two special messages and the original messages need to be distinguished, only the last two bits are used, and they are called RM. When RM=0b00, it is a normal message, when RM=0b01, it is a DROP_NOTIFY message, and when RM=0b02, it is a CWR_REQ message.
[0088] S103, the transit device sends an RDN notification message to the sending end, and the sending end receives and marks the corresponding data message as lost, and enters the congestion control state.
[0089] Preferably, the sending end receives and marks the corresponding data message as lost, and enters the congestion control state includes:
[0090] The sender responds to the DROP_NOTIFY and CWR_REQ messages arriving from the relay device;
[0091] The DROP_NOTIFY message carries the packet loss sequence number information, and the sender enters the fast retransmission phase. The CWR_REQ message notifies the sender that packet loss has occurred, and the sender enters the window reduction phase.
[0092] It should be noted that in the first-level congestion control loop, the sender is responsible for responding to the DROP_NOTIFY and CWR_REQ messages arriving from the transit device. DROP_NOTIFY carries the precise sequence number information of the lost packet, and the sender must enter the fast retransmission phase (CA_Recovery); CWR_REQ can only notify the sender that packet loss has occurred and does not carry additional information, so the sender cannot blindly retransmit the message and can only enter the window reduction phase (CA_CWR).
[0093] In the Linux kernel, TCP congestion control can be divided into five states, including CA_Open, CA_Disorder, CA_CWR, CA_Recovery, and CA_Loss, which respectively indicate no congestion, disorder, receiving auxiliary congestion feedback, fast retransmission, and timeout retransmission. The congestion levels are progressive, marked from 0 to 4.
[0094] Since congestion control is closely related to timing, the network may also be in a congested state when the first level of control is triggered. At this time, a principle must be followed that the congestion control level cannot be reduced due to early congestion feedback. Assume that the sender responds to the first level of congestion control loop in advance. The new congestion control level is congState new It is expressed as:
[0095] congState new =max{congState old ,congState′}
[0096] Among them, congState old Indicates the original congestion control level, congState′ indicates the target congestion control level of the first-level congestion control loop (such as the above, the received DROP_NOTIFY is 3, and the received CWR_REQ is 2). Following this principle, the early congestion response of the first-level congestion control loop can be executed without affecting the secondary congestion control loop.
[0097] Preferably, the sending end retransmits the data message carrying the CWR flag including:
[0098] When the sender receives the DROP_NOTIFY message, a retransmission queue is dynamically maintained based on the SACK mechanism in the Linux kernel implementation, which contains all the segments that have not been confirmed. Therefore, the segments with the corresponding sequence numbers can be marked as lost by traversing the queue to facilitate subsequent retransmission. The starting sequence number of the lost segment can be known in the DROP_NOTIFY message. Since the length field of the IP and TCP headers is not modified when generating DROP_NOTIFY, the ending sequence number can be calculated based on the IP header and TCP header response fields and the starting sequence number of the message, expressed as:
[0099] payload_len=ip·tot_len-4·ip·ihl-4·tcp.th_off
[0100] seq end =seq start +payload_len-1
[0101] Among them, ip·tot_len represents the total length of the IP packet, ip·ihl represents the total length of the IP header, tcp.th_off represents the TCP load offset, payload_len represents the TCP payload length, seq start Indicates the starting sequence number of the lost message carried in the DROP_NOTIFY message;
[0102] If the marking is successful, the sender will try to enter CA_Recovery in accordance with the congestion control level principle. Otherwise, it will adopt a logic similar to that of receiving CWR_REQ because there is no accurate packet loss guidance. The sender will try to enter CA_CWR.
[0103] The sender notifies the transit device that it has responded to the DROP_NOTIFY or CWR_REQ message and adds a CWR mark to the retransmitted TCP data message.
[0104] It should be noted that in order to notify the transit device that the sender has responded to the DROP_NOTIFY or CWR_REQ message, this embodiment adopts a strategy similar to ECN, and adds a CWR mark to the subsequently sent TCP data message. However, the difference is that since the intuitive manifestation caused by the DROP_NOTIFY message is to trigger a retransmission, the retransmitted message should also be marked with a CWR mark.
[0105] Preferably, the sending end enters CA_CWR including:
[0106] The sender sets the variable responseMark, and when responding to the CWR_REQ message, assigns the value of responseMark to the sequence number SND.NXT of the next new data segment to be sent;
[0107] Before entering CWR_REQ, determine whether the current smallest unconfirmed sequence number SND.UNA is greater than responseMark. If so, respond to the control; otherwise, skip the response.
[0108] It should be noted that when receiving the reliable auxiliary notification mechanism CWR_REQ, unlike DROP_NOTIFY which directly attempts to enter congestion control, in order to prevent the reverse link congestion from causing excessive speed reduction of the forward link, this embodiment stipulates that CWR_REQ is responded to at most once in a sending window. Since CA_CWR is an important logic implemented in the explicit congestion notification (ECN) mechanism, in order to couple with the ECN-based congestion control, the same judgment strategy is adopted before entering CA_CWR. Although the explicit congestion notification requires the support of all switches along the way and can hardly be deployed in a wide area network, this issue is still considered for the robustness of the design.
[0109] Preferably, after the sending end responds to the early congestion feedback, it notifies the transfer device to clear the notification status in the congestion hash table;
[0110] The sender maintains a state variable RDN_state to indicate whether it is currently in the response state of the first-level congestion control loop. The value of RDN_state is 1, indicating that it is in the response state, and the value of RDN_state is 0, indicating that it is not in the response state.
[0111] When exiting congestion control, that is, the congestion control level is less than 2, if the current RDN_State value is 1, RDN_State is set to 0.
[0112] S104, the sending end retransmits the data message carrying the CWR flag, and the transit device receives the RDN loop response from the sending end and clears the corresponding TCP flow congestion flag.
[0113] Preferably, when the sending end response control or the transit device receives a message with a TCP FIN flag, the congestion hash table value of the corresponding TCP flow is set to 0;
[0114] Specifically, the transit device receives a TCP data packet with a CWR flag or a FIN flag, obtains the subscript corresponding to the congestion flag of the TCP flow according to the four-tuple, and clears the value of the congestion flag of the corresponding TCP flow to 0.
[0115] It should be noted that, corresponding to the congestion hash table at the transit device, the sender needs to notify the transit device to clear the notification status in the hash table after responding to the early congestion feedback. This requires the sender itself to maintain a state variable to identify whether it is currently in the response of the first-level congestion control loop. This situation only occurs when the sender receives an ACK.
[0116] The present invention designs a shorter early packet loss feedback control loop, which can significantly reduce the control delay under the long-distance characteristics of the wide area network, enable the sender to perceive congestion and respond more promptly, and reduce the occurrence of subsequent packet loss; by occupying less reverse link resources, the sender is accurately assisted to retransmit lost data segments, allowing the sender to recover from fast retransmission more quickly, and the improvement is particularly obvious in the use scenario of unidirectional long business flow; when the packet loss notification is lost due to reverse link congestion or other reasons, the present invention can still allow the sender to enter speed reduction in advance through the auxiliary notification mechanism without adding any load, forming a reliable control mechanism; the principle of congestion control level is proposed and followed, so that the designed front-end control logic will not interfere with the original congestion control behavior, reflecting good robustness and practicality.
[0117] The above is a schematic scheme of a wide area network TCP congestion control method based on early packet loss feedback of this embodiment. It should be noted that the technical scheme of the wide area network TCP congestion control system based on early packet loss feedback and the technical scheme of the wide area network TCP congestion control method based on early packet loss feedback described above belong to the same concept, and the details of the technical scheme of the wide area network TCP congestion control system based on early packet loss feedback in this embodiment that are not described in detail can all be referred to the description of the technical scheme of the wide area network TCP congestion control method based on early packet loss feedback described above.
[0118] The wide area network TCP congestion control system based on early packet loss feedback in this embodiment includes:
[0119] The communication module is used to establish a TCP connection between the sending end and the receiving end, and the sending end sends a TCP data message to the receiving end;
[0120] The message generation module is used to receive TCP data messages at the transfer device and forward them. If the egress queue buffer reaches the discard threshold during forwarding, it marks that the TCP flow in the corresponding direction has message loss, discards the TCP data message and generates an RDN notification message.
[0121] A control module, which is used for the transfer device to send an RDN notification message to the sending end, and the sending end receives and marks the corresponding data message as lost, and enters a congestion control state;
[0122] The output module is used for the sender to retransmit the data message carrying the CWR flag. The transit device receives the RDN loop that the sender has responded to and clears the congestion flag of the corresponding TCP flow.
[0123] This embodiment further provides an electronic device, which is applicable to wide area network TCP congestion control based on early packet loss feedback, including:
[0124] A memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the wide area network TCP congestion control method based on early packet loss feedback as proposed in the above embodiment.
[0125] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for wide area network TCP congestion control based on early packet loss feedback as proposed in the above embodiment is implemented.
[0126] The storage medium proposed in this embodiment and the wide area network TCP congestion control method based on early packet loss feedback proposed in the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0127] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccessMemory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
[0128] Example 2
[0129] Refer to Table 1 and Figure 4-6 , which is an embodiment of the present invention, provides a wide area network TCP congestion control method based on early packet loss feedback. In order to verify its beneficial effects, the comparison results of two schemes are provided.
[0130] In this embodiment, the traffic distribution of Google Web Search and Facebook Hadoop with 80% load is adopted, as shown in Table 1, and the simulation experiment is carried out in the 8-to-1 scenario of 10 Gbps. Figure 4 shown.
[0131] Table 1: Traffic distribution table
[0132] Traffic distribution Traffic volume Total length (MB) Google Web Search 2298 4102.11 FBHadoop 33257 3856.97
[0133] pass Figure 5 , Figure 6 The experimental results show that for the optimization of the flow completion time (Flow Completion Time) of TCP Cubic, CUBIC with RDN implements the method of the present invention, while CUBIC w / o RDN does not implement the method of the present invention. The link delay is 10ms, the round-trip delay RTT is 40ms, and the average FCT is reduced. The effect is more obvious in the Google WebSearch traffic distribution.
[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A wide area network TCP congestion control method based on early packet loss feedback, characterized in that: include: A TCP connection is established between a sending end and a receiving end, wherein the sending end sends a TCP data message to the receiving end; The transfer device receives the TCP data message and forwards it. If the egress queue buffer reaches the discard threshold during forwarding, it marks that the TCP flow in the corresponding direction has message loss, discards the TCP data message and generates an RDN notification message. The transfer device sends the RDN notification message to the sending end, and the sending end receives and marks the corresponding data message as lost, and enters the congestion control state; The sender retransmits the data packet carrying the CWR flag, and the transit device receives the RDN loop response from the sender and clears the congestion flag of the corresponding TCP flow.
2. The wide area network TCP congestion control method based on early packet loss feedback as claimed in claim 1, characterized in that: Generating an RDN notification message includes: The RDN notification message includes a DROP_NOTIFY message and a CWR_REQ message; When the transit device receives a data packet, if there is no current buffering capability to forward the data packet, the data packet to be discarded is generated into a DROP_NOTIFY message through field editing, including: The TCP payload and TCP option of the data packet are discarded, and only the transport layer and previous headers are retained; exchanging a quadruple of the data packets, the quadruple comprising a destination IP address, a source IP address, a destination port number, and a source port number; Recalculate the IP header and TCP header checksum; The data message is rerouted and placed in a high priority queue of an egress port for forwarding with priority.
3. The wide area network TCP congestion control method based on early packet loss feedback as described in claim 1 or 2, characterized in that: The CWR_REQ message includes: A congestion marking hash table is designed at the transit device. When packet loss occurs at the transit device and a DROP_NOTIFY message is generated, the congestion hash table value of the corresponding TCP flow is set to 1. Based on the ACK returned by the receiving end, the relay device receives the TCP ACK message; Read the congestion hash table key value of the reverse TCP flow corresponding to the TCP ACK message, that is, the value of the four-tuple; If the value is 1, the TCP ACK message is made to carry CWR_REQ information, the CWR_REQ message is generated, and is forwarded to the sending end.
4. The wide area network TCP congestion control method based on early packet loss feedback as claimed in claim 3, characterized in that: The sender receives and marks the corresponding data message as lost and enters the congestion control state, including: The sender responds to the DROP_NOTIFY and CWR_REQ messages arriving from the relay device; The DROP_NOTIFY message carries the packet loss sequence number information, and the sending end enters the fast retransmission phase. The CWR_REQ message notifies the sending end that packet loss has occurred, and the sending end enters the window reduction phase; The congestion control states include CA_Open, CA_Disorder, CA_CWR, CA_Recovery and CA_Loss, which respectively represent no congestion, disorder, receiving auxiliary congestion feedback, fast retransmission and timeout retransmission, and are marked as 0 to 4; The sender responds to the congestion in advance. When the sender responds to the first level congestion control loop, the new congestion control level is congState new It is expressed as: congState new =max{congState old ,congState′} Among them, congState old represents the original congestion control level, and congState′ represents the target congestion control level of the first-level congestion control loop.
5. The wide area network TCP congestion control method based on early packet loss feedback as claimed in claim 4, characterized in that: The data packets carrying the CWR flag retransmitted by the sender include: When the sender receives the DROP_NOTIFY message, it marks the message segment with the corresponding sequence number as lost by traversing the queue, and calculates the end sequence number based on the IP header and TCP header response fields and the start sequence number of the message, expressed as: payload_len=ip·tot_len-4·ip·ihl-4·tcp.th_off seq end =seq start +payload_len-1 Among them, ip.tot_len indicates the total length of the IP message, ip.ihl indicates the total length of the IP header, tcp.th_off indicates the TCP load offset, payload_len indicates the TCP payload length, seq start Indicates the starting sequence number of the lost message carried in the DROP_NOTIFY message; If the marking is successful, the sender attempts to enter CA_Recovery while following the congestion control level principle, otherwise the sender attempts to enter CA_CWR; The sender notifies the transit device that it has responded to the DROP_NOTIFY or CWR_REQ message and adds a CWR mark to the retransmitted TCP data message.
6. The wide area network TCP congestion control method based on early packet loss feedback as claimed in claim 5, characterized in that: The sending end enters CA_CWR including: The sender sets the variable responseMark, and when responding to the CWR_REQ message, assigns the value of responseMark to the sequence number SND.NXT of the next new data segment to be sent; Before entering CWR_REQ, determine whether the current smallest unconfirmed sequence number SND.UNA is greater than responseMark. If so, respond to the control; otherwise, skip the response.
7. The wide area network TCP congestion control method based on early packet loss feedback as described in any one of claims 4 to 6, characterized in that: The sending end's early congestion response also includes: After the sending end responds to the early congestion feedback, the transfer device is notified to clear the notification status in the congestion hash table; The sender maintains a state variable RDN_state to indicate whether it is currently in the response state of the first-level congestion control loop. The value of RDN_state is 1, indicating that it is in the response state, and the value of RDN_state is 0, indicating that it is not in the response state. When exiting congestion control, that is, the final congestion control level is CA_Open, if the current RDN_State value is 1, RDN_State is set to 0.
8. A wide area network TCP congestion control system based on early packet loss feedback, characterized in that: include, A communication module, used to establish a TCP connection between a sending end and a receiving end, wherein the sending end sends a TCP data message to the receiving end; A message generation module is used to receive the TCP data message at the transfer device and forward it. If the egress queue cache reaches the discard threshold during forwarding, it marks that the TCP flow in the corresponding direction has message loss, discards the TCP data message and generates an RDN notification message; A control module, used for the transfer device to send the RDN notification message to the sending end, and the sending end receives and marks the corresponding data message as lost, and enters the congestion control state; The response module is used for the sender to respond to the congestion notification and retransmit the data message carrying the CWR flag. The transit device receives the RDN loop that the sender has responded to and clears the congestion flag of the corresponding TCP flow.
9. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the wide area network TCP congestion control method based on early packet loss feedback as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which, when executed by a processor, can implement the steps of the wide area network TCP congestion control method based on early packet loss feedback as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Enhancement method of cellular network uplink ECN mechanism, equipment and medium
CN111065120A
Multi-level congestion control method and device in high-speed interconnection network, system and medium
CN111683017A
Adaptive network congestion control method
CN116366553A
Congestion control method and device for wide area network
CN116743660A
