CN114422441A - Method and device for controlling flow - Google Patents

Method and device for controlling flow Download PDF

Info

Publication number
CN114422441A
CN114422441A CN202210321168.7A CN202210321168A CN114422441A CN 114422441 A CN114422441 A CN 114422441A CN 202210321168 A CN202210321168 A CN 202210321168A CN 114422441 A CN114422441 A CN 114422441A
Authority
CN
China
Prior art keywords
network switching
data
switching device
reputation
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210321168.7A
Other languages
Chinese (zh)
Inventor
冉仟元
李常青
干荣亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Oceanbase Technology Co Ltd
Original Assignee
Beijing Oceanbase Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Oceanbase Technology Co Ltd filed Critical Beijing Oceanbase Technology Co Ltd
Priority to CN202210321168.7A priority Critical patent/CN114422441A/en
Publication of CN114422441A publication Critical patent/CN114422441A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/39Credit based
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/30Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes

Landscapes

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

Abstract

The present disclosure discloses a method and an apparatus for controlling traffic, the method is applied to a network switching device, the network switching device is used for forwarding data between a data sending node and a data receiving node, the method includes: sending a first credit message to the data sending node, wherein the first credit message is used for notifying the data sending node of a credit value of the network switching equipment, and the credit value of the network switching equipment is used for indicating the residual capacity of a current message forwarding cache region of the network switching equipment; after the data message sent by the data sending node is forwarded to the data receiving node, the credit value of the network switching equipment is updated; and sending a second credit message to the data sending node, wherein the second credit message is used for informing the data sending node of the updated value of the credit value of the network switching equipment.

Description

Method and device for controlling flow
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for controlling flow.
Background
The network switching equipment is used for forwarding data between the data sending node and the data receiving node, and the problems of reduced transmission performance and resource waste of a network communication system exist when the prior art controls the flow of the network switching equipment.
Disclosure of Invention
In view of the above, the present disclosure provides a method and an apparatus for controlling traffic, which solve the problems of reduced transmission performance and wasted resources of a network communication system.
A first aspect provides a method for controlling traffic, the method being applied to a network switching device, where the network switching device is used for data forwarding between a data sending node and a data receiving node, and the method includes: sending a first credit message to the data sending node, wherein the first credit message is used for notifying the data sending node of a credit value of the network switching equipment, and the credit value of the network switching equipment is used for indicating the residual capacity of a current message forwarding cache region of the network switching equipment; after the data message sent by the data sending node is forwarded to the data receiving node, the credit value of the network switching equipment is updated; and sending a second credit message to the data sending node, wherein the second credit message is used for informing the data sending node of the updated value of the credit value of the network switching equipment.
A second aspect provides a method of controlling traffic, the method being applied to a data sending node, the data sending node being communicatively connected to a network switching device for forwarding data to a data receiving node through the network switching device, the method comprising: receiving a first credit message sent by network switching equipment, wherein the first credit message is used for informing the data sending node of a credit value of the network switching equipment, and the credit value of the network switching equipment is used for indicating the residual capacity of a current message forwarding cache region of the network switching equipment; sending a data message to the network switching equipment according to the first credit message; after the network switching device forwards the data packet to the data receiving node, receiving a second reputation packet from the network switching device, where the second reputation packet is used to notify the data sending node of an updated value of the reputation value of the network switching device.
A third aspect provides a device for controlling traffic, where the device for controlling traffic is a network switching device, and the network switching device is configured to forward data between a data sending node and a data receiving node; the device comprises: a first sending module, configured to send a first reputation message to the data sending node, where the first reputation message is used to notify the data sending node of a reputation value of the network switching device, and the reputation value of the network switching device is used to indicate a remaining capacity of a current message forwarding cache of the network switching device; the updating module is configured to update the reputation value of the network switching equipment after forwarding the data packet sent by the data sending node to the data receiving node; and the second sending module is configured to send a second reputation message to the data sending node, wherein the second reputation message is used for notifying the data sending node of the updated value of the reputation value of the network switching device.
A fourth aspect provides an apparatus for controlling traffic, the apparatus being located at a data sending node, the apparatus being communicatively connected to a network switching device to forward data to a data receiving node through the network switching device, the apparatus comprising: a first receiving module, configured to receive a first reputation message sent by a network switching device, where the first reputation message is used to notify the data sending node of a reputation value of the network switching device, and the reputation value of the network switching device is used to indicate a remaining capacity of a current message forwarding cache of the network switching device; a sending module configured to send a data packet to the network switching device according to the first reputation packet; an updating module configured to receive a second reputation packet from the network switching device after the network switching device forwards the data packet to the data receiving node, where the second reputation packet is used to notify the data sending node of an updated value of the reputation value of the network switching device.
In a fifth aspect, there is provided a computer readable storage medium having stored thereon executable code that, when executed, is capable of implementing the method of the first and second aspects.
A sixth aspect provides a computer program product comprising executable code which, when executed, is capable of implementing the method of the first and second aspects.
The embodiment of the disclosure provides a credit-based bidirectional flow control method, which dynamically balances the data receiving quantity and the data forwarding quantity of network switching equipment through a bidirectional credit feedback mechanism, improves the data transmission performance of a communication network while realizing the flow control of the network switching equipment, and avoids unnecessary resource waste.
Drawings
Fig. 1 is a schematic flow chart of a method for controlling a flow according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a reputation value updating method of a network switching device according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram of another method for controlling flow according to an embodiment of the disclosure.
Fig. 4 is a schematic structural diagram of an apparatus for controlling flow according to an embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of another device for controlling flow rate according to an embodiment of the disclosure.
Fig. 6 is a schematic block diagram of another flow control provided by an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A communication network system generally includes a plurality of network devices, and the plurality of network devices can implement communication between different devices by sending messages. The message is a data unit exchanged and transmitted in the network, and may be data organized according to a certain format.
When sending and receiving messages, the network device may forward the data messages using a network switching device, where the network switching device is a device having a network switching function, such as a switch, and may also be a router. In the process of forwarding a data packet, a node providing the data packet may be referred to as a sending node of the data packet, which is referred to as a data sending node for short; a node receiving a data packet may be referred to as a receiving node of the data packet, which is referred to as a data receiving node for short. The network switching equipment is positioned on a communication link between the data sending node and the data receiving node and used for caching and forwarding the data message between the data sending node and the data receiving node.
The network switching device may be, for example, a proxy server in a database system, the proxy server being located over a communication link between the client and the database server. The proxy server may receive the client's request and route the client's request to the best database server, while returning the request results to the client.
In some cases, the data sending rate of the data sending node is high, and when the data forwarding rate of the network switching device to the data receiving node is low, data is accumulated in a buffer area of the network switching device, congestion of data flow occurs, and when the accumulated data amount exceeds the size of the buffer area of the network switching device, a problem of data packet loss may occur. In other cases, when the amount of data sent by the data sending node to the network switching device at a time is too large, there may also be a problem of network congestion, for example, in a database system, when the database server sends an excessively large request result set to the proxy server at a time, or when the client sends an excessively large query data set to the proxy server at a time, network congestion may occur to the proxy server.
Network congestion may cause a reduction in resource utilization and transmission quality of the communication network, and even cause a breakdown of the communication network. In the prior art, data traffic control may be implemented through a network transport protocol, for example, TCP traffic control may implement end-to-end traffic control between a data sending end and a data receiving end in a window sliding manner. The credit-based flow control mechanism is also called a backpressure mechanism, and is a classic scheme for solving the flow control technology in network communication. In a traditional credit-based flow control mechanism, a data receiving node can feed back a memory occupation situation of the receiving node to a data sending node, and the data sending node adjusts a data sending amount based on received feedback information, wherein information that the data receiving node sends to the data sending node to inform the memory situation of the data receiving node is called credit information or flow control information.
When the reputation-based flow control mechanism is applied to a network switching device, the influence of the data receiving condition of a data receiving node on a communication network system is not considered in the prior art. For example, the data receiving rate of the data receiving node is slow, the data sending node needs to wait for a long time, which results in the waste of transmission links, and the throughput rate of the switch is also reduced. For another example, after the network switching device forwards the data to the data receiving node, new flow control information is not supplemented in time, which also causes unnecessary waste, and for another example, when the data receiving node receives the data at a high rate, when the network switching device frequently sends the flow control information to the data sending node, a large number of data channels are occupied, which affects sending of normal data; when the network switching device sends the flow control information in time, too much waiting time is caused, and unnecessary waste of the communication link is caused.
Therefore, the present disclosure provides a credit-based bidirectional flow control method, which dynamically balances the data receiving amount and the data forwarding amount of the network switching device through a bidirectional credit feedback mechanism, thereby improving the data transmission performance of the communication network while realizing the flow control of the network switching device, and avoiding unnecessary resource waste.
Fig. 1 is a schematic flowchart of a method for controlling traffic according to an embodiment of the present disclosure, where the method in fig. 1 is described in terms of interaction between a data receiving node, a network switching device, and a data sending node. The network switching device depicted in fig. 1 may be a proxy server in the aforementioned database system, which may be a distributed relational database in some embodiments. The flow control method provided by the embodiment of the present disclosure is described in detail below with reference to fig. 1.
In step S110, the network switching device sends a first reputation packet to the data sending node.
The first credit message is used for informing the credit value of the data sending node and the network switching equipment, and the credit value of the network switching equipment is used for indicating the residual capacity of the current message forwarding cache region of the network switching equipment.
The reputation value of the network switching device may be, for example, a value of the remaining capacity of the message buffer of the network switching device, and for example, the network switching device notifies the data sending node of the remaining capacity of the message buffer of 128KB through the first reputation message.
The credit value of the network switching equipment can also be the number of the messages which can be received by the network switching equipment, and the number of the messages which can be received by the network switching equipment can be determined by the network switching equipment and the data sending node through negotiation in advance according to the size of a message forwarding cache region of the network switching equipment. For example, when the remaining capacity of the message buffer of the network switching device is 128KB, the number of the messages acceptable by the network switching device is determined to be 8, and the size of each message does not exceed 16 KB. Therefore, the accurate control of the network flow is realized by defining the quantity of the data messages which can be received by the network switching equipment and the size of the data messages in the unit quantity.
It should be understood that the present disclosure is not limited to a particular form of reputation value for a network switching device, which may also be, for example, available bandwidth and other network resources of the network switching device, etc.
In some embodiments, the network switching device may establish a network connection with the data sending node and the data receiving node before performing step S110. In the distributed database, when a plurality of data sending nodes exist, connection can be sequentially established to sequentially transmit data.
In step S120, the data sending node sends a data packet to the network switching device.
And the data sending node receives the first credit message sent by the network switching equipment and sends the data message to the network switching equipment according to the credit value of the network switching equipment. For example, when the reputation value of the network switching device is the size of the packet forwarding buffer and the reputation value is 30KB, the data sending node sends a 30KB data packet to the network switching device. For another example, the reputation value of the network switching device is the number of data that the network switching device can receive, and when the reputation value is 5, the data sending node sends 5 data packets to the network switching device.
In step S130, the network switching device forwards the data packet sent by the data sending node to the data receiving node.
In step S140, after forwarding the data packet sent by the data sending node to the data receiving node, the network switching device updates the reputation value of the network switching device.
The network switching device may update the reputation value of the network switching device according to the data amount of the data sent to the data receiving node, for example, at a certain time, the reputation value of the network switching device is zero, and after the network switching device forwards the data amount of 30KB to the data receiving node, the network switching device may update the reputation value to 30KB, and for example, at a certain time, the number of the messages that the network switching device can receive is 3, and after the network switching device forwards 3 data messages to the data receiving node, the network switching device may update the reputation value to 6.
In some cases, the number of messages that can be received by the network switching device may also be updated according to the data forwarding amount. Fig. 2 is a schematic diagram of a reputation value updating method of a network switching device provided by the present disclosure, as shown in fig. 2, a prodcer in fig. 2 is a data sending node, a consumer is a data receiving node, the network switching device in fig. 2 receives a total 156KB of 3 data packets sent by the data sending node, before data is forwarded to the data receiving node, the number of messages that the network switching device can receive is 5, and after the network switching device sends 150KB of data to the data receiving node, the number of messages that the network switching device can receive is updated from the previous 5 to 7.
In step S150, the network switching device sends a second reputation packet to the data sending node, for notifying the data sending node of the updated value of the network switching device.
In step S160, the data sending node sends a data packet to the network switching device.
And the data sending node receives the second credit message sent by the network switching equipment, obtains the updated value of the credit value of the network switching equipment, and sends the data message to the network switching equipment according to the updated value. When the credit value of the network switching equipment is zero, namely the residual capacity of the current message forwarding cache area of the network switching equipment is zero, the data sending node stops sending the data message to the network switching equipment.
Therefore, in the embodiment of the present disclosure, the network switching device performs bidirectional communication with the data sending node and the data receiving node through a bidirectional credit flow control mechanism in a data packet forwarding process, continuously updates the size of the current packet forwarding cache region according to the data receiving amount of the data receiving node, and notifies the data sending node of the size of the current available packet forwarding cache region, so as to implement on-demand control of data traffic, improve the data transmission performance of the communication network, and avoid unnecessary resource waste.
And when the credit value of the network switching equipment reaches a preset value, sending a second credit message to the data sending node for informing the data sending node of updating the credit value of the network switching equipment. The preset value of the reputation value of the network switching equipment can be half of the maximum value of the reputation value of the network switching equipment, and the reputation value of the network switching equipment can be determined according to the capacity of the message forwarding cache region of the network switching equipment. As an example, when the message forwarding cache of the network switching device has a capacity of 128KB, the network switching device may send a second reputation message to the data sending node when the reputation value of the network switching device is 64KB, so as to notify the data sending node that the reputation value of the network switching device is updated to be 64 KB. When the reputation value of the network switching device is the number of the messages that can be accepted by the network switching device, the maximum number of the messages that can be received by the network switching device can be determined according to the size of the message forwarding cache area of the network switching device, and the maximum number can be, for example, 8 times, and the network switching device can send a second reputation message to the data sending node when the reputation value of the network switching device is 4, so as to notify the data sending node to update the reputation value of the network switching device to 4. Therefore, the network switching equipment is prevented from frequently sending the credit message, and the bandwidth occupancy rate of the credit message is reduced.
With the rapid development of communication technology, Remote Direct Memory Access (RDMA) technology is widely used, and RDMA technology can rapidly move data from a system to a Memory of a Remote system without any influence on an operating system, thereby freeing Memory bandwidth, reducing data transmission time and reducing data delay. The hardware implementation of RDMA technology currently includes Infiniband (IB) technology, internet wide area RDMA protocol, and converged ethernet RDMA protocol. In some embodiments, an RDMA network card is configured on the network communication device, and the plurality of devices perform remote direct memory access via the RDMA network card.
RDMA technology may be used for congestion control of communication networks, and in some embodiments, the IB network card may control the queuing of messages for data reception and forwarding. In other embodiments, flow control is implemented via the RDMA network card and the hardware of the network switching device. In other embodiments, the congestion of the communication network may be controlled by executing a flow control algorithm, for example, an Expresspass algorithm may sense the congestion state of the entire network, and the Expresspass algorithm may control the congestion by sending message data at a data receiving end, and a network switching device receiving the message data and limiting the rate of the message data according to the usage of network resources.
However, the existing congestion control algorithms are controlled from a hardware level, for example, the implementation of RDMA congestion control depends on a hardware module in a hardware network card, the implementation of the Expresspass algorithm needs to change the operation mode of the network switching device from the hardware level, and the Expresspass algorithm may cause inaccurate speed limit in the case of sharing the network by other protocols.
In the RDMA communication network, a network switching device, a data sending node and a data forwarding node form the RDMA network. As a possible implementation manner, the flow control may be implemented by the network card of the network switching device and the network switching device, and the flow control is implemented without depending on a hardware module in the RDMA network card.
Fig. 3 is a schematic diagram of a method for controlling traffic according to an embodiment of the present disclosure, and fig. 3 is a diagram illustrating an angle line of data interaction between a data sending node and a data receiving node. The method for controlling the flow rate provided in the practice of the present disclosure is described in detail below with reference to fig. 3.
The Client shown in fig. 3 is a data receiving node, which may be, for example, a database user, and the number of the data receiving nodes may be multiple; the Server shown in fig. 3 is a data sending node, which may be a database Server, and the network switching device in fig. 3 may be a proxy Server proxy. The data transmission nodes shown in fig. 3 may each record their respective reputation value, where the reputation value of the data receiving node represents the reputation value of the network device that the data receiving node has received, and the reputation value of the data sending node represents the reputation value of the network switching device that the data sending node can send.
As shown in fig. 3, the data receiving node, the network switching device, and the data receiving node establish a link, and initialize respective credit values when establishing the link, the credit value of the Server is 1, which indicates that the Server can send a message to the proxy, the credit value of the proxy is 7, which indicates that the proxy can send 7 messages to the Client, and the credit value of the Client is 7, which indicates that the data messages sent by the 7 proxy can be received. After the link is established, the Server sends a message to the proxy to activate the data transmission channel, the reputation value of the system is updated after activation, the reputation value of the Server is updated to 0, the proxy update reputation value is 8, and the Client update reputation value is 0. After activation, the proxy sends a first credit message to the Server to inform the Server that the credit value of the proxy is 8, and the Server updates the credit value to 8. And the Server receives the first credit message and sends data to the proxy, and the credit value of each Server is subtracted by 1. And the Proxy receives the data message sent by the Server and forwards the data message to the Client, and the credit value of the Client is added with 1 when each data message is forwarded. And after the proxy forwards the data for 4 times, the proxy sends a second credit message to the Server to inform the Server of the current credit value of the proxy. The Server is used as a sending node of the data message and continuously sends the data message to the proxy, and the number of the data messages sent by the Server is determined by a second credit message sent by the proxy in the data transmission process. And when the credit value of the Server is reduced to 0, the Server stops sending the data message to the proxy, and the data transmission channel is closed and respective credit values are cleared up after the proxy completes the forwarding of the data message in the two-way circulation manner.
Therefore, the present disclosure provides a reputation-based bidirectional traffic control method, which dynamically balances the data receiving amount and the data forwarding amount of the network switching device through a bidirectional reputation feedback mechanism. The bidirectional feedback mechanism provided by the disclosure can feed back the congestion degree of the communication network system through the reputation value, and simultaneously reflects the available bandwidth on the current path.
Method embodiments of the present disclosure are described in detail above in conjunction with fig. 1-3, and apparatus embodiments of the present disclosure are described in detail below in conjunction with fig. 4-6. It is to be understood that the description of the method embodiments corresponds to the description of the apparatus embodiments, and therefore reference may be made to the preceding method embodiments for parts not described in detail.
Fig. 4 is a schematic structural diagram of an apparatus for controlling flow according to an embodiment of the present disclosure. The apparatus for controlling traffic shown in fig. 4 may be a network switching device, which may be used for data forwarding between a data sending node and a data receiving node. The apparatus 400 for controlling traffic may include a first sending module 410, an updating module 420, and a second sending module 430, which are described below.
A first sending module 410, which may be configured to send a first reputation packet to the data sending node, where the first reputation packet is used to notify the data sending node of a reputation value of the network switching device, and the reputation value of the network switching device is used to indicate a remaining capacity of a current packet forwarding cache of the network switching device;
an updating module 420, which may be configured to update the reputation value of the network switching device after forwarding the data packet sent by the data sending node to the data receiving node;
a second sending module 430, which may be configured to send a second reputation message to the data sending node, where the second reputation message is used to notify the data sending node of the update of the reputation value of the network switching device.
Optionally, the sending the second reputation packet to the data sending node includes: in response to the reputation value of the network switching device reaching a preset value, the second sending module 420 sends the second reputation packet to the data sending node.
Optionally, the preset value is greater than or equal to half of a maximum value of the reputation value of the network switching device.
Optionally, the first sending module is further configured to determine a maximum value of the reputation value of the network switching device according to a capacity of a packet forwarding buffer of the network switching device before sending the first reputation packet to the data sending node.
Optionally, the reputation value of the network switching device is the number of messages that can be received by the network switching device.
Optionally, the network switching device, the data sending node and the data receiving node form an RDMA network.
Fig. 5 is a schematic structural diagram of an apparatus for controlling flow provided by an embodiment of the disclosure. The apparatus 500 for controlling traffic of fig. 5 is located at a data sending node, and may be used to connect in communication with a network switching device to forward data to a data receiving node through the network switching device. The device 500 may include a first receiving module 510, a sending module 520, and a second receiving module 530. These modules are described in detail below.
A first receiving module 510, which may be configured to receive a first reputation packet sent by a network switching device, where the first reputation packet is used to notify the data sending node of a reputation value of the network switching device, and the reputation value of the network switching device is used to indicate a remaining capacity of a current packet forwarding cache of the network switching device;
a sending module 520, which may be configured to send a data packet to the network switching device according to the first reputation packet;
a second receiving module 530, which may be configured to receive a second reputation packet from the network switching device after the network switching device forwards the data packet to the data receiving node, where the second reputation packet is used to notify the data sending node of an updated value of the reputation value of the network switching device.
Optionally, the receiving a second reputation message from the network switching device includes: in response to the reputation value of the network switching device reaching a preset value, the second receiving module 530 receives a second reputation message from the network switching device.
Optionally, the preset value is greater than or equal to half of a maximum value of the reputation value of the network switching device.
Optionally, the sending module is further configured to stop sending the data packet to the network switching device in response to the reputation value of the network switching device being equal to zero.
Fig. 6 is a schematic structural diagram of an apparatus for controlling flow according to another embodiment of the present disclosure. The apparatus 600 shown in fig. 6 may be any network node capable of performing flow control. The apparatus 600 may be, for example, a computing apparatus having computing functionality. The apparatus 600 may be, for example, a mobile terminal or a server. The apparatus 600 may include a memory 610 and a processor 620. Memory 610 may be used to store executable code. The processor 620 is operable to execute the executable code stored in the memory 610 to implement the steps of the various methods described previously. In some embodiments, the apparatus 600 may further include a network interface 630, and data exchange between the processor 620 and an external apparatus may be implemented through the network interface 630.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any other combination. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the disclosure are, in whole or in part, generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Video Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (21)

1. A method of controlling traffic, the method being applicable to a network switching device for data forwarding between a data sending node and a data receiving node,
the method comprises the following steps:
sending a first credit message to the data sending node, wherein the first credit message is used for notifying the data sending node of a credit value of the network switching equipment, and the credit value of the network switching equipment is used for indicating the residual capacity of a current message forwarding cache region of the network switching equipment;
after the data message sent by the data sending node is forwarded to the data receiving node, the credit value of the network switching equipment is updated;
and sending a second credit message to the data sending node, wherein the second credit message is used for informing the data sending node of the updated value of the credit value of the network switching equipment.
2. The method of claim 1, the sending a second reputation message to the data sending node, comprising:
and responding to the credit value of the network switching equipment reaching a preset value, and sending the second credit message to the data sending node.
3. The method of claim 2, wherein the preset value is greater than or equal to half of a maximum value of the reputation value of the network switching device.
4. The method of claim 3, prior to the sending the first reputation message to the data sending node, the method further comprising:
and determining the maximum value of the credit value of the network switching equipment according to the capacity of a message forwarding cache region of the network switching equipment.
5. The method of claim 1, the reputation value of the network switching device being a number of messages receivable by the network switching device.
6. The method of claim 1, the network switching device, the data sending node, and the data receiving node forming an RDMA network.
7. A method of controlling traffic, the method being adapted for use with a data sending node communicatively coupled to a network switching device for forwarding data to a data receiving node via the network switching device,
the method comprises the following steps:
receiving a first credit message sent by network switching equipment, wherein the first credit message is used for informing the data sending node of a credit value of the network switching equipment, and the credit value of the network switching equipment is used for indicating the residual capacity of a current message forwarding cache region of the network switching equipment;
sending a data message to the network switching equipment according to the first credit message;
after the network switching device forwards the data packet to the data receiving node, receiving a second reputation packet from the network switching device, where the second reputation packet is used to notify the data sending node of an updated value of the reputation value of the network switching device.
8. The method of claim 7, the receiving a second reputation message from the network switching device, comprising:
and receiving a second reputation message from the network switching equipment in response to the reputation value of the network switching equipment reaching a preset value.
9. The method of claim 8, wherein the preset value is greater than or equal to half of a maximum value of the reputation value of the network switching device.
10. The method of claim 7, the method comprising:
and stopping sending the data message to the network switching equipment in response to the reputation value of the network switching equipment being equal to zero.
11. A device for controlling flow is a network switching device, and the network switching device is used for forwarding data between a data sending node and a data receiving node;
the device comprises:
a first sending module, configured to send a first reputation message to the data sending node, where the first reputation message is used to notify the data sending node of a reputation value of the network switching device, and the reputation value of the network switching device is used to indicate a remaining capacity of a current message forwarding cache of the network switching device;
the updating module is configured to update the reputation value of the network switching equipment after forwarding the data packet sent by the data sending node to the data receiving node;
and the second sending module is configured to send a second reputation message to the data sending node, wherein the second reputation message is used for notifying the data sending node of the updated value of the reputation value of the network switching device.
12. The apparatus of claim 11, the sending the second reputation message to the data sending node, comprising:
and in response to the reputation value of the network switching equipment reaching a preset value, the second sending module sends the second reputation message to the data sending node.
13. The apparatus of claim 12, the preset value is greater than or equal to half of a maximum value of a reputation value of the network switching device.
14. The apparatus of claim 13, the first sending module further configured to determine a maximum value of the reputation value of the network switching device according to a capacity of a packet forwarding buffer of the network switching device before sending the first reputation packet to the data sending node.
15. The apparatus of claim 11, the reputation value of the network switching device being a number of messages receivable by the network switching device.
16. The apparatus of claim 11, the network switching device, the data sending node, and the data receiving node form an RDMA network.
17. An apparatus for controlling traffic, the apparatus being located at a data sending node, the apparatus being communicatively connected to a network switching device for forwarding data to a data receiving node via the network switching device,
the device comprises:
a first receiving module, configured to receive a first reputation message sent by a network switching device, where the first reputation message is used to notify the data sending node of a reputation value of the network switching device, and the reputation value of the network switching device is used to indicate a remaining capacity of a current message forwarding cache of the network switching device;
a sending module configured to send a data packet to the network switching device according to the first reputation packet;
a second receiving module configured to receive a second reputation packet from the network switching device after the network switching device forwards the data packet to the data receiving node, where the second reputation packet is used to notify the data sending node of an updated value of the reputation value of the network switching device.
18. The apparatus of claim 17, the receiving a second reputation message from the network switching device, comprising:
and in response to the reputation value of the network switching equipment reaching a preset value, the second receiving module receives a second reputation message from the network switching equipment.
19. The apparatus of claim 18, the preset value is greater than or equal to half of a maximum value of a reputation value of the network switching device.
20. The apparatus of claim 17, the sending module further configured to stop sending data packets to the network switching device in response to the reputation value of the network switching device being equal to zero.
21. An apparatus for controlling flow, comprising a memory having executable code stored therein and a processor configured to execute the executable code to implement the method of any one of claims 1-10.
CN202210321168.7A 2022-03-30 2022-03-30 Method and device for controlling flow Pending CN114422441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210321168.7A CN114422441A (en) 2022-03-30 2022-03-30 Method and device for controlling flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210321168.7A CN114422441A (en) 2022-03-30 2022-03-30 Method and device for controlling flow

Publications (1)

Publication Number Publication Date
CN114422441A true CN114422441A (en) 2022-04-29

Family

ID=81264114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210321168.7A Pending CN114422441A (en) 2022-03-30 2022-03-30 Method and device for controlling flow

Country Status (1)

Country Link
CN (1) CN114422441A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6115356A (en) * 1997-12-18 2000-09-05 Advanced Micro Devices, Inc. Apparatus and method for generating flow control frames in a workgroup switch based on traffic contribution from a network switch port
CN101115008A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit based flow control system, apparatus and method
CN101115053A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit flow control method
US20090010159A1 (en) * 2007-07-06 2009-01-08 Brownell Paul V End-to-end flow control in a network
CN101453419A (en) * 2007-12-06 2009-06-10 卢森特技术有限公司 Controlling congestion in a packet switched data network
CN101534173A (en) * 2009-04-20 2009-09-16 福建星网锐捷网络有限公司 Method and system for controlling data flow
CN102075436A (en) * 2011-02-10 2011-05-25 成都市华为赛门铁克科技有限公司 Ethernet, and data transmitting method and device thereof
CN106059950A (en) * 2016-05-25 2016-10-26 四川大学 Adaptive network congestion control method based on SCPS-TP
CN108667739A (en) * 2017-03-27 2018-10-16 华为技术有限公司 Jamming control method, apparatus and system
CN111385223A (en) * 2018-12-28 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device, system and storage medium
CN113438182A (en) * 2021-03-30 2021-09-24 南京大学 Flow control system and flow control method based on credit
CN113726681A (en) * 2020-05-26 2021-11-30 华为技术有限公司 Network congestion control method and network equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6115356A (en) * 1997-12-18 2000-09-05 Advanced Micro Devices, Inc. Apparatus and method for generating flow control frames in a workgroup switch based on traffic contribution from a network switch port
US20090010159A1 (en) * 2007-07-06 2009-01-08 Brownell Paul V End-to-end flow control in a network
CN101115008A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit based flow control system, apparatus and method
CN101115053A (en) * 2007-08-24 2008-01-30 中国科学院计算技术研究所 Credit flow control method
CN101453419A (en) * 2007-12-06 2009-06-10 卢森特技术有限公司 Controlling congestion in a packet switched data network
CN101534173A (en) * 2009-04-20 2009-09-16 福建星网锐捷网络有限公司 Method and system for controlling data flow
CN102075436A (en) * 2011-02-10 2011-05-25 成都市华为赛门铁克科技有限公司 Ethernet, and data transmitting method and device thereof
CN106059950A (en) * 2016-05-25 2016-10-26 四川大学 Adaptive network congestion control method based on SCPS-TP
CN108667739A (en) * 2017-03-27 2018-10-16 华为技术有限公司 Jamming control method, apparatus and system
CN111385223A (en) * 2018-12-28 2020-07-07 阿里巴巴集团控股有限公司 Flow control method, device, system and storage medium
CN113726681A (en) * 2020-05-26 2021-11-30 华为技术有限公司 Network congestion control method and network equipment
CN113438182A (en) * 2021-03-30 2021-09-24 南京大学 Flow control system and flow control method based on credit

Similar Documents

Publication Publication Date Title
JP6526825B2 (en) Method and apparatus for transmitting transmission control protocol TCP data packets, and system
EP3780542B1 (en) Data transmission method and device
JP5816718B2 (en) Communication apparatus, communication system, and data communication relay method
CN113411264B (en) Network queue monitoring method and device, computer equipment and storage medium
KR102187810B1 (en) Apparatus and method for controlling data flow in a communication system
US7643420B2 (en) Method and system for transmission control protocol (TCP) traffic smoothing
EP2819353A1 (en) Communication device
US9071984B1 (en) Modifying a data flow mechanism variable in a communication network
US20220286402A1 (en) Method and apparatus for controlling data packet sending, model training method and apparatus, and system
WO2017114231A1 (en) Packet sending method, tcp proxy, and tcp client
JP4700290B2 (en) Method for flow control in a communication system
CN113141314B (en) Congestion control method and equipment
CN104683259A (en) TCP congestion control method and device
CN111131179B (en) Service processing method, device, network equipment and storage medium
EP1395000B1 (en) A method of transmitting data streams dependent on the monitored state of the client application buffer
US10574706B2 (en) Method and system for upload optimization
CN113726681A (en) Network congestion control method and network equipment
US10897725B2 (en) System and method for managing data transfer between two different data stream protocols
CN114422441A (en) Method and device for controlling flow
EP1506644B1 (en) Shared-communications channel utilization for applications having different class of service requirements
CN109688085B (en) Transmission control protocol proxy method, storage medium and server
Ji et al. Memory performance optimization of DTN relay node based on M/G/1
KR100429503B1 (en) Data packet flow control method
WO2022153387A1 (en) Communication device, relay device, communication system, communication method, and program
CN114884884A (en) Congestion control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220429

RJ01 Rejection of invention patent application after publication