Traffic forwarding method and device and electronic equipment

By generating a flow table in the data center to determine the traffic level and setting differentiated ECN waterlines, the problem of insufficient flexibility of traffic forwarding methods in the existing technology is solved, the refined management and scheduling of traffic is realized, and the delay is satisfied. and throughput requirements, improving network performance.

CN118740713APending Publication Date: 2024-10-01CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410989368.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing data center traffic forwarding methods have insufficient flexibility in congestion control and cannot effectively meet the traffic requirements for delay and throughput. This is mainly because the fixed or adaptive adjustment of the ECN waterline cannot adapt to complex and changeable network traffic. .

Method used

By generating a flow table to determine the traffic level, and using differentiated ECN waterline settings based on the association settings between the traffic level and the ECN waterline, the forwarding path and queue of the target traffic are determined to achieve refined management and scheduling of traffic.

Benefits of technology

It improves the flexibility and efficiency of traffic forwarding, meets the traffic requirements for delay and throughput, and improves the performance and stability of the data center network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740713A_ABST
    Figure CN118740713A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic forwarding method and device and electronic equipment, and relates to the technical field of data centers. The method comprises the following steps: generating a flow table for target flow according to a preset flow table generation rule; the flow table is used for judging a flow level; according to the flow table, judging the flow level of the target flow; forwarding the target traffic to an upper layer switch according to a preset forwarding rule based on the traffic level; wherein the ECN waterlines of the switches on the upper layer and the flow levels are arranged in an associated mode, and the ECN waterlines of the switches on the same layer are arranged in a differentiated mode. Compared with the prior art, the flow level of the target flow is determined by differentiating the ECN waterline of the switch and associating the ECN waterline with the flow level, and the target flow is forwarded to the corresponding switch according to the flow level through the preset forwarding rule, so that fine management and scheduling of the flow are realized. The technical problem that the traffic forwarding method is insufficient in flexibility and cannot meet the requirements of the traffic for time delay and throughput is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data center technology, and in particular to a traffic forwarding method, device and electronic equipment. Background Art

[0002] In the data center transmission control protocol (DCTCP) network, the explicit congestion notification (ECN) waterline used for congestion control plays an important role in regulating the throughput and latency of network transmission. The reasonable setting of the ECN waterline parameter value has become the focus of high efficiency and high reliability of the congestion algorithm. In the related technology, the mainstream ECN waterline adjustment method is mostly to adaptively adjust the ECN waterline according to different conditions. The adaptive adjustment here generally refers to setting the ECN waterline of a certain layer of switches to the same value. However, the traffic in the data center network is ever-changing and difficult to understand. The obtained ECN waterline value may not meet the current traffic requirements for latency and throughput.

[0003] Therefore, current traffic forwarding methods lack flexibility and cannot meet the traffic requirements for latency and throughput. Summary of the invention

[0004] In view of this, the present application provides a traffic forwarding method, device and electronic device, the main purpose of which is to improve the technical problem that the traffic forwarding method lacks flexibility and cannot meet the traffic requirements for latency and throughput.

[0005] In a first aspect, the present application provides a traffic forwarding method, comprising:

[0006] Generate a flow table for target traffic according to a preset flow table generation rule; the flow table is used to determine the traffic level;

[0007] Determining the flow level of the target flow according to the flow table;

[0008] Based on the traffic level, the target traffic is forwarded to the upper layer switch according to a preset forwarding rule; wherein the ECN waterline of the upper layer switch is associated with the traffic level, and the ECN waterlines of the switches on the same layer are differentiated.

[0009] Optionally, forwarding the target traffic to an upper layer switch according to a preset forwarding rule based on the traffic level includes: determining a target switch that meets the forwarding condition in the upper layer switch according to the traffic level and the ECN waterline; the target switch includes at least one; forwarding the target traffic to a queue of the target switch according to the preset forwarding rule;

[0010] The target switch that meets the conditions includes the target switch corresponding to the ECN waterline associated with the traffic level.

[0011] Optionally, the upper layer switch includes a convergence layer switch, the upper layer switch of the convergence layer switch includes a core layer switch, and the ECN waterline of the core layer switch is further refined based on the ECN waterline of the convergence layer switch.

[0012] Optionally, there are multiple sending links between each switch and the upper-layer switch; forwarding the target traffic to the queue of the target switch according to the preset forwarding rule includes: obtaining the busy rate of the current queue sent by each of the upper-layer switches in the current preset period, wherein the busy rate is determined based on the current queue length and ECN waterline of the upper-layer switch; when the busy rate is greater than a preset threshold, calculating the selection rate of each sending link respectively; taking the sending link with the largest selection rate as the target sending link, and forwarding the target traffic to the queue of the upper-layer switch based on the target sending link.

[0013] Optionally, when the busy rate is greater than a preset threshold, the selection rate of each sending link is calculated separately, including: determining the weight value of each sending link according to the traffic level and the ECN waterline of the upper switch in the sending link; and calculating the selection rate of each sending link based on the weight value and the busy rate.

[0014] Optionally, the flow table includes the number of packets; and judging the traffic level of the target traffic based on the flow table includes: comparing the number of packets in the flow table with a preset level judgment threshold to determine the traffic level of the target traffic.

[0015] In a second aspect, the present application provides a traffic forwarding device, including:

[0016] A generating unit, configured to generate a flow table for target traffic according to a preset flow table generating rule; the flow table is used to determine the traffic level;

[0017] a judging unit, configured to judge the flow level of the target flow according to the flow table;

[0018] The processing unit is configured to forward the target traffic to the upper layer switch according to a preset forwarding rule based on the traffic level; wherein the ECN waterline of the upper layer switch is associated with the traffic level, and the ECN waterline of the switches on the same layer adopts differentiated settings.

[0019] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the traffic forwarding method described in the first aspect is implemented.

[0020] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the traffic forwarding method described in the first aspect when executing the computer program.

[0021] In a fifth aspect, the present application provides a computer program product having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the traffic forwarding method described in the first aspect is implemented.

[0022] By means of the above technical scheme, the present application provides a flow forwarding method, device and electronic device, which first generates a flow table for the target flow according to a preset flow table generation rule; the flow table is used to determine the flow level; according to the flow table, the flow level of the target flow is determined; based on the flow level, the target flow is forwarded to the upper layer switch according to the preset forwarding rule; wherein the ECN waterline of the upper layer switch is associated with the flow level, and the ECN waterline of the same layer switch adopts a differentiated setting. Compared with the related art, the present application determines the flow level of the target flow by using a differentiated setting of the ECN waterline of the switch, and the ECN waterline is associated with the flow level, and forwards it to the corresponding switch according to the flow level through the preset forwarding rules, thereby realizing refined management and scheduling of the flow. Improvement of the technical problem that the flow forwarding method is insufficient in flexibility and cannot meet the requirements of the flow for latency and throughput.

[0023] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0026] Figure 1 A flow chart of a traffic forwarding method provided in an embodiment of the present application is shown;

[0027] Figure 2 A flow level determination process diagram provided in an embodiment of the present application is shown;

[0028] Figure 3 A schematic diagram of a network architecture of a data center provided in an embodiment of the present application is shown;

[0029] Figure 4 A schematic diagram of a flow chart of another traffic forwarding method provided in an embodiment of the present application is shown;

[0030] Figure 5 A schematic structural diagram of a traffic forwarding device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0031] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0032] A traffic forwarding method proposed in this embodiment is applied to a traffic forwarding device or electronic device. The device or electronic device can be installed or integrated in the network system of some data centers and can execute any of the traffic forwarding methods mentioned below during operation.

[0033] In order to improve the technical problem that the traffic forwarding method is insufficiently flexible and cannot meet the traffic requirements for latency and throughput. This embodiment proposes a traffic forwarding method, such as Figure 1 As shown, the method includes:

[0034] S101, generating a flow table for target traffic according to a preset flow table generation rule.

[0035] First, a traffic forwarding method proposed in this embodiment is applied to a switch, which can be an access layer switch, or an aggregation layer or core layer switch. All have the function of generating a flow table for the target traffic according to a preset flow table generation rule. The implementation scenario of this embodiment is applied to a data center, including an access layer switch, an aggregation layer switch and a core layer switch. The switch at the access layer is an access switch with a high port density. The access switch is generally directly connected to the terminal device. The aggregation layer is the aggregation point of multiple access switches. The aggregation switch can process all information from the access layer and provide an uplink to the core layer, which is equivalent to a transfer station. The core switch undertakes all traffic and transmits data. Servers connected to the same access switch are in the same subnet, and the communication between them is through Layer 2 message exchange. Servers connected to different access switches are in different subnets, and the communication between them needs to be routed.

[0036] A flow table is a special database table used to store the relationship or rules between multiple flows. These rules define how to process data flows passing through the switch. In this embodiment, the flow table includes information such as source IP, source port number, destination IP, destination port number, aging time, and number of messages. The number of messages can be used to determine the size of the target flow. Specifically, the generation rules of the flow table are customizable. It is only necessary to determine the relevant information of the flow table such as source IP, source port number, destination IP, destination port number, aging time, and number of messages, so that the traffic level can be determined later based on the message information.

[0037] S102: Determine the flow level of the target flow according to the flow table.

[0038] Traffic level means that different traffic sizes correspond to different traffic levels. The higher the traffic level, the larger the traffic size. For example, as shown in Table 1, the judgment thresholds are set to 100 and 2000 (if the size of the data packet is 1KB, the traffic size corresponds to 100KB and 2MB respectively). Traffic with less than 100 packets is short flow, traffic with between 100 and 2000 packets is medium-length traffic, and traffic with more than 2000 packets is long flow.

[0039]

[0040] Table 1

[0041] The access layer switch divides the traffic into short flows, medium flows, and long flows according to the preset judgment threshold. When the traffic enters the aggregation layer switch, the traffic is further divided into small and large flows according to the threshold. By matching the data packet with a specific flow table entry, the traffic level of the target traffic can be determined.

[0042] S103, based on the traffic level, forward the target traffic to the upper layer switch according to the preset forwarding rules.

[0043] Among them, the ECN waterline of the upper layer switch is associated with the traffic level, and the ECN waterline of the same layer switch adopts differentiated settings. In this embodiment, the upper layer switch includes a convergence layer switch and a core layer switch, the upper layer of the access layer switch is the convergence layer, and the upper layer of the convergence layer is the core layer. Since the access layer switch needs to process the traffic regardless of the size of the traffic, the switch of this layer does not need to set a differentiated ECN waterline value, but sets a suitable ECN waterline value as a whole according to actual needs or experience, or can use methods such as deep learning to make the ECN waterline value of the access layer adaptively adjusted, which is not the key point of the embodiment. The key point of this embodiment is that different ECN waterlines are set for each (or each group) of the convergence layer switches and the core layer switches, and the ECN waterline is associated with the traffic level, so as to achieve allocation to different switches according to different traffic levels, realize refined management and scheduling of traffic, and improve flexibility.

[0044] For example, each switch in the access layer is linked to the switch in the aggregation layer, so we can set different ECN watermark values ​​for the switches in the aggregation layer, such as setting the ECN watermark value of switch A to 40, the ECN watermark value of switch B to 300, and the ECN watermark value of switch C to 800.

[0045] Each switch in the aggregation layer is also linked to the switch in the core layer. Therefore, the ECN watermark value of the core layer can be associated with the ECN watermark value of the corresponding aggregation layer switch, and further refined, such as setting the ECN watermark value of switch D in the core layer to 20, setting the ECN watermark value of switch E to 40, and setting the ECN watermark value of switch F to 50; setting the ECN watermark value of switch G to 150, setting the ECN watermark value of switch H to 300, and setting the ECN watermark value of switch I to 450; setting the ECN watermark value of switch G to 600, setting the ECN watermark value of switch K to 900, and setting the ECN watermark value of switch L to 1200. The above ECN watermark value settings are only examples. In actual operation, they should be adjusted according to the network conditions. The values ​​are not fixed, but it should be noted that the setting of the ECN watermark value needs to be combined with the traffic level, so that traffic of different traffic levels can be forwarded to the aggregation layer and core layer switches with different ECN watermarks for processing.

[0046] Traditional ECN-based data center congestion algorithms, such as DCTCP and DCQCN, usually have the same fixed value in all queues. The value is set by relevant personnel in network devices such as switches or routers based on the actual situation and experience of the network. In this embodiment, a flow table is first generated for the target traffic according to the preset flow table generation rules; the flow table is used to determine the traffic level; the traffic level of the target traffic is determined according to the flow table; based on the traffic level, the target traffic is forwarded to the upper layer switch according to the preset forwarding rules; wherein the ECN waterline of the upper layer switch is associated with the traffic level, and the ECN waterline of the same layer switch is set differently. Compared with the related art, by using the differentiated setting of the ECN waterline of the switch, and the ECN waterline is associated with the traffic level, the traffic level of the target traffic is determined, and forwarded to the corresponding switch according to the traffic level through the preset forwarding rules, the refined management and scheduling of the traffic is realized. There is a technical problem that the method for improving traffic forwarding is insufficient in flexibility and cannot meet the requirements of traffic for delay and throughput.

[0047] Optionally, based on the traffic level, forwarding the target traffic to the upper-layer switch according to a preset forwarding rule includes: in the upper-layer switch, determining a target switch that meets the forwarding conditions according to the traffic level and the ECN waterline; the target switch includes at least one; forwarding the target traffic to a queue of the target switch according to the preset forwarding rule; wherein the qualified target switch includes the target switch corresponding to the ECN waterline associated with the traffic level.

[0048] In this embodiment, network traffic is classified or marked into different levels. Based on the traffic level, different traffic will determine different forwarding paths based on the ECN waterline. When a switch or router receives traffic, it needs to decide the next forwarding switch based on the destination and forwarding rules of the traffic, and the traffic is forwarded to the "upper layer" switch. The ECN waterline is a threshold. When a switch or router detects that the congestion of a queue exceeds this threshold, it will start marking the traffic passing through the queue to notify the sender to reduce the sending rate. By comparing the traffic level and the ECN waterline, the upper layer switch can determine which target switches (one or more) are suitable for receiving the current traffic. The target switch includes at least 1, which means that based on the current traffic level and ECN waterline, one or more switches are selected as the target forwarding target.

[0049] Optionally, the upper layer switch includes a convergence layer switch, the upper layer switch of the convergence layer switch includes a core layer switch, and the ECN waterline of the core layer switch is further refined based on the ECN waterline of the convergence layer switch.

[0050] In this embodiment, the hierarchical structure of the switch includes:

[0051] Access layer switch: usually located at the bottom layer of the network architecture and directly connected to the terminal devices.

[0052] Aggregation layer switch: Located above the access layer, its function is to aggregate the data of access nodes and forward and route them.

[0053] Core switch: Located at the top layer of the network architecture, also known as the network backbone. Its main function is to quickly forward data from the aggregation layer and provide a fast and reliable network architecture. Core switches have higher reliability, redundancy, throughput, etc. and relatively low latency.

[0054] ECN waterline is a mechanism used in network devices to handle congestion. When the queue of a network device (such as a switch) is congested, the ECN mechanism can be used to notify the sender of the congestion, thereby controlling the sending rate and avoiding further congestion in the network. Aggregation layer switch: As the upper layer of the access layer switch, its ECN waterline setting needs to take into account all the traffic from the access layer devices and ensure that these traffic can be effectively forwarded to the core layer. Therefore, the ECN waterline setting of the aggregation layer switch needs to have a certain degree of flexibility to cope with the changes in traffic brought by different access layer devices. Core layer switch: As the core of the entire network architecture, its ECN waterline setting needs to be further refined on the basis of the aggregation layer switch. The core layer switch needs to process a large amount of data from the aggregation layer and needs to ensure that this data can be forwarded to the destination quickly and accurately. Therefore, the ECN waterline setting of the core layer switch needs to be more precise and efficient to ensure the stability and performance of the entire network and realize the refined management and scheduling of traffic.

[0055] Optionally, there are multiple sending links between each switch and the upper-layer switch; according to the preset forwarding rules, the target traffic is forwarded to the queue of the target switch, including: obtaining the busy rate of the current queue sent by each upper-layer switch in the current preset period, wherein the busy rate is determined based on the current queue length and ECN waterline of the upper-layer switch; when the busy rate is greater than a preset threshold, calculating the selection rate of each sending link respectively; taking the sending link with the largest selection rate as the target sending link, and forwarding the target traffic to the queue of the upper-layer switch based on the target sending link.

[0056] In this embodiment, each switch includes multiple transmission links with the upper layer switch, which provide multiple path options for data forwarding. Based on the preset forwarding rules, the switch forwards the target traffic to the queue of the target switch. The specific forwarding rules are as follows:

[0057] First, obtain the busy rate of the current preset period, where the busy rate is determined based on the current queue length and ECN waterline of the upper-layer switch. The busy rate can be calculated by the ratio of the current queue length to the ECN waterline. Then determine whether the busy rate is greater than the preset threshold. If the busy rate is greater than the preset threshold, it means that the queue of the upper-layer switch may be in a congested state. At this time, it is necessary to select a suitable sending link to alleviate the congestion. For example, if the ratio of the current queue length sent by the switch in a certain time interval to the ECN waterline value is less than 80%, it is considered that the optimal queue for short flows has no risk of congestion. Then, when the busy rate exceeds the threshold, the system will evaluate the status of each sending link and calculate its selection rate. The calculation formula for the selection rate is as follows:

[0058] w i ×(1-p i )

[0059] In the formula, w i (i is the switch number) is the weight of the switch; p i (i is the switch number) is the ratio of the current queue length to the ECN waterline value. Then the sending link with the highest selection rate will be selected as the target sending link. This is because the link with a high selection rate usually has better transmission conditions and can process the target traffic more effectively. Finally, once the target sending link is determined, the switch will forward the target traffic to the link and then transmit it to the queue of the upper layer switch.

[0060] Optionally, when the busy rate is greater than a preset threshold, the selection rate of each sending link is calculated separately, including: determining the weight value of each sending link according to the traffic level and the ECN waterline of the upper switch in the sending link; and calculating the selection rate of each sending link based on the weight value and the busy rate.

[0061] In this embodiment, a weight value can be determined for each sending link based on the traffic level and the ECN waterline. For example, the weight value corresponds to the set ECN waterline value. The closer the ECN waterline is set to the short flow (low level), the higher the weight of entering the switch for transmission. The selection rate is an indicator for evaluating whether a sending link is suitable for forwarding traffic. It is calculated based on the weight value of the link and the current busy rate. The calculation process has been described above and will not be repeated here.

[0062] Optionally, the flow table includes the number of packets; and judging the traffic level of the target traffic based on the flow table includes: comparing the number of packets in the flow table with a preset level judgment threshold to determine the traffic level of the target traffic.

[0063] like Figure 2As shown, a flow chart of a flow level judgment process proposed in this embodiment is shown. In this embodiment, flows of different sizes are transmitted to the access layer or aggregation layer switch, and the flows are classified according to the flow table and threshold, and the corresponding flow levels (short-length flows, medium-length flows, and long-length flows) are matched. Specifically, the flow can be determined to which type of flow the flow belongs by comparing the number of messages matching the flow with the judgment threshold set in advance. If the judgment threshold is set to 100 and 2000 (if the size of the data packet is 1KB, the flow size corresponds to 100KB and 2MB respectively), the flow with a message number less than 100 belongs to a short flow, the flow with a message number between 100 and 2000 belongs to a medium-length flow, and the flow with a message number greater than 2000 belongs to a long flow. When the flow enters the aggregation layer switch, the switch further subdivides the flow by size according to the number of messages, and transmits it to the core layer according to the strategy, thereby realizing refined management and scheduling of the flow.

[0064] Furthermore, the network architecture used in this embodiment is introduced. Figure 3 As shown, a schematic diagram of a network architecture of a data center proposed in this embodiment is shown. This embodiment adopts a communication network topology without bandwidth convergence for a data center network - a fat-tree network architecture.

[0065] The fat-tree network architecture uses a large number of multi-level switches to ensure that the uplink and downlink bandwidths of each node except the root node are equal, thus building a non-blocking network. The switches at the access layer are access switches with high port density. Access switches are generally directly connected to terminal devices. The aggregation layer is the aggregation point of multiple access switches. The aggregation switch can process all information from the access layer and provide uplinks to the core layer, which is equivalent to a transit station. The core switch takes over all traffic and transmits data. Servers connected to the same access switch are in the same subnet, and the communication between them is through layer 2 message exchange. Servers connected to different access switches are in different subnets, and the communication between them needs to be routed. In the network communication system, the sender sends data traffic to the receiver that has established a connection (based on the TCP protocol) or has not established a connection (based on the UDP protocol). Each traffic is divided into multiple data packets to enter the transmission network and is forwarded by network devices such as switches and routers. After receiving the data packet, the receiver sends an ACK to the sender to inform the situation (based on the TCP protocol) or no other operations (based on the UDP protocol), completing a data transmission process. During data transmission, in order to prevent network equipment overload and packet loss, it is necessary to use congestion control algorithms to control the rate at which the source host (i.e., the sender) that generates data transmits data into the communication network to avoid congestion.

[0066] Among them, research shows that in a data center, 99.91% of the traffic is contributed by the TCP protocol, and long and short flows coexist. However, the traditional TCP congestion control algorithm cannot meet the needs of the actual situation. The data center TCP (DCTCP) algorithm improves the TCP congestion algorithm based on explicit congestion notification. The specific method is: the sender sets an ECN field in the IP header of each data packet. An ECN waterline value K is set on the queue managed by the switch. When a data packet enters the queue and the current queue length exceeds the K value, the ECN field in the IP header of the data packet will be modified from ECN=01 or ECN=10 to ECN=11, and other switches in the network will transparently transmit the data packet. After the receiving end receives the data packet, it finds that ECN=11 in the data packet, and will set the ECE position to 1 in the TCP header of the ACK message returned to the sender, thereby notifying the sender that congestion has occurred in the network. The proportion of ACK messages containing ECE received by the sender in a data window represents the degree of network congestion. The sender reduces the congestion window accordingly according to the degree of congestion. In addition, when sending the next data packet, the sender sets the CWR in the TCP header to 1 to notify the receiver that the congestion window has been reduced. When the receiver receives the data packet and parses it to get the CWR set to 1, the ECE bit in the subsequent ACK message returned is no longer set to 1. The above is the congestion handling mechanism of the DCTCP congestion control algorithm. The DCTCP congestion control algorithm can avoid the violent fluctuation of throughput and achieve the effect of low latency. The effect of the DCTCP congestion control algorithm is closely related to the ECN waterline value. If the ECN waterline value is too low, the throughput in the network will become low, making the long flow completion time longer; if the ECN waterline value is too high, it will cause the short flow to stay in the queue for a longer time. In the face of complex and changeable network traffic, all switch queues use one ECN watermark value which can no longer meet the needs of the actual environment. Therefore, this embodiment proposes a traffic forwarding method. Through actual implementation, the method proposed in this embodiment achieves better traffic transmission results than the fixed ECN watermark in traditional DCTCP and some other adaptive ECN watermarks in some cases.

[0067] Furthermore, if Figure 4 FIG. 1 is a flow chart showing another flow forwarding method proposed in this embodiment.

[0068] Step 1: First, set the ECN watermark value. Set the same ECN watermark value for the access layer switches. Set three different and widely spaced ECN watermark values ​​for the aggregation layer switches as needed, corresponding to different and adjacent traffic size intervals. The ECN watermark values ​​of the core layer switches are more refined to meet the needs of different traffic sizes.

[0069] The specific implementation is as follows: Figure 3 In the fat-tree network architecture, each access layer switch can accommodate three server hosts and is responsible for processing traffic sent by subordinate hosts or sent by other hosts to subordinate hosts. Regardless of the size of the traffic, the access layer switch needs to process the traffic, so the switches at this layer do not need to set differentiated ECN waterline values, but can set a suitable ECN waterline value as a whole based on actual needs or experience.

[0070] Each switch at the access layer is linked to the aggregation layer switch in the same pod, so different ECN watermark values ​​can be set for the aggregation layer switches in the same pod. For example, the ECN watermark value of switch S4 is set to K3=40, the ECN watermark value of switch S5 is set to K5=300, and the ECN watermark value of switch S6 is set to K6=800.

[0071] Each switch in the aggregation layer is linked to the switches in the three core layers. Therefore, the ECN watermark value of the core layer can be associated with the ECN watermark value of the corresponding aggregation layer switch, and further refined, such as setting the ECN watermark value of switch S7 to K7 = 20, setting the ECN watermark value of switch S8 to K8 = 40, and setting the ECN watermark value of switch S9 to K9 = 50; setting the ECN watermark value of switch S10 to K10 = 150, setting the ECN watermark value of switch S11 to K11 = 300, and setting the ECN watermark value of switch S12 to K12 = 450; setting the ECN watermark value of switch S13 to K13 = 600, setting the ECN watermark value of switch S14 to K14 = 900, and setting the ECN watermark value of switch S15 to K15 = 1200. The above ECN watermark value settings are only examples, and should be adjusted according to network conditions in actual operation.

[0072] Step 2: Then differentiate the traffic, customize the generation rules of the flow table in the switch, calculate the traffic size according to the number of packets in the flow table, and the access layer switch divides the traffic into short flow, medium flow and long flow according to the preset judgment threshold. When the traffic enters the aggregation layer switch, the traffic is further subdivided according to the value.

[0073] The specific implementation is as follows: The generation rules of the custom flow table are not specifically required here. The switch only needs to generate the flow table according to the rules to obtain information such as source IP, source port number, destination IP, destination port number, aging time and number of packets. Then, from the number of packets, the size of the flow can be determined, and the number of packets matching the flow can be compared with the pre-set judgment threshold to determine which type of flow the flow belongs to. For example, if the judgment threshold is set to 100 and 2000 (if the size of the data packet is 1KB, the flow size corresponds to 100KB and 2MB respectively), the flow with less than 100 packets belongs to short flow, the flow with between 100 and 2000 packets belongs to medium-length flow, and the flow with more than 2000 packets belongs to long flow. When the flow enters the aggregation layer switch, the switch further subdivides the flow by size according to the number of packets and transmits it to the core layer according to the strategy, thereby realizing refined management and scheduling of the flow.

[0074] Step 3: Then select the switch. The access layer switch will transfer short-distance traffic to the aggregation layer switch with the smallest ECN waterline value, transfer medium-distance traffic to the aggregation layer switch with a medium ECN waterline value, and transfer long-distance traffic to the aggregation layer switch with a larger ECN waterline value. When the queue length in the corresponding aggregation layer switch is large, the access layer switch will transfer the traffic to the adjacent aggregation layer switch according to probability. The adjacent aggregation layer switch here refers to the same-level switch with the same or similar ECN waterline setting as the switch (for example, in groups, the ECN waterline setting of each group of switches in the aggregation layer is the same). The aggregation layer switch adopts the same method to transfer traffic to the core layer switch.

[0075] The specific implementation is as follows: select the switch according to the preset forwarding rule, and when the queue length is large, transfer the traffic to the corresponding switch based on the preset forwarding rule.

[0076] Next, the preset forwarding rules are explained in conjunction with a complete implementation example. First, the access layer switches S1, S2, and S3 will transfer short flow traffic to the aggregation layer switch S4 with a smaller ECN waterline value, transfer medium flow traffic to the aggregation layer switch S5 with a medium ECN waterline value, and transfer long flow traffic to the aggregation layer switch S6 with a larger ECN waterline value. However, the traffic in the data center network is complex and changeable. For example, at a certain moment, the access layer switches S1, S2, and S3 receive a large number of incast short flows but no medium or long flows. At this time, it is inappropriate for the access layer switch to transmit all the traffic to S4 with a smaller ECN waterline value. Not only does it waste bandwidth, but it also increases the flow completion time of the traffic. Therefore, a customized traffic forwarding strategy is defined for the switch. Figure 3 As shown, each switch has three uplinks, and weights w are set for the three types of traffic to enter different switch queues.i (i is the switch number.) For example, the weight setting corresponds to the ECN watermark value. The short-flow traffic in the access layer switch has the highest weight when it enters S4 (the ECN watermark value of S4 is lower than that of S5), followed by S5 (the ECN watermark value of S5 is lower than that of S6), and the weight entering S6 is the lowest.

[0077] Set the switch to send the busy ratio p of its current queue length and ECN waterline value to the downlink switch at every time interval i (i is the switch number), and a proportional waterline is set, such as 80% (preset threshold). Taking the transmission of short flows to the aggregation layer switch as an example, if the busy rate ratio p4 of the current queue length sent by the S4 switch in a certain time interval to the ECN waterline value is less than 80%, it is considered that the optimal queue of the short flow has no risk of congestion, and the short flow of the next time interval will continue to be transmitted to the S4 switch; if the ratio p4 of the current queue length sent by the S4 switch in a certain time interval to the ECN waterline value is greater than 80% (that is, when the busy rate is greater than the preset threshold), it is considered that the queue of the link is about to reach the ECN waterline, then the switch will calculate the selection rate of the three uplinks respectively, that is, the relationship between the weight value and the queue ratio: w i ×(1-p i ). In the formula, w i is the weight of the switch; p i It is the ratio of the current queue length to the ECN waterline value. The link with the larger value is selected as the sending link for the new short flow in the next time interval. Other switches adopt the above forwarding strategy, and the weight and proportion waterline of the queue entering the switch can also be modified according to the actual situation.

[0078] Finally, long flows enter the switch queue with a high ECN watermark value to achieve high throughput, short flows enter the switch queue with a low ECN watermark value to achieve low latency, and medium flows enter the switch queue with a balanced ECN watermark value to achieve high stability. Ultimately, the goal of shortening the flow completion time is achieved. In this way, by sacrificing the flow completion time of a small number of flows, bandwidth utilization is improved, and the phenomenon of low throughput on some switches is prevented.

[0079] In summary, in this embodiment, the ECN waterline of the switch is set differently, and the ECN waterline is set in association with the traffic level, so as to determine the traffic level of the target traffic, and forward it to the corresponding switch according to the traffic level through the preset forwarding rules, thereby realizing the refined management and scheduling of the traffic. There is a technical problem that the traffic forwarding method is not flexible enough and cannot meet the requirements of the traffic on latency and throughput.

[0080] Further, as Figures 1 to 4The specific implementation of the method shown in this embodiment provides a traffic forwarding device, such as Figure 5 As shown, the device includes: a generating unit 501, a judging unit 502 and a processing unit 503.

[0081] The generating unit 501 is configured to generate a flow table for the target traffic according to a preset flow table generating rule; the flow table is used to determine the traffic level;

[0082] A judging unit 502 is configured to judge the flow level of the target flow according to the flow table;

[0083] The processing unit 503 is configured to forward the target traffic to the upper layer switch according to a preset forwarding rule based on the traffic level; wherein the ECN waterline of the upper layer switch is associated with the traffic level, and the ECN waterline of the same layer switch adopts a differentiated setting.

[0084] In a specific application scenario, the processing unit 503 is specifically configured to determine, in the upper layer switch, a target switch that meets the forwarding conditions according to the traffic level and the ECN waterline; the target switch includes at least one; according to the preset forwarding rule, the target traffic is forwarded to the queue of the target switch; wherein the qualified target switch includes the target switch corresponding to the ECN waterline associated with the traffic level.

[0085] In a specific application scenario, the processing unit 503 is further configured as a core layer switch, and the ECN waterline of the core layer switch is further refined based on the ECN waterline of the aggregation layer switch.

[0086] In a specific application scenario, the processing unit 503 is further configured to obtain the busy rate of the current queue sent by each of the upper-layer switches in the current preset period, wherein the busy rate is determined based on the current queue length and the ECN waterline of the upper-layer switch; when the busy rate is greater than a preset threshold, the selection rate of each sending link is calculated respectively; the sending link with the largest selection rate is used as the target sending link, and the target traffic is forwarded to the queue of the upper-layer switch based on the target sending link.

[0087] In a specific application scenario, the processing unit 503 is further configured to determine the weight value of each sending link according to the traffic level and the ECN waterline of the upper switch in the sending link; and calculate the selection rate of each sending link based on the weight value and the busy rate.

[0088] In a specific application scenario, the judgment unit 502 is further configured to compare the number of packets in the flow table with a preset level judgment threshold to determine the flow level of the target flow.

[0089] It should be noted that for other corresponding descriptions of the functional units involved in the traffic forwarding device provided in this embodiment, reference can be made to Figures 1 to 4 The corresponding description in will not be repeated here.

[0090] Based on the above Figures 1 to 4 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figures 1 to 4 The method shown.

[0091] Based on the above Figures 1 to 4 The method shown in the embodiment also provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figures 1 to 4 The method shown.

[0092] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0093] Based on the above Figures 1 to 4 The method shown, and Figure 5 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, which can be configured on a computer terminal, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 4 The method shown.

[0094] Based on the above Figures 1 to 4 The method shown, and Figure 5 In order to achieve the above-mentioned purpose, the embodiment of the virtual device shown in the embodiment of the present application further provides a chip, including one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from the memory of the electronic device and send the signal to the processor, the signal including the computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the above-mentioned Figures 1 to 4 The method shown.

[0095] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0096] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.

[0097] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the solution of this embodiment, compared with the related art, the ECN waterline of the switch is set differently, and the ECN waterline is set in association with the traffic level, thereby determining the traffic level of the target traffic, and forwarding it to the corresponding switch according to the traffic level through the preset forwarding rules, thereby achieving refined management and scheduling of the traffic. Improvement of the technical problem that the traffic forwarding method is insufficient in flexibility and cannot meet the requirements of the traffic for latency and throughput.

[0099] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0100] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.

Claims

1. A traffic forwarding method, characterized in that: include: Generate a flow table for target traffic according to the preset flow table generation rules; The flow table is used to determine the flow level; Determining the flow level of the target flow according to the flow table; Based on the traffic level, the target traffic is forwarded to the upper layer switch according to a preset forwarding rule; wherein the ECN waterline of the upper layer switch is associated with the traffic level, and the ECN waterlines of the switches on the same layer are differentiated.

2. The method according to claim 1, characterized in that: The forwarding of the target traffic to the upper layer switch according to the preset forwarding rule based on the traffic level includes: In the upper layer switch, according to the traffic level and ECN waterline, a target switch that meets the forwarding conditions is determined; the target switch includes at least one; According to the preset forwarding rule, forward the target traffic to the queue of the target switch; The target switch that meets the conditions includes the target switch corresponding to the ECN waterline associated with the traffic level.

3. The method according to claim 2, characterized in that The upper layer switch includes a convergence layer switch, the upper layer switch of the convergence layer switch includes a core layer switch, and the ECN waterline of the core layer switch is further refined based on the ECN waterline of the convergence layer switch.

4. The method according to claim 3, characterized in that There are multiple transmission links between each switch and the upper layer switch; The step of forwarding the target traffic to the queue of the target switch according to the preset forwarding rule includes: Obtaining the busy rate of the current queue sent by each of the upper layer switches in the current preset period, wherein the busy rate is determined based on the current queue length and ECN waterline of the upper layer switch; When the busy rate is greater than a preset threshold, calculating the selection rate of each sending link respectively; The sending link with the largest selection rate is used as the target sending link, and the target traffic is forwarded to the queue of the upper layer switch based on the target sending link.

5. The method according to claim 3, characterized in that: When the busy rate is greater than a preset threshold, the selection rate of each sending link is calculated respectively, including: Determine the weight value of each sending link according to the traffic level and the ECN waterline of the upper switch in the sending link; Based on the weight value and the busy rate, the selection rate of each sending link is calculated.

6. The method according to claim 1, characterized in that The flow table includes the number of packets; The determining, according to the flow table, the flow level of the target flow includes: The number of packets in the flow table is compared with a preset level judgment threshold to determine the flow level of the target flow.

7. A traffic forwarding device, characterized in that: include: A generating unit, configured to generate a flow table for target traffic according to a preset flow table generating rule; The flow table is used to determine the flow level; a judging unit, configured to judge the flow level of the target flow according to the flow table; The processing unit is configured to forward the target traffic to the upper layer switch according to a preset forwarding rule based on the traffic level; wherein the ECN waterline of the upper layer switch is associated with the traffic level, and the ECN waterline of the switches on the same layer adopts differentiated settings.

8. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.