Cluster load balancing method and apparatus

By centralized controllers identifying and switching network paths in AI training and other scenarios, load imbalance and hash polarization problems caused by ECMP hashing schemes are solved, and more efficient network resource utilization and service throughput are achieved.

WO2025077388A9PCT designated stage expired Publication Date: 2025-06-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/110351
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-13
Filing Date
2024-08-07
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

In the prior art, ECMP hashing schemes are prone to load imbalance and hash polarization in AI training and other scenarios, resulting in most traffic going through a very small number of network paths, wasting bandwidth and affecting service throughput.

Method used

The centralized controller obtains the congested port and server status information of the target cluster, determines that the active connection through the congested port is the connection to be switched, and selects the path of a candidate connection from the candidate connection table as the target switching path, and sends it to the server to modify the path.

Benefits of technology

Effectively alleviate or eliminate network congestion, improve cluster load balancing and bandwidth utilization, and improve service throughput in scenarios such as AI training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024110351_12062025_PF_FP_ABST
    Figure CN2024110351_12062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a cluster load balancing method and apparatus. The method comprises: when congestion information, which is reported by a target server in a target cluster, has been acquired, acquiring a congestion port and server state information of the target cluster (201); determining, as a connection to be switched, an active connection which passes through the congestion port (202); determining, as a target switching path, a path of a candidate connection in a candidate connection list corresponding to an active connection list in which the connection to be switched is located (203); and issuing the connection to be switched and the target switching path to a server corresponding to the connection to be switched, such that the server corresponding to the connection to be switched switches, to the target switching path, a path of the connection to be switched (204).
Need to check novelty before this filing date? Find Prior Art

Description

Cluster load balancing method and device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on October 13, 2023, with application number 202311331890X, and application name “Cluster Load Balancing Method and Device”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the technical field of load balancing, and in particular to a cluster load balancing method and device. Background Art

[0003] Existing load balancing solutions include flow-level ECMP (Equal-Cost-Multi-Path) hashing. This is the most widely used solution in data centers. ECMP uses the packet's five-tuple as input to calculate the next-hop egress port. Since all packets in a data flow share the same five-tuple, they all travel along the same physical network path to the receiving end. From a load balancing performance perspective, ECMP hashing exhibits strong randomness, requiring a large number of flows (e.g., thousands of flows on a single switch) to achieve effective load balancing (based on the law of large numbers in mathematical statistics). However, in AI training scenarios, where the number of flows is relatively small, ECMP often experiences significant load imbalance and even hash polarization, resulting in the majority of traffic traversing only a few network paths, wasting significant bandwidth. Furthermore, since most data flows are congested on a small number of network paths, the throughput of each flow is severely squeezed, ultimately severely impacting service throughput and ultimately leading to low cluster load balancing and bandwidth utilization.

[0004] That is, the cluster load balancing degree and bandwidth utilization rate in the existing technology are low.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a cluster load balancing method and apparatus.

[0007] In a first aspect, the cluster load balancing method provided by the present application is applied to a centralized controller, and the cluster load balancing method includes:

[0008] When congestion information reported by a target server in a target cluster is obtained, congested ports and server status information of the target cluster are obtained, wherein the target cluster includes multiple servers and multiple switches, the switch includes multiple switch ports, and the server status information includes an active connection table and a corresponding candidate connection table between each server;

[0009] determining an active connection passing through the congested port as a connection to be switched;

[0010] Determine a path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as a target switching path;

[0011] The connection to be switched and the target switching path are sent to a server corresponding to the connection to be switched, so that the server corresponding to the connection to be switched modifies the path of the connection to be switched to the target switching path.

[0012] In a first aspect, the cluster load balancing method provided by the present application is applied to a server in a target cluster, wherein the target cluster includes a centralized controller, multiple servers, and multiple switches, wherein the switch includes multiple switch ports, and the cluster load balancing method includes:

[0013] Establishing an active connection with a server in the target cluster and transmitting a target data packet;

[0014] Detecting whether there is a congested connection among each of the active connections;

[0015] When a congested connection exists among the active connections, congestion information is sent to the centralized controller; upon receiving the congestion information, the centralized controller is configured to obtain the congested port and server status information of the target cluster; determine the active connection passing through the congested port as the connection to be switched, and determine the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as the target switching path; the server status information includes the active connection table and the corresponding candidate connection table between each server;

[0016] The connection to be switched and the target switching path sent by the centralized controller are obtained, and the path of the connection to be switched is modified to the target switching path.

[0017] In a third aspect, the cluster load balancing device provided by the present application is applied to a centralized controller, and the cluster load balancing device includes:

[0018] an acquisition module, configured to, upon acquiring congestion information reported by a target server in a target cluster, acquire congested ports and server status information of the target cluster, wherein the target cluster includes a plurality of servers and a plurality of switches, the switches include a plurality of switch ports, and the server status information includes an active connection table and a corresponding candidate connection table between each server;

[0019] a connection determination module, configured to determine an active connection passing through the congested port as a connection to be switched;

[0020] A path determination module, configured to determine a path of a candidate connection in a candidate connection table corresponding to an active connection table where the connection to be switched is located as a target switching path;

[0021] The sending module is configured to send the connection to be switched and the target switching path to a server corresponding to the connection to be switched, so that the server corresponding to the connection to be switched modifies the path of the connection to be switched to the target switching path.

[0022] In a fourth aspect, the present application provides a cluster load balancing device, which is applied to a server in a target cluster, wherein the target cluster includes a centralized controller, multiple servers, and multiple switches, wherein the switches include multiple switch ports, and the cluster load balancing device includes:

[0023] A transmission module, configured to establish an active connection with a server in the target cluster and transmit a target data packet;

[0024] A detection module, configured to detect whether there is a congested connection among the active connections;

[0025] a sending module configured to send congestion information to the centralized controller when a congested connection exists among the active connections; the centralized controller configured to, upon receiving the congestion information, obtain the congested port and server status information of the target cluster; determine the active connection passing through the congested port as the connection to be switched, and determine the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as the target switching path; the server status information includes the active connection table and the corresponding candidate connection table between each server;

[0026] The modification module is configured to obtain the connection to be switched and the target switching path issued by the centralized controller, and modify the path of the connection to be switched to the target switching path.

[0027] In a fifth aspect, the electronic device provided in this application includes a memory and a processor, the memory stores computer-readable instructions, and the processor is used to run the computer-readable instructions in the memory to implement the steps in the cluster load balancing method provided in this application.

[0028] In a sixth aspect, the computer-readable storage medium provided in the present application stores a plurality of instructions, which are suitable for loading by a processor to implement the steps in the cluster load balancing method provided in the present application.

[0029] In a seventh aspect, the computer program product provided in the present application includes a computer program or instructions, which, when executed by a processor, implements the steps in the cluster load balancing method provided in the present application.

[0030] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0032] FIG1 is a schematic diagram of a cluster load balancing system according to an embodiment of the present application;

[0033] FIG2 is a topological view of a target cluster in a cluster load balancing system provided in an embodiment of the present application;

[0034] FIG3 is a schematic diagram of a topological path of a server group in a cluster load balancing system provided in an embodiment of the present application;

[0035] FIG4 is a schematic diagram of a single Pod topology expanded in a cluster load balancing system provided in an embodiment of the present application;

[0036] FIG5 is a schematic diagram of ECMP hashing in the prior art;

[0037] FIG6 is a schematic diagram of an embodiment of a cluster load balancing method provided in an embodiment of the present application;

[0038] FIG7 is a flow chart of another embodiment of the cluster load balancing method provided in an embodiment of the present application;

[0039] FIG8 is a schematic diagram of the routing hash configuration of each switch in the cluster load balancing method provided in an embodiment of the present application;

[0040] 9 is a schematic diagram of source port number grouping in the cluster load balancing method provided in an embodiment of the present application;

[0041] 10 is a schematic diagram of source port number grouping at the aggregation layer in the cluster load balancing method provided in an embodiment of the present application;

[0042] 11 is a schematic diagram of source port number grouping of the core layer in the cluster load balancing method provided in an embodiment of the present application;

[0043] 12 is a schematic diagram of source port number grouping at the access layer in the cluster load balancing method provided in an embodiment of the present application;

[0044] 13 is a schematic diagram of server status information maintained by a server in a cluster load balancing method according to an embodiment of the present application;

[0045] 14 is a schematic diagram of switch status information, server status information, and a topology view of a target cluster maintained by a centralized controller in a cluster load balancing method according to an embodiment of the present application;

[0046] FIG15 is a flow chart of another embodiment of a cluster load balancing method provided in an embodiment of the present application;

[0047] FIG16 is a flow chart of another embodiment of a cluster load balancing method provided in an embodiment of the present application;

[0048] FIG17 is a flow chart of another embodiment of a cluster load balancing method provided in an embodiment of the present application;

[0049] FIG18 is a schematic diagram of the blocking probability of at least one connection in the cluster load balancing method provided in an embodiment of the present application;

[0050] FIG19 is a schematic diagram of the blocking probability of a connection in the cluster load balancing method provided in an embodiment of the present application;

[0051] FIG20 is a schematic structural diagram of an embodiment of a cluster load balancing device provided in an embodiment of the present application;

[0052] FIG21 is a schematic structural diagram of another embodiment of a cluster load balancing device provided in an embodiment of the present application;

[0053] FIG22 is a schematic diagram of the structure of a switch, a centralized controller, and a server provided in an embodiment of the present application;

[0054] FIG23 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] It should be noted that the principles of this application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of this application and should not be considered as limiting other specific embodiments not described in detail herein.

[0056] In the following description of this application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0057] In the following description of this application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0059] To improve the efficiency of application performance testing, embodiments of the present application provide a cluster load balancing method, a cluster load balancing device, an electronic device, a computer-readable storage medium, and a computer program product. The cluster load balancing method can be executed by the cluster load balancing device, or by an electronic device incorporating the cluster load balancing device.

[0060] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0061] Referring to Figure 1 , the present application also provides a cluster load balancing system. As shown in Figure 1 , the cluster load balancing system includes a target cluster and a centralized controller 200. The target cluster includes multiple servers 100 and multiple switches 300, each of which includes multiple switch ports. The centralized controller and servers are integrated with the cluster load balancing device provided by the present application.

[0062] Among them, the centralized controller can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smartphones, tablets, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, TVs, servers, and industrial equipment.

[0063] As shown in Figure 2, in a specific embodiment, the target cluster includes multiple switch layers and multiple servers. The multiple switch layers are the access layer Leaf, the aggregation layer Spine, and the core layer Core, as well as the first-layer server Host. The access layer switch and its downstream servers are collectively referred to as a rack. The access layer switch, all upstream aggregation layer switches, and all downstream servers are collectively referred to as a module (Pod). Multiple core layer switches are combined into a plane. For example, in Figure 2, the access layer switches L0 and L1 and their downstream servers H0 and H1 form a rack; and all devices within the first dashed box passing through the access layer Leaf, aggregation layer Spine, and the first-layer server Host form a network module (Pod). It should be noted that in mainstream data center networks, to increase communication bandwidth and connection reliability between servers, servers are generally connected to two access layer switches using two links. A server's network interface card has two network ports connected to the two switches, respectively. The aggregation layer switches with the same sequence number in each Pod are connected to all core switches in the same core plane. For example, the first aggregation switch S0 of Pod 0 and the first aggregation switch S4 of Pod 1 are all connected to all switches in plane 0 of the Core layer. The number of planes in the Core layer is the same as the number of aggregation switches in a Pod. In an actual data center, there are generally 8 Core planes, each with 8 Core switches. At the same time, the network has more than a dozen Pods, and a Pod generally has 8 aggregation switches and more than a dozen Racks, while a Rack has dozens of servers. We denote the number of aggregation switches per Pod as NS, the number of switches per plane in the Core layer as NC, and the number of Leaf switches per Rack as NL.

[0064] As shown in Figure 2, the access layer (Leaf) includes 16 access switches numbered H0-H15. The aggregation layer (Spine) includes 16 aggregation switches numbered S0-S15. The core layer (Core) includes 8 core switches numbered C0-C7, and the core layer includes four planes numbered plane0-plane3. The server layer (Host) includes 16 servers numbered HC0-H15. The target cluster is divided into four pods numbered Pod0-Pod3.

[0065] As shown in FIG3 , for a server group, a server group includes two servers. In the network topology diagram of FIG2 , there may be multiple paths between a server pair.

[0066] Of course, in other embodiments, the target cluster topology can also be a Fat-Tree topology, a Clos topology, or an extended single-pod topology. Fat-Tree can be considered a special case of the Clos topology. In a typical Clos topology, all aggregation-layer switches in each pod are connected to all core-layer switches. The extended single-pod topology is shown in Figure 4.

[0067] As shown in Figure 5, a hash function and a hash seed are stored in the switch. The hash function is used to calculate the hash output value based on the multi-element identification group of the data packet and the hash seed. Specifically, the multi-element identification group of the data packet is a five-element identification group. Specifically, in the prior art, the hash function in the switch is an ECMP (Equal-Cost-Multi-Path) hash function, and the data packet is routed and addressed by the ECMP hash function. Generally, on a certain switch, you can see multiple equal-length paths leading to the same destination server. The length here refers to the number of link hops, not the physical distance. When a data packet destined for the destination server arrives at the switch, the switch needs to select one from multiple candidate output ports to send the data packet out from the port. As shown in the switch L0 in Figure 2, you can see that there are 4 candidate output ports that can lead to server H3, and the 4 candidate output ports correspond to the 4 aggregation layer switches in the aggregation layer. When selecting an egress port, the ECMP hash extracts the five-tuple identifier group from the packet (the source IP address, destination IP address, and protocol number in the IP header, and the source and destination ports in the TCP or UDP header) and performs a hash calculation. As shown in Figure 5, packets in the same flow (a set of packets with the same five-tuple) will reach the destination server in the order they were sent, along the same path. It's important to note that the hash calculation result is the index number of the candidate egress port list, not the port number itself. The candidate egress port list is [8, 9, 10, 11], and the hash calculation result of 1 represents the port with index 1 in the candidate egress port list (index numbers start at 0), which is port 9.

[0068] In addition, the cluster load balancing system may further include a memory for storing original data, intermediate data, and result data in the audio processing process.

[0069] In the embodiment of the present application, the memory may be a cloud memory. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0070] Currently, storage systems utilize a method for creating logical volumes. When creating a logical volume, physical storage space is allocated for each logical volume. This physical storage space may consist of disks on a specific storage device or several storage devices. When a client stores data on a logical volume, it stores the data on a file system. The file system divides the data into multiple parts, each of which is an object. An object contains not only the data but also additional information such as the data identifier (ID entity). The file system writes each object to the physical storage space of the logical volume and records the storage location information for each object. Therefore, when a client requests access to data, the file system can provide access based on the storage location information for each object.

[0071] The storage system allocates physical storage space to logical volumes by pre-dividing the physical storage space into stripes based on the estimated capacity of the objects to be stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the Redundant Array of Independent Disks (RAID) groupings. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0072] It should be noted that the scenario diagram of the cluster load balancing system shown in Figure 1 is only an example. The cluster load balancing system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the cluster load balancing system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.

[0073] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0074] Please refer to FIG6 , which is a flow chart of an embodiment of a cluster load balancing method provided in an embodiment of the present application. As shown in FIG6 , the cluster load balancing method is applied to a centralized controller. It can be understood that the centralized controller can be located within the target cluster or outside the target cluster. The flow of the cluster load balancing method provided in the present application is as follows:

[0075] 201. When congestion information reported by a target server in a target cluster is obtained, congested port and server status information of the target cluster are obtained.

[0076] The target cluster includes multiple servers and multiple switches, the switch includes multiple switch ports, and the target server can be any server in the target cluster.

[0077] In an embodiment of the present application, the server status information includes an active connection table and a corresponding candidate connection table between each server. The active connection table includes multiple active connections, and the candidate connection table includes multiple candidate connections. Each candidate connection in the candidate connection table is a backup connection of the active connection table.

[0078] Both active and candidate connections include paths, which consist of the switches they traverse. For example, consider a server group consisting of H0 and H3. The path for the server group's active connection is L0->S0->L2. This means that the active connection transmits data packets between server H0 and server H3 along the L0->S0->L2 path. Server H0 transmits data through switches L0, S0, and L2, ultimately reaching server H3.

[0079] Congestion information is a notification of congested connections in the target cluster. If a server in the target cluster detects a congested connection, it can report the congestion information to the centralized controller. Servers in the target cluster establish active connections with each other. Each server detects whether any active connections are congested. If any of these active connections are congested, it sends congestion information to the centralized controller. Congested ports are known switch ports that are congested. The centralized controller can determine whether a port is congested based on the information reported by the switch.

[0080] In the embodiment of the present application, the server status information is reported by the server according to a preset period, and the preset period can be 0.1s, 0.2s, etc., which can be set according to the specific situation.

[0081] 202. Determine the active connection passing through the congested port as a connection to be switched.

[0082] In the embodiment of the present application, the switch ports through which the paths of the respective active connections pass are obtained, and the active connections passing through the congested ports are determined as the connections to be switched.

[0083] For example, consider an AI training cluster network. These networks are typically configured with non-convergent bandwidth. This means that the sum of the downlink bandwidth of each layer's switches is equal to the sum of the uplink bandwidth, in the hope of eliminating throughput bottlenecks in the training network. However, due to factors such as single connection paths and uneven routing hashing, actual data flows often experience a certain degree of congestion in the network, preventing full utilization of this theoretically non-convergent bandwidth. Congestion types include:

[0084] Leaf upstream congestion: Traffic from multiple servers in the same rack is hashed to the same upstream port during leaf upstream routing. For example, traffic from H0->L0->S0->L2->H2 and H1->L0->S0->L2->H3 is congested on the upstream port of L0.

[0085] Spine upstream congestion: Traffic from multiple servers in the same pod is hashed to the same upstream port during Spine upstream routing. For example, traffic from H0->L0->S0->C0->S4->L4->H4 and H2->L3->S0->C0->S8->L8->H8 is congested on the upstream port of S0.

[0086] Core downstream congestion: Traffic from one or more pods destined for the same pod may be hashed to the same downstream port during the Core downstream routing hashing process. For example, traffic from H0->L0->S0->C0->S4->L4->H4 and H8->L8->S8->C0->S4->L5->H5 may be congested at the downstream port of C0.

[0087] Downstream Spine congestion: Traffic between pods or racks is hashed to the same downstream port during the Spine downstream routing. For example, traffic between H2->L2->S0->L0->H0 and H3->L3->S0->L0->H0 is congested at the downstream port of S0.

[0088] Leaf downstream congestion: Traffic destined for the same node is congested on the leaf downstream port. This type of congestion typically occurs when the receiving spine fails to balance traffic between the two leaf nodes during downstream transmission. For example, traffic between H0->L0->S0->L2->H2 and H0->L1->S1->L2->H2 is congested on the L2 downstream port.

[0089] When there is congestion in transmission, the throughput of the connection will be significantly reduced, generally by more than 50%. At this time, multiple parallel connections between a node pair will be dragged down by the congested connection (needing to wait for the congested connection to complete the transmission), resulting in a significant increase in the communication completion time of the node pair. Due to the obvious serial characteristics and synchronization requirements of AI training, network congestion will eventually cause the throughput of the entire cluster to be severely damaged. It can be seen that the training performance of the cluster is closely related to the congestion of the network. Even a small amount of network congestion will cause the performance of the entire cluster to drop significantly.

[0090] For example, when traffic from multiple servers is hashed in the uplink route of switch L0, it is hashed to the same uplink port. If the paths of two active connections are H0->L0->S0->L2->H2 and H1->L0->S0->L2->H3, and the paths of the two active connections are congested on the uplink port of switch L0, then the uplink port of switch L0 is the congested port, and the paths of the two active connections both pass through the congested port.

[0091] 203. Determine a path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as a target switching path.

[0092] In a specific embodiment, a path of a candidate connection in the candidate connection table is randomly determined as the target switching path.

[0093] In another specific embodiment, the throughput of each candidate connection in the candidate connection table is obtained, and the path of the candidate connection with the lowest throughput is determined as the target switching path. A path with low throughput often indicates a lighter current load. Selecting such a path for switching helps reduce network congestion and improve data transmission efficiency and stability. In other embodiments, a path of a candidate connection can be selected from the candidate connection table in other ways to determine it as the target switching path, and this application is not limited thereto.

[0094] 204. Send the connection to be switched and the target switching path to a server corresponding to the connection to be switched, so that the server corresponding to the connection to be switched switches the path of the connection to be switched to the target switching path.

[0095] In an embodiment of the present application, after determining the connection to be switched and the target switching path, the server corresponding to the connection to be switched is determined according to the server status information, and the connection to be switched and the target switching path are sent to the server corresponding to the connection to be switched, so that the path of the connection to be switched is switched to the target switching path.

[0096] In this way, when the centralized controller detects congestion through congestion information uploaded by the server, it obtains the congested switch port (i.e., the congested port), identifies the active connection passing through the congested port as the connection to be switched, and selects a candidate connection path from the candidate connection table corresponding to the active connection table where the connection to be switched resides for switching, effectively alleviating or eliminating network congestion. By using the centralized controller to comprehensively process the congestion information of each server and the congested port information uploaded by the switch, and using centralized flow scheduling to eliminate network congestion, the cluster's load balancing and bandwidth utilization can be improved.

[0097] Please refer to FIG. 7 , which is a flow chart of another embodiment of the cluster load balancing method provided in an embodiment of the present application. As shown in FIG. 7 , the flow of the cluster load balancing method provided in the present application is as follows:

[0098] 301. Initialize multiple servers and multiple switches based on preset network topology information to obtain a target cluster.

[0099] In the embodiment of the present application, the preset network topology information includes a network topology structure. Among them, the network topology structure can be a Fat-Tree topology, a Clos topology, or an extended single Pod topology. Specifically, the network topology structure of the target cluster is shown in Figure 2.

[0100] In an embodiment of the present application, the preset network topology information includes the routing hash configuration of each switch layer, and the routing hash configuration includes a hash function and a hash seed. Specifically, the hash function and hash seed used in the same switch layer are the same, and the hash functions and hash seeds used in different switch layers are different. In this way, within the same switch layer, the use of the same hash function and hash seed helps data packets to be evenly distributed to the various switches in the same layer during the forwarding process, thereby achieving load balancing. The use of different hash functions and hash seeds in different switch layers can increase the isolation of data between different layers, which helps to improve the security of the network. The use of different hash functions and hash seeds in different switch layers also increases the flexibility of network design. Network administrators can adjust the selection of hash functions and hash seeds according to actual needs to adapt to different network environments and business needs.

[0101] As shown in Figure 8, specifically, the present application uses an XOR-based hash function for switches at the same level. For example, the XOR-based hash function can be a CRC32 algorithm or toeplitz, and uses the same hash seed. For example, all access layer switches at the Leaf layer use the same XOR-based hash algorithm L and hash seed L, while all aggregation layer switches at the Spine layer use an XOR-based hash algorithm S and hash seed S, and all core layer switches at the core layer use an XOR-based hash algorithm C and hash seed C. In practice, modern data center switches basically support XOR-based hash methods, so this requirement can be met on all switches.

[0102] 302. Divide the target identifiers of the data packets between the server groups into different target identifier joint groups based on the target cluster.

[0103] Data packets belonging to a target identifier joint group are transmitted between server groups along the flow path corresponding to the target identifier joint group. The flow path includes multiple switch ports. Each target identifier joint group corresponds to one flow path. For example, a flow path of L0->S0->L2 indicates that the data packet is transmitted between server groups sequentially through the switch port of switch L0, the switch port of switch S0, and the switch port of switch L2.

[0104] In an embodiment of the present application, the target identifier can be the source port number of the data packet. In other embodiments, the target identifier can be some bits in the source port number (such as the lower 8 bits). In IPv4 network routing, in the five-tuple participating in the route hash calculation, only the source port number is freely variable (without restrictions), and the other four-tuples are all restricted. Therefore, using the source port number or some fields in the source port number as the target identifier can ensure that all source port numbers in the same target identifier group can produce the output of the same hash function. The path of the data stream is controlled by configuring the target identifier of the data stream to achieve the goal of avoiding congestion. In addition, in IPv6 network routing, we have more options to identify the logical path, as long as the field is freely variable and participates in the route hash calculation, for example, the target identifier is the flow label field of the IPv6 packet header or a part of its bits.

[0105] In a specific embodiment, to improve grouping efficiency, the target cluster includes multiple switch layers, each switch layer includes multiple switches, and the target identifiers of data packets between server groups are divided into different target identifier groups based on the target cluster, including:

[0106] (1) Divide the target identifiers of data packets between server groups into different target identifier groups based on each switch layer.

[0107] In an embodiment of the present application, the target identifiers of data packets between server groups are divided into different target identifier groups based on each switch layer, including: inputting test data packets with different tuple identifiers between server groups into the switch layer to obtain the switch port corresponding to each test data packet, wherein the tuple identifier includes a target identifier, and the target identifiers in each tuple identifier are different; putting the target identifiers of the tuple identifiers of the test data packets of the same switch port into the same target identifier group to obtain multiple target identifier groups.

[0108] In an embodiment of the present application, test data packets with different multi-tuple identifiers between server groups can be generated by a first preset tool. After the test data packets with different multi-tuple identifiers between server groups are input into the switch layer, the first preset tool is used to perform detection to obtain the switch ports corresponding to each test data packet.

[0109] The first pre-defined tool might be traceroute. Traceroute is an essential network diagnostic tool that can help developers identify connectivity issues, bottlenecks, and packet loss within a network. The tool examines the path a packet takes from its source computer to its destination, identifying hosts along the way and providing detailed information about each hop. Traceroute aims to provide developers with a clear picture of the path a packet takes through the network. This is achieved by using the Time-To-Live (TTL) field in the packet header, which specifies the number of hops a packet can take before being discarded. Traceroute sends packets with increasing TTL values ​​starting at 1 and repeats this process, recording the hosts from which ICMP TTL exceeded messages are received. The tool builds a network map, identifying each hop a packet takes before reaching its destination. Traceroute has several key features that make it an essential tool for developers. Packet timing: Traceroute records the time it takes for each packet to travel from source to destination, allowing developers to identify slow points or bottlenecks within the network. Reverse DNS lookup: For each hop, Traceroute performs a reverse DNS lookup to resolve the IP address to a hostname, making it easier to identify network devices along the path. Customizable parameters: Traceroute allows developers to customize the packet size, port number, and TTL value, providing greater flexibility for troubleshooting network problems. To use Traceroute, simply open a command prompt or terminal window and type Traceroute, followed by the target's IP address or host name. You can also add other options, such as a maximum TTL value or packet size.

[0110] The underlying principle of relative path control is that the output of an XOR-based hash function has a linear characteristic with respect to the input offset. That is, the same input offset will produce the same output offset (regardless of the non-offset portion). In this application, we control the output of the network routing hash function by controlling its input (target identifier), thereby obtaining target identifier groups that can produce different outputs. Ultimately, the centralized controller configures the target identifier of the data flow to control the path of the data flow, thereby achieving the goal of avoiding congestion.

[0111] As shown in Figure 9, let's take a quintuple as an example, with the target identifier being the source port number within the quintuple. Keeping the other four tuples of the quintuple unchanged, the source port number is traversed to obtain multiple different quintuple identifiers. These different quintuple identifiers are input into the switch layer's hash function to obtain hash offsets for each quintuple identifier. The source port numbers within the quintuple identifiers with the same hash offset are then grouped together into the same source port number group. Within these groups, all source port numbers within the same group generate the same hash function offset.

[0112] Grouping source port numbers improves the efficiency of alternative path detection. Without relative path control, we have to iterate through the source port numbers and perform checks one by one when detecting alternative connection paths or new paths for congested active paths. This is inefficient and may not necessarily detect new viable paths. With relative path control, we can clearly identify the number of paths with only partial or no overlap and calculate which source port numbers correspond to these paths.

[0113] In other embodiments, test packets with different tuple identifiers between server groups can be generated by a virtual router. Specifically, on a switch, a five-tuple is input into a virtual routing function to obtain a hash result. For example, on a convergence layer switch, all five-tuples are traversed to obtain the output of the virtual routing function. Based on the output, a modulo remainder operation is performed on the number of candidate output ports. Source port numbers with the same remainder are then grouped together to obtain the corresponding group.

[0114] In the embodiment of the present application, the target cluster includes an access layer, a convergence layer, and a core layer.

[0115] As shown in Figure 10, the destination identifiers of packets between server groups are first divided into different destination identifier groups based on the aggregation layer. Based on the method described in Figure 9, we can obtain source port number groups hashed to different aggregation switches on the access layer leaf switches, represented by SGi (Spine Group Index), such as SG0, SG1, SG2, and SG3. Note that the groups obtained here can be confirmed to be routed to different aggregation switches.

[0116] As shown in Figure 11, the destination identifiers of packets between server groups are divided into different destination identifier groups based on the core layer. Similarly, we can obtain the source port number groups hashed to different core switches on the aggregation layer switches, represented by CGi (Core Group Index), such as CG0 and CG1.

[0117] As shown in Figure 12, the destination identifiers of data packets between server groups are divided into different destination identifier groups based on the access layer. Similarly, we can obtain the source port number groups hashed to different access layer switches at the aggregation layer switch, represented by LGi (Leaf Group Index), i.e., LG0 and LG1.

[0118] (2) The target identifiers of different switch layers are grouped and combined to obtain multiple target identifier joint groups.

[0119] The target identifiers in the target identifier joint group are the intersection of the target identifiers in the target identifier groups constituting the target identifier joint group.

[0120] In the embodiment of the present application, after obtaining the target identification groups of each layer of switches, we can further process them to obtain the target identification joint group of the multi-layer switches. We can intersect the target identification groups of different layers in pairs to obtain the target identification joint group.

[0121] Specifically, the target identifier is the source port number. After obtaining the source port number groupings of the switches at each layer, we can further process them to obtain the source port number joint groupings of the multi-layer switches. We can intersect 2 or more types of groups in pairs to obtain 2 or more types of joint groupings. For example, based on the topology of Figure 2, we can obtain 4 source port number groups of the aggregation layer, 2 source port number groups of the core layer, and 2 source port number groups of the access layer. We intersect the source port number groups of the 4 aggregation layers and the source port number groups of the 2 core layers in pairs to obtain 8 SL (Spine-Leaf) joint groups. The source port number in each group corresponds to the path passing through a specific aggregation layer switch and access layer switch, and there are a total of 8 different paths. Going further, by taking the intersection of the source port number groups of the four aggregation layers, the source port number groups of the two core layers, and the source port number groups of the two access layers twice, we can get 16 SCL (Spine-Core-Leaf) joint groups, that is, 16 target identifier joint groups. The source port number of each group corresponds to the path passing through a specific Spine-Core-Leaf switch, and there are a total of 16 different paths.

[0122] It's worth noting that target identifier grouping primarily works within a server group, balancing traffic within the IP pair across the network. However, traffic from different server groups can't simply be addressed through grouping alone; instead, our centralized controller must perform path rescheduling. There's an exception to this, however: a server group with enough connections to cover all SCL groups ensures that traffic at the server group level is load-balanced across the entire network, ensuring that the combined traffic from all server groups is load-balanced and congestion-free.

[0123] 303. Multiple target identifiers are grouped and sent to each server.

[0124] In the embodiment of the present application, in order to provide sufficient path control accuracy when the server detects candidate connection paths, given the complexity of network traffic and the possibility that congestion points may appear on any switch, we hope to be able to control the path to any combination of switches. Therefore, a joint group is required as the input for candidate connection detection. Therefore, multiple target identifiers are jointly grouped and sent to each server, enabling the server to more accurately detect candidate connection paths.

[0125] 304. When the congestion information reported by the target server is obtained, the congested port and server status information of the target cluster are obtained.

[0126] The target server can be any server in the target cluster.

[0127] In this embodiment of the present application, server status information includes an active connection table and a corresponding candidate connection table between each server. The active connection table includes multiple active connections, and the candidate connection table includes multiple candidate connections. Each candidate connection in the candidate connection table serves as a backup connection for the active connection table. Specifically, the candidate connection table is used to maintain candidate connection information. The candidate connection table includes a target identifier and a path. The candidate connection table is primarily used by the centralized controller to issue a path switching decision upon detecting congestion, selecting a path from the candidate connection table for switching.

[0128] In the implementation of this application, obtaining the target cluster's congested port and server status information includes: obtaining locally maintained switch status information, wherein the switch status information includes the congestion status of each switch port, and the switch status information is uploaded by each switch in the target cluster at a preset period; and determining the congested port based on the switch status information. In this embodiment of the application, the congested port is determined to be the congested port. Switch status information is reported regularly by each switch in the target cluster and has high accuracy. Determining the congested port based on the switch status ensures the accuracy of the congested port.

[0129] As shown in Figure 13, the target identifier is the source port number. Active connections include the source port number, the sending port, and the path. For example, the server maintains an active connection table with destination IP1, destination IP2, and destination IPN. The active connection table between the server and destination IP1 includes: Connection 1: source port number 1, sending port 1, and path 1; Connection 2: source port number 2, sending port 2, and path 2; Connection 3: source port number 3, sending port 3, and path 3; ... Connection M: source port number M, sending port M, and path M. The server maintains a candidate connection table corresponding to the active connection table with destination IP1, destination IP2, and destination IPN. The candidate connection table between the server and destination IP1 includes: Connection 1: source port number 1, and path 1; Connection 2: source port number 2, and path 2; Connection 3: source port number 3, and path 3; ... Connection K: source port number M, and path M.

[0130] In the embodiment of the present application, the centralized controller obtains switch status information according to a preset period, and the switch status information includes the load and congestion status of each switch port of each switch.

[0131] As shown in Figure 14, the centralized controller periodically obtains switch status information and server status information and maintains the switch status information, server status information, and the topology view of the target cluster locally. The topology view in Figure 14 is the same as that in Figure 2.

[0132] As shown in Figure 14, the switch status information includes the status of each port of switch 1 to switch S. For example, the status information of switch 1 includes: the load, congestion status, and other information in the outbound direction of port 1; the load, congestion status, and other information in the outbound direction of port 2; ..., the load in the outbound direction of port P.

[0133] 305. Determine the active connection passing through the congested port as the connection to be switched.

[0134] In the embodiment of the present application, the switch ports through which the paths of the respective active connections pass are obtained, and the active connections passing through the congested ports are determined as the connections to be switched.

[0135] 306. Determine a path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as a target switching path.

[0136] In a specific embodiment, a path of a candidate connection in the candidate connection table is randomly determined as the target switching path.

[0137] In another specific embodiment, the throughput of each candidate connection in the candidate connection table is obtained, and the path of the candidate connection with the minimum throughput is determined as the target switching path. In other embodiments, the path of a candidate connection can also be selected from the candidate connection table in other ways to be determined as the target switching path, and this application is not limited to this.

[0138] 307: Send the connection to be switched and the target switching path to a server corresponding to the connection to be switched, so that the path of the connection to be switched is switched to the target switching path.

[0139] In an embodiment of the present application, after determining the connection to be switched and the target switching path, the server corresponding to the connection to be switched is determined according to the server status information, and the connection to be switched and the target switching path are sent to the server corresponding to the connection to be switched, so that the path of the connection to be switched is switched to the target switching path.

[0140] Please refer to FIG15 , which is a flow chart of another embodiment of the cluster load balancing method provided in an embodiment of the present application. As shown in FIG15 , the cluster load balancing method is applied to servers in a target cluster. The flow of the cluster load balancing method provided in the present application is as follows:

[0141] 401. Establish an active connection with the server in the target cluster and transmit the target data packet.

[0142] In this embodiment of the present application, the active connection table records active connections in an active state. The active state indicates a connection state in which data is being transmitted or can be immediately transmitted. The active connection table includes multiple active connections, each of which includes a target identifier and a flow path.

[0143] 402. Check whether there is a congested connection among the active connections.

[0144] In a specific embodiment, when the server receives a congestion message sent back by the receiving end, it determines whether a congested connection exists among the active connections. For example, the congestion message is a CNP (Congestion Notification Packets) message. By determining whether a congestion message has been received, it can quickly determine whether a congested connection exists among the active connections, thereby improving the efficiency of determining congested connections.

[0145] In another specific embodiment, the server periodically monitors the rate of each active connection and determines that a congested connection exists among the active connections when the rate of the active connection falls below a preset rate. By monitoring the rate of the active connections, it is possible to accurately determine whether a congested connection exists among the active connections. By periodically monitoring the rate of the active connections, computer resources can be conserved to a certain extent.

[0146] 403. When a congested connection exists among the active connections, congestion information is sent to the centralized controller.

[0147] In an embodiment of the present application, when a congested connection exists among the active connections, it indicates that the server has sensed the congestion and reports the relevant information of the congested connection to the centralized controller for reference in locating and making path switching decisions. The congestion information may or may not include the congested connection. When the centralized controller receives the congestion information, it obtains the congested port and server status information of the target cluster. The server status information includes the active connection table and the corresponding candidate connection table between each server. The centralized controller determines the active connection passing through the congested port as the connection to be switched, and determines the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as the target switching path.

[0148] 404. Obtain the connection to be switched and the target switching path issued by the centralized controller, and modify the path of the connection to be switched to the target switching path.

[0149] In this way, when a server discovers a congested connection, it promptly reports it to the centralized controller. When the centralized controller detects congestion through the congestion information uploaded by the server, it obtains the congested switch port (i.e., the congested port), uses the active connection passing through the congested port as the connection to be switched, and selects a candidate connection path from the candidate connection table corresponding to the active connection table where the connection to be switched is located for switching, which can effectively alleviate or eliminate network congestion. By using the centralized controller to comprehensively process the congestion information of each server and the congested ports uploaded by the switch, and using centralized flow scheduling to eliminate network congestion, the cluster load balancing and bandwidth utilization can be improved.

[0150] Please refer to FIG16 , which is a flow chart of another embodiment of the cluster load balancing method provided in an embodiment of the present application. As shown in FIG16 , the cluster load balancing method is applied to servers in a target cluster. The flow of the cluster load balancing method provided in the present application is as follows:

[0151] 501. When a combined group of multiple target identifiers issued by a centralized controller is obtained, an active connection is established with other servers in the target cluster.

[0152] Among them, the active connection includes the target identifier and the path.

[0153] In an embodiment of the present application, when a joint group of multiple target identifiers issued by a centralized controller is obtained, an active connection is established with other servers in the target cluster, and the active connection includes the target identifier and the path.

[0154] 502. Transmit a target data packet having the same target identifier as the target identifier of the active connection along a path of the active connection through the active connection.

[0155] In the embodiment of the present application, different active connections are used to transmit different data packets to improve the transmission efficiency of data packets. Multiple different connections in the server group pass through different aggregation switches and are evenly distributed on the access switches on the receiving side.

[0156] 503. Perform path detection based on the combined grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group.

[0157] The active connection table for a server group includes each active connection established between the server groups. The target identifier joint groupings for each candidate connection in the candidate connection table differ from the target identifier joint groupings for each active connection in the active connection table. Because different target identifier joint groupings correspond to different paths, the paths for each candidate connection in the candidate connection table differ from the paths for each candidate connection in the active connection table.

[0158] In the embodiment of the present application, after establishing active connections with other servers in the target cluster, path detection is performed on paths corresponding to the joint grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group.

[0159] Specifically, the candidate connection table is used to maintain candidate connection information. The candidate connection table includes the target identifier and path. The candidate connection table is mainly used when the centralized controller issues a path switching decision after detecting congestion, selecting a path from the candidate connection table for switching.

[0160] As shown in Figure 13, the target identifier is the source port number. Candidate connections include the source port number, the sending port, and the path. For example, the server maintains a candidate connection table corresponding to the active connection table for destination IP1, destination IP2, and so on. The candidate connection table between the server and destination IP1 includes: Connection 1: Source port number 1, path 1; Connection 2: Source port number 2, path 2; Connection 3: Source port number 3, path 3; ... Connection K: Source port number M, path M.

[0161] Specifically, an INT tool is used to perform path detection based on a joint grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group. Each target identifier in the joint grouping of target identifiers is input into the INT tool to obtain each path for each target identifier in the joint grouping of target identifiers detected by the INT tool. The paths of active connections in each path for each target identifier in the joint grouping of target identifiers detected are removed to obtain candidate paths. Candidate connections are then determined based on the candidate paths and corresponding source port numbers.

[0162] INT typically inserts an OAM (Operation, Administration, and Maintenance) layer between the packet header and the data within it, transforming the packet from a regular network packet into a "tagged" one. IOAM (In-band Operation, Administration, and Maintenance) is a network measurement technology that samples service traffic in real time and at high speed, embeds IOAM information (metadata, including device ID, input and output interfaces, and timestamps) into the sampled data, and then proactively sends the sampled data to an analyzer for analysis, enabling real-time awareness of network operational status. INT monitors the physical path of packets with a specific five-tuple in the network. The complete path is structured as follows: (sending side) Leaf -> (sending side) Spine -> Core -> (receiving side) Spine -> (receiving side) Leaf. For example, the physical path is L0 -> S0 -> C0 -> S4 -> L4.

[0163] 504. Send the active connection table and the corresponding candidate connection table to the centralized controller.

[0164] In this embodiment of the present application, the server locally maintains an active connection table and a corresponding candidate connection table, and sends these to a centralized controller. This allows different target identifiers to be grouped together to correspond to different paths. Path detection based on these target identifier groupings can yield an accurate candidate connection table corresponding to the active connection table. Upon detecting congestion, the centralized controller issues a path switching decision, selecting a path from the candidate connection table for switching, thereby eliminating network congestion and improving cluster load balancing and bandwidth utilization.

[0165] The server can send the active connection table and the corresponding candidate connection table to the centralized controller at a preset interval. This regularly updates the active connection table and the corresponding candidate connection table, ensuring their timeliness. This allows the centralized controller to select a path for handover based on the latest data when congestion is detected, ensuring handover accuracy, eliminating network congestion, and improving cluster load balancing and bandwidth utilization.

[0166] 505. When the connection to be switched and the target switching path issued by the centralized controller are obtained, the target identifier of the path of the connection to be switched and the target identifier of the target switching path are obtained.

[0167] In the embodiment of the present application, the target identifier is the source port number.

[0168] 506. Modify the target identifier of the path to be switched to the target identifier of the target switching path.

[0169] In the embodiment of the present application, when the target identifier of the path of the connection to be switched is modified, the path of the data flow will be modified to the target switching path due to the modification of the target identifier, thereby modifying the path of the connection to be switched to achieve load balancing.

[0170] Please refer to FIG17 , which is a flow chart of another embodiment of the cluster load balancing method provided in the embodiment of the present application. As shown in FIG17 , the flow of the cluster load balancing method provided in the present application is as follows:

[0171] 601. Initialize multiple servers and multiple switches based on preset network topology information to obtain a target cluster.

[0172] In the implementation of this application, the centralized controller initializes multiple servers and multiple switches based on preset network topology information to obtain a target cluster. The centralized controller obtains switch status information at a preset period.

[0173] In the embodiment of the present application, the preset network topology information includes a network topology structure. Among them, the network topology structure can be a Fat-Tree topology, a Clos topology, or an extended single Pod topology. Specifically, the network topology structure of the target group is shown in Figure 2.

[0174] In the embodiment of the present application, the preset network topology information includes the routing hash configuration of each switch layer, and the routing hash configuration includes a hash function and a hash seed. Specifically, the hash function and hash seed used in the same switch layer are the same, and the hash functions and hash seeds used in different switch layers are different.

[0175] 602. Divide the target identifiers of the data packets between the server groups into different target identifier joint groups based on the target cluster.

[0176] In the implementation of the present application, the centralized controller divides the target identifiers of the data packets between the server groups into different target identifier joint groups based on the target cluster.

[0177] 603. Multiple target identifiers are grouped and sent to each server.

[0178] In the implementation of this application, the centralized controller groups multiple target identifiers and sends them to each server.

[0179] In the embodiment of the present application, in order to provide sufficient path control accuracy when the server detects candidate connection paths, given the complexity of network traffic and the possibility that congestion points may appear on any switch, we hope to be able to control the path to any combination of switches. Therefore, a joint group is required as the input for candidate connection detection. Therefore, multiple target identifiers are jointly grouped and sent to each server, enabling the server to more accurately detect candidate connection paths.

[0180] 604. When a combined group of multiple target identifiers issued by the centralized controller is obtained, an active connection is established with other servers in the target cluster.

[0181] In the implementation of this application, when the server obtains a joint group of multiple target identifiers issued by the centralized controller, it establishes an active connection with other servers in the target cluster.

[0182] Among them, the active connection includes the target identifier and the path.

[0183] As shown in Figure 13, the target identifier is the source port number. Active connections include the source port number, outgoing port, and path. For example, the server maintains an active connection table with destination IP1, destination IP2, and destination IPN. The active connection table between the server and destination IP1 includes: Connection 1: Source port number 1, outgoing port 1, path 1; Connection 2: Source port number 2, outgoing port 2, path 2; Connection 3: Source port number 3, outgoing port 3, path 3; ... Connection M: Source port number M, outgoing port M, path M.

[0184] In an embodiment of the present application, when a joint group of multiple target identifiers issued by a centralized controller is obtained, an active connection is established with other servers in the target cluster, and the active connection includes the target identifier and the path.

[0185] 605. Transmit the target data packet having the same target identifier as the target identifier of the active connection along the path of the active connection through the active connection.

[0186] In the implementation of the present application, the server transmits a target data packet having the same target identifier as the active connection along the path of the active connection through the active connection.

[0187] In the embodiment of the present application, different active connections are used to transmit different data packets. Multiple different connections within the server group pass through different aggregation switches and are evenly distributed on the access switches on the receiving side.

[0188] 606. Perform path detection based on the combined grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group.

[0189] In the implementation of the present application, the server performs path detection based on a joint grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group.

[0190] The active connection table for a server group includes each active connection established between the server groups. The target identifier joint groupings for each candidate connection in the candidate connection table differ from the target identifier joint groupings for each active connection in the active connection table. Because different target identifier joint groupings correspond to different paths, the paths for each candidate connection in the candidate connection table differ from the paths for each active connection in the active connection table.

[0191] In the embodiment of the present application, after establishing active connections with other servers in the target cluster, path detection is performed on the paths corresponding to the joint grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group.

[0192] Specifically, the candidate connection table is used to maintain candidate connection information. The candidate connection table includes the target identifier and path. The candidate connection table is mainly used when the centralized controller issues a path switching decision after detecting congestion, selecting a path from the candidate connection table for switching.

[0193] 607. Send the active connection table and the corresponding candidate connection table to the centralized controller.

[0194] In the implementation of this application, the server sends the active connection table and the corresponding candidate connection table to the centralized controller.

[0195] In the embodiment of the present application, the server maintains an active connection table and a corresponding candidate connection table locally, and sends the active connection table and the corresponding candidate connection table to the centralized controller according to a preset period.

[0196] 608. When the congestion information reported by the target server is obtained, the congested port and server status information of the target cluster are obtained.

[0197] In the implementation of this application, when the centralized controller obtains the congestion information reported by the target server, it obtains the congested port and server status information of the target cluster.

[0198] The target server can be any server in the target cluster.

[0199] In this embodiment of the present application, server status information includes an active connection table and a corresponding candidate connection table between each server. The active connection table includes multiple active connections, and the candidate connection table includes multiple candidate connections. Each candidate connection in the candidate connection table serves as a backup connection for the active connection table. Specifically, the candidate connection table is used to maintain candidate connection information. The candidate connection table includes a target identifier and a path. The candidate connection table is primarily used by the centralized controller to issue a path switching decision upon detecting congestion, selecting a path from the candidate connection table for switching.

[0200] 609. Determine the active connection passing through the congested port as the connection to be switched.

[0201] In the implementation of the present application, the centralized controller determines the active connection passing through the congested port as the connection to be switched.

[0202] In the embodiment of the present application, the switch ports through which the paths of the respective active connections pass are obtained, and the active connections passing through the congested ports are determined as the connections to be switched.

[0203] 610. Determine a path of a candidate connection in a candidate connection table corresponding to the active connection table where the connection to be switched is located as a target switching path.

[0204] In the implementation of the present application, the centralized controller determines the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as the target switching path.

[0205] In a specific embodiment, a path of a candidate connection in the candidate connection table is randomly determined as the target switching path.

[0206] In another specific embodiment, the throughput of each candidate connection in the candidate connection table is obtained, and the path of the candidate connection with the minimum throughput is determined as the target switching path. In other embodiments, the path of a candidate connection can also be selected from the candidate connection table in other ways to be determined as the target switching path, and this application is not limited to this.

[0207] 611. Send the connection to be switched and the target switching path to a server corresponding to the connection to be switched, so that the path of the connection to be switched is switched to the target switching path.

[0208] In the implementation of the present application, the centralized controller sends the connection to be switched and the target switching path to the server corresponding to the connection to be switched, so that the path of the connection to be switched is switched to the target switching path.

[0209] 612. When the connection to be switched and the target switching path issued by the centralized controller are obtained, the target identifier of the path of the connection to be switched and the target identifier of the target switching path are obtained.

[0210] In the implementation of the present application, when the server obtains the connection to be switched and the target switching path sent by the centralized controller, it obtains the target identifier of the path of the connection to be switched and the target identifier of the target switching path.

[0211] In the embodiment of the present application, the target identifier is the source port number.

[0212] 613. Modify the target identifier of the path of the connection to be switched to the target identifier of the target switching path.

[0213] In the implementation of the present application, the server modifies the target identifier of the path to be switched to the target identifier of the target switching path.

[0214] In the embodiment of the present application, when the target identifier of the path of the connection to be switched is modified, due to the modification of the target identifier, the path of the corresponding data flow will be modified to the target switching path, thereby modifying the path of the connection to be switched to achieve load balancing.

[0215] In a specific embodiment, the method of the present application can be applied to an AI training cluster. An AI training cluster is a server cluster used to train artificial intelligence models (AI models). The AI ​​training cluster utilizes distributed computing technology to decompose training tasks into multiple subtasks, assigning them to different servers for parallel processing. The AI ​​training cluster includes a centralized controller, multiple servers, and multiple switches. When executing a training task on an AI training set, servers in the AI ​​training cluster establish active connections and transmit target data packets related to the training task. The server detects whether there is a congested connection among each active connection. If a congested connection exists among each active connection, the server sends congestion information to the centralized controller. Upon receiving the congestion information reported by the server, the centralized controller obtains the congested port and server status information of the target cluster. The server status information includes an active connection table and a corresponding candidate connection table between each server. The centralized controller identifies the active connection passing through the congested port as the connection to be switched, identifies the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched resides as the target switching path, and sends the connection to be switched and the target switching path to the server corresponding to the connection to be switched. The server modifies the path of the connection to be switched to the target switching path. The method of this application uses centralized flow scheduling to eliminate network congestion, improve network load balancing and bandwidth utilization, and thus improve the throughput of AI training clusters.

[0216] This application uses the Monte Carlo method to simulate and test the relationship between the number of upstream flows and the congestion probability of a Rack on a Leaf. Referring to Figures 18 and 19, Figures 18 and 19 show that the horizontal axis represents the number of upstream flows, the vertical axis represents the congestion probability, the random curve and the optimized curve are the upper and lower curves respectively, the random curve is the curve obtained by the scheme that has not been optimized by this application, and the optimized curve is the curve obtained by the scheme optimized by this application. As shown in Figure 18, when a server group uses 2 connections, in a typical AI training cluster network (as shown in Figure 4), the probability of congestion in the Leaf uplink of a Rack is close to 100% when the number of flows reaches 25. That is, when the number of flows exceeds 25, there will definitely be congestion in at least one Leaf uplink. In Figure 19, the probability of congestion in each Leaf uplink also rises rapidly as the number of flows increases. For example, when there are 64 flows, the congestion probability of each link reaches 25%. In practice, once link congestion occurs, the traffic of at least two flows will be affected, which in turn affects the AI ​​training tasks where these two flows are located, resulting in a 50% drop in task throughput and a 100% increase in training time. The effect of this application is shown in the lower curve in the figure, that is, after the centralized controller scheduling converges, the probability of Rack congestion and the probability of congestion on each link are reduced to 0, that is, the congestion is completely eliminated (maximizing the AI ​​training service throughput). Of course, when a new training task is initiated, there may be a very short period of congestion. At this time, this application will quickly detect the congestion and switch the path of the congested connection under the scheduling of the controller, thereby eliminating the congestion.

[0217] To facilitate better implementation of the cluster load balancing method provided in the embodiment of the present application, the embodiment of the present application also provides a cluster load balancing device based on the above cluster load balancing method. The meanings of the terms herein are the same as those in the above cluster load balancing method. For specific implementation details, please refer to the description in the above method embodiment.

[0218] Please refer to FIG. 20 , which is a schematic diagram of the structure of an embodiment of a cluster load balancing device provided by an embodiment of the present application. The cluster load balancing device may include an acquisition module 701, a connection determination module 702, a path determination module 703, and a delivery module 704, wherein:

[0219] An acquisition module 701 is configured to, upon acquiring congestion information reported by a target server in a target cluster, acquire congested ports and server status information of the target cluster, wherein the target cluster includes multiple servers and multiple switches, the switches include multiple switch ports, and the server status information includes an active connection table and a corresponding candidate connection table between each server;

[0220] a connection determination module 702, configured to determine an active connection passing through a congested port as a connection to be switched;

[0221] A path determination module 703 is configured to determine a path of a candidate connection in a candidate connection table corresponding to an active connection table where the connection to be switched is located as a target switching path;

[0222] The sending module 704 is configured to send the connection to be switched and the target switching path to a server corresponding to the connection to be switched, so that the server corresponding to the connection to be switched modifies the path of the connection to be switched to the target switching path.

[0223] In an optional embodiment, the acquisition module is configured to:

[0224] Initialize multiple servers and multiple switches based on preset network topology information to obtain a target cluster;

[0225] dividing target identifiers of data packets between server groups into different target identifier joint groups based on the target cluster, wherein the server group includes two servers, and data packets belonging to the target identifier joint group are transmitted between the server groups along a flow path corresponding to the target identifier joint group, and the flow path includes multiple switch ports;

[0226] Multiple target identifiers are grouped and sent to each server.

[0227] In an optional embodiment, the target cluster includes multiple switch layers, each switch layer includes multiple switches; the acquisition module is configured to:

[0228] Dividing the destination identifiers of data packets between server groups into different destination identifier groups based on each switch layer;

[0229] The target identifier groups of different switch layers are combined to obtain multiple target identifier joint groups, wherein the target identifiers in the target identifier joint group are the intersections of the target identifiers in the target identifier groups constituting the target identifier joint group.

[0230] In an optional embodiment, the acquisition module is configured to:

[0231] Inputting test data packets with different tuple identifiers between the server groups into the switch layer to obtain the switch port corresponding to each test data packet, wherein the tuple identifier includes a target identifier, and the target identifiers in each tuple identifier are different;

[0232] The target identifiers of the tuple identifiers of the test data packets of the same switch port are put into the same target identifier group to obtain multiple target identifier groups.

[0233] In an optional embodiment, the hash function and hash seed used in the same switch layer are the same, and the hash functions and hash seeds used in different switch layers are different.

[0234] In an optional embodiment, the target identifier is a source port number or a partial field in the source port number.

[0235] In an optional embodiment, the path determination module is configured to:

[0236] Get the throughput of each candidate connection in the candidate connection table;

[0237] The path of the candidate connection with the minimum throughput in the candidate connection table is determined as the target switching path.

[0238] In an optional embodiment, the acquisition module is configured to:

[0239] Obtain locally maintained switch status information, where the switch status information includes the congestion status of each switch port. The switch status information is uploaded by each switch in the target cluster at a preset period.

[0240] Congested ports are determined based on switch status information.

[0241] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described again here.

[0242] In the aforementioned cluster load balancing device, when the centralized controller detects congestion through congestion information uploaded by the server, it obtains the congested switch port (i.e., the congested port), identifies the active connection passing through the congested port as the connection to be switched, and selects a candidate connection path from the candidate connection table corresponding to the active connection table containing the connection to be switched for switching, effectively alleviating or eliminating network congestion. By utilizing the centralized controller to comprehensively process the congestion information of each server and the congested ports uploaded by the switch, and using centralized flow scheduling to eliminate network congestion, the cluster's load balancing level and bandwidth utilization can be improved.

[0243] Please refer to FIG21, which is a schematic diagram of the structure of a cluster load balancing device provided in an embodiment of the present application. The cluster load balancing device may include a transmission module 801, a detection module 802, a sending module 803, and a modification module 804, wherein:

[0244] The transmission module 801 is used to establish an active connection with a server in the target cluster and transmit the target data packet;

[0245] A detection module 802 is configured to detect whether there is a congested connection among the active connections;

[0246] The sending module 803 is configured to send congestion information to the centralized controller when a congested connection exists among the active connections. The centralized controller is configured to, upon receiving the congestion information, obtain the congested port and server status information of the target cluster; determine the active connection passing through the congested port as the connection to be switched, and determine the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as the target switching path; the server status information includes the active connection table and the corresponding candidate connection table between each server;

[0247] The modification module 804 is configured to obtain the connection to be switched and the target switching path sent by the centralized controller, and modify the path of the connection to be switched to the target switching path.

[0248] In an optional embodiment, the transmission module is configured to:

[0249] When a combined group of multiple target identifiers is obtained from the centralized controller, an active connection is established with other servers in the target cluster. The active connection includes the target identifier and path.

[0250] The target data packet having the same target identifier as the active connection is transmitted along the path of the active connection through the active connection.

[0251] In an optional embodiment, the modification module is configured to:

[0252] Obtain the target identifier of the path to be switched and the target identifier of the target switching path;

[0253] The target identifier of the path to be switched is modified to the target identifier of the target switching path.

[0254] In an optional embodiment, the sending module is configured to:

[0255] When multiple target identifier joint groups issued by the centralized controller are obtained, path detection is performed based on the multiple target identifier joint groups to obtain a candidate connection table corresponding to the active connection table of each server group, wherein the active connection table of the server group includes each active connection established between the server groups, and the target identifier joint group of each candidate connection in the candidate connection table is different from the target identifier joint group of each active connection in the active connection table;

[0256] The active connection table and the corresponding candidate connection table are sent to the centralized controller.

[0257] In an optional embodiment, the sending module is configured to:

[0258] The active connection table and the corresponding candidate connection table are updated at a preset period and sent to the centralized controller.

[0259] In an optional embodiment, the detection module is configured to:

[0260] Check whether the receiving end of each active connection sends back congestion messages;

[0261] Active connections that send back congestion messages are identified as congested connections.

[0262] In an optional embodiment, the detection module is configured to:

[0263] Detect the rate of each active connection;

[0264] Active connections with a rate lower than a preset rate are identified as congested connections.

[0265] In the above-mentioned cluster load balancing device, when the server finds that there is a congested connection, it will promptly report it to the centralized controller. When the centralized controller senses congestion through the congestion information uploaded by the server, it obtains the congested switch port (i.e., the congested port), takes the active connection passing through the congested port as the connection to be switched, and selects a candidate connection path from the candidate connection table corresponding to the active connection table where the connection to be switched is located for switching, which can effectively alleviate or eliminate network congestion. By using the centralized controller to comprehensively process the congestion information of each server and the congested port uploaded by the switch, and using centralized flow scheduling to eliminate network congestion, the cluster load balancing degree and bandwidth utilization can be improved.

[0266] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described again here.

[0267] Please refer to Figure 22, which is a structural diagram of the switch, centralized controller and server provided in an embodiment of the present application.

[0268] As shown in FIG22 , the load balancing system of the present application includes a centralized controller, server agents distributed on all servers, and switch agent modules distributed on switches.

[0269] The centralized controller collects and comprehensively processes traffic and congestion information reported by servers and switch agents, forming traffic scheduling decisions that are then distributed to servers to control the physical path of their data flows. The centralized controller comprises an information engine and a decision engine. The information engine constructs a topological view of the entire network and overlays connection, traffic, and congestion information onto the topology view to form a global traffic view. It also comprehensively processes and stores this information into structured data that can be efficiently searched and indexed. The decision engine distributes source port grouping configurations for relative path control and path switching decisions for congested connections.

[0270] The server agent is used to detect congestion and report the path, traffic, and congestion data of the data flow through the perception module, so that the centralized controller can form a global traffic view, execute the scheduling decisions issued by the controller, and switch the path of the data flow. The execution module can use the INT function to detect the physical path of packets with specific five-tuples in the network. The complete path format is such as (sending side) Leaf->(sending side) Spine->Core->(receiving side) Spine->(receiving side) Leaf. The actual INT detection result will also carry the ID of the outbound port and the queuing time in the outbound port queue. The execution module can also switch its network path by changing the source port number of a connection (such as the source port number of the QP in RoCEv2 / RDMA). In addition, the perception module can perceive the performance status of the connection by reading the congestion counter of the connection and report these status to the controller.

[0271] The switch agent is used to collect traffic and congestion information of each port, and report port congestion and port load to the centralized controller through the reporting module to assist the controller in seeing the complete traffic and congestion distribution, so as to find idle paths available for scheduling.

[0272] Please refer to Figure 23, which is a schematic structural diagram of an electronic device provided in an embodiment of the present application.

[0273] The electronic device may be a centralized controller, a server, or a switch.

[0274] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently. Among them:

[0275] Processor 101 is the control center of the electronic device. It connects all parts of the electronic device using various interfaces and circuits. It executes software programs and / or modules stored in memory 102 and accesses data stored in memory 102 to perform various functions of the electronic device and process data. Optionally, processor 101 may include one or more processing cores. Alternatively, processor 101 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 101.

[0276] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.

[0277] The electronic device also includes a power supply 103 for supplying power to various components. Optionally, the power supply 103 can be logically connected to the processor 101 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 103 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0278] The electronic device may further include an input unit 104, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0279] Although not shown, the electronic device may further include a display unit, an image acquisition element, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 101 in the electronic device will load the executable code (i.e., computer-readable instructions) corresponding to one or more computer programs into the memory 102 according to the following instructions, and the processor 101 will execute the steps in the cluster load balancing method provided in this application, such as:

[0280] When the congestion information reported by the target server is obtained, the congested port and server status information of the target cluster are obtained, where the server status information includes the active connection table and the corresponding candidate connection table between each server; the active connection passing through the congested port is determined as the connection to be switched; the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located is determined as the target switching path; the connection to be switched and the target switching path are sent to the server corresponding to the connection to be switched.

[0281] Alternatively, establish an active connection with a server in the target cluster and transmit the target data packet;

[0282] Detect whether there is a congested connection among each active connection;

[0283] When there is a congested connection among the active connections, congestion information is sent to the centralized controller.

[0284] It should be noted that the electronic device provided in the embodiment of the present application and the cluster load balancing method in the above embodiment have the same concept, and the specific implementation process is detailed in the above related embodiments and will not be repeated here.

[0285] This application also provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions stored thereon are executed on a processor of an electronic device provided in an embodiment of this application, the processor of the electronic device performs the steps of the cluster load balancing method provided in this application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0286] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform various optional implementations of the above-mentioned cluster load balancing method.

[0287] The above is a detailed introduction to a cluster load balancing method and device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core ideas. At the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0288] It should be noted that when the above embodiments of this application are applied to specific products or technologies, the relevant user data is involved, and the user's permission or consent must be obtained, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A cluster load balancing method, characterized in that: Applied to a centralized controller, the cluster load balancing method includes: When congestion information reported by a target server in a target cluster is obtained, a congestion port and server status information of the target cluster are obtained, wherein the target cluster includes a plurality of servers and a plurality of switches, the switch includes a plurality of switch ports, and the server status information includes an active connection table and a corresponding candidate connection table between each server; Determine an active connection passing through the congested port as a connection to be switched; Determine a path of a candidate connection in a candidate connection table corresponding to the active connection table where the connection to be switched is located as a target switching path; The connection to be switched and the target switching path are sent to a server corresponding to the connection to be switched, so that the server corresponding to the connection to be switched modifies the path of the connection to be switched to the target switching path.

2. The cluster load balancing method according to claim 1, characterized in that: The cluster load balancing method comprises: Initialize the multiple servers and the multiple switches based on preset network topology information to obtain the target cluster; Dividing the target identifiers of data packets between the server groups into different target identifier joint groups based on the target cluster, wherein the server group includes two servers, and the data packets belonging to the target identifier joint group are transmitted between the server groups along the flow path corresponding to the target identifier joint group, and the flow path includes multiple switch ports; The plurality of target identifiers are grouped together and sent to each server.

3. The cluster load balancing method according to claim 2, characterized in that: The target cluster includes a plurality of switch layers, each of which includes a plurality of switches; The dividing the target identifiers of the data packets between the server groups into different target identifier joint groups based on the target cluster includes: Dividing the target identifiers of the data packets between the server groups into different target identifier groups based on each switch layer; The target identifier groups of different switch layers are combined to obtain a plurality of target identifier joint groups, wherein the target identifiers in the target identifier joint group are intersections of the target identifiers in the target identifier groups constituting the target identifier joint group.

4. The cluster load balancing method according to claim 3, characterized in that: The method of dividing the target identifiers of the data packets between the server groups into different target identifier groups based on each switch layer includes: Inputting test data packets with different tuple identifiers between server groups into the switch layer to obtain switch ports corresponding to each of the test data packets, wherein the tuple identifier includes a target identifier, and the target identifiers in each of the tuple identifiers are different; The target identifiers of the multi-tuple identifiers of the test data packets of the same switch port are put into the same target identifier group to obtain multiple target identifier groups.

5. The cluster load balancing method according to claim 3, characterized in that: The hash function and hash seed used in the same switch layer are the same, and the hash functions and hash seeds used in different switch layers are different.

6. The cluster load balancing method according to claim 2, characterized in that: The target identifier is the source port number or a partial field in the source port number.

7. The cluster load balancing method according to any one of claims 1 to 6, characterized in that: The step of determining a path of a candidate connection in a candidate connection table corresponding to an active connection table where the connection to be switched is located as a target switching path includes: Get the throughput of each candidate connection in the candidate connection table; The path of the candidate connection with the smallest throughput in the candidate connection table is determined as the target switching path.

8. The cluster load balancing method according to any one of claims 1 to 7, characterized in that: The obtaining of the congested port and server status information of the target cluster includes: Acquire locally maintained switch status information, wherein the switch status information includes a congestion status of each switch port, and the switch status information is uploaded by each switch of the target cluster according to a preset period; A congested port is determined based on the switch status information.

9. A cluster load balancing method, characterized in that: Applied to a server in a target cluster, the target cluster includes a centralized controller, multiple servers and multiple switches, the switch includes multiple switch ports, and the cluster load balancing method includes: Establishing an active connection with a server in the target cluster and transmitting a target data packet; Detecting whether there is a congested connection among each of the active connections; When there is a congested connection in each of the active connections, congestion information is sent to the centralized controller; the centralized controller is used to obtain the congested port and server status information of the target cluster when receiving the congestion information; the active connection passing through the congested port is determined as the connection to be switched, and a path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located is determined as the target switching path; the server status information includes the active connection table and the corresponding candidate connection table between each server; The connection to be switched and the target switching path sent by the centralized controller are obtained, and the path of the connection to be switched is modified to be the target switching path.

10. The cluster load balancing method according to claim 9, characterized in that: The step of establishing an active connection with a server in the target cluster and transmitting a target data packet includes: When a plurality of target identifiers issued by the centralized controller are jointly grouped, an active connection is established with other servers in the target cluster, wherein the active connection includes a target identifier and a path; A target data packet having the same target identifier as the active connection is transmitted along a path of the active connection through the active connection.

11. The cluster load balancing method according to claim 9 or 10, characterized in that: The step of modifying the path of the connection to be switched to the target switching path includes: Obtaining a target identifier of a path to be switched and a target identifier of the target switching path; The target identifier of the path of the connection to be switched is modified to the target identifier of the target switching path.

12. The cluster load balancing method according to any one of claims 9 to 11, characterized in that: The cluster load balancing method comprises: When multiple target identifier joint groups issued by the centralized controller are obtained, path detection is performed based on the multiple target identifier joint groups to obtain a candidate connection table corresponding to the active connection table of each server group, wherein the active connection table of the server group includes each active connection established between the server groups, and the target identifier joint group of each candidate connection in the candidate connection table is different from the target identifier joint group of each active connection in the active connection table; The active connection table and the corresponding candidate connection table are sent to the centralized controller.

13. The cluster load balancing method according to claim 12, characterized in that: The cluster load balancing method comprises: The active connection table and the corresponding candidate connection table are updated at a preset period and sent to the centralized controller.

14. The cluster load balancing method according to any one of claims 9 to 13, characterized in that: The detecting whether there is a congested connection in each of the active connections includes: Detecting whether the receiving end of each of the active connections sends back a congestion message; The active connection that sends back the congestion message is determined as a congested connection.

15. The cluster load balancing method according to any one of claims 9 to 13, characterized in that: The detecting whether there is a congested connection in each of the active connections includes: Detecting the rate of each of the active connections; The active connection with a rate lower than a preset rate is determined as a congested connection.

16. A cluster load balancing device, characterized in that: Applied to a centralized controller, the cluster load balancing device comprises: an acquisition module, configured to acquire congestion ports and server status information of the target cluster when congestion information reported by a target server in the target cluster is acquired, wherein the target cluster includes a plurality of servers and a plurality of switches, the switch includes a plurality of switch ports, and the server status information includes an active connection table and a corresponding candidate connection table between each server; A connection determination module, configured to determine an active connection passing through the congested port as a connection to be switched; A path determination module, configured to determine a path of a candidate connection in a candidate connection table corresponding to an active connection table where the connection to be switched is located as a target switching path; The sending module is used to send the connection to be switched and the target switching path to a server corresponding to the connection to be switched, so that the server corresponding to the connection to be switched modifies the path of the connection to be switched to the target switching path.

17. A cluster load balancing device, characterized in that: Applied to a server in a target cluster, the target cluster includes a centralized controller, multiple servers and multiple switches, the switch includes multiple switch ports, and the cluster load balancing device includes: A transmission module, used to establish an active connection with a server in the target cluster and transmit a target data packet; A detection module, used to detect whether there is a congested connection in each of the active connections; A sending module, configured to send congestion information to the centralized controller when there is a congested connection in each of the active connections; the centralized controller is configured to obtain the congested port and server status information of the target cluster upon receiving the congestion information; determine the active connection passing through the congested port as the connection to be switched, and determine the path of a candidate connection in the candidate connection table corresponding to the active connection table where the connection to be switched is located as the target switching path; the server status information includes the active connection table and the corresponding candidate connection table between each server; The modification module is used to obtain the connection to be switched and the target switching path sent by the centralized controller, and modify the path of the connection to be switched to the target switching path.

18. An electronic device, characterized in that: It comprises a memory and a processor, the memory stores computer-readable instructions, and the processor is used to run the computer-readable instructions in the memory to execute the steps in the cluster load balancing method according to any one of claims 1 to 15.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the cluster load balancing method according to any one of claims 1 to 15.

20. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps in the cluster load balancing method according to any one of claims 1 to 15 are implemented.