WO2023116165A1 - 网络负载均衡方法、装置、电子设备、介质和程序产品 - Google Patents
网络负载均衡方法、装置、电子设备、介质和程序产品 Download PDFInfo
- Publication number
- WO2023116165A1 WO2023116165A1 PCT/CN2022/126674 CN2022126674W WO2023116165A1 WO 2023116165 A1 WO2023116165 A1 WO 2023116165A1 CN 2022126674 W CN2022126674 W CN 2022126674W WO 2023116165 A1 WO2023116165 A1 WO 2023116165A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- information
- load balancing
- packet
- device information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/24—Multipath
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
Definitions
- the present disclosure relates to the technical field of communications, and in particular to a network load balancing method, device, electronic equipment, media and program product.
- Multi-Path Transmission Control Protocol defines a way to establish a connection between two hosts, allowing the connection to use multiple paths at the same time, where MPTCP is on each path that needs to be used Create a sub-connection.
- a network load balancing device determines a target server from a server set through a load balancing algorithm, and sends a message to the target server.
- the present disclosure provides a network load balancing method, device, electronic equipment, medium and program product.
- a first aspect of the present disclosure provides a network load balancing method, the method comprising:
- the first message includes: first source device information, first destination device information, sub-flow identification information belonging to the multiplex transmission control protocol MPTCP type, and verification information, and the verification information uses To indicate the main stream corresponding to the sub-stream identified by the sub-stream identification information;
- the determining the packet conversion rule according to the verification information and the target flow of the first packet includes:
- the target flow characterization message of the first message needs to be sent to the load balancing device, then determine the target server corresponding to the mainstream according to the verification information, and determine that the message conversion rule is used to convert the first message
- the first target device information in the text is converted into the device information of the target server;
- the target flow indication message of the first message needs to be sent to the client, determine that the message conversion rule is used to convert the first source device information in the first message into the load balancing device information Device Information.
- the method before determining the target flow of the first message according to the information of the first destination device, the method further includes:
- the message conversion rule includes: if the target flow direction representation message of the first message needs to be sent to a load balancing device, Then convert the first destination device information in the first message into the device information of the target server; if the target flow indication message of the first message needs to be sent to the client, then the first The first source device information in the packet is converted into device information of the load balancing device.
- before receiving the first message it also includes:
- control information sent by the load balancing device where the control information includes: the verification information and the device information of the target server;
- the control information is stored in the database.
- the packet conversion rule corresponding to the verification information after generating the packet conversion rule corresponding to the verification information according to the device information of the target server, it further includes:
- a timer is started, and after the timer expires, the packet conversion rule is deleted.
- the network load balancing method is performed by a virtual switch corresponding to the client.
- a second aspect of the present disclosure provides a network load balancing method, the method comprising:
- connection establishment response including: the mainstream identification information belonging to the multiplex transmission control protocol MPTCP type, the device information and the key of the target server;
- control message Generate a control message according to the verification information and the device information of the target server, where the control message includes: the verification information and the device information of the target server;
- the network load balancing method is performed by a load balancing device.
- a third aspect of the present disclosure provides a network load balancing device, the device comprising:
- a receiving module configured to receive a first message, the first message including: first source device information, first destination device information, sub-flow identification information belonging to the multiplex transmission control protocol MPTCP type, and verification information, The verification information is used to indicate the main stream corresponding to the sub-stream identified by the sub-stream identification information;
- a processing module configured to determine the target flow of the first message according to the information of the first destination device; and determine a message conversion rule according to the verification information and the target flow of the first message, the message The conversion rule is used to direct the sub-flow and the main stream to the same target server; and based on the message conversion rule, perform the first source device information or the first destination device information in the first message Converting to obtain a second message, where the second message includes second source device information and second destination device information;
- a sending module configured to send the second message to the second destination device according to the second destination device information in the second message.
- a fourth aspect of the present disclosure provides a network load balancing device, the device comprising:
- the receiving module is configured to receive a connection establishment response, which includes: mainstream identification information belonging to the multiplex transmission control protocol MPTCP type, device information and keys of the target server;
- a processing module configured to generate verification information according to the key; and generate a control message according to the verification information and device information of the target server, where the control message includes: the verification information and the target server device information;
- a sending module configured to send the control packet to the virtual switch corresponding to the client, so that the virtual switch generates a packet conversion rule based on the control packet, so as to direct the subflow corresponding to the main flow to the target server .
- a fifth aspect of the present disclosure provides an electronic device, comprising: one or more processors; memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; the one When the one or more processors execute the one or more computer programs, the electronic device implements the network load balancing method according to any one of the first aspect or the network load balancing method according to the second aspect.
- a sixth aspect of the present disclosure provides a computer storage medium, including computer instructions.
- the computer instructions When the computer instructions are run on an electronic device, the electronic device executes the network load balancing method as described in any one of the first aspect or as described in The network load balancing method described in the second aspect.
- a seventh aspect of the present disclosure provides a computer program product.
- the computer program product runs on a computer, the computer executes the method as described in any one of the first aspect or the network load as described in the second aspect. balanced approach.
- An eighth aspect of the present disclosure provides a network load balancing system, including: a virtual switch, corresponding to a client, configured to execute the network load balancing method according to any one of the claims in the first aspect.
- the network load balancing system further includes: a load balancing device configured to execute the network load balancing method according to any one of the second aspect.
- FIG. 1 is a schematic structural diagram of a load balancing system provided by the present disclosure
- FIG. 2 is a schematic flowchart of an embodiment of a network load balancing method provided by the present disclosure
- FIG. 3 is a schematic flowchart of another embodiment of a load balancing method provided by the present disclosure.
- FIG. 4 is a schematic flowchart of another embodiment of a network load balancing method provided by the present disclosure.
- FIG. 5 is a schematic flowchart of another embodiment of a load balancing method provided by the present disclosure.
- FIG. 6 is a schematic flowchart of another embodiment of a load balancing method provided by the present disclosure.
- FIG. 7 is a schematic flowchart of another embodiment of a load balancing method provided by the present disclosure.
- FIG. 8 is a schematic structural diagram of a network load balancing device provided by the present disclosure.
- FIG. 9 is a schematic structural diagram of another network load balancing device provided by the present disclosure.
- TCP Transmission Control Protocol
- IP Internet Protocol
- MPTCP defines a way to establish a connection between two hosts, not between two interfaces. MPTCP allows connections to use multiple paths simultaneously, maximizing channel resource usage. Among them, MPTCP creates a subflow TCP connection on each path that needs to be used.
- host A and host B uses host A and host B to establish an MPTCP connection as an example to illustrate how to establish an MPTCP connection.
- host A has two addresses, namely address A1 and address A2, and the address of host B is address B1.
- Host A sends a data packet (SYN) to host B's address B1 through address A1.
- This data packet is the same as that sent when TCP establishes a connection, except that the MPTCP identification information (MP_CAPABLE) and a key A generated by host A are added.
- MP_CAPABLE MPTCP identification information
- the key A is used for verification when the sub-connection is subsequently established. Therefore, the key generated by the host A is different each time the MPTCP main connection is established).
- Host B sends a data packet (SYN+ACK) to host A's address A1 through address B1, which also includes MPTCP identification information (MP_CAPABLE) and a key B generated by host B.
- SYN+ACK data packet
- MP_CAPABLE MPTCP identification information
- Host A sends a data packet (ACK) to host B's address B1 through address A1, which contains MPTCP identification information (MP_CAPABLE), key A, and key B. At this time, host A and host B establish a main connection.
- ACK data packet
- MP_CAPABLE MPTCP identification information
- Host A sends a data packet (SYN) to host B's address B1 through address A2, which includes subflow identification information (MP_JOIN), authentication information (Token) and random number A.
- SYN data packet
- MP_JOIN subflow identification information
- Token authentication information
- Token is the hash value of key B when the previous main connection is established, and random number A is generated by host A.
- Host B sends a data packet SYN/ACK to host A's address A2 through address B1, which contains subflow identification information (MP_JOIN), authentication information (HMAC-B) and random number B, where HMAC-B consists of random number A and The random number B is obtained by performing a hash operation, and the random number B is generated by the host B.
- MP_JOIN subflow identification information
- HMAC-B authentication information
- Host A sends a data packet (ACK) to host B's address B1 through address A2, which contains verification information (HMAC-A), where HMAC-A is obtained by hashing random number A and random number B.
- ACK data packet
- HMAC-A verification information
- the host B sends a data packet (ACK) to the address A2 of the host A through the address B1, and at this time, the establishment of the sub-connection is completed.
- ACK data packet
- Load balancing is often required in the data center. Load balancing can form multiple servers into a server set, and through load sharing technology, distribute external requests to one of the servers in the server set. The server that receives the request Independently respond to client requests. Network load balancing solves the problem of a large number of concurrent access services by distributing client requests to different servers.
- Network load balancing is divided into layer 4 load balancing and layer 7 load balancing according to the different layers defined in the OSI model.
- Layer 4 load balancing can also be divided into TCP and UDP according to the protocols it supports. Among them, TCP type load balancing is used for load balancing of TCP type requests.
- MPTCP for data center load balancing can effectively improve load balancing performance.
- FIG. 1 is a schematic diagram of the architecture of a load balancing system provided by the present disclosure.
- the load balancing system may include: a client 10, a virtual switch 20, a load balancing device 30, a virtual switch 40, a server 50, and a virtual switch 60 and server 70.
- the virtual switch 20 may be referred to as a virtual switch of the client 10 .
- the virtual switch 40 may be referred to as a virtual switch of the server 50 .
- the virtual switch 60 may be referred to as a virtual switch of the server 70 .
- the client 10 can be connected to one or more load balancing devices through the virtual switch 20 , and a load balancing device 30 is shown as an example in FIG. 1 .
- the load balancing device 30 can be connected to multiple servers, and each server is connected to the load balancing device 30 through a virtual switch, as shown in Fig. 40 is connected to the load balancing device 30 , and the server 70 is connected to the load balancing device 30 through the virtual switch 60 .
- the mobile phone can include two ways of accessing the Internet, cellular mobile data network (including 2G, 3G, 4G or 5G network, etc.) and WIFI network. Users hope to use WIFI as much as possible when WIFI is available, which can save costs, and automatically switch to cellular mobile network when there is no WIFI to avoid disconnection. In this way, an MPTCP connection can be established between the mobile phone and the server. The mobile phone can establish an MPTCP main connection with the server through the WIFI network, and then establish an MPTCP sub-connection with the same server through the cellular mobile data network.
- the load balancing device 30 actually faces the client 10.
- the client 10 needs to access a certain service, it sends an MPTCP main connection establishment request to the load balancing device 30 through the virtual switch 20, and the load balancing The device 30 will use it as a request to establish a TCP connection, and select a server from the server 50 and the server 70 according to the load balancing scheduling algorithm, assuming that the server 50 is selected so that the server 50 establishes a connection with the client 10, and the main connection is successfully established .
- the client 10 when it needs to establish an MPTCP sub-connection, it sends an MPTCP connection establishment request to the load balancing device 30 through the virtual switch 20, and the load balancing device 30 will still use it as a request for establishing a TCP connection, and the load balancing device 30 will send it
- a server is selected from the server 50 and the server 70, and there is a possibility that the load balancing device 30 selects the server 70, so that the access cannot be performed.
- the present disclosure provides a network load balancing method. After the virtual switch corresponding to the client in the present disclosure determines that the packet belongs to the subflow according to the subflow identification information contained in the packet, according to the verification information in the packet Determine the main flow corresponding to the sub-flow, and direct the sub-flow to the same target server as the main flow based on the device information of the target server corresponding to the main flow obtained from the load balancing device, so that the sub-flow and the main flow can be directed to the same target server, ensuring normal access.
- FIG. 2 is a schematic flowchart of an embodiment of a network load balancing method provided by the present disclosure. As shown in FIG. 2 , the method of this embodiment is executed by the virtual switch corresponding to the client, and the method of this embodiment is as follows:
- S201 Receive a first packet.
- the first packet includes: first source device information, first destination device information, sub-flow identification information belonging to the MPTCP type, and verification information.
- the verification information is used to indicate the main stream corresponding to the sub-stream identified by the sub-stream identification information.
- the first source device information may include a source address and a source port number.
- the first destination device information may include a destination address and a destination port number.
- the subflow identification information belonging to the MPTCP type is used to identify that the first packet belongs to the subflow of the MPTCP type.
- the subflow identification information may be, for example, the above-mentioned MP_JOIN. According to the subflow identification information, it can be determined that the packet belongs to the subflow.
- the verification information can uniquely identify a main stream, for example, the above-mentioned Token. Therefore, the main stream corresponding to the sub-stream can be determined according to the verification information.
- the first packet received by the virtual switch corresponding to the client may be from the client or from the target server.
- the first message may be a message for establishing a connection, or a message for data transmission, and the technical solution of the present disclosure may be applied.
- S203 Determine a target flow of the first packet according to the first destination device information.
- the target flow of the first message can be determined according to the first destination device information carried in the first message, including the following two situations:
- the first destination device information of the first packet is the device information of the load balancing device, it means that the first packet needs to be sent to the load balancing device, that is, the target flow of the first packet is to be sent to the load balancing device.
- the target flow may also be described as being sent to the load balancing device as an outbound direction.
- the target flow that is sent to the client may also be described as inbound or forward, which is not limited in the present disclosure.
- S205 Determine a packet conversion rule according to the verification information and the target flow of the first packet, where the packet conversion rule is used to direct the subflow and the main flow to the same target server.
- the packet conversion rules corresponding to the main flow include: two flow directions (above Outbound and inbound) packet conversion rules, therefore, the packet conversion rules that the first packet needs to adopt can be determined based on the target flow of the first packet, and the subflow and the main flow can be directed to the same destination through the packet conversion rules server.
- S207 Convert the first source device information or the first destination device information in the first message based on the message conversion rule to obtain a second message, the second message including the second source Device information and second destination device information.
- one situation is: if the target flow characterization message of the first message needs to be sent to the load balancing device, then determine the target server corresponding to the main stream according to the verification information, and determine the message conversion rule and converting the first destination device information in the first packet into device information of the target server. That is, by replacing the destination address in the first packet with the device information of the load balancing device with the device information of the target server corresponding to the main stream, the sub-flow and the main stream can be directed to the same target server.
- Another situation is: if the target flow characterization message of the first message needs to be sent to the client, determine that the message conversion rule is used to convert the first source device information in the first message into Device information of the load balancing device. That is, by converting the source address in the first packet from the device information of the target server to the device information of the load balancing device.
- S209 Send the second packet to the second destination device according to the second destination device information in the second packet.
- the first message needs to be sent to the load balancing device, it can be directly sent to the target server corresponding to the main flow according to the operation of S207, ensuring that the sub-flow and the main flow are directed to the same target server, and there is no need to go through load balancing in this process device, which reduces the burden on the load balancing device.
- the device information of the target server can be changed to the device information of the load balancing device to ensure that the client can parse the packet normally.
- the virtual switch of the client after receiving the first message sent by the client, determines the target flow direction of the first message according to the destination device information in the first message, based on the verification information carried in the first message and The target flow direction of the first message determines the message conversion rule, and converts the source device information or the destination device information in the first message based on the message conversion rule to obtain the second message, according to the destination device in the second message The information sends the second message to the second destination device.
- the packet conversion rule can direct the sub-flow and the main stream to the same target server, so that the sub-flow and the main stream can be directed to the same target server, ensuring normal access.
- the subflow does not need to pass through the load balancing device, which reduces the burden on the load balancing device and improves the system capacity.
- Fig. 3 is a schematic flowchart of another embodiment of a load balancing method provided by the present disclosure.
- Fig. 3 is based on the embodiment shown in Fig. 2 , further, before S203, it also includes:
- S2021 Determine that the first packet is a subflow according to the subflow identification information of the MPTCP type.
- the packet contains subflow identification information belonging to the MPTCP type, then it is determined that the first packet is a subflow.
- the verification information can uniquely identify a mainstream, and the target server corresponding to the mainstream is recorded in the database, based on the verification information, the target server corresponding to the mainstream can be obtained from the database.
- S2023 Generate the packet conversion rule corresponding to the verification information according to the device information of the target server.
- the packet conversion rule includes: if the target flow direction representation packet of the first packet needs to be sent to the load balancing device, convert the first destination device information in the first packet into the target The device information of the server; if the target flow indication message of the first message needs to be sent to the client, converting the first source device information in the first message into the device information of the load balancing device.
- the first packet is determined to be a subflow according to the subflow identification information of the MPTCP type, and then, according to the verification information, the target server corresponding to the mainstream direction of the verification information is obtained from the database, and the device based on the target server
- the information generates and verifies the message conversion rules corresponding to the information, so that in the subsequent process of message transmission, the sub-flow and the main flow can be directed to the same target server based on the message conversion rules, ensuring normal access.
- the message conversion rule after generating the message conversion rule, it further includes: starting a timer, and deleting the message conversion rule when the timer expires.
- FIG. 4 is a schematic flowchart of another embodiment of a network load balancing method provided by the present disclosure.
- FIG. 4 is based on the embodiment shown in FIG. 3 , and further includes:
- the control information includes: the verification information and the device information of the target server.
- the load balancing device receives the connection establishment response sent by the target server.
- the connection establishment response includes: the mainstream identification information belonging to the MPTCP type, the device information and the key of the target server; Generating verification information with the key; and generating a control message according to the verification information and the device information of the target server, where the control message includes: the verification information and the device information of the target server;
- the corresponding virtual switch sends the control packet, so that the virtual switch generates a packet conversion rule based on the control packet, so as to direct the subflow corresponding to the main flow to the same target server.
- the virtual switch corresponding to the client After receiving the control information, the virtual switch corresponding to the client stores the control information in the database, so as to generate a packet conversion rule based on the packet control information after receiving the subflow.
- the virtual switch corresponding to the client can be based on the control message Generate packet conversion rules to direct the sub-flows corresponding to the main flow to the same target server to ensure normal access.
- FIG. 5 is a schematic flowchart of another embodiment of a load balancing method provided by the present disclosure.
- this embodiment includes: a client 10, a virtual switch 20, a load balancing device 30, a virtual switch 40, and a server 50 , a virtual switch 60 and a server 70.
- the virtual switch 20 is a virtual switch of the client 10 .
- the virtual switch 40 is a virtual switch of the server 50 .
- the virtual switch 60 may be a virtual switch of the server 70 .
- the client 10 sends a first packet to the virtual switch 20.
- the first message includes the TCP connection from the IP address 1 and port number 1 of the client 10 to the IP address 2 and port number 2 of the load balancing device 30 , MP_JOIN and token.
- MP_JOIN corresponds to sub-flow identification information belonging to the MPTCP type
- token is verification information
- IP address 2 and port number 2 of the load balancing device 30 correspond to the information of the first destination device.
- the virtual switch 20 determines according to the MP_JOIN that the first message belongs to the subflow of the MPTCP type, judges that the first target device information is the device information of the load balancing device, and then obtains the device of the target server corresponding to the Token in the database according to the carried Token information, and generate packet conversion rules based on the device information of the target server.
- the target server corresponding to the token is the server 50 , and the device information of the server 50 ie IP address 3 and port 3 can be obtained.
- the message conversion rules include: outbound message conversion rules and inbound message conversion rules.
- Outgoing message conversion rules include: replacing the destination address and port number in the message with the address and port number of the target server corresponding to the mainstream;
- the incoming packet conversion rules include: replacing the source address and source port number in the packet with the address and port number of the load balancing device.
- source device information IP address 1 and port number 1 of client 10
- Destination device information IP address 3 and port number 3 of server 50
- subflow identification information MP_JOIN
- authentication information token
- the virtual switch 20 sends the second packet to the virtual switch 40 corresponding to the target server.
- the first message can also be encapsulated by overlay (overlay), for example, the TCP data packet can be encapsulated using User Datagram Protocol (UDP) to obtain the second message arts.
- overlay overlay
- UDP User Datagram Protocol
- the inner layer of the second message includes: the TCP connection from the IP address 1 and port number 1 of the client 10 to the IP address 3 and port number 3 of the server 50, MP_JOIN and token.
- the second packet sent by the virtual switch 20 to the virtual switch 40 is a second packet after superposition and encapsulation.
- the virtual switch 20 sends the second packet to the server 50.
- the method provided in this embodiment may further include the following steps after step S505:
- the server 50 generates a second response corresponding to the second packet.
- the second response includes the TCP connection response, MP_JOIN and HMAC from the IP address 3 and port number 3 of the server 50 to the IP address 1 and port number 1 of the client 10 .
- the server 50 sends a second response to the virtual switch 40.
- the second response includes the TCP connection response, MP_JOIN and HMAC from the IP address 3 and port number 3 of the server 50 to the IP address 1 and port number 1 of the client 10 .
- the virtual switch 40 sends a second response to the virtual switch 20.
- the second response may also be overlay encapsulated, for example, the TCP data packet may be encapsulated using User Datagram Protocol (UDP) to obtain the second response.
- UDP User Datagram Protocol
- the inner layer of the updated second response includes: the TCP connection response from the IP address 3 and port number 3 of the server 50 to the IP address 1 and port number 1 of the client 10, MP_JOIN and HMAC.
- step S508 the first connection establishment response sent by the virtual switch 40 to the virtual switch 20 is the second response after superposition and encapsulation.
- the virtual switch 20 replaces the device information of the target server in the second response with the device information of the load balancing device according to the incoming packet conversion rule, to obtain the first response.
- the IP address 3 and port number 3 of the server 50 in the second response are updated to the IP address 2 and port number 2 of the load balancing device 30 to obtain the first response.
- the first response includes: source device information: IP address 2 of load balancing device 30, destination device information: port number 2 to IP address 1 and port number 1 of client 10, subflow identifier MP_JOIN and HMAC belonging to MPTCP .
- the virtual switch 20 sends a first response to the client 10.
- the sub-flow and the main stream are directed to the same target server, which ensures the normal progress of the access, and does not require the participation of the load balancing device in this process, which reduces the burden of the load balancing device and improves the system capacity.
- S601 The client 10 sends a first packet to the virtual switch 20.
- the first message includes: source device information: IP address 4 and port number 4 of the client 10, destination device information: IP address 2 and port number 2 of the load balancing device 30, mainstream identification information belonging to the MPTCP type ( MP_CAPABLE) and key (key1).
- the virtual switch 20 sends the first packet to the load balancing device 30.
- the virtual switch 20 encapsulates the first packet and sends it to the load balancing device.
- the load balancing device 30 sends the updated first packet to the virtual switch 40.
- the load balancing device 30 selects the target server according to the load balancing policy, assuming that the server 50 is selected. Replace the IP address 2 and port number 2 of the load balancing device 30 with the IP address 3 and port number 3 of the server 50 .
- the load balancing device 30 sends the updated first packet to the virtual switch 40 .
- the virtual switch 40 sends the updated first packet to the server 50.
- the server 50 sends a first response to the virtual switch 40.
- the first response includes: source device information: IP address 3 and port number 3 of the server 50, destination device information: IP address 4 and port number 4 of the client 10, mainstream identification information (MP_CAPABLE) belonging to the MPTCP type and Key key2.
- source device information IP address 3 and port number 3 of the server 50
- destination device information IP address 4 and port number 4 of the client 10
- mainstream identification information MP_CAPABLE belonging to the MPTCP type and Key key2.
- the virtual switch 40 sends a first response to the load balancing device 30.
- the first response includes: source address: IP address 3 and port number 3 of server 50, TCP connection of IP address 4 and port number 4 of client 10, mainstream identification information (MP_CAPABLE) and key2 belonging to MPTCP type.
- the load balancing device 30 sends a second response to the virtual switch 20.
- the load balancing device converts the source device information in the first response, and encapsulates the first response to obtain the second response.
- the load balancing device 30 updates the IP address 3 and port number 3 of the server 50 in the first response to the IP address 2 and port number 2 of the load balancing device 30 to obtain a second response.
- the second response includes: source device information: IP address 2 and port number 2 of the load balancing device 30, destination device information: IP address 4 and port number 4 of the client 10, mainstream identification information (MP_CAPABLE) and key2 belonging to the MPTCP type .
- the virtual switch 20 sends a second response to the client 10.
- S609 The virtual switch 20 of the client learns the device information of the target server through the load balancing device.
- S610 The client 10 sends a packet to the virtual switch 20.
- the message includes: source device information, destination device information, sub-flow identification information belonging to the MPTCP type, and verification information.
- source device information IP address 4 and port number 4 of client 10
- destination device information IP address 2 and port number 2 of load balancing device 30
- mainstream identification information MP_JOIN
- Token verification information
- the virtual switch 20 replaces the target device information with the device information of the target server according to the learned device information of the target server, and performs encapsulation to obtain an updated message.
- the updated message includes: source device information, destination device information, sub-flow identification information belonging to the MPTCP type, and verification information.
- Source device information IP address 4 and port number 4 of the client 10
- destination device information IP address 3 and port number 3 of the server 50
- sub-flow identification information MP_JOIN
- verification information token
- S613 The virtual switch 40 decapsulates the packet and sends it to the server 50.
- the server 50 After receiving the message, the server 50 associates the message according to the sub-flow identification information and verification information.
- S615 The server 50 sends a response to the virtual switch 40.
- the response includes: source device information, destination device information, subflow identification information belonging to the MPTCP type, and HMAC of the virtual switch 40 .
- S616 The virtual switch 40 sends a response to the virtual switch 20 of the client.
- the virtual switch 40 encapsulates the response and sends it to the virtual switch 20 .
- S617 The virtual switch 20 performs address translation and sends a response to the client 10.
- the IP address 3 and port number 3 of the server 50 in the response are updated to the IP address 2 and port number 2 of the load balancing device 30, and an updated response is obtained.
- the updated response includes: source device information: IP address 2 of load balancing device 30, destination device information: port number 2 to IP address 1 and port number 1 of client 10, subflow identifier MP_JOIN and HMAC belonging to MPTCP.
- the client virtual machine learns the device information of the target server through the load balancing device, so that after receiving the sub-flow, the virtual switch corresponding to the client can, according to the stored control information Direct the substream and the main stream to the same target server.
- the load balancing device 30 generates control information.
- the load balancing device determines that the client and the server try to establish an MPTCP session according to the mainstream identification information belonging to the MPTCP type in the first response, and calculates the verification information Token according to the key2 carried in the message replied by the virtual switch 40, and the Token can uniquely identify In this session, control information is generated based on the device information of the server 50 and the calculated authentication information.
- the load balancing device 30 sends the control information to the virtual switch 20.
- the virtual switch 20 stores the control information in a database.
- the load balancing device learns the device information of the target server, generates control information based on the device information of the target server and the obtained verification information, and sends the control information to the virtual switch corresponding to the client. Therefore, after receiving the sub-flow, the virtual switch corresponding to the client can direct the sub-flow and the main flow to the same target server according to the stored control information.
- FIG. 8 is a schematic structural diagram of a network load balancing device provided by the present disclosure. As shown in FIG. 8 , the device of this embodiment includes: a receiving module 801 , a processing module 802 and a sending module 803 .
- the receiving module 801 is configured to receive a first message, the first message including: first source device information, first destination device information, sub-flow identification information belonging to the multiplex transmission control protocol MPTCP type, and verification information , the verification information is used to indicate the main stream corresponding to the sub-stream identified by the sub-stream identification information;
- a processing module 802 configured to determine a target flow of the first message according to the first destination device information; determine a message conversion rule according to the verification information and the target flow of the first message, and the message The conversion rule is used to direct the sub-flow and the main stream to the same target server; based on the message conversion rule, the first source device information or the first destination device information in the first message is converted , obtaining a second message, where the second message includes second source device information and second destination device information;
- a sending module 803, configured to send the second message to the second destination device according to the second destination device information in the second message.
- the processing module 802 is specifically configured to determine the target server corresponding to the mainstream according to the verification information if the target flow characterization message of the first message needs to be sent to the load balancing device, and determine The message conversion rule is used to convert the first destination device information in the first message into the device information of the target server; if the target flow direction of the first message indicates that the message needs to be sent to the client , determining that the packet conversion rule is used to convert the first source device information in the first packet into device information of the load balancing device.
- the processing module 802 is further configured to determine that the first packet is a subflow according to the subflow identification information of the MPTCP type; obtain the corresponding subflow of the verification information from the database according to the verification information The target server directed by the mainstream; generate the message conversion rule corresponding to the verification information according to the device information of the target server, and the message conversion rule includes: if the target flow of the first message indicates that the message requires Sending to the load balancing device, converting the first destination device information in the first message into the device information of the target server; if the target flow direction representation message of the first message needs to be sent to the client, Then convert the first source device information in the first packet into the device information of the load balancing device.
- the receiving module 801 is further configured to receive control information sent by a load balancing device, where the control information includes: the verification information and the device information of the target server;
- the processing module 802 is also configured to store the control information in the database.
- the processing module 802 is further configured to start a timer, and delete the packet conversion rule after the timer expires.
- the device in this embodiment corresponds to the steps performed by the virtual switch corresponding to the client in the above method embodiments, and its implementation principle and technical effect are similar, and will not be repeated here.
- FIG. 9 is a schematic structural diagram of another network load balancing device provided by the present disclosure. As shown in FIG. 9 , the device of this embodiment includes: a receiving module 901 , a processing module 902 and a sending module 903 .
- the receiving module 901 is configured to receive a connection establishment response, which includes: mainstream identification information belonging to the multiplex transmission control protocol MPTCP type, device information and keys of the target server;
- the processing module 902 is configured to generate verification information according to the key; and generate a control message according to the verification information and the device information of the target server, and the control message includes: the verification information and the target server device information;
- the sending module 903 is configured to send the control packet to the virtual switch corresponding to the client, so that the virtual switch generates a packet conversion rule based on the control packet, so as to direct the subflow corresponding to the main flow to the target server .
- the apparatus in this embodiment can be used to execute the steps performed by the load balancing device in the foregoing method embodiments, and its implementation principles and technical effects are similar, and will not be repeated here.
- An embodiment of the present disclosure provides an electronic device, including: one or more processors; memory; and one or more computer programs; wherein one or more computer programs are stored in the memory; one or more processors are executing One or more computer programs enable the electronic device to implement the above-mentioned method.
- An embodiment of the present disclosure provides a computer storage medium, including computer instructions.
- the computer instructions When the computer instructions are run on an electronic device, the electronic device is made to execute the above method.
- An embodiment of the present disclosure provides a computer program product, which enables the computer to execute the above method when the computer program product is run on the computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
Claims (16)
- 一种网络负载均衡方法,包括:接收第一报文,所述第一报文中包括:第一源设备信息、第一目的设备信息、属于多路传输控制协议MPTCP类型的子流标识信息、以及验证信息,所述验证信息用于指示所述子流标识信息标识的子流对应的主流;根据所述第一目的设备信息确定所述第一报文的目标流向;根据所述验证信息以及所述第一报文的目标流向确定报文转换规则,所述报文转换规则用于将所述子流与所述主流定向到同一目标服务器;基于所述报文转换规则对所述第一报文中的第一源设备信息或者所述第一目的设备信息进行转换,得到第二报文,所述第二报文包括第二源设备信息和第二目的设备信息;根据所述第二报文中的第二目的设备信息向第二目的设备发送所述第二报文。
- 根据权利要求1所述的网络负载均衡方法,其中,所述根据所述验证信息以及所述第一报文的目标流向确定报文转换规则,包括:若所述第一报文的目标流向表征报文需要发送至负载均衡设备,则根据所述验证信息确定所述主流对应的目标服务器,确定所述报文转换规则用于将所述第一报文中的第一目的设备信息转换为所述目标服务器的设备信息;若所述第一报文的目标流向表征报文需要发送至客户端,确定所述报文转换规则用于将所述第一报文中的第一源设备信息转换为所述负载均衡设备的设备信息。
- 根据权利要求1或2所述的网络负载均衡方法,其中,所述根据所述第一目的设备信息确定所述第一报文的目标流向之前,还包括:根据所述MPTCP类型的子流标识信息确定所述第一报文为子流;根据所述验证信息从数据库中获取所述验证信息对应的主流定向的目标服务器;根据所述目标服务器的设备信息生成所述验证信息对应的所述报文转换规则,所述报文转换规则包括:若所述第一报文的目标流向表征报文需要发送至负载均衡设备,则将所述第一报文中的第一目的设备信息转换为所述目标服务器的设备信息;若所述第一报文的目标流向表征报文需要发送至客户端,则将所述第一报文中的第一源设备信息转换为所述负载均衡设备的设备信息。
- 根据权利要求3所述的网络负载均衡方法,其中,所述接收第一报文之前,还包括:接收负载均衡设备发送的控制信息,所述控制信息中包括:所述验证信息以及所述目标服务器的设备信息;将所述控制信息存储于所述数据库中。
- 根据权利要求3所述的网络负载均衡方法,其中,所述根据所述目标服务器的设备信息生成所述验证信息对应的所述报文转换规则之后,还包括:启动定时器,定时器到时后,删除所述报文转换规则。
- 根据权利要求1或2所述的网络负载均衡方法,其中,所述网络负载均衡方法由与客户端对应的虚拟交换机执行。
- 一种网络负载均衡方法,包括:接收连接建立响应,所述连接建立响应中包括:属于多路传输控制协议MPTCP类型的主流标识信息、目标服务器的设备信息和密钥;根据所述密钥生成验证信息;根据所述验证信息和所述目标服务器的设备信息生成控制报文,所述控制报文中包括:所述验证信息和所述目标服务器的设备信息;向客户端对应的虚拟交换机发送所述控制报文,以使所述虚拟交换机基于所述控制报文生成报文转换规则,以将主流对应的子流定向至所述目标服务器。
- 根据权利要求7所述的网络负载均衡方法,其中,所述网络负载均衡方法由负载均衡设备执行。
- 一种网络负载均衡装置,包括:接收模块,用于接收第一报文,所述第一报文中包括:第一源设备信息、第 一目的设备信息、属于多路传输控制协议MPTCP类型的子流标识信息、以及验证信息,所述验证信息用于指示所述子流标识信息标识的子流对应的主流;处理模块,用于根据所述第一目的设备信息确定所述第一报文的目标流向;并根据所述验证信息以及所述第一报文的目标流向确定报文转换规则,所述报文转换规则用于将所述子流与所述主流定向到同一目标服务器;并基于所述报文转换规则对所述第一报文中的第一源设备信息或者所述第一目的设备信息进行转换,得到第二报文,所述第二报文包括第二源设备信息和第二目的设备信息;发送模块,用于根据所述第二报文中的第二目的设备信息向第二目的设备发送所述第二报文。
- 一种网络负载均衡装置,包括:接收模块,用于接收连接建立响应,所述连接建立响应中包括:属于多路传输控制协议MPTCP类型的主流标识信息、目标服务器的设备信息和密钥;处理模块,用于根据所述密钥生成验证信息;并根据所述验证信息和所述目标服务器的设备信息生成控制报文,所述控制报文中包括:所述验证信息和所述目标服务器的设备信息;发送模块,用于向客户端对应的虚拟交换机发送所述控制报文,以使所述虚拟交换机基于所述控制报文生成报文转换规则,以将主流对应的子流定向至所述目标服务器。
- 一种网络负载均衡系统,包括:虚拟交换机,与客户端对应,被配置为执行如权利要求1-6任一项所述的网络均衡负载方法。
- 根据权利要求11所述的网络负载均衡系统,还包括:负载均衡设备,被配置为执行如权利要求7或8所述的网络均衡负载方法。
- 一种电子设备,包括:一个或多个处理器;存储器;以及一个或多个计算机程序;其中所述一个或多个计算机程序被存储在所述存储器中;其中,所述一个或多个处理器在执行所述一个或多个计算机程序时,使得所述电子设备实现如权利要求1-8任一项所述的网络负载均衡方法。
- 一种计算机存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-8任一项所述的网络负载均衡方法。
- 一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-8任一项所述的网络负载均衡方法。
- 一种计算机程序,包括:指令,所述指令当由处理器执行时使所述处理器执行根据权利要求1-8任一项所述的网络负载均衡方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/560,866 US12574326B2 (en) | 2021-12-21 | 2022-10-21 | Network load balancing method and apparatus, electronic device, medium, and program product |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111571274.2 | 2021-12-21 | ||
| CN202111571274.2A CN114285802A (zh) | 2021-12-21 | 2021-12-21 | 网络负载均衡方法、装置、电子设备、介质和程序产品 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023116165A1 true WO2023116165A1 (zh) | 2023-06-29 |
Family
ID=80873471
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/126674 Ceased WO2023116165A1 (zh) | 2021-12-21 | 2022-10-21 | 网络负载均衡方法、装置、电子设备、介质和程序产品 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US12574326B2 (zh) |
| CN (1) | CN114285802A (zh) |
| WO (1) | WO2023116165A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118214786A (zh) * | 2024-05-21 | 2024-06-18 | 国网信息通信产业集团有限公司 | 高并发多协议通信方法、装置、电子设备及存储介质 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114285802A (zh) * | 2021-12-21 | 2022-04-05 | 北京字节跳动网络技术有限公司 | 网络负载均衡方法、装置、电子设备、介质和程序产品 |
| CN115665047B (zh) * | 2022-10-27 | 2025-07-11 | 北京火山引擎科技有限公司 | 报文传输控制方法、装置、介质及设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108353334A (zh) * | 2015-12-25 | 2018-07-31 | 华为技术有限公司 | 业务传输方法、装置及设备 |
| CN109155757A (zh) * | 2016-06-10 | 2019-01-04 | 特斯萨瑞斯股份公司 | 混合接入网络中的多路径tcp |
| US10476992B1 (en) * | 2015-07-06 | 2019-11-12 | F5 Networks, Inc. | Methods for providing MPTCP proxy options and devices thereof |
| CN112291815A (zh) * | 2020-11-06 | 2021-01-29 | 网易(杭州)网络有限公司 | 一种mptcp连接建立方法及装置 |
| CN114285802A (zh) * | 2021-12-21 | 2022-04-05 | 北京字节跳动网络技术有限公司 | 网络负载均衡方法、装置、电子设备、介质和程序产品 |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120331160A1 (en) * | 2011-06-22 | 2012-12-27 | Telefonaktiebolaget L M Ericsson (Publ) | Multi-path transmission control protocol proxy service |
| US9930013B2 (en) * | 2014-11-14 | 2018-03-27 | Cisco Technology, Inc. | Control of out-of-band multipath connections |
| US20190068694A1 (en) * | 2016-02-26 | 2019-02-28 | NEC Laboratories Europe GmbH | Load balancer for multipath-capable clients and servers |
| CN108667880A (zh) * | 2017-03-31 | 2018-10-16 | 华为技术有限公司 | 一种负载均衡系统、方法及装置 |
| CN111512611B (zh) * | 2017-12-22 | 2023-04-04 | 诺基亚技术有限公司 | Mptcp感知的负载均衡器的设计方法和使用该设计的负载均衡器 |
| US10785163B2 (en) * | 2019-02-27 | 2020-09-22 | International Business Machines Corporation | Maintaining a queuing policy with multipath traffic |
| CN112929264B (zh) * | 2019-12-06 | 2022-10-28 | 厦门网宿有限公司 | 业务流量传输方法、系统及网络设备 |
| CN111193773B (zh) * | 2019-12-06 | 2022-12-09 | 腾讯云计算(北京)有限责任公司 | 负载均衡方法、装置、设备及存储介质 |
| US11647083B2 (en) * | 2021-07-20 | 2023-05-09 | Citrix Systems, Inc. | Cluster-aware multipath transmission control protocol (MPTCP) session load balancing |
| CN114519113A (zh) | 2022-02-18 | 2022-05-20 | 北京神州安信科技股份有限公司 | 一种可实时人机互交3d演示文稿的实现方法及应用系统 |
-
2021
- 2021-12-21 CN CN202111571274.2A patent/CN114285802A/zh active Pending
-
2022
- 2022-10-21 WO PCT/CN2022/126674 patent/WO2023116165A1/zh not_active Ceased
- 2022-10-21 US US18/560,866 patent/US12574326B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10476992B1 (en) * | 2015-07-06 | 2019-11-12 | F5 Networks, Inc. | Methods for providing MPTCP proxy options and devices thereof |
| CN108353334A (zh) * | 2015-12-25 | 2018-07-31 | 华为技术有限公司 | 业务传输方法、装置及设备 |
| CN109155757A (zh) * | 2016-06-10 | 2019-01-04 | 特斯萨瑞斯股份公司 | 混合接入网络中的多路径tcp |
| CN112291815A (zh) * | 2020-11-06 | 2021-01-29 | 网易(杭州)网络有限公司 | 一种mptcp连接建立方法及装置 |
| CN114285802A (zh) * | 2021-12-21 | 2022-04-05 | 北京字节跳动网络技术有限公司 | 网络负载均衡方法、装置、电子设备、介质和程序产品 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118214786A (zh) * | 2024-05-21 | 2024-06-18 | 国网信息通信产业集团有限公司 | 高并发多协议通信方法、装置、电子设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114285802A (zh) | 2022-04-05 |
| US20240259316A1 (en) | 2024-08-01 |
| US12574326B2 (en) | 2026-03-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8244881B2 (en) | Service virtualization over content-centric networks | |
| US8588233B1 (en) | Peer-to-peer connection establishment using TURN | |
| US8996657B2 (en) | Systems and methods for multiplexing network channels | |
| US7107609B2 (en) | Stateful packet forwarding in a firewall cluster | |
| US8266294B2 (en) | Routing hints | |
| WO2023116165A1 (zh) | 网络负载均衡方法、装置、电子设备、介质和程序产品 | |
| WO2021047515A1 (zh) | 一种服务路由方法及装置 | |
| JP2013251925A (ja) | モバイル機器に対するネットワークアドレス変更のための方法及び装置 | |
| WO2023151264A1 (zh) | 负载均衡方法、装置、节点及存储介质 | |
| CN119449721A (zh) | 跨信任网络的服务器的负载平衡客户端连接 | |
| JP2024072265A (ja) | レジデンシャルゲートウェイへのネットワークアクセスのための装置、方法、および非一時的コンピュータ可読記憶媒体 | |
| WO2023186109A1 (zh) | 节点访问方法以及数据传输系统 | |
| CN118631813B (zh) | 一种quic协议的负载均衡方法、系统和负载均衡器 | |
| US20060047821A1 (en) | System, method, and medium for relaying data using socket application program | |
| WO2022042370A1 (zh) | Mptcp负载均衡方法、介质及设备 | |
| WO2007019809A1 (en) | A method and ststem for establishing a direct p2p channel | |
| CN1863202B (zh) | 提高负载均衡设备和服务器处理性能的方法 | |
| WO2021134860A1 (zh) | 负载均衡方法、设备及系统 | |
| JP3929969B2 (ja) | 通信システム、サーバ、端末装置、通信方法、プログラムおよび記憶媒体 | |
| US20070147376A1 (en) | Router-assisted DDoS protection by tunneling replicas | |
| US12452103B2 (en) | Combined PFCP session model for network access by residential gateways | |
| US11902052B1 (en) | Separate PFCP session model for network access by residential gateways | |
| US11956302B1 (en) | Internet protocol version 4-to-version 6 redirect for application function-specific user endpoint identifiers | |
| JP5415388B2 (ja) | 仮想通信路接続システム、制御方法、制御プログラム、第1の端末及び第2の端末 | |
| JP2002199003A (ja) | 移動端末位置登録方法及びその実施装置 |
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: 22909483 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18560866 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17.10.24) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22909483 Country of ref document: EP Kind code of ref document: A1 |
|
| WWG | Wipo information: grant in national office |
Ref document number: 18560866 Country of ref document: US |