WO2018036173A1 - Network load balancing method, device and system - Google Patents

Network load balancing method, device and system Download PDF

Info

Publication number
WO2018036173A1
WO2018036173A1 PCT/CN2017/080586 CN2017080586W WO2018036173A1 WO 2018036173 A1 WO2018036173 A1 WO 2018036173A1 CN 2017080586 W CN2017080586 W CN 2017080586W WO 2018036173 A1 WO2018036173 A1 WO 2018036173A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
stream
sub
load balancing
terminal device
Prior art date
Application number
PCT/CN2017/080586
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 WO2018036173A1 publication Critical patent/WO2018036173A1/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/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • 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/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2483Traffic characterised by specific attributes, e.g. priority or QoS involving identification of individual flows

Definitions

  • the present invention relates to the field of network communication technologies, and in particular, to a network load balancing method, device, and system.
  • ECMP Equal Cost Multi-Path
  • a concept of flowcell is proposed. The meaning is that when the data flow is sent by the sender of the Transmission Control Protocol (TCP), the data stream is divided into multiple points according to a certain amount of data. Segment, each segment has a unique number, recorded as the flow segment ID Flowcell ID.
  • TCP Transmission Control Protocol
  • the advantage of the stream segmentation method is that there is a clear upper limit on the amount of data for each segment, so load balancing based on stream segmentation can achieve good balance. For example, if the stream segment is divided in units of 64 Kbytes, the load balancing accuracy error of a single data stream does not exceed 64 Kbytes.
  • the probability of generating significant cumulative errors eg, reaching 1% of the gigabit link bandwidth, ie 10 Mbps
  • ECMP is the most common method of load balancing in units of flow.
  • the principle of this method is to use a quintuple (source IP address, destination IP address, source port number, destination port number, protocol number) for hash calculation, mapping each stream to one of multiple available links.
  • quintuple source IP address, destination IP address, source port number, destination port number, protocol number
  • flow-based load balancing has the problem of uneven load sharing. Some paths in the network may not be effectively utilized.
  • the invention is based on the concept of Flowcell, and proposes a network load balancing method, device and system.
  • a network load balancing method includes: the terminal device provides P logical channels, the P is a network maximum load balancing path number P, and P is an integer greater than or equal to 2;
  • the transmitted data stream is divided into units of stream segments to generate a plurality of sub-data streams;
  • the terminal device maps the plurality of sub-data streams to the P logical channels and sends the data to the network device.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • stream segmentation is that when a data stream is sent by a transmission control protocol (TCP) sender, the data stream is divided into a plurality of segments according to a certain amount of data, and each segment has The unique number is recorded as the flow segment ID Flowcell ID.
  • TCP transmission control protocol
  • the method further includes when the length of the Xth sub data stream and the next data stream is accumulated exceeding a maximum value of the stream segment, and the next data stream is taken as the X+1th
  • X is a non-negative integer.
  • the sub-data stream further includes: a stream segment identifier; and, according to the stream segment identifier, retrieve the P, and acquire a logical channel corresponding to the stream segment identifier;
  • the sub-data streams identified by the segments are respectively mapped to the corresponding logical channels.
  • the sub-data stream is mapped to the plurality of logical channels according to the flow segment identifier, and the load balancing is more balanced in the network.
  • the maximum load balancing path number P is determined by reading a memory of the terminal device.
  • the maximum load balancing path number P of the terminal device is set through a console or a command line.
  • the embodiment of the present invention further provides a network load balancing method, including: receiving a plurality of sub-data streams from an upstream node, and fetching the P according to the quintuple of the sub-data stream and the stream segment identifier
  • the hash operation is performed, and the mapping is performed to multiple physical links and sent to the next hop node, where P is the maximum load balancing path number of the network, and P is an integer greater than or equal to 2.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • the P value is obtained by reading the memory.
  • the P value is obtained through a command line or a network management device.
  • the embodiment of the present invention further provides a terminal device, including a processor, configured to provide P logical channels, where P is a network maximum load balancing path number P, and P is an integer greater than or equal to 2;
  • P is a network maximum load balancing path number P, and P is an integer greater than or equal to 2;
  • the data stream is divided into units of stream segments to generate a plurality of sub-data streams; and the transceiver maps the plurality of sub-data streams to the P logical channels for transmission to the network device.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • the sub-data stream further includes: a stream segment identifier; the processor is further configured to: take a P share according to the stream segment identifier, and obtain a corresponding to the stream segment identifier a logical channel; respectively mapping the sub-data streams identified by the stream segment to the corresponding logical channel.
  • the sub-data stream is mapped to the plurality of logical channels according to the flow segment identifier, and the load balancing is more balanced in the network.
  • the processor is configured to read a storage unit of the terminal device to determine the maximum load balancing path number P.
  • the transceiver is further configured to send a first message to the network device, to request the network device to feed back a P value.
  • the embodiment of the present invention further provides a network device, including a processor, that receives multiple sub-data streams from an upstream node, where each sub-data stream carries a stream segment identifier, and a transceiver is configured to use the sub- The quintuple of the data stream and the stream segment identifier hash the P remainder and map to multiple physical links Send to the next hop node, where P is the number of network maximum load balancing paths, and P is an integer greater than or equal to 2.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • the P value is obtained by reading the memory.
  • the P value is obtained through a command line or a network management device.
  • a fifth aspect a communication system comprising the terminal device according to the third aspect and the network device according to the fourth aspect.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • FIG. 1A is a schematic structural diagram of a communication network according to an embodiment of the present invention.
  • FIG. 1B is a schematic structural diagram of another communication network according to an embodiment of the present invention.
  • 2A is a schematic diagram of data of different granularities according to an embodiment of the present invention.
  • FIG. 2B is a schematic structural diagram of a novel TCP packet according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for network load balancing according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of mapping a sub-data stream to a logical channel according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a method for network load balancing according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of mapping multiple sub-data streams to multiple physical channels according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of mapping multiple sub-data streams to multiple physical channels according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • the terminal device of the present invention can communicate with one or more network devices via a network, and the user device can refer to a user terminal, a computer, a server, a telephone, a computer, a handheld device, a printer, a palmtop computer, a fax machine, Multi-function devices, projectors, plotters and other equipment.
  • the network device of the present invention may be a network side device for communicating with the terminal device, for example, may be a router, a switch, a bridge, a hub, a modem, or other device having a function of forwarding a message.
  • FIG. 1A is a schematic structural diagram of a communication network 100 according to an embodiment of the present invention.
  • the terminal device 110 is connected to the terminal device 140 through the network devices 120, 130.
  • FIG. 1B is a schematic structural diagram of another communication network 100 according to an embodiment of the present invention.
  • the terminal device 110 is connected to the terminal device 140 through the network devices 120, 130, 132.
  • FIG. 1A and FIG. 1B are merely examples, and the actual networking architecture may be much more complicated. There may be multiple network nodes from the network device 120 to the terminal device 140, and FIG. 1A and FIG. 130 and/or 132 are examples.
  • the source node device 110 wants to send a data stream to the destination node 140, and the network device 120 and 130, 132, wherein there are three physical paths in the network device 120 to the destination node 140, and an embodiment of the present invention provides a network load balancing method.
  • the data stream can be equalized and transmitted on the above three physical paths.
  • FIG. 2A shows a schematic diagram of data of different granularities.
  • Figure 2A shows an example of the flow segmentation from the TCP data stream to the stream segmentation and then to the packet.
  • the TCP data stream is divided into multiple stream segments according to a fixed upper length limit. If the length of a TCP data stream and the previous data stream exceeds the upper limit, the data stream is divided into the next stream segment.
  • the stream segmentation identifier is assigned to the stream segment while segmenting the stream segment.
  • the stream segment is further divided into packets, and the stream segment identifier is encapsulated into a packet header of each packet. In this way, the plurality of TCP data streams that are divided into the same stream segment carry the same stream segment identifier in the packets transmitted on the network link.
  • a new type of TCP packet including:
  • Source port and destination port each occupying 2 bytes, which is the service interface between the transport layer and the application layer.
  • Serial number 4 bytes. Each byte in the data stream transmitted by the TCP connection is numbered. The value of the sequence number field in the header refers to the sequence number of the first byte of the data sent in this segment.
  • Confirmation number 4 bytes, which is the sequence number of the first byte of data expected to receive the next segment of the other party.
  • Data Offset 4 bits, which indicates how far the data at the beginning of the segment is from the beginning of the TCP segment. In fact, it is the length of the header of the TCP segment.
  • the Flowcell ID in the embodiment of the present invention may be extended in the reserved field, or the flow segment identifier may be carried by defining a field named Flowcell ID.
  • Acknowledge bit ACK When the ACK value is 1, the acknowledgment number field is valid. When the ACK value is 0, the acknowledgment number field is invalid.
  • Push Bit PUSH When a receiver receives a segment with a PUSH value of 1, it will deliver it to the receiving application process as soon as possible, and will not wait until the entire receive buffer is full before delivering it.
  • Reset bit RST When the RST value is 1, it indicates that there is a serious error in the TCP connection and the connection must be released.
  • the reset bit is also used to reject an illegal segment or refuse to open a connection.
  • Synchronization bit SYN used to synchronize the sequence number when the connection is established.
  • the value of SYN is 1, the value of ACK is When 0, it indicates that this is a connection request segment. If the other party agrees to establish a connection, the SYN shall be 1 and the ACK shall be 1 in the response segment. Therefore, a value of 1 for SYN indicates that this is a connection request or a connection reception message.
  • Termination bit FIN When the FIN value is 1, it indicates that the data of the sender of this segment has been sent and requires the release of the transport connection.
  • Window 2 bytes, used to control the amount of data sent by the other party.
  • the unit is byte, indicating the upper limit of the sending window of the other party.
  • Checksum 2 bytes. The range of the check includes the header and the data. When calculating the checksum, you need to add a 12-byte pseudo header to the segment.
  • Urgent pointer 2 bytes, indicating the sequence number of the last byte in the urgent data in this segment. Only valid when the emergency bit URG has a value of 1.
  • TCP only specifies one option, the Maximum Segment Size (MSS).
  • MSS Maximum Segment Size
  • inventive embodiments are applicable to data communication networks having multiple physical links, such as, but not limited to, wide area networks, enterprise networks, data center networks, and the like. Please refer to the following examples for specific solutions:
  • the first embodiment of the present invention provides a method 300 for network load balancing, including:
  • Step 310 The terminal device provides P logical channels, where P is the maximum load balancing path number P of the network, and P is an integer greater than or equal to 2;
  • Step 320 The terminal device divides the data stream to be sent into units of stream segments, and generates multiple sub-data streams.
  • Step 330 The terminal device maps the multiple sub-data streams to the P logical channels and sends the data to the network device.
  • the network maximum load balancing path number P refers to the maximum number of paths from one node to another in the entire network.
  • the terminal device obtains the maximum load balancing path number P value of the network, and has multiple implementation modes:
  • the first implementation manner is: setting the network maximum load balancing path number P as a part of the network protocol, and the terminal device and the network device in the network all follow the P value specified by the network protocol, that is, the device has already been P before leaving the factory.
  • the value is written to the device's memory and is not changed subsequently.
  • the protocol specifies that P is 6, and the P value of the terminal device and the network device defaults to 6.
  • step 310 can be understood as determining the P value by reading the memory of the terminal device or the network device.
  • the second implementation manner is: the network administrator sets the P value of the network device through the console or the command line, and then the terminal device acquires the P value from the network device by using signaling or a message.
  • the specific implementation steps are:
  • Step A The terminal device sends a first message to the network device, where the first message is used to request the network device to feed back the maximum load balancing path number P of the network;
  • Step B The network device sends a second message to the terminal device, where the second message carries the P value.
  • the P value of the network device is set by the network administrator through a console or a command line. This P value can be changed later.
  • the format of the first message and the second message may refer to the prior art TCP.
  • the frame format of the protocol is not described here.
  • the P value can be carried by extending the reserved field of the existing TCP protocol.
  • the method also includes each of the sub-data streams carrying a stream segment identifier.
  • the meaning of the flow segment identifier is that when the data flow is sent by the sender of the Transmission Control Protocol (TCP), the data stream is divided into multiple segments according to a certain amount of data, and each segment has a unique number. , recorded as the stream segment ID Flowcell ID.
  • the logical channel in step 320 can represent a sub-connection, each logical channel is similar to a TCP connection, with independent transmission windows and control parameters.
  • the terminal device sends the packets of each logical channel in parallel, and each logical channel uses a TCP transmission window to control the transmission rate.
  • the terminal device can perform accurate path congestion state measurement for each logical channel and perform corresponding flow control. for example:
  • Step a logical channel #1 sends the message that the current sending window allows to send
  • Step b waiting for the receiving end (network device) to feed back the acknowledgement message of the logical channel #1;
  • the receiving end finds that the data sequence number of the packet received in the same flow segment is not continuous, it indicates that packet loss occurs.
  • Step c The receiving end feeds back the acknowledgement packet, and requests to retransmit the lost packet.
  • Step d When the transmitting end receives the request to retransmit the lost packet, in addition to retransmitting the lost packet, the logical channel is considered to be congested;
  • Step e The sending end halved the size of the sending window, that is, reduces the rate at which the message is sent.
  • each logical channel Since each logical channel has its own independent window, the logical channel #1 is congested. It only needs to reduce the packet sending rate of the logical channel #1. The other logical channels are not affected, and the packets are sent normally.
  • step 330 “the segmentation of each segment is mapped to the P logical channels”, which specifically includes:
  • the stream segment identification value is used to allocate P to obtain which logical channel each stream segment corresponds to.
  • P takes a value of 3, and the data stream to be transmitted is divided into 5 Flowcells in units of 64 Kbytes (ie, the size of each stream segment is 64 kbytes). Recorded as Flowcell ID#0 ⁇ Flowcell ID#4, respectively.
  • Flowcell ID#0 corresponds to logical channel
  • Flowcell ID#1 corresponds to logical channel 1
  • Flowcell ID#4 corresponds to logical channel 1.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • a second embodiment of the present invention provides a method 500 for network load balancing, including:
  • Step 510 The network device receives multiple sub-data streams from the upstream node, where each sub-data stream carries a stream segment identifier.
  • Step 520 Perform a hash operation on the P remainder according to the quintuple of the sub-data stream and the stream segment identifier, and map to multiple physical links to send to the next hop node, where P is the maximum load of the network.
  • P is the maximum load of the network.
  • the number of equalized paths, P is an integer greater than or equal to 2.
  • the next hop node may be an intermediate node (network device) or a destination node, and is a terminal device that the plurality of sub-data streams finally arrive at.
  • the network device identifies that the packet belonging to one logical channel passes the six-tuple information, and the so-called six-tuple includes the traditional five-tuple and the stream segment identifier, and the six-member group includes: the source IP, Source port, destination IP, destination port, protocol number, and stream segment identifier %P, where % represents the remainder operation.
  • the same message of the six-tuple comes from a logical channel.
  • the network device When receiving a packet, the network device firstly searches the routing table according to the destination IP address of the packet, and the obtained route includes M next hops, that is, M links of adjacent downstream physical links. M is greater than or equal to 1.
  • the value of the logical channel P is 3, that is, the packets received on the three logical channels are sent through three physical links, where the packets on the first logical channel are sent through the first physical link, and the second logical channel is sent.
  • the packet is sent through the second physical link; the packet on the third logical channel is sent through the third physical link. That is, in this implementation manner, the number of the physical link corresponds to the number of the logical channel.
  • the logical channel P takes a value of 3
  • the physical path physical link takes a value of 2, that is, the received packet on the three logical channels passes through two physical entities.
  • the path physical link is sent, where the packet on the first logical path is sent through the physical link of the first physical path; the packet on the second logical channel and the third logical channel is sent through the physical link of the second physical path. If the next hop node of the physical link of the second physical path has two physical path physical links, the packet sent by the physical link of the second physical path can be divided by the secondary.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • another embodiment of the present invention provides a terminal device 800, where the terminal device 800 includes a processor 810 and a transceiver 820, where:
  • the processor 810 is configured to provide P logical channels, where P is the maximum load balancing path number of the network, P is an integer greater than or equal to 2, and the data stream to be sent is segmented by using a stream segment as a unit to generate multiple sub-data. flow;
  • the transceiver 820 is configured to map the multiple sub-data streams to the P logical channels and send the data to the network device.
  • Each sub-data stream carries a stream segment identifier.
  • the number of network maximum load balancing paths P is obtained, and there are multiple implementation manners:
  • the first implementation manner is: setting the network maximum load balancing path number P as a part of the network protocol, and the terminal device and the network device in the network all follow the P value specified by the network protocol, that is, the device has already been P before leaving the factory. The value is written to the device's memory and is not changed subsequently.
  • the processing unit 810 reads the terminal setting The standby storage unit determines the maximum load balancing path number P.
  • the second implementation manner is: the network administrator sets the P value of the network device through the console or the command line, and then the terminal device acquires the P value from the network device by using signaling or a message.
  • the specific implementation is:
  • the transceiver 820 is configured to send a first message to the network device, to request the network device to feed back a maximum network load balancing path number P value;
  • the transceiver 820 is further configured to receive a second message from the network device that carries the P value.
  • the format of the first message and the second message may refer to the frame format of the TCP protocol of the prior art, and details are not described herein again.
  • the P value can be carried by extending the reserved field of the existing TCP protocol.
  • the processor is further configured to select P logical channels according to the flow segment identifier of the plurality of sub-data streams, and the P logical channel is selected.
  • P logical channels according to the flow segment identifier of the plurality of sub-data streams
  • the third embodiment of the present invention is an apparatus embodiment corresponding to the first embodiment of the method, and the description of the first embodiment of the method should also be applied to the third embodiment of the present invention.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • an embodiment of the present invention provides a network device 900, including:
  • the transceiver 920 receives a plurality of sub-data streams from an upstream node, wherein each sub-data stream carries a stream segment identifier.
  • the processor 910 is configured to perform a hash operation on the P-capacity according to the quintuple of the sub-data stream and the stream segment identifier, and map the data to multiple physical links to send to the next hop node, where P is The maximum number of load balancing paths on the network. P is an integer greater than or equal to 2.
  • the fourth embodiment of the present invention is an apparatus embodiment corresponding to the second embodiment of the method, and the description of the second embodiment of the method should also be applied to the fourth embodiment of the present invention.
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
  • FIG. 10 is a schematic block diagram of a network device according to another embodiment of the present invention.
  • the network device 1000 includes a processor 1010, a memory 1020, a bus 1030 and a user interface 1040, and a network interface 1050.
  • processor 1010 controls the operation of network device 1000, which may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array, or other programmable logic device.
  • a user interface 1060 configured to connect to a lower layer terminal device
  • the network interface 1050 is configured to connect to an upper layer network device.
  • bus 1050 which in addition to the data bus includes a power bus, a control bus, and a status signal bus.
  • various buses are labeled as bus system 1050 in the figure. It should be noted that the foregoing description of the structure of the network element can be applied to the embodiment of the present invention.
  • the memory 1020 may include a Read Only Memory (ROM) and a Random Access Memory (RAM), or other types of dynamic storage devices that may store information and instructions, or may be a disk storage.
  • the memory 1020 can be used to store instructions that implement the related methods provided by embodiments of the present invention. It will be appreciated that at least one of the cache and long term storage is programmed or loaded by the processor 1010 of the network element 1000 by programming or loading.
  • the memory is for storing computer executable program code, wherein when the program code includes an instruction, when the processor executes the instruction, the instruction causes the network Meta performs the following operations:
  • P is the maximum load balancing path number P of the network, and P is an integer greater than or equal to 2;
  • the data stream to be sent is divided into units of stream segments to generate a plurality of sub-data streams
  • the instruction causes the network element to perform the following operations:
  • each sub-data stream carries a stream segment identifier
  • the present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize load balancing.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

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

Abstract

Provided is a network load balancing method, comprising: a terminal device providing P logic channels, wherein P is the maximum number P of paths for network load balancing, and P is an integer greater than or equal to 2; the terminal device splitting a data flow to be sent by taking a flow segment as a unit, and generating a plurality of data sub-flows; and the terminal device mapping the plurality of data sub-flows to the P logic channels, and sending same to a network device. According to the present invention, by means of splitting a data flow to be sent by taking a flow segment as a unit and mapping same to a plurality of logic channels, the technical solution involving a fine granularity and more balanced load sharing can be realized in a network, the network utilization rate is effectively improved, the load balancing effect is optimized, and a network device is prevented from recording the state and path information about a single data flow at the same time.

Description

一种网络负载均衡方法、设备及系统Network load balancing method, device and system 技术领域Technical field
本发明涉及网络通信技术领域,尤其涉及一种网络负载均衡方法、设备及系统。The present invention relates to the field of network communication technologies, and in particular, to a network load balancing method, device, and system.
背景技术Background technique
在数据通讯网络中,通常存在多条不同链路可以到达同一目的地址。如果使用传统的路由技术,发往该目的地址的报文只能利用其中的一条链路,不能有效利用网络资源。采用负载均衡技术,按一定的规则将流量分担到多条链路上,可以提升链路利用率,还可以备份失效链路的数据传输。当前现有技术中,比较常见的负载均衡技术是等价多路径(Equal Cost Multi-Path,ECMP)技术,来实现多路径负载均衡和链路备份的目的。In a data communication network, there are usually multiple different links that can reach the same destination address. If the traditional routing technology is used, packets destined for the destination address can only use one of the links and cannot effectively utilize network resources. The load balancing technology is adopted to distribute traffic to multiple links according to certain rules, which can improve link utilization and back up data transmission of the failed link. In the current prior art, the more common load balancing technology is Equal Cost Multi-Path (ECMP) technology to achieve multi-path load balancing and link backup.
采用负载均衡技术,需要将前往同一目的地址的报文调度到多个路径。调度的单位目前有多种选择。当前提出一种采用流分段(Flowcell)的概念,含义是在传输控制协议(Transport Control Protocol,TCP)发送端发出数据流时,按照一定的数据量为单位将数据流切分为多个分段,每个分段具有唯一编号,记为流分段标识Flowcell ID。流分段方法的优点是每个分段的数据量有明确的上限,那么基于流分段的负载均衡调度可以取得很好的均衡性。例如以64K字节为单位划分流分段,则单个数据流的负载均衡流量精度误差不超过64K字节。大量数据流同时进行负载均衡时,产生显著的累积误差(例如达到千兆链路带宽的1%,即10Mbps)的概率极其微小。With load balancing technology, packets destined for the same destination address need to be scheduled to multiple paths. The scheduling unit currently has multiple options. A concept of flowcell is proposed. The meaning is that when the data flow is sent by the sender of the Transmission Control Protocol (TCP), the data stream is divided into multiple points according to a certain amount of data. Segment, each segment has a unique number, recorded as the flow segment ID Flowcell ID. The advantage of the stream segmentation method is that there is a clear upper limit on the amount of data for each segment, so load balancing based on stream segmentation can achieve good balance. For example, if the stream segment is divided in units of 64 Kbytes, the load balancing accuracy error of a single data stream does not exceed 64 Kbytes. When a large number of data streams are simultaneously load balanced, the probability of generating significant cumulative errors (eg, reaching 1% of the gigabit link bandwidth, ie 10 Mbps) is extremely small.
现有技术中,以流(Flow)为单位进行ECMP是最常见的负载均衡的方法。这种方法的原理是采用五元组(源IP地址、目的IP地址、源端口号、目的端口号、协议号)进行散列计算,把每个流映射到多个可用链路上的一个。但是基于流的负载均衡,存在负载分担不均匀的问题,网络中可能有一部分路径未能得到有效利用。In the prior art, ECMP is the most common method of load balancing in units of flow. The principle of this method is to use a quintuple (source IP address, destination IP address, source port number, destination port number, protocol number) for hash calculation, mapping each stream to one of multiple available links. However, flow-based load balancing has the problem of uneven load sharing. Some paths in the network may not be effectively utilized.
发明内容Summary of the invention
有鉴于此,实有必要提供一种网络负载均衡的方法、设备及系统,用于提升链路利用率。本发明是基于Flowcell概念,提出一种网络负载均衡方法、设备及系统。In view of this, it is necessary to provide a method, device and system for network load balancing to improve link utilization. The invention is based on the concept of Flowcell, and proposes a network load balancing method, device and system.
第一方面,一种网络负载均衡的方法,包括:所述终端设备提供P条逻辑通道,所述P为网络最大负载均衡路径数P,P为大于等于2的整数;所述终端设备将待发送的数据流以流分段为单位进行分割,生成多个子数据流;所述终端设备将所述多个子数据流映射到所述P个逻辑通道,发送至所述网络设备。本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。In a first aspect, a network load balancing method includes: the terminal device provides P logical channels, the P is a network maximum load balancing path number P, and P is an integer greater than or equal to 2; The transmitted data stream is divided into units of stream segments to generate a plurality of sub-data streams; the terminal device maps the plurality of sub-data streams to the P logical channels and sends the data to the network device. The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
应理解,流分段的含义是在传输控制协议(Transport Control Protocol,TCP)发送端发出数据流时,按照一定的数据量为单位将数据流切分为多个分段,每个分段具有唯一编号,记为流分段标识Flowcell ID。对流分段的说明,适用于本发明所有实施例,后续不再赘述。 It should be understood that the meaning of stream segmentation is that when a data stream is sent by a transmission control protocol (TCP) sender, the data stream is divided into a plurality of segments according to a certain amount of data, and each segment has The unique number is recorded as the flow segment ID Flowcell ID. The description of the convection segment is applicable to all embodiments of the present invention, and will not be described again.
在一种可能的设计中,所述方法还包括当第X个子数据流与下一个数据流累加的长度超过所述流分段的最大值,将所述下一个数据流作为第X+1个待发送的数据流,X为非负整数。In a possible design, the method further includes when the length of the Xth sub data stream and the next data stream is accumulated exceeding a maximum value of the stream segment, and the next data stream is taken as the X+1th The data stream to be sent, X is a non-negative integer.
在一种可能的设计中,所述子数据流还包括:流分段标识;根据所述流分段标识,对P取余,获取与流分段标识对应的逻辑通道;将所述流分段标识的子数据流分别映射到所述对应的逻辑通道。本发明实施例将子数据流根据流分段标识对P取余映射到多个逻辑通道上,可以在网络中实现负载分担更均衡的技术方案。In a possible design, the sub-data stream further includes: a stream segment identifier; and, according to the stream segment identifier, retrieve the P, and acquire a logical channel corresponding to the stream segment identifier; The sub-data streams identified by the segments are respectively mapped to the corresponding logical channels. In the embodiment of the present invention, the sub-data stream is mapped to the plurality of logical channels according to the flow segment identifier, and the load balancing is more balanced in the network.
在一种可能的设计中,通过读取所述终端设备的存储器确定所述最大负载均衡路径数P。In a possible design, the maximum load balancing path number P is determined by reading a memory of the terminal device.
在一种可能的设计中,通过控制台或者命令行设置所述终端设备的最大负载均衡路径数P。In one possible design, the maximum load balancing path number P of the terminal device is set through a console or a command line.
第二方面,本发明实施例还提供一种网络负载均衡的方法,包括:接收来自上游节点的多个子数据流,根据所述子数据流的五元组和所述流分段标识对P取余进行散列运算,映射到多个物理链路发送至下一跳节点,其中,P为网络最大负载均衡路径数,P为大于等于2的整数。本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。In a second aspect, the embodiment of the present invention further provides a network load balancing method, including: receiving a plurality of sub-data streams from an upstream node, and fetching the P according to the quintuple of the sub-data stream and the stream segment identifier The hash operation is performed, and the mapping is performed to multiple physical links and sent to the next hop node, where P is the maximum load balancing path number of the network, and P is an integer greater than or equal to 2. The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
在一种可能的设计中,所述P值是通过读取存储器获取。In one possible design, the P value is obtained by reading the memory.
在一种可能的设计中,所述P值是通过命令行或者网管设备来获取。In one possible design, the P value is obtained through a command line or a network management device.
第三方面,本发明实施例还提供一种终端设备,包括处理器,用于提供P个逻辑通道,所述P为网络最大负载均衡路径数P,P为大于等于2的整数;将待发送的数据流以流分段为单位进行分割,生成多个子数据流;收发器,将所述多个子数据流映射到所述P个逻辑通道,发送至网络设备。本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。In a third aspect, the embodiment of the present invention further provides a terminal device, including a processor, configured to provide P logical channels, where P is a network maximum load balancing path number P, and P is an integer greater than or equal to 2; The data stream is divided into units of stream segments to generate a plurality of sub-data streams; and the transceiver maps the plurality of sub-data streams to the P logical channels for transmission to the network device. The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
在一种可能的设计中,所述子数据流还包括:流分段标识;所述处理器,还用于根据所述流分段标识,对P取余,获取与流分段标识对应的逻辑通道;将所述流分段标识的子数据流分别映射到所述对应的逻辑通道。本发明实施例将子数据流根据流分段标识对P取余映射到多个逻辑通道上,可以在网络中实现负载分担更均衡的技术方案。In a possible design, the sub-data stream further includes: a stream segment identifier; the processor is further configured to: take a P share according to the stream segment identifier, and obtain a corresponding to the stream segment identifier a logical channel; respectively mapping the sub-data streams identified by the stream segment to the corresponding logical channel. In the embodiment of the present invention, the sub-data stream is mapped to the plurality of logical channels according to the flow segment identifier, and the load balancing is more balanced in the network.
在一种可能的设计中,所述处理器用于读取所述终端设备的存储单元确定所述最大负载均衡路径数P。In a possible design, the processor is configured to read a storage unit of the terminal device to determine the maximum load balancing path number P.
在一种可能的设计中,所述收发器还用于发送第一消息至所述网络设备,用于请求所述网络设备反馈P值。In a possible design, the transceiver is further configured to send a first message to the network device, to request the network device to feed back a P value.
第四方面,本发明实施例还提供一种网络设备,包括处理器,接收来自上游节点的多个子数据流,其中,每个子数据流携带流分段标识;收发器,用于根据所述子数据流的五元组和所述流分段标识对P取余进行散列运算,映射到多个物理链路 发送至下一跳节点,其中,P为网络最大负载均衡路径数,P为大于等于2的整数。本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。In a fourth aspect, the embodiment of the present invention further provides a network device, including a processor, that receives multiple sub-data streams from an upstream node, where each sub-data stream carries a stream segment identifier, and a transceiver is configured to use the sub- The quintuple of the data stream and the stream segment identifier hash the P remainder and map to multiple physical links Send to the next hop node, where P is the number of network maximum load balancing paths, and P is an integer greater than or equal to 2. The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
在一种可能的设计中,所述P值是通过读取存储器获取。In one possible design, the P value is obtained by reading the memory.
在一种可能的设计中,所述P值是通过命令行或者网管设备来获取。In one possible design, the P value is obtained through a command line or a network management device.
第五方面,一种通信系统,包括如第三方面所述的终端设备和如第四方面所述的网络设备。A fifth aspect, a communication system comprising the terminal device according to the third aspect and the network device according to the fourth aspect.
本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
附图说明DRAWINGS
图1A是本发明实施例提供的一种通信网络的示意性架构图;1A is a schematic structural diagram of a communication network according to an embodiment of the present invention;
图1B是本发明实施例提供的另一种通信网络的示意性架构图;FIG. 1B is a schematic structural diagram of another communication network according to an embodiment of the present invention; FIG.
图2A是本发明实施例提供的不同粒度的数据的示意性图;2A is a schematic diagram of data of different granularities according to an embodiment of the present invention;
图2B是本发明实施例提供的一种新型TCP报文的结构性示意图;2B is a schematic structural diagram of a novel TCP packet according to an embodiment of the present invention;
图3是本发明实施例提供的一种网络负载均衡的方法流程示意图;3 is a schematic flowchart of a method for network load balancing according to an embodiment of the present invention;
图4是本发明实施例提供的一种子数据流映射到逻辑通道的示意图;4 is a schematic diagram of mapping a sub-data stream to a logical channel according to an embodiment of the present invention;
图5是本发明实施例提供的一种网络负载均衡的方法流程示意图;FIG. 5 is a schematic flowchart of a method for network load balancing according to an embodiment of the present disclosure;
图6是本发明实施例提供的一种将多个子数据流映射到多条物理通道的示意图;FIG. 6 is a schematic diagram of mapping multiple sub-data streams to multiple physical channels according to an embodiment of the present invention; FIG.
图7是本发明实施例提供的一种将多个子数据流映射到多条物理通道的示意图;FIG. 7 is a schematic diagram of mapping multiple sub-data streams to multiple physical channels according to an embodiment of the present invention; FIG.
图8是本发明实施例提供的一种网络设备的结构示意图;FIG. 8 is a schematic structural diagram of a network device according to an embodiment of the present disclosure;
图9是本发明实施例提供的一种网络设备的结构示意图;FIG. 9 is a schematic structural diagram of a network device according to an embodiment of the present invention;
图10是本发明实施例提供的一种网络设备的结构示意图。FIG. 10 is a schematic structural diagram of a network device according to an embodiment of the present invention.
具体实施方式detailed description
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域的技术人员所获得的所有其他实施例,都属于本发明保护的范围。In order to make the object, the features and the advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本发明的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second" and the like in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a particular order or order. It is to be understood that the terms so used are interchangeable as appropriate, and are merely illustrative of the manner in which the objects of the same. In addition, the terms "comprises" and "comprises" and "comprises", and any variations thereof, are intended to cover a non-exclusive inclusion so that a process, method, system, product, or device comprising a series of units is not necessarily limited to those elements, but may include Other units listed or inherent to these processes, methods, products or equipment.
本发明终端设备可以经网络与一个或多个网络设备进行通信,用户设备可以指用户终端、计算机、服务器、电话、电脑、手持设备、打印机、掌上电脑、传真机、 多功能设备、投影仪、绘图仪等设备。The terminal device of the present invention can communicate with one or more network devices via a network, and the user device can refer to a user terminal, a computer, a server, a telephone, a computer, a handheld device, a printer, a palmtop computer, a fax machine, Multi-function devices, projectors, plotters and other equipment.
本发明网络设备可以是用于与终端设备进行通信的网络侧设备,例如,可以是路由器、交换机、网桥、集线器、调制解调器、或者其他具有转发报文功能的设备。The network device of the present invention may be a network side device for communicating with the terminal device, for example, may be a router, a switch, a bridge, a hub, a modem, or other device having a function of forwarding a message.
示例性地,图1A为本发明实施例提供的一种通信网络100的示意性架构图。终端设备110通过网络设备120、130连接到终端设备140上。示例性地,图1B是本发明实施例提供的另一种通信网络100的示意性架构图。终端设备110通过网络设备120、130、132连接到终端设备140上。应理解,图1A和图1B仅为示例,实际中的组网架构可能复杂得多,从网络设备120至终端设备140之间可能存在多个网络节点,图1A和图1B仅仅以存在网络设备130和/或132为例。假设源节点设备110欲发送数据流至目的节点140,途径网络设备120以及130、132,其中,网络设备120至目的节点140中存在三条物理路径,本发明的实施例提供一种网络负载均衡方法使得数据流可以均衡在上述三条物理路径上传输。Illustratively, FIG. 1A is a schematic structural diagram of a communication network 100 according to an embodiment of the present invention. The terminal device 110 is connected to the terminal device 140 through the network devices 120, 130. Illustratively, FIG. 1B is a schematic structural diagram of another communication network 100 according to an embodiment of the present invention. The terminal device 110 is connected to the terminal device 140 through the network devices 120, 130, 132. It should be understood that FIG. 1A and FIG. 1B are merely examples, and the actual networking architecture may be much more complicated. There may be multiple network nodes from the network device 120 to the terminal device 140, and FIG. 1A and FIG. 130 and/or 132 are examples. It is assumed that the source node device 110 wants to send a data stream to the destination node 140, and the network device 120 and 130, 132, wherein there are three physical paths in the network device 120 to the destination node 140, and an embodiment of the present invention provides a network load balancing method. The data stream can be equalized and transmitted on the above three physical paths.
需要说明的是,如图2A所示,图2A示出了不同粒度的数据的示意性图。图2A以流分段上限为64KB为例,说明了从TCP数据流到流分段、再到报文的划分示意图。一般地,将TCP数据流按固定的长度上限划分为多个流分段,如果某个TCP数据流与前面的数据流所累加的长度超过了上限,则该数据流被划分到下一个流分段中。在划分流分段的同时,为流分段分配流分段标识。在流分段进一步切分为报文(packet)的环节,将流分段标识封装到每个报文的报文头(packet header)中。如此,划分到同一流分段中的多个TCP数据流,在网络链路上传输的报文中,携带相同的流分段标识。It should be noted that, as shown in FIG. 2A, FIG. 2A shows a schematic diagram of data of different granularities. Figure 2A shows an example of the flow segmentation from the TCP data stream to the stream segmentation and then to the packet. Generally, the TCP data stream is divided into multiple stream segments according to a fixed upper length limit. If the length of a TCP data stream and the previous data stream exceeds the upper limit, the data stream is divided into the next stream segment. In the paragraph. The stream segmentation identifier is assigned to the stream segment while segmenting the stream segment. The stream segment is further divided into packets, and the stream segment identifier is encapsulated into a packet header of each packet. In this way, the plurality of TCP data streams that are divided into the same stream segment carry the same stream segment identifier in the packets transmitted on the network link.
如图2B所示,提供一种新型TCP报文,包括:As shown in FIG. 2B, a new type of TCP packet is provided, including:
源端口和目的端口:各占2个字节,是运输层与应用层的服务接口。Source port and destination port: each occupying 2 bytes, which is the service interface between the transport layer and the application layer.
序号:占4个字节。TCP连接传输的数据流中的每一个字节都被编上一个序号。首部中序号字段的值指的是本报文段所发送的数据的第一个字节的序号。Serial number: 4 bytes. Each byte in the data stream transmitted by the TCP connection is numbered. The value of the sequence number field in the header refers to the sequence number of the first byte of the data sent in this segment.
确认号:占4个字节,是期望收到对方下一个报文段的数据的第一个字节的序号。Confirmation number: 4 bytes, which is the sequence number of the first byte of data expected to receive the next segment of the other party.
数据偏移:占4比特,它指出报文段的数据起始处距离TCP报文段的起始处有多远。实际上就是TCP报文段首部的长度。Data Offset: 4 bits, which indicates how far the data at the beginning of the segment is from the beginning of the TCP segment. In fact, it is the length of the header of the TCP segment.
保留字段,占6比特。本发明实施例中的Flowcell ID可以扩展在该保留字段中,也可以通过定义一个名为Flowcell ID的字段来承载流分段标识。Reserved field, 6 bits. The Flowcell ID in the embodiment of the present invention may be extended in the reserved field, or the flow segment identifier may be carried by defining a field named Flowcell ID.
紧急比特URG:当URG取值1时,表明紧急指针有效。它告诉系统报文段中有紧急数据,应尽快传送。Emergency bit URG: When the URG value is 1, it indicates that the emergency pointer is valid. It tells the system that there is urgent data in the segment and should be transmitted as soon as possible.
确认比特ACK:当ACK取值为1时,确认号字段才有效,当ACK取值为0时,确认号字段无效。Acknowledge bit ACK: When the ACK value is 1, the acknowledgment number field is valid. When the ACK value is 0, the acknowledgment number field is invalid.
推送比特PUSH:接收方接收到PUSH值为1的报文段时,会尽快的将其交付给接收应用进程,而不再等到整个接收缓存都填满后再向上交付。Push Bit PUSH: When a receiver receives a segment with a PUSH value of 1, it will deliver it to the receiving application process as soon as possible, and will not wait until the entire receive buffer is full before delivering it.
复位比特RST:当RST取值为1时,表明TCP连接中出现严重差错,必须释放连接。复位比特还用来拒绝一个非法的报文段或拒绝打开一个连接。Reset bit RST: When the RST value is 1, it indicates that there is a serious error in the TCP connection and the connection must be released. The reset bit is also used to reject an illegal segment or refuse to open a connection.
同步比特SYN:在连接建立时用来同步序号。当SYN取值为1时而ACK取值 为0时,表明这是一个连接请求报文段。对方若同意建立连接,应在响应的报文段中使SYN取值为1和ACK取值为1。因此,SYN取值为1就表示这是一个连接请求或连接接收报文。Synchronization bit SYN: used to synchronize the sequence number when the connection is established. When the value of SYN is 1, the value of ACK is When 0, it indicates that this is a connection request segment. If the other party agrees to establish a connection, the SYN shall be 1 and the ACK shall be 1 in the response segment. Therefore, a value of 1 for SYN indicates that this is a connection request or a connection reception message.
终止比特FIN:当FIN取值为1时,表明此报文段的发送端的数据已发送完毕,并要求释放运输连接。Termination bit FIN: When the FIN value is 1, it indicates that the data of the sender of this segment has been sent and requires the release of the transport connection.
窗口:占2个字节,用来控制对方发送的数据量,单位是字节,指明对方发送窗口的上限。Window: 2 bytes, used to control the amount of data sent by the other party. The unit is byte, indicating the upper limit of the sending window of the other party.
校验和:占2个字节,校验的范围包括首部和数据两个部分,计算校验和时需要在报文段前加上12字节的伪首部。Checksum: 2 bytes. The range of the check includes the header and the data. When calculating the checksum, you need to add a 12-byte pseudo header to the segment.
紧急指针:占2个字节,指出本报文段中紧急数据中最后一个字节的序号。只有当紧急比特URG取值为1时,才有效。Urgent pointer: 2 bytes, indicating the sequence number of the last byte in the urgent data in this segment. Only valid when the emergency bit URG has a value of 1.
选项:长度可变。TCP只规定了一种选项,即最大报文段长度(Maximum Segment Size,MSS)。Option: Variable length. TCP only specifies one option, the Maximum Segment Size (MSS).
以下发明实施例可应用于具有多条物理链路的数据通讯网络中,例如但不限于,广域网、企业网、数据中心网等。具体方案请参考以下实施例:The following inventive embodiments are applicable to data communication networks having multiple physical links, such as, but not limited to, wide area networks, enterprise networks, data center networks, and the like. Please refer to the following examples for specific solutions:
实施例一Embodiment 1
如图3所示,本发明实例一提供一种网络负载均衡的方法300,包括:As shown in FIG. 3, the first embodiment of the present invention provides a method 300 for network load balancing, including:
步骤310、终端设备提供P条逻辑通道,所述P为网络最大负载均衡路径数P,P为大于等于2的整数;Step 310: The terminal device provides P logical channels, where P is the maximum load balancing path number P of the network, and P is an integer greater than or equal to 2;
步骤320、所述终端设备将待发送的数据流以流分段为单位分割,生成多个子数据流;Step 320: The terminal device divides the data stream to be sent into units of stream segments, and generates multiple sub-data streams.
步骤330、所述终端设备将所述多个子数据流映射到所述P条逻辑通道,发送至网络设备。Step 330: The terminal device maps the multiple sub-data streams to the P logical channels and sends the data to the network device.
具体地,网络最大负载均衡路径数P是指整个网络中从某一个节点到另一个节点之间最大的路径数量。Specifically, the network maximum load balancing path number P refers to the maximum number of paths from one node to another in the entire network.
终端设备获取网络最大负载均衡路径数P值,有多种实现方式:The terminal device obtains the maximum load balancing path number P value of the network, and has multiple implementation modes:
比如,第一种实现方式为:将网络最大负载均衡路径数P设置为网络协议的一部分,网络中的终端设备和网络设备均遵循该网络协议指定的P值,即设备出厂前,已经将P值写入设备的存储器,后续不再改变。比如,协议规定P为6,终端设备和网络设备P值默认为6。在此实现方式中,步骤310可以理解为,通过读取终端设备或者网络设备的存储器,确定P值。For example, the first implementation manner is: setting the network maximum load balancing path number P as a part of the network protocol, and the terminal device and the network device in the network all follow the P value specified by the network protocol, that is, the device has already been P before leaving the factory. The value is written to the device's memory and is not changed subsequently. For example, the protocol specifies that P is 6, and the P value of the terminal device and the network device defaults to 6. In this implementation, step 310 can be understood as determining the P value by reading the memory of the terminal device or the network device.
第二种实现方式为:由网络管理者通过控制台或者命令行来设置网络设备的P值,然后终端设备通过信令或者消息从网络设备处获取P值。比如,具体的实现步骤为:The second implementation manner is: the network administrator sets the P value of the network device through the console or the command line, and then the terminal device acquires the P value from the network device by using signaling or a message. For example, the specific implementation steps are:
步骤A:终端设备发送第一消息至网络设备,第一消息用于请求网络设备反馈网络最大负载均衡路径数P;Step A: The terminal device sends a first message to the network device, where the first message is used to request the network device to feed back the maximum load balancing path number P of the network;
步骤B;网络设备发送第二消息至终端设备,所述第二消息携带所述P值。Step B: The network device sends a second message to the terminal device, where the second message carries the P value.
其中,网络设备的P值,是由网络管理者通过控制台或者命令行人为设置的。这个P值后续可以更改。其中,第一消息、第二消息的格式可以参考现有技术TCP 协议的帧格式,这里不再赘述。可以通过扩展现有TCP协议的保留字段来承载所述P值。The P value of the network device is set by the network administrator through a console or a command line. This P value can be changed later. The format of the first message and the second message may refer to the prior art TCP. The frame format of the protocol is not described here. The P value can be carried by extending the reserved field of the existing TCP protocol.
所述方法还包括:每个子数据流携带流分段标识。流分段标识的含义是在传输控制协议(Transport Control Protocol,TCP)发送端发出数据流时,按照一定的数据量为单位将数据流切分为多个分段,每个分段具有唯一编号,记为流分段标识Flowcell ID。The method also includes each of the sub-data streams carrying a stream segment identifier. The meaning of the flow segment identifier is that when the data flow is sent by the sender of the Transmission Control Protocol (TCP), the data stream is divided into multiple segments according to a certain amount of data, and each segment has a unique number. , recorded as the stream segment ID Flowcell ID.
具体地,步骤320中的逻辑通道,可以表示一个子连接,每个逻辑通道类似一个TCP连接,具有独立的发送窗口和控制参数。Specifically, the logical channel in step 320 can represent a sub-connection, each logical channel is similar to a TCP connection, with independent transmission windows and control parameters.
终端设备对每个逻辑通道的报文进行并行发送,每个逻辑通道各自采用一个TCP发送窗口控制发送速率。The terminal device sends the packets of each logical channel in parallel, and each logical channel uses a TCP transmission window to control the transmission rate.
在本发明实施例中,终端设备可以对每个逻辑通道进行准确的路径拥塞状态测量,并进行相应的流量控制。举例说明:In the embodiment of the present invention, the terminal device can perform accurate path congestion state measurement for each logical channel and perform corresponding flow control. for example:
步骤a、逻辑通道#1将当前发送窗口允许发送的报文发出;Step a, logical channel #1 sends the message that the current sending window allows to send;
步骤b、等候接收端(网络设备)反馈逻辑通道#1的接收确认报文;Step b: waiting for the receiving end (network device) to feed back the acknowledgement message of the logical channel #1;
当接收端发现同一个流分段中接收的报文的数据序号不连续时,说明出现了丢包;When the receiving end finds that the data sequence number of the packet received in the same flow segment is not continuous, it indicates that packet loss occurs.
步骤c、接收端反馈接收确认报文,要求重新传输丢失的报文;Step c: The receiving end feeds back the acknowledgement packet, and requests to retransmit the lost packet.
步骤d、发送端接收到要求重新传输丢失的报文时,除了重新传输丢失的报文,还会认为此逻辑通道发生了拥塞;Step d: When the transmitting end receives the request to retransmit the lost packet, in addition to retransmitting the lost packet, the logical channel is considered to be congested;
步骤e、发送端将发送窗口尺寸减半,即降低发送报文的速率。Step e: The sending end halved the size of the sending window, that is, reduces the rate at which the message is sent.
由于每个逻辑通道有各自独立的窗口,逻辑通道#1发生拥塞,只需要降低逻辑通道#1的报文发送速率,其他逻辑通道不受影响,正常发送报文。Since each logical channel has its own independent window, the logical channel #1 is congested. It only needs to reduce the packet sending rate of the logical channel #1. The other logical channels are not affected, and the packets are sent normally.
具体地,步骤330中“将分割后的各个流分段,映射到所述P个逻辑通道”,具体包括:Specifically, in step 330, “the segmentation of each segment is mapped to the P logical channels”, which specifically includes:
以流分段标识值对P取余,来获得各个流分段具体对应哪个逻辑通道。The stream segment identification value is used to allocate P to obtain which logical channel each stream segment corresponds to.
示例性地,如图4所示,P取值为3,将待发送的数据流以64K字节为单位(即每个流分段的大小为64k字节),分割为5个Flowcell,编号分别记为Flowcell ID#0~Flowcell ID#4。其中,Flowcell ID#0对应逻辑通道0、Flowcell ID#1对应逻辑通道1、依次类推,Flowcell ID#4对应逻辑通道1。Illustratively, as shown in FIG. 4, P takes a value of 3, and the data stream to be transmitted is divided into 5 Flowcells in units of 64 Kbytes (ie, the size of each stream segment is 64 kbytes). Recorded as Flowcell ID#0~Flowcell ID#4, respectively. Flowcell ID#0 corresponds to logical channel 0, Flowcell ID#1 corresponds to logical channel 1, and so on, and Flowcell ID#4 corresponds to logical channel 1.
应理解,以流分段标识值对P取余只是一种具体的将流分段与P个逻辑通道对应的实现方式。还可以采用其他实现方式,比如,随机分配等。本发明实施例对此不进行限定。It should be understood that taking the stream segment identification value to P replenishment is only a specific implementation manner of corresponding the stream segment to the P logical channels. Other implementations can also be employed, such as random assignments and the like. This embodiment of the present invention does not limit this.
本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
实施例二Embodiment 2
如图5所示,本发明实施例二提供一种网络负载均衡的方法500,包括:As shown in FIG. 5, a second embodiment of the present invention provides a method 500 for network load balancing, including:
步骤510、网络设备接收来自上游节点的多个子数据流,其中,每个子数据流携带流分段标识; Step 510: The network device receives multiple sub-data streams from the upstream node, where each sub-data stream carries a stream segment identifier.
步骤520、根据所述子数据流的五元组和所述流分段标识对P取余进行散列运算,映射到多个物理链路发送至下一跳节点,其中,P为网络最大负载均衡路径数,P为大于等于2的整数。Step 520: Perform a hash operation on the P remainder according to the quintuple of the sub-data stream and the stream segment identifier, and map to multiple physical links to send to the next hop node, where P is the maximum load of the network. The number of equalized paths, P is an integer greater than or equal to 2.
所述下一跳节点可以是中间节点(网络设备),也可以是目的节点,是所述多个子数据流最终到达的终端设备。The next hop node may be an intermediate node (network device) or a destination node, and is a terminal device that the plurality of sub-data streams finally arrive at.
具体地,网络设备识别属于一个逻辑通道的报文是通过六元组信息,所谓六元组包括传统的五元组以及流分段标识对P值取余,即六元组包括:源IP、源端口、目的IP、目的端口、协议号以及流分段标识%P,其中,%表示取余运算。Specifically, the network device identifies that the packet belonging to one logical channel passes the six-tuple information, and the so-called six-tuple includes the traditional five-tuple and the stream segment identifier, and the six-member group includes: the source IP, Source port, destination IP, destination port, protocol number, and stream segment identifier %P, where % represents the remainder operation.
其中,六元组相同的报文,来自一个逻辑通道。Among them, the same message of the six-tuple comes from a logical channel.
当接收报文时,网络设备首先按照常规的IP路由转发流程,根据报文目的IP地址查询路由表,得到的路由中包括M个下一跳,即代表相邻下游物理链路有M条。M大于等于1。When receiving a packet, the network device firstly searches the routing table according to the destination IP address of the packet, and the obtained route includes M next hops, that is, M links of adjacent downstream physical links. M is greater than or equal to 1.
在一种实现方式中,如图6所示。逻辑通道P取值为3,即将3个逻辑通道上接收到的报文,通过三条物理链路发送,其中,第一逻辑通道上的报文通过第一物理链路发送;第二逻辑通道上的报文通过第二物理链路发送;第三逻辑通道上的报文通过第三物理链路发送。即在该种实现方式中,物理链路的编号与逻辑通道的编号一一对应。In one implementation, as shown in FIG. The value of the logical channel P is 3, that is, the packets received on the three logical channels are sent through three physical links, where the packets on the first logical channel are sent through the first physical link, and the second logical channel is sent. The packet is sent through the second physical link; the packet on the third logical channel is sent through the third physical link. That is, in this implementation manner, the number of the physical link corresponds to the number of the logical channel.
比如,在另一种实现方式中,如图7所示,逻辑通道P取值为3,物理路径物理链路取值为2,即将3个逻辑通道上接收到的报文,通过两条物理路径物理链路发送,其中,第一逻辑通道上的报文通过第一物理路径物理链路发送;第二逻辑通道和第三逻辑通道上的报文通过第二物理路径物理链路发送。假如第二物理路径物理链路连接的下一跳节点下具有2条物理路径物理链路,那么通过第二物理路径物理链路发送的报文可以通过二次分流。For example, in another implementation manner, as shown in FIG. 7, the logical channel P takes a value of 3, and the physical path physical link takes a value of 2, that is, the received packet on the three logical channels passes through two physical entities. The path physical link is sent, where the packet on the first logical path is sent through the physical link of the first physical path; the packet on the second logical channel and the third logical channel is sent through the physical link of the second physical path. If the next hop node of the physical link of the second physical path has two physical path physical links, the packet sent by the physical link of the second physical path can be divided by the secondary.
本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
实施例三Embodiment 3
如图8所示,本发明又一实施例提供一种终端设备800,该终端设备800包括处理器810和收发器820,其中:As shown in FIG. 8, another embodiment of the present invention provides a terminal device 800, where the terminal device 800 includes a processor 810 and a transceiver 820, where:
处理器810,用于提供P个逻辑通道,所述P为网络最大负载均衡路径数,P为大于等于2的整数;将待发送的数据流以流分段为单元进行分割,生成多个子数据流;The processor 810 is configured to provide P logical channels, where P is the maximum load balancing path number of the network, P is an integer greater than or equal to 2, and the data stream to be sent is segmented by using a stream segment as a unit to generate multiple sub-data. flow;
收发器820,用于将所述多个子数据流映射到所述P个逻辑通道,发送至所述网络设备。The transceiver 820 is configured to map the multiple sub-data streams to the P logical channels and send the data to the network device.
其中,每个子数据流携带流分段标识。Each sub-data stream carries a stream segment identifier.
具体地,获得网络最大负载均衡路径数P,有多种实现方式:Specifically, the number of network maximum load balancing paths P is obtained, and there are multiple implementation manners:
比如,第一种实现方式为:将网络最大负载均衡路径数P设置为网络协议的一部分,网络中的终端设备和网络设备均遵循该网络协议指定的P值,即设备出厂前,已经将P值写入设备的存储器,后续不再改变。处理单元810通过读取所述终端设 备的存储单元确定所述最大负载均衡路径数P。For example, the first implementation manner is: setting the network maximum load balancing path number P as a part of the network protocol, and the terminal device and the network device in the network all follow the P value specified by the network protocol, that is, the device has already been P before leaving the factory. The value is written to the device's memory and is not changed subsequently. The processing unit 810 reads the terminal setting The standby storage unit determines the maximum load balancing path number P.
第二种实现方式为:由网络管理者通过控制台或者命令行来设置网络设备的P值,然后终端设备通过信令或者消息从网络设备处获取P值。比如,具体的实现方案为:The second implementation manner is: the network administrator sets the P value of the network device through the console or the command line, and then the terminal device acquires the P value from the network device by using signaling or a message. For example, the specific implementation is:
收发器820,用于发送第一消息至所述网络设备,用于请求所述网络设备反馈最大网络负载均衡路径数P值;The transceiver 820 is configured to send a first message to the network device, to request the network device to feed back a maximum network load balancing path number P value;
收发器820,还用于接收来自所述网络设备的、携带所述P值的第二消息。The transceiver 820 is further configured to receive a second message from the network device that carries the P value.
其中,第一消息、第二消息的格式可以参考现有技术TCP协议的帧格式,这里不再赘述。可以通过扩展现有TCP协议的保留字段来承载所述P值。The format of the first message and the second message may refer to the frame format of the TCP protocol of the prior art, and details are not described herein again. The P value can be carried by extending the reserved field of the existing TCP protocol.
可选地,所属处理器还用于根据所述多个子数据流的流分段标识对P取余,来选择P个逻辑通道,具体可以参考实施例二中的方案,这里不再赘述。Optionally, the processor is further configured to select P logical channels according to the flow segment identifier of the plurality of sub-data streams, and the P logical channel is selected. For details, refer to the solution in the second embodiment, and details are not described herein again.
应理解,本发明实施例三是对应于方法实施例一的装置实施例,对方法实施例一的描述,也应适用于本发明实施例三。It should be understood that the third embodiment of the present invention is an apparatus embodiment corresponding to the first embodiment of the method, and the description of the first embodiment of the method should also be applied to the third embodiment of the present invention.
本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
实施例四Embodiment 4
如图9所示,本发明实施例提供一种网络设备900,包括:As shown in FIG. 9, an embodiment of the present invention provides a network device 900, including:
收发器920,接收来自上游节点的多个子数据流,其中,每个子数据流携带流分段标识。The transceiver 920 receives a plurality of sub-data streams from an upstream node, wherein each sub-data stream carries a stream segment identifier.
处理器910,用于根据所述子数据流的五元组和所述流分段标识对P取余进行散列运算,映射到多个物理链路发送至下一跳节点,其中,P为网络最大负载均衡路径数,P为大于等于2的整数。The processor 910 is configured to perform a hash operation on the P-capacity according to the quintuple of the sub-data stream and the stream segment identifier, and map the data to multiple physical links to send to the next hop node, where P is The maximum number of load balancing paths on the network. P is an integer greater than or equal to 2.
应理解,本发明实施例四是对应于方法实施例二的装置实施例,对方法实施例二的描述,也应适用于本发明实施例四。It should be understood that the fourth embodiment of the present invention is an apparatus embodiment corresponding to the second embodiment of the method, and the description of the second embodiment of the method should also be applied to the fourth embodiment of the present invention.
本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果,同时避免网络设备记录单个数据流的状态和路径信息。The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize the load balancing effect while avoiding network devices recording the status and path information of a single data stream.
实施例五Embodiment 5
图10为本发明又一实施例提供的一种网络设备的示意性框图。该网络设备1000包括处理器1010、存储器1020、总线1030和用户接口1040、网络接口1050。FIG. 10 is a schematic block diagram of a network device according to another embodiment of the present invention. The network device 1000 includes a processor 1010, a memory 1020, a bus 1030 and a user interface 1040, and a network interface 1050.
具体地,处理器1010控制网络设备1000的操作,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件。In particular, processor 1010 controls the operation of network device 1000, which may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array, or other programmable logic device.
用户接口1060,用于连接下层终端设备;a user interface 1060, configured to connect to a lower layer terminal device;
网络接口1050用于连接上层网络设备;The network interface 1050 is configured to connect to an upper layer network device.
网络设备1000的各个组件通过总线1050耦合在一起,其中总线系统1050除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都标为总线系统1050。需要说明的是,上述对于网元结构的描述,可应用于本发明的实施例。 The various components of network device 1000 are coupled together by a bus 1050, which in addition to the data bus includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 1050 in the figure. It should be noted that the foregoing description of the structure of the network element can be applied to the embodiment of the present invention.
存储器1020可以包括只读存储器(Read Only Memory,ROM)和随机存取存储器(Random Access Memory,RAM),或者可存储信息和指令的其他类型的动态存储设备,也可以是磁盘存储器。存储器1020可用于保存实现本发明实施例提供的相关方法的指令。可以理解,通过编程或装载可执行指令到网元1000的处理器1010,缓存和长期存储中的至少一个。在一种具体的实施例中,所述存储器,用于存储计算机可执行程序代码,其中,当所述程序代码包括指令,当所述处理器执行所述指令时,所述指令使所述网元执行以下操作:The memory 1020 may include a Read Only Memory (ROM) and a Random Access Memory (RAM), or other types of dynamic storage devices that may store information and instructions, or may be a disk storage. The memory 1020 can be used to store instructions that implement the related methods provided by embodiments of the present invention. It will be appreciated that at least one of the cache and long term storage is programmed or loaded by the processor 1010 of the network element 1000 by programming or loading. In a specific embodiment, the memory is for storing computer executable program code, wherein when the program code includes an instruction, when the processor executes the instruction, the instruction causes the network Meta performs the following operations:
提供P个逻辑通道,所述P为网络最大负载均衡路径数P,P为大于等于2的整数;Providing P logical channels, where P is the maximum load balancing path number P of the network, and P is an integer greater than or equal to 2;
将待发送的数据流以流分段为单位分割,生成多个子数据流;The data stream to be sent is divided into units of stream segments to generate a plurality of sub-data streams;
将所述多个子数据流映射到所述P个逻辑通道,发送至所述网络设备。Mapping the plurality of sub-data streams to the P logical channels for transmission to the network device.
或者,所述指令使所述网元执行以下操作:Alternatively, the instruction causes the network element to perform the following operations:
接收来自上游节点的多个子数据流,其中,每个子数据流携带流分段标识;Receiving a plurality of sub-data streams from an upstream node, wherein each sub-data stream carries a stream segment identifier;
根据所述子数据流的五元组和所述流分段标识对P取余进行散列运算,映射到多个物理链路发送至下一跳节点,其中,P为网络最大负载均衡路径数,P为大于等于2的整数。Performing a hash operation on the P-capacity according to the quintuple of the sub-stream and the stream segment identifier, and mapping to multiple physical links to send to the next hop node, where P is the maximum load balancing path number of the network , P is an integer greater than or equal to 2.
以上作为设备的网元包含的处理器所执行操作的具体实现方式可以参照实施例一至二中的由设备执行的对应步骤,本发明实施例不再赘述。For the specific implementation of the operations performed by the processor included in the network element of the device, reference may be made to the corresponding steps performed by the device in the first embodiment to the second embodiment.
本发明通过将待发送数据流以流分段为单位进行分割,并通过映射到多个逻辑通道上,可以在网络中实现细粒度的、负载分担更均衡的技术方案,有效提升网络利用率,优化负载均衡效果。The present invention can implement a fine-grained, load-sharing and more balanced technical solution in the network by dividing the data stream to be sent in units of stream segmentation and mapping to multiple logical channels, thereby effectively improving network utilization. Optimize load balancing.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
本领域普通技术人员可知,上述方法中的全部或部分步骤可以通过程序指令相关的硬件完成,该程序可以存储于一计算机可读存储介质中,该计算机可读存储介质如ROM、RAM和光盘等。A person skilled in the art may know that all or part of the above steps may be completed by hardware related to program instructions, and the program may be stored in a computer readable storage medium such as a ROM, a RAM, an optical disc, or the like. .
综上所述,以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 In conclusion, the above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims (16)

  1. 一种网络负载均衡的方法,其特征在于,包括:A method for network load balancing, characterized in that it comprises:
    所述终端设备提供P条逻辑通道,所述P为网络最大负载均衡路径数P,P为大于等于2的整数;The terminal device provides P logical channels, where P is the maximum load balancing path number P of the network, and P is an integer greater than or equal to 2;
    所述终端设备将待发送的数据流以流分段为单位分割,生成多个子数据流;The terminal device divides the data stream to be sent into units of stream segments to generate a plurality of sub-data streams;
    所述终端设备将所述多个子数据流映射到所述P条逻辑通道,发送至网络设备。The terminal device maps the multiple sub-data streams to the P logical channels and sends the data to the network device.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    当第X个子数据流与下一个数据流累加的长度超过所述流分段的最大值,将所述下一个数据流作为第X+1个待发送的数据流,X为非负整数。When the length of the Xth sub data stream and the next data stream is accumulated exceeding the maximum value of the stream segment, the next data stream is regarded as the X+1th data stream to be transmitted, and X is a non-negative integer.
  3. 根据权利要求1或2所述的方法,其特征在于,所述子数据流还包括:流分段标识;The method according to claim 1 or 2, wherein the sub-data stream further comprises: a stream segment identifier;
    根据所述流分段标识,对P取余,获取与流分段标识对应的逻辑通道;And acquiring, according to the flow segment identifier, a logical channel corresponding to the flow segment identifier;
    将所述流分段标识的子数据流分别映射到所述对应的逻辑通道。The sub-data streams identified by the stream segment are respectively mapped to the corresponding logical channels.
  4. 根据权利要求1~3任意一项所述的方法,其特征在于,通过读取所述终端设备的存储器确定所述最大负载均衡路径数P。The method according to any one of claims 1 to 3, characterized in that the maximum load balancing path number P is determined by reading a memory of the terminal device.
  5. 根据权利要求1~3任意一项所述的方法,其特征在于,确定网络最大负载均衡路径数P,具体包括:The method according to any one of claims 1 to 3, wherein determining the maximum number of load balancing paths P of the network includes:
    发送第一请求消息至所述网络设备,所述第一请求消息用于请求所述网络设备反馈所述P值;Sending a first request message to the network device, where the first request message is used to request the network device to feed back the P value;
    接收来自所述网络设备的第二消息,所述第二消息携带所述P值。Receiving a second message from the network device, the second message carrying the P value.
  6. 一种网络负载均衡的方法,其特征在于,包括:A method for network load balancing, characterized in that it comprises:
    接收来自上游节点的多个子数据流,其中,每个子数据流携带流分段标识;Receiving a plurality of sub-data streams from an upstream node, wherein each sub-data stream carries a stream segment identifier;
    根据所述子数据流的五元组和所述流分段标识对P取余进行散列运算,映射到多个物理链路发送至下一跳节点,其中,P为网络最大负载均衡路径数,P为大于等于2的整数。Performing a hash operation on the P-capacity according to the quintuple of the sub-stream and the stream segment identifier, and mapping to multiple physical links to send to the next hop node, where P is the maximum load balancing path number of the network , P is an integer greater than or equal to 2.
  7. 根据权利要求6所述的方法,所述P值是通过读取存储器来获取。The method of claim 6 wherein said P value is obtained by reading a memory.
  8. 根据权利要求6所述的方法,所述P值是通过命令行或者网管设备来获取。The method according to claim 6, wherein the P value is obtained through a command line or a network management device.
  9. 一种终端设备,其特征在于,包括:A terminal device, comprising:
    处理器,用于提供P个逻辑通道,所述P为网络最大负载均衡路径数P,P为大于等于2的整数;将待发送的数据流以流分段为单位进行分割,生成多个子数据流;The processor is configured to provide P logical channels, where P is a network maximum load balancing path number P, P is an integer greater than or equal to 2; and the data stream to be sent is divided into units in a stream segmentation manner to generate multiple sub-data flow;
    收发器,将所述多个子数据流映射到所述P个逻辑通道,发送至网络设备。a transceiver that maps the plurality of sub-data streams to the P logical channels for transmission to a network device.
  10. 根据权利要求9所述的终端设备,其特征在于,所述子数据流还包括:流分段标识;The terminal device according to claim 9, wherein the sub data stream further comprises: a stream segment identifier;
    所述处理器,还用于根据所述流分段标识,对P取余,获取与流分段标识对应的逻辑通道;将所述流分段标识的子数据流分别映射到所述对应的逻辑通道。The processor is further configured to: acquire, according to the flow segment identifier, a P logical channel corresponding to the flow segment identifier; and map the sub-data flow identified by the flow segment to the corresponding Logical channel.
  11. 根据权利要求9或10所述的终端设备,其特征在于,所述处理器用于读取所述终端设备的存储单元确定所述最大负载均衡路径数P。The terminal device according to claim 9 or 10, wherein the processor is configured to read a storage unit of the terminal device to determine the maximum load balancing path number P.
  12. 根据权利要求9或10所述的终端设备,其特征在于,所述收发器还用于发送第一消息至所述网络设备,用于请求所述网络设备反馈P值。 The terminal device according to claim 9 or 10, wherein the transceiver is further configured to send a first message to the network device, to request the network device to feed back a P value.
  13. 一种网络设备,包括:A network device, including:
    收发器,接收来自上游节点的多个子数据流,其中,每个子数据流携带流分段标识;a transceiver, receiving a plurality of sub-data streams from an upstream node, wherein each sub-data stream carries a stream segment identifier;
    处理器,用于根据所述子数据流的五元组和所述流分段标识对P取余进行散列运算,映射到多个物理链路发送至下一跳节点,其中,P为网络最大负载均衡路径数,P为大于等于2的整数。a processor, configured to perform a hash operation on the P remainder according to the quintuple of the sub-data stream and the flow segment identifier, and map to multiple physical links to send to a next hop node, where P is a network The maximum load balancing path number, P is an integer greater than or equal to 2.
  14. 根据权利要求13所述的网络设备,其特征在于,所述P值是通过读取存储器获取。The network device according to claim 13, wherein said P value is obtained by reading a memory.
  15. 根据权利要求13所述的网络设备,其特征在于,所述P值是通过命令行或者网管设备来获取。The network device according to claim 13, wherein the P value is obtained through a command line or a network management device.
  16. 一种通信系统,包括终端设备和网络设备,其中,所述终端设备包括如权利要求9~12任意一项所述的终端设备;所述网络设备包括如权利要求13~15任意一项所述的网络设备。 A communication system comprising a terminal device and a network device, wherein the terminal device comprises the terminal device according to any one of claims 9 to 12; the network device comprising the device according to any one of claims 13 to Network equipment.
PCT/CN2017/080586 2016-08-23 2017-04-14 Network load balancing method, device and system WO2018036173A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610710518.3 2016-08-23
CN201610710518.3A CN107770085B (en) 2016-08-23 2016-08-23 Network load balancing method, equipment and system

Publications (1)

Publication Number Publication Date
WO2018036173A1 true WO2018036173A1 (en) 2018-03-01

Family

ID=61246377

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/080586 WO2018036173A1 (en) 2016-08-23 2017-04-14 Network load balancing method, device and system

Country Status (2)

Country Link
CN (1) CN107770085B (en)
WO (1) WO2018036173A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995609A (en) * 2019-12-20 2020-04-10 新华三半导体技术有限公司 Message sending method and device, electronic equipment and storage medium
CN111586099A (en) * 2020-04-01 2020-08-25 烽火通信科技股份有限公司 Cross-node data backup synchronization method and system
CN113542051A (en) * 2021-05-27 2021-10-22 贵州电网有限责任公司 Monitoring flow load balancing method based on software defined network
CN114095433A (en) * 2021-11-25 2022-02-25 新华三技术有限公司合肥分公司 Message sending method, device, electronic equipment and medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112272933B (en) * 2018-06-05 2022-08-09 华为技术有限公司 Queue control method, device and storage medium
CN111817973B (en) * 2020-06-28 2022-03-25 电子科技大学 Data center network load balancing method
CN115085757B (en) * 2022-07-07 2023-08-25 Oppo广东移动通信有限公司 Radio frequency network optimization method and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6778495B1 (en) * 2000-05-17 2004-08-17 Cisco Technology, Inc. Combining multilink and IP per-destination load balancing over a multilink bundle
US20060007929A1 (en) * 2001-03-14 2006-01-12 Desai Bhavesh N Transmit and receive system for a cable data service
CN103348728A (en) * 2010-12-20 2013-10-09 阿尔卡特朗讯 System and method for multi-channel packet transmission

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8711703B2 (en) * 2010-10-29 2014-04-29 Telefonaktiebolaget L M Ericsson (Publ) Load balancing in shortest-path-bridging networks
CN102368742B (en) * 2011-12-11 2014-08-06 湖南科技大学 Multilink data transmission method with good fairness and high efficiency
CN103312607B (en) * 2012-03-09 2016-12-21 华为技术有限公司 A kind of selection of transmission paths method and device
CN104954249B (en) * 2014-03-27 2018-09-21 华为技术有限公司 A kind of message forwarding method, system and device
CN104581892B (en) * 2014-12-05 2018-08-21 华为技术有限公司 A kind of data transmission method and device of terminal
CN105791145B (en) * 2014-12-18 2019-10-25 南京中兴新软件有限责任公司 Message transmitting method and device based on equal cost multipath ECMP

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6778495B1 (en) * 2000-05-17 2004-08-17 Cisco Technology, Inc. Combining multilink and IP per-destination load balancing over a multilink bundle
US20060007929A1 (en) * 2001-03-14 2006-01-12 Desai Bhavesh N Transmit and receive system for a cable data service
CN103348728A (en) * 2010-12-20 2013-10-09 阿尔卡特朗讯 System and method for multi-channel packet transmission

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A. FORD: "Architectural Guidelines for Multipath TCP Development", IETF RFC6182, 21 March 2011 (2011-03-21), pages 1 - 28, XP055603069, ISSN: 2070-1721 *
FU FA ET AL.: "Performance Analysis of MPTCP Protocol in Multiple Scenarios", COMPUTER ENGINEERING AND APPLICATIONS, vol. 52, no. 5, 31 March 2016 (2016-03-31) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995609A (en) * 2019-12-20 2020-04-10 新华三半导体技术有限公司 Message sending method and device, electronic equipment and storage medium
CN111586099A (en) * 2020-04-01 2020-08-25 烽火通信科技股份有限公司 Cross-node data backup synchronization method and system
CN111586099B (en) * 2020-04-01 2023-03-24 烽火通信科技股份有限公司 Cross-node data backup synchronization method and system
CN113542051A (en) * 2021-05-27 2021-10-22 贵州电网有限责任公司 Monitoring flow load balancing method based on software defined network
CN114095433A (en) * 2021-11-25 2022-02-25 新华三技术有限公司合肥分公司 Message sending method, device, electronic equipment and medium
CN114095433B (en) * 2021-11-25 2024-02-23 新华三技术有限公司合肥分公司 Message sending method and device, electronic equipment and medium

Also Published As

Publication number Publication date
CN107770085B (en) 2021-08-31
CN107770085A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
WO2018036173A1 (en) Network load balancing method, device and system
CN109412964B (en) Message control method and network device
US10554538B2 (en) Dynamic link state routing protocol
US7729328B2 (en) Real-time sessions for wireless mesh networks
US8942094B2 (en) Credit-based network congestion management
WO2016062106A1 (en) Packet processing method, device and system
US8885502B2 (en) Feedback protocol for end-to-end multiple path network systems
CN111800351A (en) Congestion notification packet generation by a switch
CN105391567A (en) Traffic management implementation method and device, and network equipment
WO2021244450A1 (en) Communication method and apparatus
US8838782B2 (en) Network protocol processing system and network protocol processing method
WO2019001484A1 (en) Method, apparatus and system for adjusting rate of sending side
CN111555982A (en) Method and system for intelligently routing message based on IPv6 extension header
US11245546B2 (en) Methods and systems for transmitting and receiving data packets through a bonded connection
CN109219944B (en) System and method for reducing MTU size in packet networks
JP5254916B2 (en) Communication device and communication control method in ring network
WO2022242775A1 (en) Packet processing method and system, and network device
JP6268027B2 (en) COMMUNICATION SYSTEM, TRANSMISSION DEVICE, AND COMMUNICATION METHOD
JP5216830B2 (en) Data transfer apparatus and method
JP4828555B2 (en) Node device and bandwidth control method
WO2024065481A1 (en) Data processing method and apparatus, and network device and storage medium
JP4797033B2 (en) Flow rate control method and edge node in TCP flow rate control edge node
CN118120209A (en) Data processing method, device, network equipment and storage medium
US7260114B1 (en) System and method for tracking multilink packet information
JP2021022838A (en) Data transmission device and program

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: 17842598

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: 17842598

Country of ref document: EP

Kind code of ref document: A1