A Load Balancing Method, System and Load Balancer for QUIC Protocol
By using a load balancer in the direct routing mode in QUIC connection for reload balancing and packet forwarding, the problem of high implementation cost of QUIC protocol address migration is solved, and the low-cost and efficient implementation of QUIC protocol address migration is achieved.
Patent Information
- Application Number
- CN202411096933.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The prior art is difficult to effectively reduce the implementation cost of address migration of QUIC protocol, which makes it difficult to exert the advantages of address migration of QUIC protocol.
When there is a QUIC connection between the client and the first target server, if the source address of the client changes, the load balancer in the direct routing mode is used to reload balance, and the second target server is obtained, and the QUIC packet is sent to the second target server, and the packet is forwarded to the first target server according to the unique identification of the first target server embedded in the server CID of the QUIC connected server, triggering the address migration in the QUIC standard protocol stack.
The low-cost implementation of QUIC protocol address migration is implemented, solving the problem of how to reduce the implementation cost of QUIC protocol address migration, without the need to modify the load balancer or QUIC protocol stack.
Smart Images

Figure CN118631813B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data communication technologies, and in particular, to a load balancing method, system, and load balancer for the QUIC protocol. Background Art
[0002] QUIC (Quick UDP Internet Connections) is a transport layer network protocol designed to improve the performance of web pages and applications, reduce latency, and enhance security. QUIC is based on UDP (User Datagram Protocol) and has various features such as end-to-end encryption, multiplexing, and address migration. Among them, for the address migration of QUIC, that is, QUIC supports the address migration of clients and servers to reduce frequent reconnections and application interruptions caused by changes in the client network. In practical applications, data communication between the client and the server needs to go through a load balancer for load balancing. Generally, a load balancer needs to perform traffic distribution based on the four-tuple of the network, that is, the source address, source port, destination address, and destination port. When the client address migrates, that is, the four-tuple changes, most likely the connected traffic will be switched to different servers, resulting in connection interruptions. The client and the server need to re-establish a connection to resume the service, making it difficult to take advantage of the address migration advantage of the QUIC protocol.
[0003] In existing technical solutions that can ensure the address migration advantage of the QUIC protocol, such as the patent with application number 202011463461.4, it discloses using an Nginx server provided by a cloud computing service provider as a load balancer to achieve load balancing of packets at the application layer (the seventh layer in the OSI network model). Although it can ensure both the address migration of the QUIC protocol and the multi-process mechanism of the Nginx server, the support degree of the cloud computing server for other functions of the QUIC protocol is not transparent, and the usage cost of the application layer load balancer is significantly higher than that of the transport layer load balancer. Another example is the patent with application number 202210892928.X, which discloses using multiple-level load balancers, where each load balancer corresponds to at least one server, to ensure that when an address migration occurs, the original QUIC data packets are still sent to the same server, that is, the client does not need to disconnect and reconnect with different servers, ensuring the address migration advantage of the QUIC protocol. However, obviously, the multiple-level load balancers undoubtedly increase the hardware usage cost and network cost, and the multiple-level forwarding increases the network latency and the calculation and judgment efficiency is also lower.
[0004] Currently, for the problem of how to reduce the implementation cost of QUIC protocol address migration in related technologies, no effective solution has been proposed. Summary of the Invention
[0005] The embodiments of the present application provide a load balancing method, system and load balancer for the QUIC protocol, so as to at least solve the problem of how to reduce the implementation cost of address migration in the QUIC protocol in the related art.
[0006] In a first aspect, the embodiments of the present application provide a load balancing method for the QUIC protocol, and the method includes:
[0007] When there is a QUIC connection between the client and the first target server, if the source address of the client changes, re-load balancing is performed through a load balancer in the direct routing mode according to the changed source address to obtain a second target server;
[0008] Send the QUIC data packet sent by the client through the QUIC connection to the second target server;
[0009] According to the unique identifier of the first target server embedded in the server CID of the QUIC connection, forward the QUIC data packet sent to the second target server to the first target server and trigger address migration in the QUIC standard protocol stack.
[0010] In some embodiments, before there is a QUIC connection between the client and the first target server, the method includes:
[0011] Receive the QUIC Initial packet sent by the client;
[0012] Perform load balancing through a load balancer in the direct routing mode according to the source address of the client to obtain a first target server, and send the QUIC Initial packet to the first target server;
[0013] Send the handshake packet returned by the first target server to the client;
[0014] Establish a QUIC connection between the client and the first target server based on the handshake packet, where the handshake packet includes the server CID of the QUIC connection, and the unique identifier of the target server is embedded in the server CID.
[0015] In some embodiments, according to the unique identifier of the first target server embedded in the server CID of the QUIC connection, forwarding the QUIC data packet sent to the second target server to the first target server includes:
[0016] By using the XDP packet processing technology, detect the QUIC packets received by the second target server. If it is determined that the unique identifier of the first target server is embedded in the server CID of the QUIC connection, forward the QUIC packets to the first target server.
[0017] In some embodiments, triggering the address migration in the QUIC standard protocol stack includes:
[0018] By using the XDP packet processing technology, detect the QUIC packets received by the first target server. If it is determined that the source address to the client has changed, trigger the address migration in the QUIC standard protocol stack.
[0019] In some embodiments, performing re - load balancing through a load balancer in the direct routing mode according to the changed source address to obtain the second target server includes:
[0020] Perform re - load balancing through a load balancer in the direct routing mode according to the changed source address and predefined rules to obtain the second target server that receives the QUIC packets.
[0021] In some embodiments, performing load balancing through a load balancer in the direct routing mode according to the source address of the client to obtain the first target server includes:
[0022] Perform load balancing through a load balancer in the direct routing mode according to the source address of the client and predefined rules to obtain the first target server that receives the QUIC packets.
[0023] In some embodiments, the predefined rules include a round - robin rule and a least - connections rule.
[0024] In some embodiments, the load balancing or the re - load balancing is performed by a load balancer at the transport layer.
[0025] In a second aspect, an embodiment of the present application provides a load - balancing system for the QUIC protocol. The system is used to execute the method described in the first aspect above. The system includes a client, a load balancer, a first target server, and a second target server;
[0026] There is a QUIC connection between the client and the first target server, and it is used to send QUIC packets through the QUIC connection;
[0027] The load balancer is used to automatically allocate the first target server or the second target server to the client according to the source address of the client;
[0028] The first target server has a QUIC connection with the client and is used to return data to the client through the QUIC connection;
[0029] The second target server is used to forward the received QUIC data packets sent by the client to the first target server.
[0030] In a third aspect, an embodiment of the present application provides a load balancer for the QUIC protocol. The load balancer is used to execute the method described in the first aspect above, and the load balancer is a load balancer at the transport layer.
[0031] Compared with the related art, an embodiment of the present application provides a load balancing method, system, and load balancer for the QUIC protocol. Among them, in the case where there is a QUIC connection between the client and the first target server, if the source address of the client changes, then according to the changed source address, re-load balancing is performed through a load balancer in the direct routing mode to obtain the second target server; the QUIC data packets sent by the client through the QUIC connection are sent to the second target server; according to the unique identifier of the first target server embedded in the server CID of the QUIC connection, the QUIC data packets sent to the second target server are forwarded to the first target server and trigger the address migration in the QUIC standard protocol stack, realizing embedding the unique identifier of the target server into the server CID of the QUIC connection. In the case where re-load balancing is required, data forwarding and address migration are completed based on the embedded unique identifier of the target server and the load balancer in the direct routing mode, without the need to modify the load balancer or the QUIC protocol stack, ensuring the low-cost implementation of the QUIC protocol address migration, and solving the problem of how to reduce the implementation cost of the QUIC protocol address migration. Description of the Drawings
[0032] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0033] Figure 1 is the step flow of the QUIC protocol load balancing method according to the embodiment of the present application Figure 1 ;
[0034] Figure 2 is the schematic diagram of the QUIC address migration process according to the embodiment of the present application;
[0035] Figure 3 is the step flow of the QUIC protocol load balancing method according to the embodiment of the present application Figure 2 ;
[0036] Figure 4 It is a schematic flowchart of establishing a QUIC connection according to an embodiment of the present application;
[0037] Figure 5 It is a schematic internal structure diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners
[0038] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be described and explained below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without making creative efforts fall within the scope of protection of the present application.
[0039] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without making creative efforts, the present application can also be applied to other similar scenarios based on these drawings. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.
[0040] Referring to "embodiment" in the present application means that the specific features, structures or characteristics described in combination with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0041] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "one", "a kind of", "the" and the like involved in this application do not indicate a limitation in quantity and may represent a singular or plural number. The terms "including", "comprising", "having" and any variations thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device including a series of steps or modules (units) is not limited to the listed steps or units, but may further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The words such as "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and back associated objects. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0042] An embodiment of this application provides a load balancing method for the QUIC protocol. The method includes establishing a QUIC connection and QUIC address migration after establishing the QUIC connection. Among them, Figure 1 is the step flow of the QUIC protocol load balancing method according to the embodiment of this application Figure 1 , as Figure 1 shown, the QUIC address migration includes the following steps:
[0043] Step S102, when there is a QUIC connection between the client and the first target server, if the source address of the client changes, re-load balancing is performed through the load balancer in the direct routing mode according to the changed source address to obtain a second target server;
[0044] Specifically, in step S102, re-load balancing is performed through the load balancer in the direct routing mode according to the changed source address and a predefined rule to obtain a second target server that receives QUIC data packets. Among them, the predefined rule includes but is not limited to a round-robin rule and a least-connection rule.
[0045] Preferably, this re - load balancing is performed by a load balancer at the transport layer, such as IPVS (IP Virtual Server), which is a highly scalable and high - performance load - balancing technology in the Linux kernel. It belongs to the Layer 4 (transport layer) load balancer. Compared with the Layer 7 (application layer) load balancer (such as the load balancer provided by cloud service platforms), the cost of the transport - layer load balancer in this embodiment is significantly lower, which further ensures the low - cost implementation of the QUIC protocol address migration.
[0046] It should be noted that Figure 2 is a schematic diagram of the QUIC address migration process according to the embodiments of the present application, as Figure 2 shown Figure 2 In 1: When the source address of the client changes (such as when the client switches between Wi - Fi network and cellular network, resulting in the change of the source address); Figure 2 In 2: Further, it leads to the change of the NAT gateway address, so the network quadruple changes; Figure 2 In 3: Because of the change of the quadruple, the load balancer will perform re - load balancing through predefined rules to obtain the second target server for receiving QUIC data packets. In addition, the load balancer is associated with several servers (including the first target server and the second target server) through a virtual IP address (VIP), and this virtual IP address is configured on the local network interface (link - local device) of the server.
[0047] Step S104: Send the QUIC data packets sent by the client through the QUIC connection to the second target server;
[0048] Specifically for step S104, as Figure 2 shown Figure 2 In 3: According to the second target server obtained in the above step S102, send the QUIC data packets sent by the client through the QUIC connection to this second target server.
[0049] Step S106: According to the unique identifier of the first target server embedded in the server CID of the QUIC connection, forward the QUIC data packets sent to the second target server to the first target server and trigger the address migration in the QUIC standard protocol stack.
[0050] It should be noted that the QUIC connection between the client and the server is an asymmetric connection, that is, the CID of the QUIC connection includes the client CID (contained in the data packet header sent by the server to the client) and the server CID (contained in the data packet header sent by the client to the server). In this embodiment, only the unique identifier of the first target server is embedded in the server CID.
[0051] Step S106 specifically includes the following steps:
[0052] Step S1061: Detect the QUIC packets received by the second target server through the XDP packet processing technology. If it is determined that the unique identifier of the first target server is embedded in the server CID of the QUIC connection at the server side, then forward the QUIC packets to the first target server.
[0053] It should be noted that as Figure 2 shown Figure 2 in 4: The second target server includes an XDP detection module. This XDP detection module is built based on the XDP packet processing technology and will detect the QUIC packets received by the second target server. If the server identification ID embedded in the server CID of the QUIC packets is not the unique identifier of the second target server but the unique identifier of the first target server, then forward the QUIC packets to the first target server, and the source address and destination address of the forwarded packet remain unchanged at this time. XDP is a technology for processing packets at an early stage of the network stack. It runs in the Linux kernel and allows applications to process packets before they reach other parts of the network protocol stack. Since XDP can execute code before the network driver passes the packets to other parts of the kernel, it can significantly reduce the packet processing latency and CPU usage.
[0054] Step S1062: Detect the QUIC packets received by the first target server through the XDP packet processing technology. If it is determined that the source address to the client has changed, then trigger the address migration in the QUIC standard protocol stack.
[0055] It should be noted that as Figure 2 shown Figure 2 in 5: The first target server also includes an XDP detection module. This XDP detection module is built based on the XDP packet processing technology. If it is detected that the server CID of the QUIC packets received by the first target server embeds the unique identification number of the first target server, then release them to the QUIC protocol stack. If it is detected in the QUIC protocol stack that the source address of the client has changed, then trigger the process of address migration in the QUIC standard protocol stack. Figure 2 in 6: The NAT gateway performs address translation and forwards the packets to the client according to the previous packet sending information.
[0056] Further, it should be noted that since the QUIC protocol uses the concept of Connection ID (server CID), even if the underlying IP address or port number changes, as long as the Connection ID remains unchanged, the connection can continue. That is, the address migration of the QUIC protocol. The address migration of the QUIC protocol allows for a smooth switch from one network interface or address to another without interrupting the session. This feature is particularly important for mobile devices as these devices may frequently switch between different types of networks (such as Wi-Fi and cellular networks).
[0057] It can be seen that in the embodiments of the present application, the unique identifier of the first target server is ingeniously embedded in the Connection ID (server CID). Subsequently, when the source address of the client changes, through steps S1061 and S1062, the transmission path newly created by the load balancer for the client (the path sent to the second target server) is migrated back to the original path (the path sent to the first target server) according to the unique identifier of the first target server embedded in the Connection ID, maintaining the QUIC connection between the client and the first target server. Based on the embedded unique identifier of the first target server, data forwarding and address migration are completed, ensuring a low-cost implementation of the QUIC protocol address migration and solving the problem of how to reduce the implementation cost of the QUIC protocol address migration.
[0058] Through steps S102 to S106 in the embodiments of the present application, the unique identifier of the target server is embedded in the server CID of the QUIC connection. In the case where load balancing needs to be re-performed, data forwarding and address migration are completed based on the embedded unique identifier of the target server and the load balancer in the direct routing mode, without the need to modify the load balancer or the QUIC protocol stack, ensuring a low-cost implementation of the QUIC protocol address migration and solving the problem of how to reduce the implementation cost of the QUIC protocol address migration. Further, the load balancing method of this embodiment also has advantages such as low network transformation (only need to load the XDP detection module, configure VIP and relative routing on the server side), using mature open source technologies, being compatible with traditional UDP load balancers, having a simple logic that is easy to understand, reducing operation and maintenance complexity, high efficiency in kernel state implementation, capacity scalable with the number of servers, decrypting QUIC packets only once, the packet forwarding having at most one more hop, and not performing protocol conversion, etc.
[0059] In some of these embodiments, a load balancing method for the QUIC protocol includes establishing a QUIC connection, Figure 3 It is the step flow of the load balancing method for the QUIC protocol according to the embodiments of the present application Figure 2 , as Figure 3 shown, establishing a QUIC connection includes the following steps:
[0060] Step S302: Receive the QUIC Initial packet sent by the client.
[0061] Specifically, for step S302, Figure 4 is a schematic diagram of the process for establishing a QUIC connection according to an embodiment of the present application. As Figure 4 shown, Figure 4 in 1: The client sends a QUIC Initial packet; Figure 4 in 2: The NAT gateway performs address translation; Figure 4 in 3: The load balancer in the direct routing mode receives the QUIC Initial packet sent by the client.
[0062] Step S304: Perform load balancing through the load balancer in the direct routing mode according to the source address of the client, obtain the first target server, and send the QUIC Initial packet to the first target server.
[0063] Specifically, for step S304, as Figure 4 shown, Figure 4 in 3: According to the source address of the client and predefined rules, perform load balancing through the load balancer in the direct routing mode to obtain the first target server that receives the QUIC data packet. The predefined rules include, but are not limited to, the round-robin rule and the least-connection rule.
[0064] Preferably, this load balancing is performed by a load balancer at the transport layer, such as IPVS, whose full name is IP VirtualServer, which is a highly scalable and high-performance load balancing technology in the Linux kernel. It belongs to a Layer 4 (transport layer) load balancer. Compared with a Layer 7 (application layer) load balancer (such as the load balancer provided by a cloud service platform), the cost of the load balancer at the transport layer in this embodiment is significantly lower, that is, it further ensures the low-cost implementation of the QUIC protocol address migration.
[0065] Step S306: As Figure 4 shown, Figure 4 in 4: Send a handshake packet back to the client from the first target server.
[0066] Step S308: As Figure 4 shown, Figure 4 in 5: The NAT gateway performs address translation based on the previous packet sending information and sends it to the client, and establishes a QUIC connection between the client and the first target server based on the handshake packet. The handshake packet contains the server CID of the QUIC connection, and the unique identifier of the target server is embedded in the server CID.
[0067] It should be noted that the ConnectionID (CID) in the QUIC (Quick UDP Internet Connections) protocol does not need to be regenerated every time data is sent. The CID is initialized during the establishment of a QUIC connection and remains unchanged throughout the connection. When a client wants to establish a QUIC connection, it generates a CID (client CID) and includes it in the initial connection request; after receiving this request, the server also assigns a CID (server CID) and returns it to the client in the response. Once the connection is established, the client and the server use these CIDs to identify the connection.
[0068] Under normal circumstances, the CID does not change during the entire connection process. However, in some cases, such as when the server needs to change the server CID, it can send an instruction with the new server CID to the client for CID update. At this time, it is also necessary to embed the unique identifier of the target server into the new server CID. Embedding the unique identifier of the target server is applicable to the generation of all server CIDs. For example, when the server needs to generate multiple backup CIDs, it also needs to embed the unique identifier of the target server.
[0069] Through steps S302 to S308 in the embodiments of the present application, the unique identifier of the first target server is cleverly embedded into the Connection ID (specifically, the server CID). Subsequently, when the source address of the client changes, the transmission path newly created by the load balancer for the client (the path sent to the second target server) is migrated back to the original path (the path sent to the first target server) according to the unique identifier of the first target server embedded in the Connection ID, maintaining the QUIC connection between the client and the first target server. Based on the embedded unique identifier of the first target server, data forwarding and address migration are completed, ensuring the low-cost implementation of address migration in the QUIC protocol and solving the problem of how to reduce the implementation cost of address migration in the QUIC protocol.
[0070] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0071] The embodiments of the present application provide a load balancing system for the QUIC protocol. The system includes a client, a load balancer, a first target server, and a second target server;
[0072] There is a QUIC connection between the client and the first target server, which is used to send QUIC packets through the QUIC connection;
[0073] A load balancer, which is used to automatically allocate the first target server or the second target server for the client according to the source address of the client; It should be noted that the number of servers allocated for the client is not limited to one, and can also be two or more.
[0074] There is a QUIC connection between the first target server and the client, which is used to return data to the client through the QUIC connection;
[0075] The second target server is used to forward the received QUIC packets sent by the client to the first target server.
[0076] This embodiment also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.
[0077] Optionally, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0078] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be repeated here.
[0079] In addition, in combination with the load balancing method of the QUIC protocol in the above embodiments, an embodiment of the present application can be implemented by providing a storage medium. A computer program is stored on the storage medium; when the computer program is executed by a processor, it implements any one of the load balancing methods of the QUIC protocol in the above embodiments.
[0080] In one embodiment, a computer device is provided, and the computer device may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a load balancing method for the QUIC protocol. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0081] In one embodiment, Figure 5 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application, as Figure 5 shown, an electronic device is provided, and the electronic device may be a server, and its internal structure diagram may be as Figure 5 shown. The electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected through an internal bus. Among them, the non-volatile memory stores an operating system, a computer program, and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with an external terminal through a network connection, the internal memory is used to provide an environment for the operation of the operating system and the computer program, the computer program is executed by the processor to implement a load balancing method for the QUIC protocol, and the database is used to store data.
[0082] Those skilled in the art can understand that Figure 5 the structure shown in
[0083] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0084] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0085] The above embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A load balancing method for the QUIC protocol, characterized in that: The method comprises: The receiving client sends a QUICInitial packet; Perform load balancing through a load balancer in direct routing mode according to the source address of the client to obtain a first target server, and send the QUICInitial packet to the first target server; Sending the first target server return handshake packet to the client without passing through the load balancer, wherein the client communicates with the load balancer and the first target server through a NAT gateway; Establishing a QUIC connection between the client and the first target server based on the handshake packet, wherein the handshake packet includes a server CID of the QUIC connection, and the server CID has a unique identifier of the target server embedded therein; In the case where a QUIC connection exists between the client and the first target server, if the source address of the client changes, re-load balancing is performed through a load balancer in direct routing mode according to the changed source address to obtain a second target server, wherein the load balancer is a transport layer load balancer; Sending the QUIC data packet sent by the client through the QUIC connection to the second target server; By using the XDP data packet processing technology, the QUIC data packet received by the second target server is detected, and it is determined that the unique identifier of the first target server is embedded in the server CID of the QUIC connection, and the QUIC data packet is forwarded to the first target server; Through XDP data packet processing technology, the QUIC data packet received by the first target server is detected, and if it is determined that the source address to the client has changed, the address migration in the QUIC standard protocol stack is triggered.
2. The method according to claim 1, characterized in that According to the changed source address, re-load balancing is performed through the load balancer in direct routing mode, and the second target server includes: According to the changed source address and predefined rules, re-load balancing is performed through the load balancer in direct routing mode to obtain the second target server for receiving the QUIC data packet.
3. The method according to claim 1, characterized in that According to the source address of the client, load balancing is performed through a load balancer in direct routing mode, and the first target server is obtained including: According to the source address of the client and predefined rules, load balancing is performed through a load balancer in direct routing mode to obtain a first target server for receiving the QUIC data packet.
4. The method according to claim 2 or 3, characterized in that: The predefined rules include a loop rule and a minimum connection rule.
5. The method according to claim 1, characterized in that The load balancing is performed by a load balancer at the transport level.
6. A load balancing system for the QUIC protocol, characterized in that: The system is used to perform the method according to any one of claims 1 to 5, the system comprising a client, a load balancer, a first target server and a second target server; There is a QUIC connection between the client and the first target server, which is used to send a QUIC data packet through the QUIC connection; The load balancer is used to automatically allocate the first target server or the second target server to the client according to the source address of the client; The first target server has a QUIC connection with the client, and is used to return data to the client through the QUIC connection; The second target server is used to forward the received QUIC data packet sent by the client to the first target server.
7. A load balancer for the QUIC protocol, characterized in that: The load balancer is used to execute the method described in any one of claims 1 to 5, and the load balancer is a transport-layer load balancer.
Citation Information
Patent Citations
Load balancing method and device supporting QUIC connection migration and computer product
CN112653740A
A load balancing system and packet distribution method
CN115225644B
Distributed resilient load-balancing for multipath transport protocols
US20210329069A1