WO2018121535A1 - Load balance processing method and apparatus - Google Patents

Load balance processing method and apparatus Download PDF

Info

Publication number
WO2018121535A1
WO2018121535A1 PCT/CN2017/118652 CN2017118652W WO2018121535A1 WO 2018121535 A1 WO2018121535 A1 WO 2018121535A1 CN 2017118652 W CN2017118652 W CN 2017118652W WO 2018121535 A1 WO2018121535 A1 WO 2018121535A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
flowlet
tcp
sending
sent
Prior art date
Application number
PCT/CN2017/118652
Other languages
French (fr)
Chinese (zh)
Inventor
韩冰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018121535A1 publication Critical patent/WO2018121535A1/en

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/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • 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/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a load balancing method and apparatus.
  • Equal-cost multi-path routing is a commonly used load balancing processing method.
  • ECMP technology includes a packet-based path selection method and a flow-based path selection method.
  • Packet-based path selection can achieve load balancing. There is a difference in the delay of different paths in the multipath, which causes the packets received at the receiving end to be out of order. Requires Packet reordering.
  • the outbound interface the packet forwarding path
  • the receiver does not need to reorder the message.
  • the rates of different flows may be different (for example, occupying a large bandwidth (Elephant Flow) and occupying a smaller bandwidth (Mice Flow)), and the flows transmitted in different paths are also different.
  • the rates of Flows transmitted in different paths are not equal, the load may be unbalanced.
  • a load balancing processing method based on Flowlet mechanism is proposed.
  • a load balancing processing method based on the flow mechanism a plurality of packets continuously sent in a certain flow are used as one flowlet, and a flowlet mechanism is used to perform path selection, so that multiple packets included in the flowlet are forwarded based on the selected path.
  • the load balancing processing method based on the Flowlet mechanism combines the two path selection methods, that is, the packet-based path selection method and the flow-based path selection method, so that load balancing processing can be performed better.
  • the path selection method based on the hash algorithm is not switched to the path selection method based on the Flowlet mechanism.
  • switching of the execution path selection mode easily leads to out-of-order.
  • the embodiment of the present application provides a load balancing processing method and apparatus, which can implement a path selection manner based on a hash algorithm to switch to a path selection method based on a Flowlet mechanism.
  • disorder can be avoided.
  • the first aspect provides a load balancing processing method, in which the packet sending device sends a first packet by using a TCP, where the first packet is sent by the packet sending device in the first TCP sending window.
  • a message The packet forwarding device receives the first packet sent by the packet sending device by using the TCP, and determines the outgoing interface according to the feature information of the first packet and the hash algorithm, and forwards the first packet by using the outbound interface. .
  • the packet sending device sends a second packet by using TCP, and sets a Flowlet start tag for the second packet, where the Flowlet start tag is used to identify the first packet in the Flowlet.
  • the packet forwarding device receives the second packet sent by the packet sending device by using the TCP, and the second packet is the first packet sent by the packet sending device in the second TCP sending window, and the second packet is sent by the packet sending device.
  • the text includes a flowlet start tag, so the first flowlet flow table entry can be created based on the flowlet start tag included in the second message, and the second message is forwarded according to the created first flowlet flow table entry.
  • the second TCP transmission window is a TCP transmission window adjacent to the first TCP transmission window, and the packet sending device receives the ACK confirmation corresponding to the packet sent in the first TCP transmission window. Sending a message in the second TCP transmission window.
  • the ACK acknowledgement corresponding to the packet sent in the first TCP transmission window refers to the ACK acknowledgement corresponding to the last packet (the first packet) sent in the first TCP transmission window.
  • the packet forwarding path used by the packet forwarding device to forward the second packet indicated by the first flowlet flow table entry according to the flowlet start tag included in the second packet may be used for determining the packet forwarding path based on the hash algorithm.
  • the forwarding path of the first packet is the same or different.
  • the outbound interface for forwarding the second packet indicated by the first flowlet flow table entry is the same outbound interface as the outbound interface determined by the hash algorithm for forwarding the first packet, or is different. interface.
  • the packet forwarding device may be switched to adopt a flowlet to perform path selection by using a hash algorithm to determine a packet forwarding path, and the packet forwarding device is a flowlet stream created based on a Flowlet start tag.
  • the table entry, the Flowlet start tag is used to identify the first packet sent in the second TCP sending window, and the packet sending device needs to receive the ACK acknowledgement to continue sending after sending the message in the first TCP sending window.
  • the packet is sent by the packet sending device, and the packet sending device has received the packet sent by the packet sending device. Therefore, the packet sending device sends the packet to the packet receiving device in the second TCP sending window.
  • the text does not cause out-of-order when the packet arrives at the packet receiving device, which can avoid out-of-order.
  • the packet forwarding device after receiving the second packet sent by the packet sending device by using the TCP, the packet forwarding device continues to receive the packet sent by the sending device using TCP in the second TCP sending window, and according to the packet forwarding device, The created first flowlet flow table entry forwards the subsequently received packet sending device to send the packet sent by the TCP in the second TCP sending window.
  • the packet forwarding device if the packet forwarding device receives the third packet sent by the packet sending device in the second TCP sending window, and the third packet includes the Flowlet end tag, the packet forwarding device Deleting the first Flowlet flow table entry based on the Flowlet End Tag included in the third message to release the resource, the released resource may be used to create a Flowlet flow table entry followed by other Flowlets, so that more Flowlets are obtained. It can match the flow table flow table entries and perform load balancing processing.
  • the packet forwarding device can continue to receive the subsequent packet.
  • the packet forwarding device receives the fourth packet sent by the packet sending device by using TCP.
  • the fourth packet is a first packet sent by the packet sending device in the third TCP sending window, and the fourth packet includes a Flowlet start tag.
  • the packet forwarding device creates a second Flowlet flow table entry based on the Flowlet start tag included in the fourth packet, and forwards the fourth packet according to the created second Flowlet flow table entry to implement the Flowlet mechanism.
  • the path selection method is used for path selection.
  • the third TCP transmission window is a TCP transmission window adjacent to the second TCP transmission window, and the packet sending device receives the ACK confirmation corresponding to the packet sent in the second TCP transmission window, The third TCP transmission window sends a message.
  • the ACK acknowledgement corresponding to the packet sent in the second TCP sending window refers to the ACK acknowledgement corresponding to the last packet (third packet) sent in the second TCP sending window.
  • the packet forwarding path that is used by the packet forwarding device to forward the fourth packet according to the flowlet start tag included in the fourth packet to create the second flowlet flow table entry may be based on the packet included in the second packet.
  • the flow forwarding path of the Flowlet start tag is the same as that of the first flowlet table entry, and the packet forwarding path used to forward the second packet is the same or different.
  • the outbound interface for forwarding the fourth packet indicated by the second flowlet flow table entry is the same outbound interface as the outgoing interface for forwarding the second packet indicated by the first flowlet flow table entry, or Is a different outbound interface.
  • the Flowlet Start Tag and/or the Flowlet End Tag are carried by the idle bits in the message header.
  • the existing TCP can be augmented, and the Flowlet Start Tag and/or the Flowlet End Tag are carried by the Reserved Bit in the Message Header field.
  • the Flowlet start tag included in the second packet is carried by the idle bit in the packet header of the second packet, and the Flowlet end tag included in the third packet passes the packet of the third packet.
  • the idle bit in the header is carried, and the Flowlet start tag included in the fourth packet is carried by the idle bit in the header of the fourth packet.
  • a load balancing processing apparatus including all of the functions of implementing the load balancing processing method described above.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the modules can be software and/or hardware.
  • the load balancing processing device includes a receiving unit, a processing unit, and a sending unit.
  • the functions of the receiving unit, the processing unit, and the sending unit may correspond to the method steps, and details are not described herein.
  • a third aspect provides a message forwarding device, where the message forwarding device includes a processor, a memory, and a communication interface, and the processor, the memory, and the communication interface are connected by a bus.
  • the memory is configured to store program code executed by the processor; the processor calls the program code stored in the memory, acquires and forwards a message through the communication interface, and when the processor executes the memory storage
  • the instruction is used to complete any of the load balancing processing methods as involved in the first aspect.
  • a computer storage medium for storing instructions that, when executed, perform any of the load balancing processing methods described above.
  • the packet forwarding device after receiving the last packet sent by the packet sending device in the first TCP sending window, determines the interface according to the feature information of the first packet and the hash algorithm, and The method of forwarding the first packet by the interface is a method for determining a packet forwarding path by using a hash algorithm.
  • the packet forwarding device After the packet forwarding device receives the second packet sent by the TCP in the second TCP sending window, the packet forwarding device creates a first Flowlet flow table entry based on the Flowlet start tag included in the second packet, and creates the first Flowlet flow table entry.
  • the first Flowlet flow table entry, forwarding the second packet is a way for path selection based on the Flowlet mechanism.
  • the method for determining the packet forwarding path based on the hash algorithm is converted into the path selection method by using the flowlet to perform load balancing processing.
  • the packet forwarding device is a flowlet flow table entry created based on a Flowlet start tag included in the second packet, where the Flowlet start tag is used to identify the first packet sent in the second TCP sending window, because the packet After receiving the packet in the first TCP transmission window, the packet sending device needs to receive the ACK to continue to send the packet, and the packet sending device receives the ACK acknowledgement, indicating that the packet receiving device has received the packet sending device and sends the packet.
  • the packet sending device sends a packet to the packet receiving device in the second TCP sending window, so that the packet does not need to be out of order when the packet arrives at the receiving device, and the packet receiving device does not need to receive the received packet.
  • the text is reordered.
  • FIG. 1 is a system architecture applied to a load balancing processing method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a path selection manner based on a Flowlet mechanism
  • FIG. 3 is a flowchart of a load balancing processing method according to an embodiment of the present application.
  • FIG. 4 is another flowchart of a load balancing processing method according to an embodiment of the present disclosure.
  • FIG. 5 is still another flowchart of a load balancing processing method according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a load balancing processing apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a packet forwarding device according to an embodiment of the present disclosure.
  • a flowlet can be understood as a packet group consisting of multiple packets continuously sent in a flow, and each flow includes multiple flowlets.
  • the forwarding of multiple packets included in the flowlet can be implemented based on the flowlet flow table entry.
  • Different Flowlets correspond to different Flowlet flow table entries.
  • the flowlet flow table entry is used to indicate a packet forwarding path of multiple packets included in each flowlet.
  • TCP In TCP, the concepts of window, TCP send window, acknowledgement, segment, TCP sender, and TCP receiver are defined.
  • TCP windows, acknowledgement, segments, TCP senders, and TCP receivers see RFC793, RFC813, RFC879, RFC1180, RFC5681, and RFC5690 published by the IETF.
  • the load balancing processing method and apparatus provided by the embodiments of the present application can be applied to a network that supports ECMP technology for load balancing processing, for example, applicable to the network architecture shown in FIG. 1.
  • the server uses a Transmission Control Protocol (TCP) to send packets to a packet forwarding device of a routing switching network, and a packet forwarding device (such as a switch, a router, etc.) in the routing switching network adopts ECMP.
  • TCP Transmission Control Protocol
  • a packet forwarding device such as a switch, a router, etc.
  • the technology forwards the packet and forwards the received packet to the terminal in the case of load balancing of the entire network.
  • the packet forwarding device uses the ECMP technology to forward packets, the Flowlet mechanism can be used for path selection.
  • FIG. 2 is a schematic diagram of a path selection manner based on a Flowlet mechanism according to an embodiment of the present application.
  • the packet forwarding device needs to split the multiple packets included in the flow into multiple packet groups, and each packet group includes multiple packets.
  • Each packet group can be understood as a flowlet.
  • the following embodiments of the present application refer to "message group" and "Flowlet” frequently used interchangeably, but those skilled in the art can understand the meaning thereof.
  • the different packet groups correspond to different flowlet flow table entries, and the flowlet flow table entry is used to indicate the packet forwarding path of the packet forwarding device to forward the packet, for example, to indicate that the packet forwarding device forwards the packet.
  • the packet forwarding device can forward different flowlet table entries.
  • the basis for obtaining multiple message groups in multiple packets in a specific split stream is: the time difference between the time taken by two adjacent packets in the flow to reach the packet receiving device (the device corresponding to the destination address of the packet) Gap) is greater than or equal to the absolute value of the time difference between the two different forwarding paths.
  • the two adjacent packets to be forwarded are forwarded to the packet receiving device through two different forwarding paths.
  • each Gap that meets the condition can determine whether the packet is the first packet or the last packet in the packet group that can be forwarded by a flowlet flow table entry. Message message.
  • the packet forwarding device can forward the packet in the packet group to be split based on the Flowlet mechanism flow table.
  • Each flow entry in the flowlet flow table includes a source address and a destination address of the packet forwarding, and the source address and the destination address forwarded by the flow are the result of the routing of the Flowlet obtained by executing the flowlet routing policy. For example, in FIG.
  • the packet forwarding device receives the to-be-forwarded packets included in the flow as message 1, message 2, message 3, message 4, and message 5, and message 2 and message 3 arrive at the report.
  • the time difference between the time used by the receiving device is Gap
  • the time taken by the packet 2 and the packet 3 through the forwarding path 1 is d1
  • the time taken by the packet 2 and the packet 3 through the forwarding path 2 is d2, and if so, the packet 2 can be
  • the packet 1 is divided into a packet group and forwarded to the packet receiving device through the forwarding path 1
  • the packet 3, the packet 4, and the packet 5 are divided into another packet group and forwarded to the packet through the forwarding path 2.
  • each packet group is forwarded based on the Flowlet flow table entry, and the packet arrives at the report.
  • the packet forwarding device does not determine the first packet in the packet group that is forwarded based on the flowlet flow table entry.
  • the packet forwarding device has insufficient specifications due to the flowlet flow table
  • the route selection method based on the flowlet is converted to the path selection mode based on the hash algorithm to determine the packet forwarding path, even if there is an available flowlet flow table, it is determined whether the current to-be-forwarded packet is based on the flowlet flow table.
  • the first packet of the packet forwarding group is forwarded. Therefore, in order to avoid packet out-of-order, the path of the packet forwarding path can be determined by using the hash algorithm.
  • the method performs load balancing processing.
  • An embodiment of the present application provides a load balancing processing method, in which a Flowlet start flag is set for a first packet in a packet group forwarded by each Flowlet flow table entry obtained by the splitting, by using the The Flowlet Start tag identifies the first message in the packet group forwarded based on the Flowlet Flow Table entry.
  • the packet in the two adjacent to-be-forwarded packets in the basis of splitting the multiple packets in the flow into the plurality of packets in the foregoing embodiment may be used as a basis.
  • the first packet of the packet group forwarded by the flowlet flow entry may be used as a basis.
  • the packet forwarding device forwards the packet
  • the packet is forwarded by the flowlet to determine that the packet forwarded by the flowlet table entry is the first packet in the packet group, and even if the packet forwarding device is currently applied.
  • the path selection mode of the packet forwarding path is determined by the hash algorithm to perform load balancing processing.
  • the method can be converted into a path using the flowlet by the application to determine the packet forwarding path based on the hash algorithm.
  • the method of load balancing is performed, and the packet does not need to be out of order when the packet arrives at the packet receiving device.
  • the packet receiving device does not need to reorder the received packet.
  • the packet sending device can determine the sending time of the packet, the packet sending device can identify each packet group that is forwarded based on the flowlet flow table entry.
  • the first packet and the last packet in this embodiment, the packet sending device may set the Flowlet start tag for the first packet in each packet group forwarded by the Flowlet flow table entry. .
  • the Flowlet start tag can be carried by the first message in the packet group forwarded by the Flowlet flow table entry in the Flowlet.
  • TCP Transmission Control Protocol
  • TCP Transmission Control Protocol
  • TCP Receiver Transmission Control Protocol receiver
  • the packet transmitted by using TCP on the following refers to the above TCP packet.
  • the TCP transmission window is capable of characterizing a sequence number of a message that the TCP receiver desires to receive, and the sequence number can indicate a data segment included in the message received by the TCP receiver through the TCP transmission window.
  • the TCP receiver After receiving the data packet sent by the TCP sender through the TCP transmission window, the TCP receiver sends an acknowledgement (ACK) to the TCP transmitter according to the received message. After receiving the ACK, the TCP sender continues to send a message to the TCP receiver in another TCP transmission window.
  • ACK acknowledgement
  • the packet sending device needs to receive the ACK to confirm the packet after the packet is sent in the first TCP sending window, and the packet sending device receives the packet.
  • the packet receiving device has received the packet sent by the packet sending device, so the packet sending device sends a packet to the packet receiving device in the second TCP sending window, where the second TCP is sent.
  • the sending window is different from the first TCP sending window, the second TCP sending window is a TCP sending window adjacent to the first TCP sending window, and the message sending device receives the sending in the first TCP sending window.
  • TCP packets sent in each window is a TCP packet based on a plurality of packet group Flowlet flow table entry in the forwarding.
  • the message sending device that uses TCP to send a message in the embodiment of the present application may set a Flowlet start tag for the first message sent in each TCP sending window, and the Flowlet starts marking.
  • the first packet in the flowlet is identified, in other words, if the packet includes a Flowlet start tag, the packet containing the Flowlet start tag may be considered as the first packet in the Flowlet.
  • the packet forwarding device receives the packet including the Flowlet start tag sent by the packet sending device using the TCP, it may be based on the received message.
  • the Flowlet included in the packet starts to create a Flowlet flow table entry, and forwards the packet according to the created Flowlet flow table entry, thereby implementing a path selection method based on the Flowlet mechanism.
  • the message sending device that uses TCP to send a message in the embodiment of the present application may set a Flowlet end tag for the last message sent in each TCP sending window.
  • the Flowlet End Tag is used to identify the last packet in the packet group forwarded based on the Flowlet Flow Table entry. In other words, if the packet includes a Flowlet End Tag, the packet may be considered to include the Flowlet End Tag.
  • the last packet in a packet group forwarded based on the Flowlet flow table entry.
  • the packet forwarding device can determine the packet if the packet sending device receives the packet including the Flowlet end tag sent by the packet sending device by using the TCP packet.
  • the packet After the packet containing the flow end tag is forwarded, the packet is sent to the last packet in the packet group, and the packet is forwarded.
  • the Flowlet flow table entry on which the packet is based is deleted to release the resource.
  • the released resource can be used to create a Flowlet flow table entry that is followed by other packet groups, so that more packet groups can be matched to the Flowlet flow table. Item, load balancing processing.
  • the Flowlet Start Tag and/or the Flowlet End Tag are carried by idle bits in the message header.
  • the existing TCP can be extended and carried by the reserved bit in the message header field.
  • the Flowlet Start Tag and the Flowlet End Tag can be marked by two reserved bits in the message header field.
  • the Flowlet start tag and the Flowlet end tag may be represented by a bit position bit. For example, if the bit used to indicate the Flowlet start tag in the message is set to 1, the message includes the Flowlet. Start tag, which is the first packet in the packet group forwarded based on the Flowlet flow table entry.
  • bit in the packet indicating the end of the Flowlet flag is set to 1, it indicates that the packet contains a Flowlet End Tag, which is the last packet in the packet group forwarded based on the Flowlet Flow Table entry. . If the bit in the message indicating the start of the Flowlet flag is set to 0, and the bit used to indicate the end of the Flowlet flag is also set to 0, it indicates that the message is a message forwarded based on the Flowlet flow table entry. A packet between the first packet and the last packet in the group.
  • the embodiment of the present application provides an implementation scheme for performing load balancing processing by converting a manner in which a packet forwarding path is determined based on a hash algorithm into a manner in which a path is selected by using a flowlet.
  • the packet sending device uses TCP to send the packet sent by each TCP sending window as a packet group forwarded by the Flowlet flow table entry.
  • FIG. 3 is a flowchart of a load balancing processing method according to an embodiment of the present application.
  • the execution body of the method shown in FIG. 3 may be a packet forwarding device, or may be a component in a packet forwarding device.
  • the packet forwarding device may be a device with a packet forwarding function, such as a switch or a router, which is not limited in this embodiment. Referring to Figure 3, the method includes:
  • the packet forwarding device receives the first packet sent by the packet sending device by using TCP.
  • the first packet is the last packet sent by the packet sending device in the first TCP sending window.
  • the last message sent by the message sending device in the first TCP sending window can be understood as the last message sent in the first TCP sending window in the time dimension, and if it is represented by the serial number, it can be understood as The message with the largest sequence number sent in the first TCP transmission window.
  • the packet forwarding device determines an interface according to the feature information of the first packet and a hash algorithm, and forwards the first packet by using the outbound interface.
  • the packet forwarding device determines the packet forwarding path based on the hash algorithm.
  • the hash key input when the packet forwarding device executes the hash algorithm may be a feature such as a five-tuple of the first packet that characterizes the first message attribute.
  • the hash value output by the packet forwarding device when the hash algorithm is executed may be used to represent the forwarding path information, and the forwarding path information may be, for example, information such as an outgoing interface of the forwarding packet.
  • the packet forwarding device receives the second packet sent by the packet sending device by using the TCP.
  • the second packet is a first packet sent by the packet sending device in the second TCP sending window, and the second packet includes a Flowlet start tag.
  • the first message sent by the message sending device in the second TCP sending window can be understood as the first message sent in the second TCP sending window in the time dimension, and if it is represented by the serial number, It is understood to be the message with the smallest sequence number sent in the second TCP transmission window.
  • the second TCP sending window is a TCP sending window adjacent to the first TCP sending window, and the packet sending device receives the ACK confirmation corresponding to the sending of the message in the first TCP sending window,
  • the second TCP transmission window sends a message.
  • the ACK corresponding to the packet sent in the first TCP sending window is used to indicate that all the packets sent in the first TCP sending window have reached the destination.
  • the ACK acknowledgment corresponding to the message sent in the first TCP transmission window refers to the ACK acknowledgment corresponding to the last message (the first message) sent in the first TCP transmission window.
  • the sequence number carried in the ACK acknowledgement is equal to the sequence number carried in the first TCP packet.
  • the flow start tag included in the second packet may be carried by the idle bit in the header of the second packet.
  • the second packet may have the same feature information as the first packet.
  • the second packet and the first packet are packets belonging to the same stream.
  • the packet forwarding device creates a first flowlet flow table entry based on the flowlet start tag included in the second packet, and forwards the second packet according to the created first flowlet flow table entry.
  • the packet forwarding device may be based on the flowlet start flag included in the second packet, and the packet forwarding path for forwarding the second packet indicated by the first flowlet flow table entry may be based on a hash algorithm.
  • the forwarding path used to forward the first packet is the same, but may be different.
  • the outbound interface for forwarding the second packet indicated by the first flowlet flow table entry is the same outbound interface as the outbound interface determined by the hash algorithm for forwarding the first packet, or is different. interface.
  • the packet forwarding device after receiving the last packet sent by the packet sending device in the first TCP sending window, determines the interface according to the feature information of the first packet and the hash algorithm, and The method of forwarding the first packet by the interface is a method for determining a packet forwarding path by using a hash algorithm.
  • the packet forwarding device After the packet forwarding device receives the second packet sent by the TCP in the second TCP sending window, the packet forwarding device creates a first Flowlet flow table entry based on the Flowlet start tag included in the second packet, and creates the first Flowlet flow table entry.
  • the first Flowlet flow table entry, forwarding the second packet is a way for path selection based on the Flowlet mechanism.
  • the method for determining the packet forwarding path based on the hash algorithm is converted into the path selection method by using the flowlet to perform load balancing processing.
  • the packet forwarding device is a flowlet flow table entry created based on a Flowlet start tag included in the second packet, where the Flowlet start tag is used to identify the first packet sent in the second TCP sending window, because the packet After receiving the packet in the first TCP transmission window, the packet sending device needs to receive the ACK to continue to send the packet, and the packet sending device receives the ACK acknowledgement, indicating that the packet receiving device has received the packet sending device and sends the packet.
  • the packet sending device sends a packet to the packet receiving device in the second TCP sending window, so that the packet does not need to be out of order when the packet arrives at the receiving device, and the packet receiving device does not need to receive the received packet.
  • the text is reordered.
  • the packet forwarding device after receiving the second packet sent by the packet sending device by using the TCP, continues to receive the packet sent by the sending device using the TCP in the second TCP sending window, and creates the packet according to the method.
  • the first Flowlet flow table entry forwards the subsequently received message sending device to send the message sent by the TCP in the second TCP sending window.
  • the packet forwarding device receives the packet sending device using TCP, the last packet sent in the second TCP sending window, and the last packet sent in the second TCP sending window includes
  • the flowlet end tag is based on the method flow shown in FIG. 3, and may also include the following implementation steps, as shown in FIG. 4:
  • the packet forwarding device receives the third packet sent by the packet sending device by using the TCP.
  • the last packet sent by the packet sending device received by the packet forwarding device in the second TCP sending window is referred to as a third packet
  • the third packet includes a Flowlet end tag.
  • the flow end tag included in the third packet may be carried by the idle bit in the header of the third packet.
  • the packet forwarding device deletes the first Flowlet flow table entry based on the Flowlet End Tag included in the third packet.
  • the packet forwarding device deletes the first flowlet flow table entry based on the flowlet end tag included in the third packet, and can release the resource, and the released resource can be used to create another packet group to follow.
  • the Flowlet flow table entry enables more packet groups to match the Flowlet flow table entries for load balancing.
  • the packet forwarding device after receiving the third packet sent by the TCP, the packet forwarding device can continue to receive subsequent packets, and performs path selection according to the path selection mode of the Flowlet mechanism.
  • the implementation process is as shown in FIG. 5 . Show.
  • the method flow shown in FIG. 5 may further include the following implementation steps on the basis of the method flow shown in FIG. 4:
  • the packet forwarding device receives the fourth packet sent by the packet sending device by using the TCP.
  • the fourth packet is the first packet sent by the packet sending device in the third TCP sending window, and the fourth packet and the first packet have the same feature information.
  • the fourth message and the first message belong to the same stream.
  • the fourth message includes a Flowlet Start tag.
  • the Flowlet start tag included in the fourth message may be carried by the idle bit in the header of the fourth message.
  • the Flowlet start tag included in the fourth packet in the embodiment of the present application may be the same as or different from the Flowlet start tag included in the second packet, but the Flowlet start tag function and the second packet included in the fourth packet are included.
  • the Flowlet start tag included in the function has the same function and is used to identify the first message sent by the data sending device in the TCP send window.
  • the third TCP sending window is a TCP sending window adjacent to the second TCP sending window, and after the packet sending device receives the ACK confirmation corresponding to the sending of the message in the second TCP sending window, The message is sent in the third TCP transmission window.
  • the ACK corresponding to the packet sent in the second TCP sending window is used to indicate that all the packets sent in the second TCP sending window have reached the destination.
  • the ACK acknowledgment corresponding to the message sent in the second TCP transmission window refers to the ACK acknowledgment corresponding to the last message (third message) sent in the second TCP transmission window.
  • the sequence number carried in the ACK acknowledgement is equal to the sequence number carried in the third TCP packet.
  • the packet forwarding device creates a second Flowlet flow table entry based on the Flowlet start tag included in the fourth packet, and forwards the fourth packet according to the created second Flowlet flow table entry.
  • the packet forwarding device may be based on the Flowlet start tag included in the fourth packet, and the packet forwarding path for forwarding the fourth packet indicated by the second Flowlet flow table entry may be based on the second report.
  • the flow forwarding path included in the text is the same as the forwarding path of the packet for forwarding the second packet indicated by the first flowlet flow table entry, and may of course be different.
  • the outbound interface for forwarding the fourth packet indicated by the second flowlet flow table entry is the same outbound interface as the outgoing interface for forwarding the second packet indicated by the first flowlet flow table entry, or Is a different outbound interface.
  • the packet forwarding device after receiving the fourth packet sent by the packet sending device, continues to receive the packet sent by the sending device using the TCP in the third TCP sending window, and creates the packet according to the method.
  • the second Flowlet flow table entry forwards the subsequently received message sending device to send the message sent by the TCP in the third TCP sending window.
  • the inactive flow entry in the created flowlet flow table that exceeds the set duration of the flow table resource is periodically detected, and the inactive flow entry is deleted, so that the resource can be released.
  • the released resources can be used to create flowlet flow tables of other Flowlets, so that more Flowlets can be matched to the Flowlet flow table for load balancing processing.
  • the inactive flow entry is a flow entry that is not executed within a set duration.
  • the embodiment of the present application further provides a load balancing processing apparatus.
  • the load balancing processing device includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above functions.
  • the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the unit and algorithm steps of the examples described in the embodiments disclosed in the embodiments of the present application. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present application.
  • the embodiment of the present application may divide the functional unit into the load balancing processing device according to the foregoing method example.
  • each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 6 is a schematic structural diagram of a load balancing processing apparatus 100 according to an embodiment of the present application.
  • the load balancing processing apparatus 100 includes a receiving unit 101, a processing unit 102, and a transmitting unit 103.
  • the receiving unit 101 is configured to receive a first packet that is sent by the packet sending device by using the TCP, where the first packet is the last packet sent by the packet sending device in the first TCP sending window; Receiving, by the packet sending device, a second packet sent by using a TCP, where the second packet is a first packet sent by the packet sending device in a second TCP sending window, where the second packet is sent Contains the Flowlet start tag.
  • the second TCP transmission window is a TCP transmission window adjacent to the first TCP transmission window, and the message sending device receives the correct ACK confirmation of the message sent in the first TCP transmission window. Sending a message in the second TCP transmission window.
  • the processing unit 102 is configured to determine an interface according to the feature information of the first packet received by the receiving unit 101 and a hash algorithm, and create a first identifier based on the Flowlet start tag included in the second packet. Flowlet flow table entry.
  • the sending unit 103 is configured to forward the first packet by using the outbound interface determined by the processing unit 102, and forward the second according to the first Flowlet flow table entry created by the processing unit 102.
  • the message has the same feature information between the second message and the first message.
  • the receiving unit 101 is further configured to: after the first flowlet flow table entry is created, receive the third packet sent by the packet sending device by using the TCP, where the third packet is sent by using the third packet. The last message sent by the device in the second TCP transmission window, the third message containing a Flowlet End Tag.
  • the processing unit 102 is further configured to delete the first Flowlet flow table entry based on the Flowlet end tag included in the third packet received by the receiving unit 101.
  • the receiving unit 101 is further configured to: after the processing unit 102 determines that the third packet sent by the packet sending device by using the TCP includes the Flowlet End Tag, and receives the first sent by the packet sending device. And a fourth packet, where the fourth packet is a first packet sent by the packet sending device in a third TCP sending window, where the fourth packet includes a Flowlet start tag.
  • the processing unit 102 is further configured to: create, according to the Flowlet start tag included in the fourth packet received by the receiving unit 101, a second Flowlet flow table entry; the sending unit 103 further uses The fourth packet is forwarded according to the second flowlet flow table entry created by the processing unit 102.
  • the processing unit 102 may be a processor, and the receiving unit 101 and the sending unit 103 may be communication interfaces.
  • the communication interface is a collective name and may include one or more interfaces.
  • the load balancing processing apparatus 100 When the processing unit 102 is a processor, and the receiving unit 101 and the transmitting unit 103 are communication interfaces, the load balancing processing apparatus 100 provided by the embodiment of the present application may have the structure as shown in FIG. 7.
  • the load balancing processing device 100 shown in FIG. 7 may be a packet forwarding device, and the packet forwarding device may be a load balancing device, or may be a switch or a router.
  • FIG. 7 is a schematic structural diagram of a packet forwarding device 1000 according to an embodiment of the present application.
  • the message forwarding device 1000 adopts a general computer system structure, including a bus, a processor 1001, a memory 1002, and a communication interface 1003.
  • the program code for executing the solution of the embodiment of the present application is stored in the memory 1002, and is processed by the processor. 1001 to control execution.
  • the program stored in the memory 1002 is used by the instruction processor 1001 to perform the load balancing processing method of the foregoing embodiment, including: receiving, by the communication interface 1003, a first packet sent by the packet sending device by using the TCP, where the first packet is The last message sent by the message sending device in the first TCP sending window. Determining an interface according to the feature information of the first packet and a hash algorithm, and forwarding the first packet by using the outbound interface.
  • the second message includes a Flowlet start tag
  • the second TCP send window is a TCP send window adjacent to the first TCP send window
  • the message sending device receives the message in the first TCP send window.
  • the message is sent in the second TCP transmission window.
  • the data forwarding device creates a first flowlet flow table entry based on the flowlet start tag included in the second packet, and forwards the second packet according to the created first flowlet flow table entry.
  • the second message has the same feature information as the first message.
  • the program stored in the memory 1002 is further used by the instruction processor 1001 to receive, by the communication interface 1003, the third report sent by the packet sending device by using the TCP after creating the first Flowlet flow table entry.
  • the third packet is the last packet sent by the packet sending device in the second TCP sending window, where the third packet includes a Flowlet end tag, and is based on the third packet.
  • the flowlet end tag included in the first flowlet flow table entry is deleted.
  • the program stored in the memory 1002 is further used by the instruction processor 1001 to determine that the third message sent by the message sending device includes a Flowlet end tag, and then communicates
  • the interface 1003 receives the fourth packet sent by the packet sending device by using the TCP, and the fourth packet is the first packet sent by the packet sending device in the third TCP sending window, and the fourth packet
  • the message includes a flow start tag, and based on the flowlet start tag included in the fourth packet, creating a second flowlet flow table entry, and forwarding the according to the created second flowlet flow table entry Fourth message.
  • load balancing processing device 100 and the packet forwarding device 1000 provided by the embodiments of the present application have the functions of the packet forwarding device involved in the foregoing embodiment.
  • the embodiments of the present application are not described herein again.
  • bus involved above may include a path for transferring information between various components of the computer.
  • the processor may be a general purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the embodiments of the present application.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • One or more memories included in the computer system which may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or Other types of dynamic storage devices that store information and instructions may also be disk storage. These memories are connected to the processor via a bus.
  • any device such as transceiver can be used to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
  • RAN Radio Access Network
  • WLAN Wireless Local Area Network
  • a memory such as a RAM, stores an operating system and a program for executing the aspects of the embodiments of the present application.
  • the operating system is a program that controls the running of other programs and manages system resources.
  • the embodiment of the present application further provides a storage medium, configured to store computer software instructions used by the load balancing processing device and the packet forwarding device, and includes a method for performing the user read/write request scheduling method related to the first aspect. program.

Landscapes

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

Abstract

A load balance processing method and apparatus. In the load balance processing method, a packet forwarding device receives a first packet sent by a packet sending device by using a transport control protocol (TCP), and determines an outbound interface according to characteristic information of the first packet and a hash algorithm, and forwards the first packet through the outbound interface. The packet forwarding device receives a second packet sent by the packet sending device by using the TCP, and creates a first Flowlet flow table entry according to a Flowlet start identifier comprised in the second packet, and forwards the second packet according to the established first Flowlet flow table entry. By means of the method, a flow-based path selection manner is converted into a Flowlet mechanism-based path selection manner in a case of no disorder.

Description

一种负载均衡处理方法及装置Load balancing processing method and device 技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种负载均衡方法及装置。The present application relates to the field of communications technologies, and in particular, to a load balancing method and apparatus.
背景技术Background technique
随着科技的发展,现代数据中心网络中网络设备的主流带宽也逐渐增大。为了充分利用网络设备带宽,负载均衡技术成为当前研究的热点。With the development of technology, the mainstream bandwidth of network devices in modern data center networks has gradually increased. In order to make full use of network device bandwidth, load balancing technology has become a hot topic in current research.
目前,等负荷多路径负载均衡(Equal-cost multi-path routing,ECMP)是比较常用的负载均衡处理方法。ECMP技术包括基于包(Packet)的路径选择方式和基于流(Flow)的路径选择方式。基于Packet的路径选择方式可以做到负载均衡。多路径中不同路径的时延存在差别,导致在接收端接收到的Packet会出现乱序。需要Packet重排序。基于流的路径选择方式中可以根据哈希(hash)算法确定出转发报文的出接口(报文转发路径)。接收端不需要报文重排序。不同Flow的速率会有差别(例如占据带宽较大的大流(Elephant Flow)和占据带宽较小的小流(Mice Flow)),不同路径中传输的Flow也不同。当不同路径中传输的Flow的速率不相等时,可能会导致负载不均衡。At present, equal-cost multi-path routing (ECMP) is a commonly used load balancing processing method. ECMP technology includes a packet-based path selection method and a flow-based path selection method. Packet-based path selection can achieve load balancing. There is a difference in the delay of different paths in the multipath, which causes the packets received at the receiving end to be out of order. Requires Packet reordering. In the flow-based path selection mode, the outbound interface (the packet forwarding path) of the forwarded packet can be determined according to a hash algorithm. The receiver does not need to reorder the message. The rates of different flows may be different (for example, occupying a large bandwidth (Elephant Flow) and occupying a smaller bandwidth (Mice Flow)), and the flows transmitted in different paths are also different. When the rates of Flows transmitted in different paths are not equal, the load may be unbalanced.
为了能够达到更好的负载均衡,提出了一种基于Flowlet机制的负载均衡处理方法。在基于Flowlet机制的负载均衡处理方法中,将某个流中连续发送的多个Packet作为一个Flowlet,并应用Flowlet机制进行路径选择,以将该Flowlet中包括的多个Packet基于选择的路径进行转发。基于Flowlet机制的负载均衡处理方法,将基于Packet的路径选择方式和基于流的路径选择方式这两种路径选择方式进行结合,能够较好的做到负载均衡处理。In order to achieve better load balancing, a load balancing processing method based on Flowlet mechanism is proposed. In the load balancing processing method based on the flow mechanism, a plurality of packets continuously sent in a certain flow are used as one flowlet, and a flowlet mechanism is used to perform path selection, so that multiple packets included in the flowlet are forwarded based on the selected path. . The load balancing processing method based on the Flowlet mechanism combines the two path selection methods, that is, the packet-based path selection method and the flow-based path selection method, so that load balancing processing can be performed better.
应用Flowlet机制进行路径选择的过程中,需要基于Flowlet机制流表进行路径选择。然而,大流存在的几率比较大,使得Flowlet的数目也会比较庞大。故,若应用Flowlet机制进行路径选择,则需要建立表项数量比较多的Flowlet流表。当需要创建的Flowlet流表表项的数目超出报文转发装置能够创建的Flowlet流表表项的数量的最大值时,负载均衡处理由基于Flowlet机制的路径选择方式转换为基于哈希算法确定报文转发路径的路径选择方式。In the process of applying the Flowlet mechanism for path selection, path selection needs to be performed based on the Flowlet mechanism flow table. However, the probability of a large stream is relatively large, making the number of Flowlets larger. Therefore, if you use the Flowlet mechanism to perform path selection, you need to create a flowlet flow table with a larger number of entries. When the number of Flowlet flow table entries to be created exceeds the maximum number of Flowlet flow table entries that can be created by the packet forwarding device, the load balancing process is converted from the path selection method based on the Flowlet mechanism to the Hash algorithm based determination algorithm. The path selection method of the text forwarding path.
现有技术中,无法实现从基于哈希算法的路径选择方式切换为基于Flowlet机制的路径选择方式。另外,现有技术中,执行路径选择方式的切换容易导致乱序。In the prior art, the path selection method based on the hash algorithm is not switched to the path selection method based on the Flowlet mechanism. In addition, in the prior art, switching of the execution path selection mode easily leads to out-of-order.
发明内容Summary of the invention
本申请实施例提供一种负载均衡处理方法及装置,可以实现由基于哈希算法的路径选择方式切换为基于Flowlet机制的路径选择方式。另外,在上述切换过程中,可以避免发生乱序。The embodiment of the present application provides a load balancing processing method and apparatus, which can implement a path selection manner based on a hash algorithm to switch to a path selection method based on a Flowlet mechanism. In addition, in the above switching process, disorder can be avoided.
第一方面,提供一种负载均衡处理方法,在该方法中,报文发送设备采用TCP发送第一报文,所述第一报文为报文发送设备在第一TCP发送窗口内发送的最后一个报文。报文转发设备接收报文发送设备采用TCP发送的第一报文,并根据所述第一报文的特征信息以及哈希 算法确定出接口,并经由所述出接口转发所述第一报文。报文发送设备采用TCP发送第二报文,并为第二报文设置Flowlet开始标记,所述Flowlet开始标记用于标识Flowlet中的第一个报文。报文转发设备接收报文发送设备采用TCP发送的第二报文,所述第二报文为报文发送设备在第二TCP发送窗口内发送的第一个报文,且所述第二报文包含Flowlet开始标记,故可基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项,并依据创建的所述第一Flowlet流表表项,转发第二报文。The first aspect provides a load balancing processing method, in which the packet sending device sends a first packet by using a TCP, where the first packet is sent by the packet sending device in the first TCP sending window. A message. The packet forwarding device receives the first packet sent by the packet sending device by using the TCP, and determines the outgoing interface according to the feature information of the first packet and the hash algorithm, and forwards the first packet by using the outbound interface. . The packet sending device sends a second packet by using TCP, and sets a Flowlet start tag for the second packet, where the Flowlet start tag is used to identify the first packet in the Flowlet. The packet forwarding device receives the second packet sent by the packet sending device by using the TCP, and the second packet is the first packet sent by the packet sending device in the second TCP sending window, and the second packet is sent by the packet sending device. The text includes a flowlet start tag, so the first flowlet flow table entry can be created based on the flowlet start tag included in the second message, and the second message is forwarded according to the created first flowlet flow table entry.
其中,第二TCP发送窗口是与所述第一TCP发送窗口相邻的TCP发送窗口,且所述报文发送设备接收到在第一TCP发送窗口内发送的报文对应的ACK确认后在所述第二TCP发送窗口内发送报文。其中,在第一TCP发送窗口内发送的报文对应的ACK确认是指在第一TCP发送窗口内发送的最后一个报文(第一报文)对应的ACK确认。The second TCP transmission window is a TCP transmission window adjacent to the first TCP transmission window, and the packet sending device receives the ACK confirmation corresponding to the packet sent in the first TCP transmission window. Sending a message in the second TCP transmission window. The ACK acknowledgement corresponding to the packet sent in the first TCP transmission window refers to the ACK acknowledgement corresponding to the last packet (the first packet) sent in the first TCP transmission window.
其中,报文转发设备基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项所指示的用于转发第二报文的报文转发路径可以与基于哈希算法确定的用于转发第一报文的转发路径相同,也可不同。例如,第一Flowlet流表表项所指示的用于转发第二报文的出接口与基于哈希算法确定的用于转发第一报文的出接口是同一个出接口,或者是不同的出接口。The packet forwarding path used by the packet forwarding device to forward the second packet indicated by the first flowlet flow table entry according to the flowlet start tag included in the second packet may be used for determining the packet forwarding path based on the hash algorithm. The forwarding path of the first packet is the same or different. For example, the outbound interface for forwarding the second packet indicated by the first flowlet flow table entry is the same outbound interface as the outbound interface determined by the hash algorithm for forwarding the first packet, or is different. interface.
本申请实施例通过上述方法,报文转发设备可以由应用基于哈希算法确定报文转发路径的方式切换为采用Flowlet进行路径选择的方式,并且报文转发设备是基于Flowlet开始标记创建的Flowlet流表表项,该Flowlet开始标记用于标识第二TCP发送窗口内发送的第一个报文,由于报文发送设备在第一TCP发送窗口内发送报文后需要接收到ACK确认才会继续发送报文,而报文发送设备接收到ACK确认,则表明报文接收设备已经接收到报文发送设备发送的报文,故报文发送设备再在第二TCP发送窗口内向报文接收设备发送报文,使得报文到达报文接收设备时不会发生乱序,可避免发生乱序。In the embodiment of the present application, the packet forwarding device may be switched to adopt a flowlet to perform path selection by using a hash algorithm to determine a packet forwarding path, and the packet forwarding device is a flowlet stream created based on a Flowlet start tag. The table entry, the Flowlet start tag is used to identify the first packet sent in the second TCP sending window, and the packet sending device needs to receive the ACK acknowledgement to continue sending after sending the message in the first TCP sending window. The packet is sent by the packet sending device, and the packet sending device has received the packet sent by the packet sending device. Therefore, the packet sending device sends the packet to the packet receiving device in the second TCP sending window. The text does not cause out-of-order when the packet arrives at the packet receiving device, which can avoid out-of-order.
一种可能的设计中,报文转发设备接收到报文发送设备采用TCP发送的第二报文之后,继续接收报文发送设备采用TCP在发送第二TCP发送窗口内发送的报文,并依据创建的第一Flowlet流表表项转发后续接收到的报文发送设备采用TCP在发送第二TCP发送窗口内发送的报文。In a possible design, after receiving the second packet sent by the packet sending device by using the TCP, the packet forwarding device continues to receive the packet sent by the sending device using TCP in the second TCP sending window, and according to the packet forwarding device, The created first flowlet flow table entry forwards the subsequently received packet sending device to send the packet sent by the TCP in the second TCP sending window.
另一种可能的设计中,若报文转发设备接收到报文发送设备采用TCP在第二TCP发送窗口内发送的第三报文,且该第三报文包含Flowlet结束标记,报文转发设备基于第三报文中包括的Flowlet结束标记,删除所述第一Flowlet流表表项,以释放资源,该释放的资源可用于创建其它Flowlet所遵循的Flowlet流表表项,使更多的Flowlet能够匹配到Flowlet流表表项,进行负载均衡处理。In another possible design, if the packet forwarding device receives the third packet sent by the packet sending device in the second TCP sending window, and the third packet includes the Flowlet end tag, the packet forwarding device Deleting the first Flowlet flow table entry based on the Flowlet End Tag included in the third message to release the resource, the released resource may be used to create a Flowlet flow table entry followed by other Flowlets, so that more Flowlets are obtained. It can match the flow table flow table entries and perform load balancing processing.
又一种可能的设计中,报文转发设备接收报文发送设备采用TCP发送的第三报文后,可继续接收后续报文。报文转发设备接收报文发送设备采用TCP发送的第四报文。第四报文为报文发送设备在第三TCP发送窗口内发送的第一个报文,所述第四报文包含Flowlet开始标记。报文转发设备基于第四报文中包括的Flowlet开始标记,创建第二Flowlet流表表项,并依据创建的第二Flowlet流表表项,转发所述第四报文,实现基于Flowlet机制的路径选择方式进行路径选择。In another possible design, after the packet forwarding device receives the third packet sent by the TCP sending device, the packet forwarding device can continue to receive the subsequent packet. The packet forwarding device receives the fourth packet sent by the packet sending device by using TCP. The fourth packet is a first packet sent by the packet sending device in the third TCP sending window, and the fourth packet includes a Flowlet start tag. The packet forwarding device creates a second Flowlet flow table entry based on the Flowlet start tag included in the fourth packet, and forwards the fourth packet according to the created second Flowlet flow table entry to implement the Flowlet mechanism. The path selection method is used for path selection.
其中,第三TCP发送窗口是与所述第二TCP发送窗口相邻的TCP发送窗口,且报文发送设备在接收到在第二TCP发送窗口内发送的报文对应的ACK确认后,在所述第三TCP发送窗口内 发送报文。其中,该第二TCP发送窗口内发送的报文对应的ACK确认是指第二TCP发送窗口内发送的最后一个报文(第三报文)对应的ACK确认。The third TCP transmission window is a TCP transmission window adjacent to the second TCP transmission window, and the packet sending device receives the ACK confirmation corresponding to the packet sent in the second TCP transmission window, The third TCP transmission window sends a message. The ACK acknowledgement corresponding to the packet sent in the second TCP sending window refers to the ACK acknowledgement corresponding to the last packet (third packet) sent in the second TCP sending window.
其中,报文转发设备基于第四报文中包括的Flowlet开始标记创建第二Flowlet流表表项所指示的用于转发第四报文的报文转发路径可以与基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项所指示的用于转发第二报文的报文转发路径相同,也可不同。例如,第二Flowlet流表表项所指示的用于转发第四报文的出接口与第一Flowlet流表表项所指示的用于转发第二报文的出接口是同一个出接口,或者是不同的出接口。The packet forwarding path that is used by the packet forwarding device to forward the fourth packet according to the flowlet start tag included in the fourth packet to create the second flowlet flow table entry may be based on the packet included in the second packet. The flow forwarding path of the Flowlet start tag is the same as that of the first flowlet table entry, and the packet forwarding path used to forward the second packet is the same or different. For example, the outbound interface for forwarding the fourth packet indicated by the second flowlet flow table entry is the same outbound interface as the outgoing interface for forwarding the second packet indicated by the first flowlet flow table entry, or Is a different outbound interface.
又一种可能的设计中,Flowlet开始标记和/或Flowlet结束标记通过报文头中的空闲比特位携带。例如,可扩充已有TCP,通过报文头字段中的预留比特位(Reserved)携带Flowlet开始标记和/或Flowlet结束标记。例如,第二报文中包括的Flowlet开始标记通过所述第二报文的报文头中的空闲比特位携带,第三报文中包括的Flowlet结束标记通过所述第三报文的报文头中的空闲比特位携带,第四报文中包括的Flowlet开始标记通过所述第四报文的报文头中的空闲比特位携带。In yet another possible design, the Flowlet Start Tag and/or the Flowlet End Tag are carried by the idle bits in the message header. For example, the existing TCP can be augmented, and the Flowlet Start Tag and/or the Flowlet End Tag are carried by the Reserved Bit in the Message Header field. For example, the Flowlet start tag included in the second packet is carried by the idle bit in the packet header of the second packet, and the Flowlet end tag included in the third packet passes the packet of the third packet. The idle bit in the header is carried, and the Flowlet start tag included in the fourth packet is carried by the idle bit in the header of the fourth packet.
第二方面,提供一种负载均衡处理装置,该负载均衡处理装置具备实现上述负载均衡处理方法的全部功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。所述模块可以是软件和/或硬件。According to a second aspect, there is provided a load balancing processing apparatus including all of the functions of implementing the load balancing processing method described above. The functions may be implemented by hardware or by corresponding software implemented by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware.
一种可能的设计中,所述负载均衡处理装置包括接收单元、处理单元和发送单元,接收单元、处理单元和发送单元的功能可以和各方法步骤相对应,在此不予赘述。In a possible design, the load balancing processing device includes a receiving unit, a processing unit, and a sending unit. The functions of the receiving unit, the processing unit, and the sending unit may correspond to the method steps, and details are not described herein.
第三方面,提供一种报文转发设备,所述报文转发设备包括处理器、存储器和通信接口,所述处理器、存储器和通信接口通过总线相连接。所述存储器,用于存储所述处理器执行的程序代码;所述处理器,调用所述存储器存储的程序代码,通过所述通信接口获取并转发报文,当处理器执行所述存储器存储的指令时,用于完成如第一方面中所涉及的任意一种负载均衡处理方法。A third aspect provides a message forwarding device, where the message forwarding device includes a processor, a memory, and a communication interface, and the processor, the memory, and the communication interface are connected by a bus. The memory is configured to store program code executed by the processor; the processor calls the program code stored in the memory, acquires and forwards a message through the communication interface, and when the processor executes the memory storage The instruction is used to complete any of the load balancing processing methods as involved in the first aspect.
第四方面,提供一种计算机存储介质,用于存储一些指令,这些指令被执行时,可以完成前述所涉及的任意一种负载均衡处理方法。In a fourth aspect, a computer storage medium is provided for storing instructions that, when executed, perform any of the load balancing processing methods described above.
本申请实施例中,报文转发设备接收到报文发送设备在第一TCP发送窗口内发送的最后一个报文后,根据第一报文的特征信息以及哈希算法确定出接口,并经由所述出接口转发所述第一报文,是一种应用哈希算法确定报文转发路径的方式。报文转发设备接收到报文发送设备采用TCP在第二TCP发送窗口内发送的第二报文后,基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项,并依据创建的所述第一Flowlet流表表项,转发第二报文,是一种基于Flowlet机制进行路径选择的方式。故通过本申请实施例可实现由应用基于哈希算法确定报文转发路径的方式转换为采用Flowlet进行路径选择的方式进行负载均衡处理。进一步的,报文转发设备是基于第二报文中包括的Flowlet开始标记创建的Flowlet流表表项,该Flowlet开始标记用于标识第二TCP发送窗口内发送的第一个报文,由于报文发送设备在第一TCP发送窗口内发送报文后需要接收到ACK确认才会继续发送报文,而报文发送设备接收到ACK确认,则表明报文接收设备已经接收到报文发送设备发送的报文,故报文发送设备再在第二TCP发送窗口内向报文接收设备发送报文,使得报文到达报文接收设备时不会发生乱序,报文接收设备无需对接收到的报文进行重排序。In the embodiment of the present application, after receiving the last packet sent by the packet sending device in the first TCP sending window, the packet forwarding device determines the interface according to the feature information of the first packet and the hash algorithm, and The method of forwarding the first packet by the interface is a method for determining a packet forwarding path by using a hash algorithm. After the packet forwarding device receives the second packet sent by the TCP in the second TCP sending window, the packet forwarding device creates a first Flowlet flow table entry based on the Flowlet start tag included in the second packet, and creates the first Flowlet flow table entry. The first Flowlet flow table entry, forwarding the second packet, is a way for path selection based on the Flowlet mechanism. Therefore, the method for determining the packet forwarding path based on the hash algorithm is converted into the path selection method by using the flowlet to perform load balancing processing. Further, the packet forwarding device is a flowlet flow table entry created based on a Flowlet start tag included in the second packet, where the Flowlet start tag is used to identify the first packet sent in the second TCP sending window, because the packet After receiving the packet in the first TCP transmission window, the packet sending device needs to receive the ACK to continue to send the packet, and the packet sending device receives the ACK acknowledgement, indicating that the packet receiving device has received the packet sending device and sends the packet. The packet sending device sends a packet to the packet receiving device in the second TCP sending window, so that the packet does not need to be out of order when the packet arrives at the receiving device, and the packet receiving device does not need to receive the received packet. The text is reordered.
附图说明DRAWINGS
图1为本申请实施例提供的负载均衡处理方法所应用的系统架构;FIG. 1 is a system architecture applied to a load balancing processing method according to an embodiment of the present disclosure;
图2为基于Flowlet机制的路径选择方式示意图;2 is a schematic diagram of a path selection manner based on a Flowlet mechanism;
图3为本申请实施例提供的负载均衡处理方法的一种流程图;FIG. 3 is a flowchart of a load balancing processing method according to an embodiment of the present application;
图4为本申请实施例提供的负载均衡处理方法另一流程图;FIG. 4 is another flowchart of a load balancing processing method according to an embodiment of the present disclosure;
图5为本申请实施例提供的负载均衡处理方法又一流程图;FIG. 5 is still another flowchart of a load balancing processing method according to an embodiment of the present application;
图6为本申请实施例提供的负载均衡处理装置的结构示意图;FIG. 6 is a schematic structural diagram of a load balancing processing apparatus according to an embodiment of the present disclosure;
图7为本申请实施例提供的报文转发设备的结构示意图。FIG. 7 is a schematic structural diagram of a packet forwarding device according to an embodiment of the present disclosure.
具体实施方式detailed description
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
首先,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。First, some of the terms in this application are explained to be understood by those skilled in the art.
1)、Flowlet可以理解为是一个Flow中连续发送的多个报文组成的报文组,每个Flow中包括多个Flowlet。基于Flowlet机制进行报文转发时可基于Flowlet流表表项实现Flowlet中包括的多个报文的转发。不同的Flowlet对应不同的Flowlet流表表项。所述Flowlet流表表项用于指示每个Flowlet中包括的多个报文的报文转发路径。关于Flowlet,以及基于Flowlet机制进行报文转发的过程,请参考如下两篇文献,本申请完整引用如下两篇文献:“Dynamic Load Balancing Without Packet Reordering,Srikanth Kandula,Dina Katabi,Shantanu Sinha,Arthur Berger.ACM Computer Communications Review,2007”和“Harnessing TCP’s Burstiness with Flowlet Switching,Shan Sinha,Srikanth Kandula,Dina Katabi.ACM Hot Topics in Networks~(HotNets),2004”。1) A flowlet can be understood as a packet group consisting of multiple packets continuously sent in a flow, and each flow includes multiple flowlets. When the packet is forwarded based on the flowlet mechanism, the forwarding of multiple packets included in the flowlet can be implemented based on the flowlet flow table entry. Different Flowlets correspond to different Flowlet flow table entries. The flowlet flow table entry is used to indicate a packet forwarding path of multiple packets included in each flowlet. For the flowlet and the process of message forwarding based on the Flowlet mechanism, please refer to the following two documents. The full reference is made to the following two documents: "Dynamic Load Balancing Without Packet Reordering, Srikanth Kandula, Dina Katabi, Shantanu Sinha, Arthur Berger. ACM Computer Communications Review, 2007" and "Harnessing TCP's Burstiness with Flowlet Switching, Shan Sinha, Srikanth Kandula, Dina Katabi. ACM Hot Topics in Networks ~ (HotNets), 2004".
2)TCP中,定义了窗口、TCP发送窗口、确认(acknowledgement)、段(segment)、TCP发送器以及TCP接收器的概念。关于TCP窗口、确认(acknowledgement)、段(segment)、TCP发送器以及TCP接收器,请参见IETF发布的RFC793、RFC813、RFC879、RFC1180、RFC5681以及RFC5690。2) In TCP, the concepts of window, TCP send window, acknowledgement, segment, TCP sender, and TCP receiver are defined. For TCP windows, acknowledgement, segments, TCP senders, and TCP receivers, see RFC793, RFC813, RFC879, RFC1180, RFC5681, and RFC5690 published by the IETF.
本申请实施例提供的负载均衡处理方法及装置,可应用于支持ECMP技术进行负载均衡处理的网络,例如可应用于图1所示的网络架构。参阅图1所示,服务器采用诸如传输控制协议(Transmission Control Protocol,TCP)向路由交换网络的报文转发设备发送报文,路由交换网络中的报文转发设备(诸如交换机、路由器等)采用ECMP技术进行报文的转发,在整个网络的负载均衡情况下,向终端转发接收到的报文。报文转发设备采用ECMP技术进行报文转发时可应用Flowlet机制进行路径选择,然而应用Flowlet机制进行路径选择的负载均衡处理过程中存在诸如背景技术部分所提及的技术问题:当需要创建的Flowlet流表表项的数目超出报文转发装置能够创建的Flowlet流表表项的数量的最大值时,将不能应用Flowlet机制进行路径选择,负载均衡处理由基于Flowlet机制的路径选择方式转换为基于哈希算法确定报文转发路径的路径选择方式,并一直应用基于哈希算法确定报文转发路径的方式进行负载均衡处理。The load balancing processing method and apparatus provided by the embodiments of the present application can be applied to a network that supports ECMP technology for load balancing processing, for example, applicable to the network architecture shown in FIG. 1. Referring to FIG. 1, the server uses a Transmission Control Protocol (TCP) to send packets to a packet forwarding device of a routing switching network, and a packet forwarding device (such as a switch, a router, etc.) in the routing switching network adopts ECMP. The technology forwards the packet and forwards the received packet to the terminal in the case of load balancing of the entire network. When the packet forwarding device uses the ECMP technology to forward packets, the Flowlet mechanism can be used for path selection. However, in the load balancing process using the Flowlet mechanism for path selection, there are technical problems such as those mentioned in the background section: When a flowlet needs to be created When the number of flow table entries exceeds the maximum number of Flowlet flow table entries that can be created by the packet forwarding device, the Flowlet mechanism cannot be used for path selection. The load balancing process is converted to a path based on the path selection method based on the Flowlet mechanism. The algorithm determines the path selection mode of the packet forwarding path, and applies load balancing processing based on the hash algorithm to determine the packet forwarding path.
以下将结合实际应用对上述技术问题进行说明。The above technical problems will be described below in conjunction with practical applications.
本申请实施例首先对基于Flowlet机制进行路径选择的实施过程进行说明。图2为本申请实施例提供的基于Flowlet机制的路径选择方式示意图。基于Flowlet机制进行路径选择时,报文转发设备需要将流中包括的多个报文拆分为多个报文组,每个报文组中包括多个报文。每个报文组可以理解为是一个Flowlet,本申请实施例以下涉及“报文组”和“Flowlet”经常交替使用,但本领域的技术人员可以理解其含义。其中,不同的报文组对应不同的Flowlet流表表项,所述Flowlet流表表项用于指示报文转发设备转发报文的报文转发路径,例如用于指示报文转发设备转发报文的出接口。针对不同的报文组,报文转发设备可利用不同的Flowlet流表表项进行转发。具体拆分流中的多个报文得到多个报文组的依据为:若流中两个相邻报文到达报文接收设备(报文最终的目的地址对应的设备)所用时间的时间差(Gap)大于等于通过两条不同转发路径所用时间的时间差的绝对值,则这两个相邻待转发报文通过两条不同转发路径转发到报文接收设备,不会产生乱序,报文接收设备也无需进行报文重排序,故可将每个符合这种条件的Gap,确定报文是否是某个flowlet流表表项能够指示转发的报文组中的第一个报文或者最后一个报文报文。将流中包括的待转发报文拆分为多个报文组后,报文转发设备可基于Flowlet机制流表对待拆分得到的报文组中的报文进行转发。其中,Flowlet流表中的每一流表项均包括报文转发的源地址和目的地址,该报文转发的源地址和目的地址是执行Flowlet选路策略得到的Flowlet的选路结果。例如图2中,报文转发设备接收到流中包括的待转发报文分别为报文1、报文2、报文3、报文4和报文5,报文2和报文3到达报文接收设备所用时间的时间差为Gap,报文2和报文3通过转发路径1所用时间为d1,报文2和报文3通过转发路径2所用时间为d2,若,则可将报文2和报文1划分为一个报文组并通过转发路径1转发到报文接收设备,而将报文3、报文4和报文5划分为另一个报文组并通过转发路径2转发到报文接收设备。The embodiment of the present application first describes an implementation process of path selection based on the Flowlet mechanism. FIG. 2 is a schematic diagram of a path selection manner based on a Flowlet mechanism according to an embodiment of the present application. When the path is selected based on the flowlet mechanism, the packet forwarding device needs to split the multiple packets included in the flow into multiple packet groups, and each packet group includes multiple packets. Each packet group can be understood as a flowlet. The following embodiments of the present application refer to "message group" and "Flowlet" frequently used interchangeably, but those skilled in the art can understand the meaning thereof. The different packet groups correspond to different flowlet flow table entries, and the flowlet flow table entry is used to indicate the packet forwarding path of the packet forwarding device to forward the packet, for example, to indicate that the packet forwarding device forwards the packet. Outbound interface. For different packet groups, the packet forwarding device can forward different flowlet table entries. The basis for obtaining multiple message groups in multiple packets in a specific split stream is: the time difference between the time taken by two adjacent packets in the flow to reach the packet receiving device (the device corresponding to the destination address of the packet) Gap) is greater than or equal to the absolute value of the time difference between the two different forwarding paths. The two adjacent packets to be forwarded are forwarded to the packet receiving device through two different forwarding paths. The device does not need to perform packet reordering. Therefore, each Gap that meets the condition can determine whether the packet is the first packet or the last packet in the packet group that can be forwarded by a flowlet flow table entry. Message message. After the packet to be forwarded included in the flow is split into multiple packet groups, the packet forwarding device can forward the packet in the packet group to be split based on the Flowlet mechanism flow table. Each flow entry in the flowlet flow table includes a source address and a destination address of the packet forwarding, and the source address and the destination address forwarded by the flow are the result of the routing of the Flowlet obtained by executing the flowlet routing policy. For example, in FIG. 2, the packet forwarding device receives the to-be-forwarded packets included in the flow as message 1, message 2, message 3, message 4, and message 5, and message 2 and message 3 arrive at the report. The time difference between the time used by the receiving device is Gap, the time taken by the packet 2 and the packet 3 through the forwarding path 1 is d1, and the time taken by the packet 2 and the packet 3 through the forwarding path 2 is d2, and if so, the packet 2 can be And the packet 1 is divided into a packet group and forwarded to the packet receiving device through the forwarding path 1, and the packet 3, the packet 4, and the packet 5 are divided into another packet group and forwarded to the packet through the forwarding path 2. Text receiving device.
通过上述描述可知,若确定了基于Flowlet流表表项进行转发的每个报文组中的第一个报文,则对每个报文组基于Flowlet流表表项进行转发,报文到达报文接收设备时不会发生乱序。但是传统技术中,报文转发设备进行转发过程中,并不能确定基于Flowlet流表表项进行转发的报文组中的第一个报文,故若报文转发设备由于Flowlet流表规格不足,将基于Flowlet进行路径选择的方式转换为基于哈希算法确定报文转发路径的路径选择方式之后,即使后续存在可用的Flowlet流表,但由于不确定当前待转发报文是否为基于Flowlet流表表项进行转发的报文组的第一个报文,故为了避免报文乱序,不能转换回应用Flowlet机制进行路径选择的方式,只能一直应用基于哈希算法确定报文转发路径的路径选择方式进行负载均衡处理。According to the above description, if the first packet in each packet group that is forwarded based on the Flowlet flow table entry is determined, each packet group is forwarded based on the Flowlet flow table entry, and the packet arrives at the report. When the device is received, no out of order occurs. However, in the traditional technology, the packet forwarding device does not determine the first packet in the packet group that is forwarded based on the flowlet flow table entry. Therefore, if the packet forwarding device has insufficient specifications due to the flowlet flow table, After the route selection method based on the flowlet is converted to the path selection mode based on the hash algorithm to determine the packet forwarding path, even if there is an available flowlet flow table, it is determined whether the current to-be-forwarded packet is based on the flowlet flow table. The first packet of the packet forwarding group is forwarded. Therefore, in order to avoid packet out-of-order, the path of the packet forwarding path can be determined by using the hash algorithm. The method performs load balancing processing.
本申请实施例提供一种负载均衡处理方法,在该方法中,针对拆分得到的每一基于Flowlet流表表项转发的报文组中的第一个报文设置Flowlet开始标记,通过所述Flowlet开始标记标识该该基于Flowlet流表表项转发的报文组中的第一个报文。其中,上述实施例中涉及的将流中的多个报文拆分为多个报文组所涉及的依据中的两个相邻待转发报文中转发时间在后的报文可以作为一个基于Flowlet流表表项转发的报文组的第一个报文。报文转发设备在转发报文时,可通过该Flowlet开始标记,确定该基于Flowlet流表表项转发的报文为报文组中的第一个报文,进而即使报文转发设备当前是应用基于哈希算法确定报文转发路径的路径选择方式进行负载均衡处理,在能够匹配到Flowlet流表的情况下,仍可以由应用基于哈希算法确定报文转发路径的方式转换为采用Flowlet进行路径选择的方式进行负 载均衡处理,并可使得报文到达报文接收设备时不会发生乱序,报文接收设备无需对接收到的报文进行重排序。An embodiment of the present application provides a load balancing processing method, in which a Flowlet start flag is set for a first packet in a packet group forwarded by each Flowlet flow table entry obtained by the splitting, by using the The Flowlet Start tag identifies the first message in the packet group forwarded based on the Flowlet Flow Table entry. The packet in the two adjacent to-be-forwarded packets in the basis of splitting the multiple packets in the flow into the plurality of packets in the foregoing embodiment may be used as a basis. The first packet of the packet group forwarded by the flowlet flow entry. When the packet forwarding device forwards the packet, the packet is forwarded by the flowlet to determine that the packet forwarded by the flowlet table entry is the first packet in the packet group, and even if the packet forwarding device is currently applied. The path selection mode of the packet forwarding path is determined by the hash algorithm to perform load balancing processing. When the flow chart can be matched to the flowlet flow table, the method can be converted into a path using the flowlet by the application to determine the packet forwarding path based on the hash algorithm. The method of load balancing is performed, and the packet does not need to be out of order when the packet arrives at the packet receiving device. The packet receiving device does not need to reorder the received packet.
由于报文发送设备(诸如图1中的服务器,也可以是报文转发设备)能够确定报文的发送时间,故报文发送设备可以识别每个基于Flowlet流表表项转发的报文组中的第一个报文和最后一个报文,故本申请实施例中,可由报文发送设备来为每一基于Flowlet流表表项转发的报文组中的第一个报文设置Flowlet开始标记。该Flowlet开始标记可以由Flowlet中基于Flowlet流表表项转发的报文组中的首个报文携带。Since the packet sending device (such as the server in FIG. 1 or the packet forwarding device) can determine the sending time of the packet, the packet sending device can identify each packet group that is forwarded based on the flowlet flow table entry. The first packet and the last packet, in this embodiment, the packet sending device may set the Flowlet start tag for the first packet in each packet group forwarded by the Flowlet flow table entry. . The Flowlet start tag can be carried by the first message in the packet group forwarded by the Flowlet flow table entry in the Flowlet.
采用传输控制协议(Transmission Control Protocol,TCP)传输报文,是实现报文可靠传输的一种机制。TCP中,定义了窗口的概念,所述窗口用于指示发送器(sender)在接收到许可之前允许传输的字节数目。本申请实施例中可将采用TCP发送报文的设备称为TCP发送器(Transmission Control Protocol sender,TCP sender),并将采用TCP接收报文的设备称为TCP接收器(Transmission Control Protocol receiver,TCP receiver)。TCP网络中,TCP发送器在一个TCP发送窗口内向TCP接收器发送包含有数据段(segment)的报文,该报文可称为TCP报文。本申请实施例以下涉及的采用TCP发送的报文是指上述TCP报文。所述TCP发送窗口能够表征TCP接收器期望接收到的报文的序列号,通过该序列号能够指示TCP接收器通过所述TCP发送窗口接收到的报文所包含的数据段。TCP接收器接收到TCP发送器通过TCP发送窗口发送的数据报文后,根据接收到的报文向所述TCP发送器发送确认(ACKnowledge,ACK)。所述TCP发送器接收到ACK后,才会在另一个TCP发送窗口内继续向所述TCP接收器发送报文。The use of the Transmission Control Protocol (TCP) to transmit packets is a mechanism for realizing reliable transmission of messages. In TCP, the concept of a window is defined, which is used to indicate the number of bytes that a sender is allowed to transmit before receiving a grant. In the embodiment of the present application, a device that uses TCP to send a packet is called a TCP (Transmission Control Protocol sender), and a device that uses TCP to receive a packet is called a TCP Receiver (Transmission Control Protocol receiver, TCP). Receiver). In a TCP network, a TCP sender sends a packet containing a segment to a TCP receiver in a TCP transmission window. The packet can be called a TCP packet. The packet transmitted by using TCP on the following refers to the above TCP packet. The TCP transmission window is capable of characterizing a sequence number of a message that the TCP receiver desires to receive, and the sequence number can indicate a data segment included in the message received by the TCP receiver through the TCP transmission window. After receiving the data packet sent by the TCP sender through the TCP transmission window, the TCP receiver sends an acknowledgement (ACK) to the TCP transmitter according to the received message. After receiving the ACK, the TCP sender continues to send a message to the TCP receiver in another TCP transmission window.
本申请实施例中若报文发送设备采用TCP发送报文,由于报文发送设备在第一TCP发送窗口内发送报文后需要接收到ACK确认才会继续发送报文,而报文发送设备接收到ACK确认,则表明报文接收设备已经接收到报文发送设备发送的报文,故报文发送设备再在第二TCP发送窗口内向报文接收设备发送报文,其中,所述第二TCP发送窗口不同于第一TCP发送窗口,该第二TCP发送窗口是与所述第一TCP发送窗口相邻的TCP发送窗口,且所述报文发送设备接收到在第一TCP发送窗口内发送的报文对应的ACK确认后在所述第二TCP发送窗口内发送报文,其中,在第一TCP发送窗口内发送的报文对应的ACK确认是指在第一TCP发送窗口内发送的最后一个报文(第一报文)对应的ACK确认,故可使得报文到达报文接收设备时不会发生乱序,报文接收设备无需对接收到的报文进行重排序,故本申请实施例中可以认为报文发送设备采用TCP在每个TCP发送窗口发送的报文就是一个基于Flowlet流表表项转发的报文组中的多个报文。In the embodiment of the present application, if the packet sending device sends a packet by using the TCP, the packet sending device needs to receive the ACK to confirm the packet after the packet is sent in the first TCP sending window, and the packet sending device receives the packet. After the ACK is confirmed, the packet receiving device has received the packet sent by the packet sending device, so the packet sending device sends a packet to the packet receiving device in the second TCP sending window, where the second TCP is sent. The sending window is different from the first TCP sending window, the second TCP sending window is a TCP sending window adjacent to the first TCP sending window, and the message sending device receives the sending in the first TCP sending window. Sending a message in the second TCP transmission window after the ACK of the message is acknowledged, wherein the ACK confirmation corresponding to the message sent in the first TCP transmission window refers to the last one sent in the first TCP transmission window. The ACK is acknowledged in the packet (the first packet), so that the packet does not need to be out of order when the packet arrives at the receiving device, and the packet receiving device does not need to reorder the received packet. Examples that may be using packet transmission apparatus transmits TCP packets sent in each window is a TCP packet based on a plurality of packet group Flowlet flow table entry in the forwarding.
一种可能的实施方式中,本申请实施例中采用TCP发送报文的报文发送设备可为在每个TCP发送窗口内发送的第一个报文设置Flowlet开始标记,所述Flowlet开始标记用于标识Flowlet中的第一个报文,换言之,若报文中包含有Flowlet开始标记,则可认为该包含有Flowlet开始标记的报文为Flowlet中的第一个报文。采用TCP发送报文的报文发送设备发送包含Flowlet开始标记的报文之后,若报文转发设备接收到报文发送设备采用TCP发送的该包含Flowlet开始标记的报文,则可基于接收到的报文中包含的Flowlet开始标记创建Flowlet流表表项,并依据创建的Flowlet流表表项转发报文,实现基于Flowlet机制的路径选择方式。In a possible implementation, the message sending device that uses TCP to send a message in the embodiment of the present application may set a Flowlet start tag for the first message sent in each TCP sending window, and the Flowlet starts marking. The first packet in the flowlet is identified, in other words, if the packet includes a Flowlet start tag, the packet containing the Flowlet start tag may be considered as the first packet in the Flowlet. After the packet sending device that sends the packet with the TCP sends the packet containing the start flag of the Flowlet, if the packet forwarding device receives the packet including the Flowlet start tag sent by the packet sending device using the TCP, it may be based on the received message. The Flowlet included in the packet starts to create a Flowlet flow table entry, and forwards the packet according to the created Flowlet flow table entry, thereby implementing a path selection method based on the Flowlet mechanism.
另一种可能的实施方式中,本申请实施例中采用TCP发送报文的报文发送设备可为在每个TCP发送窗口内发送的最后一个报文设置Flowlet结束标记。所述Flowlet结束标记用于标识基于Flowlet流表表项转发的报文组中的最后一个报文,换言之,若报文中包含有Flowlet结束标记,则可认为该包含有Flowlet结束标记的报文为基于Flowlet流表表项转发的一个报文组中的最后一个报文。采用TCP发送报文的报文发送设备发送包含Flowlet结束标记的报文之后,若报文转发设备接收到报文发送设备采用TCP发送的该包含Flowlet结束标记的报文,则可确定该报文为基于Flowlet流表表项转发的一个报文组中的最后一个报文,将该包含有Flowlet结束标记的报文转发完成后,确定该报文组转发结束,进而可将该结束转发的报文组所基于的Flowlet流表表项删除,以释放资源,该释放的资源可用于创建其它报文组所遵循的Flowlet流表表项,使更多的报文组能够匹配到Flowlet流表表项,进行负载均衡处理。In another possible implementation manner, the message sending device that uses TCP to send a message in the embodiment of the present application may set a Flowlet end tag for the last message sent in each TCP sending window. The Flowlet End Tag is used to identify the last packet in the packet group forwarded based on the Flowlet Flow Table entry. In other words, if the packet includes a Flowlet End Tag, the packet may be considered to include the Flowlet End Tag. The last packet in a packet group forwarded based on the Flowlet flow table entry. After the packet sending device that sends the packet is sent by the packet, the packet forwarding device can determine the packet if the packet sending device receives the packet including the Flowlet end tag sent by the packet sending device by using the TCP packet. After the packet containing the flow end tag is forwarded, the packet is sent to the last packet in the packet group, and the packet is forwarded. The Flowlet flow table entry on which the packet is based is deleted to release the resource. The released resource can be used to create a Flowlet flow table entry that is followed by other packet groups, so that more packet groups can be matched to the Flowlet flow table. Item, load balancing processing.
本申请实施例中Flowlet开始标记和/或Flowlet结束标记通过报文头中的空闲比特位携带。例如,可扩充已有TCP,通过报文头字段中的预留比特位(Reserved)携带。例如,可通过报文头字段中2个预留的比特位,标记Flowlet开始标记和Flowlet结束标记。本申请实施例中可通过比特位置位的方式来表示Flowlet开始标记和Flowlet结束标记,例如,报文中用于表示Flowlet开始标记的比特位若置位为1,则表示该报文中包含Flowlet开始标记,该报文为基于Flowlet流表表项转发的报文组中的第一个报文。报文中用于表示Flowlet结束标记的比特位若置位为1,则表示该报文中包含Flowlet结束标记,该报文为基于Flowlet流表表项转发的报文组中的最后一个报文。报文中用于表示Flowlet开始标记的比特位若置位为0,且用于表示Flowlet结束标记的比特位也置位为0,则表示该报文为基于Flowlet流表表项转发的报文组中位于第一个报文和最后一个报文之间的报文。In the embodiment of the present application, the Flowlet Start Tag and/or the Flowlet End Tag are carried by idle bits in the message header. For example, the existing TCP can be extended and carried by the reserved bit in the message header field. For example, the Flowlet Start Tag and the Flowlet End Tag can be marked by two reserved bits in the message header field. In the embodiment of the present application, the Flowlet start tag and the Flowlet end tag may be represented by a bit position bit. For example, if the bit used to indicate the Flowlet start tag in the message is set to 1, the message includes the Flowlet. Start tag, which is the first packet in the packet group forwarded based on the Flowlet flow table entry. If the bit in the packet indicating the end of the Flowlet flag is set to 1, it indicates that the packet contains a Flowlet End Tag, which is the last packet in the packet group forwarded based on the Flowlet Flow Table entry. . If the bit in the message indicating the start of the Flowlet flag is set to 0, and the bit used to indicate the end of the Flowlet flag is also set to 0, it indicates that the message is a message forwarded based on the Flowlet flow table entry. A packet between the first packet and the last packet in the group.
本申请实施例基于上述思想,提供一种由应用基于哈希算法确定报文转发路径的方式转换为采用Flowlet进行路径选择的方式进行负载均衡处理的实施方案。以下以报文发送设备采用TCP发送,并以每个TCP发送窗口发送的报文为基于Flowlet流表表项转发的一个报文组为例进行说明。Based on the above idea, the embodiment of the present application provides an implementation scheme for performing load balancing processing by converting a manner in which a packet forwarding path is determined based on a hash algorithm into a manner in which a path is selected by using a flowlet. The packet sending device uses TCP to send the packet sent by each TCP sending window as a packet group forwarded by the Flowlet flow table entry.
图3为本申请实施例提供的一种负载均衡处理方法流程图。图3所示方法的执行主体可以为报文转发设备,或者也可以是报文转发设备中的部件。所述报文转发设备可以是交换机、路由器等具有报文转发功能的设备,本申请实施例不做限定。参阅图3所示,该方法包括:FIG. 3 is a flowchart of a load balancing processing method according to an embodiment of the present application. The execution body of the method shown in FIG. 3 may be a packet forwarding device, or may be a component in a packet forwarding device. The packet forwarding device may be a device with a packet forwarding function, such as a switch or a router, which is not limited in this embodiment. Referring to Figure 3, the method includes:
S101:报文转发设备接收报文发送设备采用TCP发送的第一报文。S101: The packet forwarding device receives the first packet sent by the packet sending device by using TCP.
本申请实施例中,所述第一报文为报文发送设备在第一TCP发送窗口内发送的最后一个报文。报文发送设备在第一TCP发送窗口内发送的最后一个报文在时间维度上可以理解为是在第一TCP发送窗口内最后发送的报文,而若通过序列号表示,则可理解为是在第一TCP发送窗口内发送的序列号最大的报文。In the embodiment of the present application, the first packet is the last packet sent by the packet sending device in the first TCP sending window. The last message sent by the message sending device in the first TCP sending window can be understood as the last message sent in the first TCP sending window in the time dimension, and if it is represented by the serial number, it can be understood as The message with the largest sequence number sent in the first TCP transmission window.
S102:报文转发设备根据所述第一报文的特征信息以及哈希算法确定出接口,并经由所述出接口转发所述第一报文。S102: The packet forwarding device determines an interface according to the feature information of the first packet and a hash algorithm, and forwards the first packet by using the outbound interface.
本申请实施例中报文转发设备接收到报文发送设备发送的第一报文后,基于哈希算法确定报文转发路径。报文转发设备执行哈希算法时输入的哈希关键字可以为诸如第一报文 的五元组等表征第一报文属性的特征信息。报文转发设备执行哈希算法时输出的哈希值可以用于表征转发路径信息,转发路径信息例如可以是转发报文的出接口等信息。In the embodiment of the present application, after receiving the first packet sent by the packet sending device, the packet forwarding device determines the packet forwarding path based on the hash algorithm. The hash key input when the packet forwarding device executes the hash algorithm may be a feature such as a five-tuple of the first packet that characterizes the first message attribute. The hash value output by the packet forwarding device when the hash algorithm is executed may be used to represent the forwarding path information, and the forwarding path information may be, for example, information such as an outgoing interface of the forwarding packet.
S103:报文转发设备接收报文发送设备采用TCP发送的第二报文。S103: The packet forwarding device receives the second packet sent by the packet sending device by using the TCP.
本申请实施例中,所述第二报文为报文发送设备在第二TCP发送窗口内发送的第一个报文,且所述第二报文包含Flowlet开始标记。报文发送设备在第二TCP发送窗口内发送的第一个报文在时间维度上可以理解为是在第二TCP发送窗口内第一个发送的报文,而若通过序列号表示,则可理解为是在第二TCP发送窗口内发送的序列号最小的报文。In this embodiment, the second packet is a first packet sent by the packet sending device in the second TCP sending window, and the second packet includes a Flowlet start tag. The first message sent by the message sending device in the second TCP sending window can be understood as the first message sent in the second TCP sending window in the time dimension, and if it is represented by the serial number, It is understood to be the message with the smallest sequence number sent in the second TCP transmission window.
本申请实施例中第二TCP发送窗口是与所述第一TCP发送窗口相邻的TCP发送窗口,且报文发送设备接收到在第一TCP发送窗口内发送报文对应的ACK确认后,在第二TCP发送窗口内发送报文。其中,所述第一TCP发送窗口内发送的报文对应的ACK用于指示所述所述第一TCP发送窗口内发送的所有报文已到达目的地。例如,在第一TCP发送窗口内发送的报文对应的ACK确认是指在第一TCP发送窗口内发送的最后一个报文(第一报文)对应的ACK确认。所述ACK确认中携带的序列号与所述第一TCP报文中携带的序列号相等。In the embodiment of the present application, the second TCP sending window is a TCP sending window adjacent to the first TCP sending window, and the packet sending device receives the ACK confirmation corresponding to the sending of the message in the first TCP sending window, The second TCP transmission window sends a message. The ACK corresponding to the packet sent in the first TCP sending window is used to indicate that all the packets sent in the first TCP sending window have reached the destination. For example, the ACK acknowledgment corresponding to the message sent in the first TCP transmission window refers to the ACK acknowledgment corresponding to the last message (the first message) sent in the first TCP transmission window. The sequence number carried in the ACK acknowledgement is equal to the sequence number carried in the first TCP packet.
其中,第二报文中包括的Flowlet开始标记可通过第二报文的报文头中的空闲比特位携带。The flow start tag included in the second packet may be carried by the idle bit in the header of the second packet.
本申请实施例中,所述第二报文可以和所述第一报文之间具有相同的特征信息。换言之,所述第二报文和所述第一报文是属于同一流中的报文。In this embodiment, the second packet may have the same feature information as the first packet. In other words, the second packet and the first packet are packets belonging to the same stream.
S104:报文转发设备基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项,并依据创建的所述第一Flowlet流表表项,转发第二报文。S104: The packet forwarding device creates a first flowlet flow table entry based on the flowlet start tag included in the second packet, and forwards the second packet according to the created first flowlet flow table entry.
本申请实施例中,报文转发设备基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项所指示的用于转发第二报文的报文转发路径可以与基于哈希算法确定的用于转发第一报文的转发路径相同,当然也可不同。例如,第一Flowlet流表表项所指示的用于转发第二报文的出接口与基于哈希算法确定的用于转发第一报文的出接口是同一个出接口,或者是不同的出接口。In the embodiment of the present application, the packet forwarding device may be based on the flowlet start flag included in the second packet, and the packet forwarding path for forwarding the second packet indicated by the first flowlet flow table entry may be based on a hash algorithm. The forwarding path used to forward the first packet is the same, but may be different. For example, the outbound interface for forwarding the second packet indicated by the first flowlet flow table entry is the same outbound interface as the outbound interface determined by the hash algorithm for forwarding the first packet, or is different. interface.
本申请实施例中,报文转发设备接收到报文发送设备在第一TCP发送窗口内发送的最后一个报文后,根据第一报文的特征信息以及哈希算法确定出接口,并经由所述出接口转发所述第一报文,是一种应用哈希算法确定报文转发路径的方式。报文转发设备接收到报文发送设备采用TCP在第二TCP发送窗口内发送的第二报文后,基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项,并依据创建的所述第一Flowlet流表表项,转发第二报文,是一种基于Flowlet机制进行路径选择的方式。故通过本申请实施例可实现由应用基于哈希算法确定报文转发路径的方式转换为采用Flowlet进行路径选择的方式进行负载均衡处理。进一步的,报文转发设备是基于第二报文中包括的Flowlet开始标记创建的Flowlet流表表项,该Flowlet开始标记用于标识第二TCP发送窗口内发送的第一个报文,由于报文发送设备在第一TCP发送窗口内发送报文后需要接收到ACK确认才会继续发送报文,而报文发送设备接收到ACK确认,则表明报文接收设备已经接收到报文发送设备发送的报文,故报文发送设备再在第二TCP发送窗口内向报文接收设备发送报文,使得报文到达报文接收设备时不会发生乱序,报文接收设备无需对接收到的报文进行重排序。In the embodiment of the present application, after receiving the last packet sent by the packet sending device in the first TCP sending window, the packet forwarding device determines the interface according to the feature information of the first packet and the hash algorithm, and The method of forwarding the first packet by the interface is a method for determining a packet forwarding path by using a hash algorithm. After the packet forwarding device receives the second packet sent by the TCP in the second TCP sending window, the packet forwarding device creates a first Flowlet flow table entry based on the Flowlet start tag included in the second packet, and creates the first Flowlet flow table entry. The first Flowlet flow table entry, forwarding the second packet, is a way for path selection based on the Flowlet mechanism. Therefore, the method for determining the packet forwarding path based on the hash algorithm is converted into the path selection method by using the flowlet to perform load balancing processing. Further, the packet forwarding device is a flowlet flow table entry created based on a Flowlet start tag included in the second packet, where the Flowlet start tag is used to identify the first packet sent in the second TCP sending window, because the packet After receiving the packet in the first TCP transmission window, the packet sending device needs to receive the ACK to continue to send the packet, and the packet sending device receives the ACK acknowledgement, indicating that the packet receiving device has received the packet sending device and sends the packet. The packet sending device sends a packet to the packet receiving device in the second TCP sending window, so that the packet does not need to be out of order when the packet arrives at the receiving device, and the packet receiving device does not need to receive the received packet. The text is reordered.
本申请实施例中,报文转发设备接收到报文发送设备采用TCP发送的第二报文之后,继续接收报文发送设备采用TCP在发送第二TCP发送窗口内发送的报文,并依据创建的第一 Flowlet流表表项转发后续接收到的报文发送设备采用TCP在发送第二TCP发送窗口内发送的报文。In the embodiment of the present application, after receiving the second packet sent by the packet sending device by using the TCP, the packet forwarding device continues to receive the packet sent by the sending device using the TCP in the second TCP sending window, and creates the packet according to the method. The first Flowlet flow table entry forwards the subsequently received message sending device to send the message sent by the TCP in the second TCP sending window.
本申请实施例中,若报文转发设备接收到报文发送设备采用TCP,在第二TCP发送窗口内发送的最后一个报文,且该在第二TCP发送窗口内发送的最后一个报文包含Flowlet结束标记,则在图3所示方法流程基础上,还可包括如下实施步骤,如图4所示:In the embodiment of the present application, if the packet forwarding device receives the packet sending device using TCP, the last packet sent in the second TCP sending window, and the last packet sent in the second TCP sending window includes The flowlet end tag is based on the method flow shown in FIG. 3, and may also include the following implementation steps, as shown in FIG. 4:
S105:报文转发设备接收报文发送设备采用TCP发送的第三报文。S105: The packet forwarding device receives the third packet sent by the packet sending device by using the TCP.
本申请实施例中将报文转发设备接收到的报文发送设备在第二TCP发送窗口内发送的最后一个报文称为第三报文,所述第三报文包含Flowlet结束标记。其中,第三报文中包括的Flowlet结束标记可通过第三报文的报文头中的空闲比特位携带。In the embodiment of the present application, the last packet sent by the packet sending device received by the packet forwarding device in the second TCP sending window is referred to as a third packet, and the third packet includes a Flowlet end tag. The flow end tag included in the third packet may be carried by the idle bit in the header of the third packet.
S106:报文转发设备基于第三报文中包括的Flowlet结束标记,删除所述第一Flowlet流表表项。S106: The packet forwarding device deletes the first Flowlet flow table entry based on the Flowlet End Tag included in the third packet.
本申请实施例中,报文转发设备基于第三报文中包括的Flowlet结束标记,删除所述第一Flowlet流表表项,能够释放资源,该释放的资源可用于创建其它报文组所遵循的Flowlet流表表项,使更多的报文组能够匹配到Flowlet流表表项,进行负载均衡处理。In the embodiment of the present application, the packet forwarding device deletes the first flowlet flow table entry based on the flowlet end tag included in the third packet, and can release the resource, and the released resource can be used to create another packet group to follow. The Flowlet flow table entry enables more packet groups to match the Flowlet flow table entries for load balancing.
本申请实施例中,报文转发设备接收报文发送设备采用TCP发送的第三报文后,可继续接收后续报文,并基于Flowlet机制的路径选择方式进行路径选择,实现过程如图5所示。图5所示的方法流程,在图4所示方法流程基础上,还可包括如下实施步骤:In the embodiment of the present application, after receiving the third packet sent by the TCP, the packet forwarding device can continue to receive subsequent packets, and performs path selection according to the path selection mode of the Flowlet mechanism. The implementation process is as shown in FIG. 5 . Show. The method flow shown in FIG. 5 may further include the following implementation steps on the basis of the method flow shown in FIG. 4:
S107:报文转发设备接收报文发送设备采用TCP发送的第四报文。S107: The packet forwarding device receives the fourth packet sent by the packet sending device by using the TCP.
本申请实施例中,第四报文为报文发送设备在第三TCP发送窗口内发送的第一个报文,所述第四报文和所述第一报文之间具有相同的特征信息,换言之,第四报文和第一报文属于同一流。In the embodiment of the present application, the fourth packet is the first packet sent by the packet sending device in the third TCP sending window, and the fourth packet and the first packet have the same feature information. In other words, the fourth message and the first message belong to the same stream.
所述第四报文包含Flowlet开始标记。第四报文中包含的Flowlet开始标记可通过第四报文的报文头中的空闲比特位携带。The fourth message includes a Flowlet Start tag. The Flowlet start tag included in the fourth message may be carried by the idle bit in the header of the fourth message.
本申请实施例中第四报文中包含的Flowlet开始标记与第二报文中包含的Flowlet开始标记可以相同也可以不同,但是第四报文中包含的Flowlet开始标记的功能与第二报文中包含的Flowlet开始标记的功能相同,都是用于标识数据发送设备在TCP发送窗口内发送的首个报文。The Flowlet start tag included in the fourth packet in the embodiment of the present application may be the same as or different from the Flowlet start tag included in the second packet, but the Flowlet start tag function and the second packet included in the fourth packet are included. The Flowlet start tag included in the function has the same function and is used to identify the first message sent by the data sending device in the TCP send window.
本申请实施例中第三TCP发送窗口是与所述第二TCP发送窗口相邻的TCP发送窗口,且报文发送设备在接收到在第二TCP发送窗口内发送报文对应的ACK确认后,在第三TCP发送窗口内发送报文。所述第二TCP发送窗口内发送的报文对应的ACK用于指示所述所述第二TCP发送窗口内发送的所有报文已到达目的地。例如,在第二TCP发送窗口内发送的报文对应的ACK确认是指在第二TCP发送窗口内发送的最后一个报文(第三报文)对应的ACK确认。所述ACK确认中携带的序列号与所述第三TCP报文中携带的序列号相等。In the embodiment of the present application, the third TCP sending window is a TCP sending window adjacent to the second TCP sending window, and after the packet sending device receives the ACK confirmation corresponding to the sending of the message in the second TCP sending window, The message is sent in the third TCP transmission window. The ACK corresponding to the packet sent in the second TCP sending window is used to indicate that all the packets sent in the second TCP sending window have reached the destination. For example, the ACK acknowledgment corresponding to the message sent in the second TCP transmission window refers to the ACK acknowledgment corresponding to the last message (third message) sent in the second TCP transmission window. The sequence number carried in the ACK acknowledgement is equal to the sequence number carried in the third TCP packet.
S108:报文转发设备基于第四报文中包括的Flowlet开始标记,创建第二Flowlet流表表项,并依据创建的第二Flowlet流表表项,转发所述第四报文。S108: The packet forwarding device creates a second Flowlet flow table entry based on the Flowlet start tag included in the fourth packet, and forwards the fourth packet according to the created second Flowlet flow table entry.
本申请实施例中,报文转发设备基于第四报文中包括的Flowlet开始标记创建第二Flowlet流表表项所指示的用于转发第四报文的报文转发路径可以与基于第二报文中包括的Flowlet开始标记创建第一Flowlet流表表项所指示的用于转发第二报文的报文转发路径相同,当然也可不同。例如,第二Flowlet流表表项所指示的用于转发第四报文的出接口与 第一Flowlet流表表项所指示的用于转发第二报文的出接口是同一个出接口,或者是不同的出接口。In the embodiment of the present application, the packet forwarding device may be based on the Flowlet start tag included in the fourth packet, and the packet forwarding path for forwarding the fourth packet indicated by the second Flowlet flow table entry may be based on the second report. The flow forwarding path included in the text is the same as the forwarding path of the packet for forwarding the second packet indicated by the first flowlet flow table entry, and may of course be different. For example, the outbound interface for forwarding the fourth packet indicated by the second flowlet flow table entry is the same outbound interface as the outgoing interface for forwarding the second packet indicated by the first flowlet flow table entry, or Is a different outbound interface.
本申请实施例中S107和S108中实施基于Flowlet机制的路径选择方式进行路径选择的实施过程,与S103和S104的实施过程类似,故相似之处可参阅上述实施例中S103和S104的描述,在此不再赘述。The implementation process of the path selection method based on the flow path mechanism in the S107 and S108 in the embodiment of the present application is similar to the implementation process of S103 and S104, so the similarities can be referred to the descriptions of S103 and S104 in the above embodiment. This will not be repeated here.
本申请实施例中,报文转发设备接收到报文发送设备采用TCP发送的第四报文之后,继续接收报文发送设备采用TCP在发送第三TCP发送窗口内发送的报文,并依据创建的第二Flowlet流表表项转发后续接收到的报文发送设备采用TCP在发送第三TCP发送窗口内发送的报文。In the embodiment of the present application, after receiving the fourth packet sent by the packet sending device, the packet forwarding device continues to receive the packet sent by the sending device using the TCP in the third TCP sending window, and creates the packet according to the method. The second Flowlet flow table entry forwards the subsequently received message sending device to send the message sent by the TCP in the third TCP sending window.
本申请实施例中,还可周期性的检测已创建的Flowlet流表中占用流表资源时间超出设定时长的非活跃流表项,并删除所述非活跃流表项,以便能够释放资源,该释放的资源可用于创建其它Flowlet的Flowlet流表,使更多的Flowlet能够匹配到Flowlet流表,进行负载均衡处理。其中,所述非活跃流表项为在设定时长内未被执行的流表项。In the embodiment of the present application, the inactive flow entry in the created flowlet flow table that exceeds the set duration of the flow table resource is periodically detected, and the inactive flow entry is deleted, so that the resource can be released. The released resources can be used to create flowlet flow tables of other Flowlets, so that more Flowlets can be matched to the Flowlet flow table for load balancing processing. The inactive flow entry is a flow entry that is not executed within a set duration.
基于上述实施例涉及的负载均衡处理方法,本申请实施例还提供了一种负载均衡处理装置。可以理解的是,负载均衡处理装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本申请实施例中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的技术方案的范围。Based on the load balancing processing method of the foregoing embodiment, the embodiment of the present application further provides a load balancing processing apparatus. It can be understood that the load balancing processing device includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above functions. The embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the unit and algorithm steps of the examples described in the embodiments disclosed in the embodiments of the present application. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present application.
本申请实施例可以根据上述方法示例对负载均衡处理装置进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the functional unit into the load balancing processing device according to the foregoing method example. For example, each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
在采用集成的单元的情况下,图6示出了本申请实施例提供的负载均衡处理装置100的结构示意图。图6中,负载均衡处理装置100包括接收单元101、处理单元102和发送单元103。FIG. 6 is a schematic structural diagram of a load balancing processing apparatus 100 according to an embodiment of the present application. In FIG. 6, the load balancing processing apparatus 100 includes a receiving unit 101, a processing unit 102, and a transmitting unit 103.
所述接收单元101,用于接收报文发送设备采用TCP发送的第一报文,所述第一报文为所述报文发送设备在第一TCP发送窗口内发送的最后一个报文;并接收所述报文发送设备采用TCP发送的第二报文,所述第二报文为所述报文发送设备在第二TCP发送窗口内发送的第一个报文,所述第二报文包含Flowlet开始标记。其中,第二TCP发送窗口是与所述第一TCP发送窗口相邻的TCP发送窗口,且所述报文发送设备接收到在第一TCP发送窗口内发送的报文的正确ACK确认后在所述第二TCP发送窗口内发送报文。The receiving unit 101 is configured to receive a first packet that is sent by the packet sending device by using the TCP, where the first packet is the last packet sent by the packet sending device in the first TCP sending window; Receiving, by the packet sending device, a second packet sent by using a TCP, where the second packet is a first packet sent by the packet sending device in a second TCP sending window, where the second packet is sent Contains the Flowlet start tag. The second TCP transmission window is a TCP transmission window adjacent to the first TCP transmission window, and the message sending device receives the correct ACK confirmation of the message sent in the first TCP transmission window. Sending a message in the second TCP transmission window.
所述处理单元102,用于根据所述接收单元101接收的第一报文的特征信息以及哈希算法确定出接口;并基于所述第二报文中包括的所述Flowlet开始标记创建第一Flowlet流表表项。The processing unit 102 is configured to determine an interface according to the feature information of the first packet received by the receiving unit 101 and a hash algorithm, and create a first identifier based on the Flowlet start tag included in the second packet. Flowlet flow table entry.
所述发送单元103,用于经由所述处理单元102确定的出接口转发所述第一报文,并依据所述处理单元102创建的所述第一Flowlet流表表项,转发所述第二报文,所述第二报文和所述第一报文之间具有相同的特征信息。The sending unit 103 is configured to forward the first packet by using the outbound interface determined by the processing unit 102, and forward the second according to the first Flowlet flow table entry created by the processing unit 102. The message has the same feature information between the second message and the first message.
其中,所述接收单元101,还用于:创建第一Flowlet流表表项之后,接收所述报文发送设备采用TCP发送的第三报文,所述第三报文为所述报文发送设备在所述第二TCP发送窗口内发送的最后一个报文,所述第三报文包含Flowlet结束标记。所述处理单元102,还用于:基于所述接收单元101接收的第三报文中包括的所述Flowlet结束标记,删除所述第一Flowlet流表表项。The receiving unit 101 is further configured to: after the first flowlet flow table entry is created, receive the third packet sent by the packet sending device by using the TCP, where the third packet is sent by using the third packet. The last message sent by the device in the second TCP transmission window, the third message containing a Flowlet End Tag. The processing unit 102 is further configured to delete the first Flowlet flow table entry based on the Flowlet end tag included in the third packet received by the receiving unit 101.
其中,所述接收单元101,还用于:在所述处理单元102确定所述报文发送设备采用TCP发送的第三报文中包括Flowlet结束标记之后,接收所述报文发送设备发送的第四报文,所述第四报文为所述报文发送设备在第三TCP发送窗口内发送的第一个报文,所述第四报文包含Flowlet开始标记。所述处理单元102,还用于:基于所述接收单元101接收的所述第四报文中包括的所述Flowlet开始标记,创建第二Flowlet流表表项;所述发送单元103,还用于:依据所述处理单元102创建的所述第二Flowlet流表表项,转发所述第四报文。The receiving unit 101 is further configured to: after the processing unit 102 determines that the third packet sent by the packet sending device by using the TCP includes the Flowlet End Tag, and receives the first sent by the packet sending device. And a fourth packet, where the fourth packet is a first packet sent by the packet sending device in a third TCP sending window, where the fourth packet includes a Flowlet start tag. The processing unit 102 is further configured to: create, according to the Flowlet start tag included in the fourth packet received by the receiving unit 101, a second Flowlet flow table entry; the sending unit 103 further uses The fourth packet is forwarded according to the second flowlet flow table entry created by the processing unit 102.
当采用硬件形式实现时,本申请实施例中,处理单元102可以是处理器,接收单元101和发送单元103可以是通信接口,通信接口是统称,可以包括一个或多个接口。In the embodiment of the present application, the processing unit 102 may be a processor, and the receiving unit 101 and the sending unit 103 may be communication interfaces. The communication interface is a collective name and may include one or more interfaces.
当处理单元102是处理器,接收单元101和发送单元103是通信接口时,本申请实施例提供的负载均衡处理装置100可具有如图7所示的结构。图7所示的负载均衡处理装置100可以是报文转发设备,该报文转发设备可以是负载均衡设备,也可以是交换机或者路由器等。When the processing unit 102 is a processor, and the receiving unit 101 and the transmitting unit 103 are communication interfaces, the load balancing processing apparatus 100 provided by the embodiment of the present application may have the structure as shown in FIG. 7. The load balancing processing device 100 shown in FIG. 7 may be a packet forwarding device, and the packet forwarding device may be a load balancing device, or may be a switch or a router.
图7示出了本申请实施例提供的一种报文转发设备1000的结构示意图。参阅图7所示,报文转发设备1000采用通用计算机系统结构,包括总线,处理器1001,存储器1002和通信接口1003,执行本申请实施例方案的程序代码保存在存储器1002中,并由处理器1001来控制执行。FIG. 7 is a schematic structural diagram of a packet forwarding device 1000 according to an embodiment of the present application. Referring to FIG. 7, the message forwarding device 1000 adopts a general computer system structure, including a bus, a processor 1001, a memory 1002, and a communication interface 1003. The program code for executing the solution of the embodiment of the present application is stored in the memory 1002, and is processed by the processor. 1001 to control execution.
存储器1002中存储的程序用于指令处理器1001执行上述实施例涉及的负载均衡处理方法,包括:通过通信接口1003接收报文发送设备采用TCP发送的第一报文,所述第一报文为所述报文发送设备在第一TCP发送窗口内发送的最后一个报文。根据所述第一报文的特征信息以及哈希算法确定出接口,并经由所述出接口转发所述第一报文。通过通信接口1003接收所述报文发送设备采用TCP发送的第二报文,所述第二报文为所述报文发送设备在第二TCP发送窗口内发送的第一个报文,所述第二报文包含Flowlet开始标记,所述第二TCP发送窗口是与所述第一TCP发送窗口相邻的TCP发送窗口,且报文发送设备在接收到在第一TCP发送窗口内发送报文对应的ACK确认后,在所述第二TCP发送窗口内发送报文。数据转发设备基于所述第二报文中包括的所述Flowlet开始标记创建第一Flowlet流表表项,并依据创建的所述第一Flowlet流表表项,转发所述第二报文,所述第二报文和所述第一报文之间具有相同的特征信息。The program stored in the memory 1002 is used by the instruction processor 1001 to perform the load balancing processing method of the foregoing embodiment, including: receiving, by the communication interface 1003, a first packet sent by the packet sending device by using the TCP, where the first packet is The last message sent by the message sending device in the first TCP sending window. Determining an interface according to the feature information of the first packet and a hash algorithm, and forwarding the first packet by using the outbound interface. Receiving, by the communication interface 1003, the second packet sent by the packet sending device by using the TCP, where the second packet is the first packet sent by the packet sending device in the second TCP sending window, The second message includes a Flowlet start tag, the second TCP send window is a TCP send window adjacent to the first TCP send window, and the message sending device receives the message in the first TCP send window. After the corresponding ACK is confirmed, the message is sent in the second TCP transmission window. The data forwarding device creates a first flowlet flow table entry based on the flowlet start tag included in the second packet, and forwards the second packet according to the created first flowlet flow table entry. The second message has the same feature information as the first message.
一种可能的实施方式中,存储器1002中存储的程序还用于指令处理器1001在创建第一Flowlet流表表项之后,通过通信接口1003接收所述报文发送设备采用TCP发送的第三报文,所述第三报文为所述报文发送设备在所述第二TCP发送窗口内发送的最后一个报文,所述第三报文包含Flowlet结束标记,并基于所述第三报文中包括的所述Flowlet结束标记,删除所述第一Flowlet流表表项。In a possible implementation, the program stored in the memory 1002 is further used by the instruction processor 1001 to receive, by the communication interface 1003, the third report sent by the packet sending device by using the TCP after creating the first Flowlet flow table entry. The third packet is the last packet sent by the packet sending device in the second TCP sending window, where the third packet includes a Flowlet end tag, and is based on the third packet. The flowlet end tag included in the first flowlet flow table entry is deleted.
另一种实施方式中,一种可能的实施方式中,存储器1002中存储的程序还用于指令处理器1001确定所述报文发送设备发送的第三报文中包括Flowlet结束标记之后,通过通信接口1003接收所述报文发送设备采用TCP发送的第四报文,所述第四报文为所述报文发送设备 在第三TCP发送窗口内发送的第一个报文,所述第四报文包含Flowlet开始标记,并基于所述第四报文中包括的所述Flowlet开始标记,创建第二Flowlet流表表项,并依据创建的所述第二Flowlet流表表项,转发所述第四报文。In another implementation manner, in a possible implementation, the program stored in the memory 1002 is further used by the instruction processor 1001 to determine that the third message sent by the message sending device includes a Flowlet end tag, and then communicates The interface 1003 receives the fourth packet sent by the packet sending device by using the TCP, and the fourth packet is the first packet sent by the packet sending device in the third TCP sending window, and the fourth packet The message includes a flow start tag, and based on the flowlet start tag included in the fourth packet, creating a second flowlet flow table entry, and forwarding the according to the created second flowlet flow table entry Fourth message.
需要说明的是,本申请实施例提供的负载均衡处理装置100和报文转发设备1000具备上述实施例中涉及的报文转发设备的功能,对于本申请实施例描述不够详尽的地方,可参阅上述实施例的相关描述,本申请实施例在此不再赘述。It should be noted that the load balancing processing device 100 and the packet forwarding device 1000 provided by the embodiments of the present application have the functions of the packet forwarding device involved in the foregoing embodiment. For the related description of the embodiments, the embodiments of the present application are not described herein again.
进一步需要说明的是,上述涉及的总线可包括一通路,在计算机各个部件之间传送信息。It should be further noted that the bus involved above may include a path for transferring information between various components of the computer.
处理器可以是一个通用中央处理器(CPU),微处理器,特定应用集成电路application-specific integrated circuit(ASIC),或一个或多个用于控制本申请实施例方案程序执行的集成电路。计算机系统中包括的一个或多个存储器,可以是只读存储器read-only memory(ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器random access memory(RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是磁盘存储器。这些存储器通过总线与处理器相连接。The processor may be a general purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the embodiments of the present application. One or more memories included in the computer system, which may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or Other types of dynamic storage devices that store information and instructions may also be disk storage. These memories are connected to the processor via a bus.
通信接口,可以使用任何收发器一类的装置,以便与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(WLAN)等.Communication interface, any device such as transceiver can be used to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
存储器,如RAM,保存有操作系统和执行本申请实施例方案的程序。操作系统是用于控制其他程序运行,管理系统资源的程序。A memory, such as a RAM, stores an operating system and a program for executing the aspects of the embodiments of the present application. The operating system is a program that controls the running of other programs and manages system resources.
本申请实施例还提供一种存储介质,用于储存上述负载均衡处理装置和报文转发设备所用的计算机软件指令,其包含用于执行上述第一方面涉及的用户读写请求调度方法所涉及的程序。The embodiment of the present application further provides a storage medium, configured to store computer software instructions used by the load balancing processing device and the packet forwarding device, and includes a method for performing the user read/write request scheduling method related to the first aspect. program.
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请实施例权利要求及其等同技术的范围之内,则本申请实施例也意图包含这些改动和变型在内。It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the present application without departing from the spirit and scope of the application. Thus, the present embodiments are intended to cover such modifications and variations as the modifications and variations of the embodiments of the present invention are intended to be included within the scope of the appended claims.

Claims (10)

  1. 一种负载均衡处理方法,其特征在于,包括:A load balancing processing method, comprising:
    报文转发设备接收报文发送设备采用传输控制协议TCP发送的第一报文,所述第一报文为所述报文发送设备在第一TCP发送窗口内发送的最后一个报文;The packet forwarding device receives the first packet sent by the packet sending device by using the transmission control protocol TCP, and the first packet is the last packet sent by the packet sending device in the first TCP sending window;
    所述报文转发设备根据所述第一报文的特征信息以及哈希算法确定出接口,并经由所述出接口转发所述第一报文;The packet forwarding device determines an interface according to the feature information of the first packet and a hash algorithm, and forwards the first packet by using the outbound interface;
    所述报文转发设备接收所述报文发送设备采用TCP发送的第二报文,所述第二报文为所述报文发送设备在第二TCP发送窗口内发送的第一个报文,所述第二报文包含Flowlet开始标记,所述第二TCP发送窗口是与所述第一TCP发送窗口相邻的TCP发送窗口,所述报文发送设备接收到在所述第一TCP发送窗口内发送的报文对应的ACK确认后,在所述第二TCP发送窗口内发送报文;The packet forwarding device receives the second packet sent by the packet sending device by using the TCP, and the second packet is the first packet sent by the packet sending device in the second TCP sending window. The second message includes a Flowlet start tag, the second TCP send window is a TCP send window adjacent to the first TCP send window, and the message sending device receives the first TCP send window. After the ACK corresponding to the message sent within the packet is acknowledged, the packet is sent in the second TCP sending window;
    所述报文转发设备基于所述第二报文中包括的所述Flowlet开始标记创建第一Flowlet流表表项,并依据创建的所述第一Flowlet流表表项,转发所述第二报文,所述第二报文和所述第一报文之间具有相同的特征信息。The packet forwarding device creates a first flowlet flow table entry based on the flowlet start tag included in the second packet, and forwards the second report according to the created first flowlet flow table entry. The second message has the same feature information as the first message.
  2. 如权利要求1所述的方法,其特征在于,创建第一Flowlet流表表项之后,所述方法还包括:The method of claim 1, wherein after the first flowlet flow table entry is created, the method further comprises:
    所述报文转发设备接收所述报文发送设备采用TCP发送的第三报文,所述第三报文为所述报文发送设备在所述第二TCP发送窗口内发送的最后一个报文,所述第三报文包含Flowlet结束标记;The packet forwarding device receives the third packet sent by the packet sending device by using the TCP, and the third packet is the last packet sent by the packet sending device in the second TCP sending window. The third message includes a flow end tag;
    所述报文转发设备基于所述第三报文中包括的所述Flowlet结束标记,删除所述第一Flowlet流表表项。The packet forwarding device deletes the first Flowlet flow table entry based on the Flowlet end tag included in the third packet.
  3. 如权利要求2所述的方法,其特征在于,所述报文转发设备确定所述报文发送设备发送的第三报文中包括Flowlet结束标记之后,所述方法还包括:The method of claim 2, wherein after the packet forwarding device determines that the third packet sent by the packet sending device includes a Flowlet End Tag, the method further includes:
    所述报文转发设备接收所述报文发送设备采用TCP发送的第四报文,所述第四报文为所述报文发送设备在第三TCP发送窗口内发送的第一个报文,所述第四报文包含Flowlet开始标记;The packet forwarding device receives the fourth packet sent by the packet sending device by using the TCP, and the fourth packet is the first packet sent by the packet sending device in the third TCP sending window. The fourth message includes a Flowlet start tag;
    所述报文转发设备基于所述第四报文中包括的所述Flowlet开始标记,创建第二Flowlet流表表项,并依据创建的所述第二Flowlet流表表项,转发所述第四报文。The packet forwarding device creates a second Flowlet flow table entry based on the Flowlet start tag included in the fourth packet, and forwards the fourth according to the created second Flowlet flow table entry. Message.
  4. 如权利要求1至3任一项所述的方法,其特征在于,所述第二报文中包括的所述Flowlet开始标记通过所述第二报文的报文头中的空闲比特位携带。The method according to any one of claims 1 to 3, wherein the Flowlet start tag included in the second message is carried by an idle bit in a header of the second message.
  5. 如权利要求1所述的方法,其特征在于,所述第一Flowlet流表表项所指示的用于转发所述第二报文的出接口,与转发所述第一报文的出接口是同一个出接口或者是不同的出接口。The method according to claim 1, wherein the outbound interface for forwarding the second packet indicated by the first flowlet flow table entry, and the outgoing interface for forwarding the first packet are The same outgoing interface or a different outgoing interface.
  6. 一种负载均衡处理装置,其特征在于,包括接收单元、处理单元和发送单元,其中:A load balancing processing device, comprising: a receiving unit, a processing unit, and a sending unit, wherein:
    所述接收单元,用于接收报文发送设备采用传输控制协议TCP发送的第一报文,所述第一报文为所述报文发送设备在第一TCP发送窗口内发送的最后一个报文;并接收所述报文发送设备采用TCP发送的第二报文,所述第二报文为所述报文发送设备在第二TCP发送窗口内发送的第一个报文,所述第二报文包含Flowlet开始标记,所述第二TCP发送窗口是与所述 第一TCP发送窗口相邻的TCP发送窗口,所述报文发送设备接收到在所述第一TCP发送窗口内发送的报文对应的ACK确认后在所述第二TCP发送窗口内发送报文;The receiving unit is configured to receive a first packet sent by the packet sending device by using a transmission control protocol (TCP), where the first packet is the last packet sent by the packet sending device in the first TCP sending window. And receiving the second packet sent by the packet sending device by using the TCP, where the second packet is the first packet sent by the packet sending device in the second TCP sending window, the second packet The message includes a Flowlet start tag, the second TCP send window is a TCP send window adjacent to the first TCP send window, and the message sending device receives the report sent in the first TCP send window Sending a message in the second TCP sending window after confirming the ACK corresponding to the text;
    所述处理单元,用于根据所述接收单元接收的第一报文的特征信息以及哈希算法确定出接口;并基于所述第二报文中包括的所述Flowlet开始标记创建第一Flowlet流表表项;The processing unit is configured to determine an interface according to the feature information of the first packet and the hash algorithm received by the receiving unit, and create a first Flowlet stream based on the Flowlet start tag included in the second packet Table entry
    所述发送单元,用于经由所述处理单元确定的出接口转发所述第一报文,并依据所述处理单元创建的所述第一Flowlet流表表项,转发所述第二报文,所述第二报文和所述第一报文之间具有相同的特征信息。The sending unit is configured to forward the first packet by using the outbound interface determined by the processing unit, and forward the second packet according to the first Flowlet flow table entry created by the processing unit, The second message and the first message have the same feature information.
  7. 如权利要求6所述的负载均衡处理装置,其特征在于,所述接收单元,还用于:The load balancing processing apparatus according to claim 6, wherein the receiving unit is further configured to:
    创建第一Flowlet流表表项之后,接收所述报文发送设备采用TCP发送的第三报文,所述第三报文为所述报文发送设备在所述第二TCP发送窗口内发送的最后一个报文,所述第三报文包含Flowlet结束标记;After the first flowlet table entry is created, the third packet sent by the packet sending device is sent by the packet sending device, and the third packet is sent by the packet sending device in the second TCP sending window. The last message, the third message includes a flow end tag;
    所述处理单元,还用于:The processing unit is further configured to:
    基于所述接收单元接收的第三报文中包括的所述Flowlet结束标记,删除所述第一Flowlet流表表项。And deleting the first Flowlet flow table entry based on the Flowlet end tag included in the third packet received by the receiving unit.
  8. 如权利要求7所述的负载均衡处理装置,其特征在于,所述接收单元,还用于:The load balancing processing device according to claim 7, wherein the receiving unit is further configured to:
    在所述处理单元确定所述报文发送设备采用TCP发送的第三报文中包括Flowlet结束标记之后,接收所述报文发送设备发送的第四报文,所述第四报文为所述报文发送设备在第三TCP发送窗口内发送的第一个报文,所述第四报文包含Flowlet开始标记;After the processing unit determines that the third packet sent by the packet sending device by using the TCP includes the Flowlet End Tag, the fourth packet sent by the packet sending device is received, where the fourth packet is the a first message sent by the message sending device in the third TCP sending window, where the fourth message includes a Flowlet start tag;
    所述处理单元,还用于:The processing unit is further configured to:
    基于所述接收单元接收的所述第四报文中包括的所述Flowlet开始标记,创建第二Flowlet流表表项;Creating a second Flowlet flow table entry based on the Flowlet start tag included in the fourth packet received by the receiving unit;
    所述发送单元,还用于:The sending unit is further configured to:
    依据所述处理单元创建的所述第二Flowlet流表表项,转发所述第四报文。And forwarding, according to the second flowlet flow table entry created by the processing unit, the fourth packet.
  9. 如权利要求6至8任一项所述的负载均衡处理装置,其特征在于,所述第二报文中包括的所述Flowlet开始标记通过所述第二报文的报文头中的空闲比特位携带。The load balancing processing apparatus according to any one of claims 6 to 8, wherein the flowlet included in the second packet starts to mark a free bit in a header of the second packet. Carrying.
  10. 如权利要求6所述的负载均衡处理装置,其特征在于,所述第一Flowlet流表表项所指示的用于转发所述第二报文的出接口,与转发所述第一报文的出接口是同一个出接口或者是不同的出接口。The load balancing processing device according to claim 6, wherein the outbound interface for forwarding the second packet and the forwarding of the first packet are indicated by the first flowlet flow table entry The outgoing interface is the same outgoing interface or a different outgoing interface.
PCT/CN2017/118652 2016-12-30 2017-12-26 Load balance processing method and apparatus WO2018121535A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611264145.8 2016-12-30
CN201611264145.8A CN108270687B (en) 2016-12-30 2016-12-30 Load balancing processing method and device

Publications (1)

Publication Number Publication Date
WO2018121535A1 true WO2018121535A1 (en) 2018-07-05

Family

ID=62710279

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/118652 WO2018121535A1 (en) 2016-12-30 2017-12-26 Load balance processing method and apparatus

Country Status (2)

Country Link
CN (1) CN108270687B (en)
WO (1) WO2018121535A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040323A (en) * 2018-10-19 2018-12-18 盛科网络(苏州)有限公司 Load balancing apparatus
CN111200558A (en) * 2018-11-19 2020-05-26 华为技术有限公司 Method and device for sharing flow load
CN112866115A (en) * 2020-12-31 2021-05-28 杭州迪普科技股份有限公司 Method, device, electronic equipment and storage medium for realizing transparent serial connection
CN113542131A (en) * 2021-05-25 2021-10-22 新华三信息安全技术有限公司 Message forwarding method and device
WO2022184267A1 (en) * 2021-03-05 2022-09-09 Huawei Technologies Co., Ltd. System and method for transmitting a data packet

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11593134B2 (en) 2018-01-26 2023-02-28 Nicira, Inc. Throttling CPU utilization by implementing a rate limiter
US20210224138A1 (en) * 2020-01-21 2021-07-22 Vmware, Inc. Packet processing with load imbalance handling
CN116325708A (en) * 2020-09-30 2023-06-23 华为技术有限公司 Data processing and transmitting method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904825A (en) * 2012-09-27 2013-01-30 杭州华三通信技术有限公司 Hash based message transmission method and device
CN104168201A (en) * 2014-08-06 2014-11-26 福建星网锐捷网络有限公司 Multipath forwarding method and device
US20150127797A1 (en) * 2013-11-05 2015-05-07 Cisco Technology, Inc. System and method for multi-path load balancing in network fabrics
US20150124611A1 (en) * 2013-11-05 2015-05-07 Insieme Networks, Inc. Dynamic flowlet prioritization

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9502111B2 (en) * 2013-11-05 2016-11-22 Cisco Technology, Inc. Weighted equal cost multipath routing
CN104580002B (en) * 2015-01-14 2017-07-28 盛科网络(苏州)有限公司 The big balanced retransmission method of current load and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904825A (en) * 2012-09-27 2013-01-30 杭州华三通信技术有限公司 Hash based message transmission method and device
US20150127797A1 (en) * 2013-11-05 2015-05-07 Cisco Technology, Inc. System and method for multi-path load balancing in network fabrics
US20150124611A1 (en) * 2013-11-05 2015-05-07 Insieme Networks, Inc. Dynamic flowlet prioritization
CN104168201A (en) * 2014-08-06 2014-11-26 福建星网锐捷网络有限公司 Multipath forwarding method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHAN SINHA ET AL.: "Harnessing TCP's Burstiness with Flowlet Switching", ACM HOT TOPICS IN NETWORKS- (HOTNETS, 30 November 2004 (2004-11-30), pages 1 - 6, XP055509598 *
SRIKANTH KANDULA ET AL.: "Dynamic Load Balancing Without Packet Reordering", ACM SIGCOMM COMPUTER COMMUNICATION REVIEW, vol. 37, no. 2, 30 April 2007 (2007-04-30), pages 51 - 62, XP058355011 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040323A (en) * 2018-10-19 2018-12-18 盛科网络(苏州)有限公司 Load balancing apparatus
CN109040323B (en) * 2018-10-19 2021-03-16 盛科网络(苏州)有限公司 Load balancing device
CN111200558A (en) * 2018-11-19 2020-05-26 华为技术有限公司 Method and device for sharing flow load
CN111200558B (en) * 2018-11-19 2021-05-18 华为技术有限公司 Method and device for sharing flow load
CN112866115A (en) * 2020-12-31 2021-05-28 杭州迪普科技股份有限公司 Method, device, electronic equipment and storage medium for realizing transparent serial connection
WO2022184267A1 (en) * 2021-03-05 2022-09-09 Huawei Technologies Co., Ltd. System and method for transmitting a data packet
CN113542131A (en) * 2021-05-25 2021-10-22 新华三信息安全技术有限公司 Message forwarding method and device
CN113542131B (en) * 2021-05-25 2023-08-22 新华三信息安全技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN108270687A (en) 2018-07-10
CN108270687B (en) 2020-08-25

Similar Documents

Publication Publication Date Title
WO2018121535A1 (en) Load balance processing method and apparatus
WO2018210117A1 (en) Congestion control method, network device, and network interface controller thereof
US10237153B2 (en) Packet retransmission method and apparatus
WO2018086076A1 (en) Data transmission method and apparatus
WO2019029318A1 (en) Network congestion notification method, proxy node and computer device
US8953631B2 (en) Interruption, at least in part, of frame transmission
WO2021238025A1 (en) Network congestion control method and related product
WO2016033948A1 (en) Transmission window traffic control method and terminal
WO2020078448A1 (en) Message processing method and apparatus
CN109218222B (en) Method, device and system for realizing speed regulation of sending end
US10461886B2 (en) Transport layer identifying failure cause and mitigation for deterministic transport across multiple deterministic data links
WO2020156569A1 (en) Rlc status report sending method and device, and storage medium
US20230379244A1 (en) Ultra reliable segment routing
EP3490293B1 (en) Data receiving method, data sending method, receiving device and system
CN111224888A (en) Method for sending message and message forwarding equipment
WO2012083654A1 (en) Method and distributed system for processing internet protocol packet fragments
WO2022143468A1 (en) Data transmission method, apparatus and system, and storage medium
WO2016202224A1 (en) Method and device for adjusting transport layer parameter
EP3297210B1 (en) Method and apparatus for setting packet transmission mode
WO2021101640A1 (en) Method and apparatus of packet wash for in-time packet delivery
US10897725B2 (en) System and method for managing data transfer between two different data stream protocols
JP2006279188A (en) Transmission controller conducting priority control, communication controller, communication system, communication network and transmission method
CN108337171B (en) IP packet forwarding method compatible with DTN, network node and storage medium
WO2018133784A1 (en) Packet processing method, device and system
WO2012146139A1 (en) Message filtering method and access device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17885902

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17885902

Country of ref document: EP

Kind code of ref document: A1