Cluster Load Balancing Method, Device, Equipment, Medium and Program Product

By obtaining congestion information and server status, adjusting the path of connection to be switched, and centralized stream scheduling is used to solve the problems of unbalanced load and low bandwidth utilization in the data center, and improving the load balancing degree and bandwidth utilization of the cluster.

CN117278567BActive Publication Date: 2025-07-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311331890.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-13
Publication Date
2025-07-29
Estimated Expiration
2043-10-13

AI Technical Summary

Technical Problem

The existing load balancing schemes have problems with load imbalance and low bandwidth utilization in data centers. Especially in AI training scenarios, when the number of streams is small, the ECMP hash scheme is prone to have hash polarization, resulting in traffic concentration on a few network paths, resulting in bandwidth waste and throughput being squeezed.

Method used

By obtaining the congestion information and server status of the target cluster, determining the connection to be switched and adjusting its path, centralized flow scheduling is performed using a centralized controller to optimize the network path to eliminate congestion.

Benefits of technology

It improves the cluster load balancing level and bandwidth utilization, reduces the impact of network congestion on cluster performance, and improves the overall throughput capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117278567B_ABST
    Figure CN117278567B_ABST
Patent Text Reader

Abstract

The present application discloses a cluster load balancing method and apparatus. When congestion information reported by a target server is obtained, congestion ports of the target cluster and server status information are obtained, where the server status information includes an active connection table among various servers and a corresponding candidate connection table; the active connections passing through the congestion ports are determined as connections to be switched; 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 a target switching path; and the connection to be switched and the target switching path are sent to the server corresponding to the connection to be switched. The present application comprehensively processes the congestion information of each server and the congestion ports uploaded by the switch using a centralized controller, and uses centralized flow scheduling to eliminate network congestion, which can improve the degree of cluster load balancing and bandwidth utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of load balancing, and particularly relates to a cluster load balancing method and device. Background Art

[0002] Existing load balancing solutions include the flow-level ECMP (Equal-Cost-Multi-Path) hashing solution. Among them, the flow-level ECMP hashing solution is the most widely used solution in current data centers. The ECMP solution uses the five-tuple of a data packet as the input to calculate the output port of the next-hop route. Since all data packets of a data stream have the same five-tuple, these data packets will all reach the receiving end along the same physical network path. From the perspective of load balancing performance, ECMP hashing has strong randomness and requires a large number of data streams (such as thousands of streams on a single switch) to achieve a relatively good load balancing effect (based on the law of large numbers in mathematical statistics). In the scenario of AI training, when the number of streams is not large, ECMP often shows obvious load imbalance and even hash polarization, resulting in most traffic only taking a very small number of network paths, wasting a large amount of bandwidth. At the same time, since most data streams are crowded on a small number of network paths, the throughput of each stream is severely squeezed, ultimately resulting in serious impairment of the service throughput, and finally resulting in low cluster load balancing degree and bandwidth utilization rate.

[0003] That is, the cluster load balancing degree and bandwidth utilization rate in the prior art are low. Summary of the Invention

[0004] The embodiments of this application provide a cluster load balancing method and device, which can improve the cluster load balancing degree and bandwidth utilization rate.

[0005] In a first aspect, the cluster load balancing method provided by this application is applied to a target cluster, the target cluster includes multiple servers and multiple switches, the switches include multiple switch ports, and the cluster load balancing method includes:

[0006] When congestion information reported by a target server is obtained, obtain the congestion port of the target cluster and the server status information, where the server status information includes the active connection table between each server and the corresponding candidate connection table;

[0007] Determine the active connection passing through the congestion port as the connection to be switched;

[0008] 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;

[0009] Send the connection to be switched and the target switching path to the server corresponding to the connection to be switched.

[0010] In an optional embodiment, the cluster load balancing method includes:

[0011] Initializing the multiple servers and the multiple switches based on preset network topology information to obtain the target cluster;

[0012] Dividing the target identifiers of data packets between server groups into different target identifier combined groups based on the target cluster, where each server group includes two servers, and the data packets belonging to the target identifier combined group are transmitted between the server groups along the flow path corresponding to the target identifier combined group, and the flow path includes multiple switch ports;

[0013] Issuing multiple target identifier combined groups to each server.

[0014] In an optional embodiment, the target cluster includes multiple switch layers, and each switch layer includes multiple switches;

[0015] The dividing the target identifiers of data packets between server groups into different target identifier combined groups based on the target cluster includes:

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

[0017] Combining the target identifier groups of different switch layers to obtain multiple target identifier combined groups, where the target identifiers in the target identifier combined group are the intersection of the target identifiers in the target identifier groups that make up the target identifier combined group.

[0018] In an optional embodiment, the dividing the target identifiers of data packets between server groups into different target identifier groups respectively based on each switch layer includes:

[0019] Inputting test data packets with different multi - tuple identifiers between server groups into the switch layer to obtain the switch ports corresponding to each test data packet, where the multi - tuple identifier includes a target identifier, and the target identifiers in each multi - tuple identifier are different;

[0020] Putting the target identifiers of the multi - tuple identifiers of the test data packets on the same switch port into the same target identifier group to obtain multiple target identifier groups.

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

[0022] In a first aspect, the cluster load balancing method provided by the present application is applied to a cluster load balancing system. The cluster load balancing system includes a target cluster, and the target cluster includes a central controller, a plurality of servers, and a plurality of switches. The switches include a plurality of ports. The cluster load balancing method includes:

[0023] Establish an active connection with the servers in the target cluster and transmit target data packets;

[0024] Detect whether there are congested connections in each of the active connections;

[0025] When there are congested connections in each of the active connections, send congestion information to the central controller.

[0026] In an optional embodiment, the establishing an active connection with the servers in the target cluster and transmitting target data packets includes:

[0027] When obtaining a plurality of the target identification combined packets sent by the central controller, establish an active connection with other servers in the target cluster. The active connection includes a target identification and a path;

[0028] Transmit the target data packets having the same target identification as that of the active connection along the path of the active connection through the active connection.

[0029] In an optional embodiment, the cluster load balancing method includes:

[0030] When obtaining the connection to be switched and the target switching path sent by the central controller, obtain the target identification of the path of the connection to be switched and the target identification of the target switching path;

[0031] Modify the target identification of the path of the connection to be switched to the target identification of the target switching path.

[0032] In an optional embodiment, the cluster load balancing method includes:

[0033] When obtaining a plurality of the target identification combined packets sent by the central controller, perform path detection based on the plurality of the target identification combined packets to obtain a candidate connection table corresponding to the active connection table of each server group. The active connection table of a server group includes each active connection established between server groups. The target identification combined packets of each candidate connection in the candidate connection table are different from the target identification combined packets of each candidate connection in the active connection table;

[0034] Send the active connection table and the corresponding candidate connection table to the central controller.

[0035] In a third aspect, the cluster load balancing device provided by the present application is applied to a target cluster, where the target cluster includes multiple servers and multiple switches, the switches include multiple switch ports, and the cluster load balancing device includes:

[0036] An obtaining module, configured to obtain the congested ports and server status information of the target cluster when receiving the congestion information reported by a target server, where the server status information includes the active connection table and the corresponding candidate connection table among the servers;

[0037] A connection determination module, configured to determine the active connections passing through the congested ports as the connections to be switched;

[0038] A path determination module, configured to 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;

[0039] A sending module, configured to send the connection to be switched and the target switching path to the server corresponding to the connection to be switched.

[0040] In an optional embodiment, the obtaining module is configured to:

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

[0042] Based on the target cluster, divide the target identifiers of the data packets between server groups into different target identifier combined groups, where a server group includes two servers, and the data packets belonging to the target identifier combined group are transmitted between the server groups along the flow path corresponding to the target identifier combined group, and the flow path includes multiple switch ports;

[0043] Send multiple target identifier combined groups to each server.

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

[0045] Divide the target identifiers of the data packets between server groups into different target identifier groups based on each switch layer respectively;

[0046] Combine the target identifier groups of different switch layers to obtain multiple target identifier combined groups, where the target identifiers in the target identifier combined group are the intersections of the target identifiers in the target identifier groups that make up the target identifier combined group.

[0047] In an optional embodiment, the obtaining module is configured to:

[0048] Input test data packets with different multi - tuple identifiers between server groups into the switch layer to obtain the switch ports corresponding to each test data packet, where the multi - tuple identifier includes a target identifier, and the target identifiers in each multi - tuple identifier are different;

[0049] Put the target identifiers of the multi - tuple identifiers of the test data packets on the same switch port into the same target identifier group to obtain multiple target identifier groups.

[0050] In an optional embodiment, the hash function and hash seed used by the same switch layer are the same, and the hash function and hash seed used by different switch layers are different.

[0051] In a fourth aspect, the cluster load - balancing device provided by the present application is applied to a cluster load - balancing system. The cluster load - balancing system includes a target cluster, the target cluster includes a central controller, multiple servers, and multiple switches, the switch includes multiple ports, and the cluster load - balancing device includes:

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

[0053] A detection module, configured to detect whether there are congested connections in each of the active connections;

[0054] A sending module, configured to send congestion information to the central controller when there are congested connections in each of the active connections.

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

[0056] When obtaining multiple target identifier combined groups sent by the central controller, establish active connections with other servers in the target cluster, where the active connections include target identifiers and paths;

[0057] Transmit the target data packets with the same target identifier as the active connection along the path of the active connection through the active connection.

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

[0059] When obtaining a connection to be switched and a target switching path sent by the central controller, obtain the target identifier of the path of the connection to be switched and the target identifier of the target switching path;

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

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

[0062] When obtaining multiple combined groupings of the target identifiers sent by the centralized controller, perform path detection based on the multiple combined groupings of the target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group, where the active connection table of the server group includes each active connection established between server groups, and the combined grouping of the target identifiers of each candidate connection in the candidate connection table is different from the combined grouping of the target identifiers of each candidate connection in the active connection table;

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

[0064] In a fifth aspect, the electronic device provided in the present application includes a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program in the memory to implement the steps in the cluster load balancing method provided in the present application.

[0065] In a sixth aspect, the computer-readable storage medium provided in the present application stores multiple instructions, and these instructions are suitable for being loaded by a processor to implement the steps in the cluster load balancing method provided in the present application.

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

[0067] In the present application, compared with the related art, when obtaining the congestion information reported by the target server, obtain the congestion ports and server status information of the target cluster, and then determine the active connections passing through the congestion ports as the connections to be switched; then 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; finally, send the connection to be switched and the target switching path to the server corresponding to the connection to be switched. The present application uses the centralized controller to comprehensively process the congestion information of each server and the congestion ports uploaded by the switch, and uses centralized flow scheduling to eliminate network congestion, which can improve the degree of cluster load balancing and bandwidth utilization. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0069] Figure 1It is a schematic diagram of the scenario of the cluster load balancing system provided by the embodiments of the present application;

[0070] Figure 2 It is a topological view of the target cluster in the cluster load balancing system provided by the embodiments of the present application;

[0071] Figure 3 It is a schematic diagram of the topological path of a server group in the cluster load balancing system provided by the embodiments of the present application;

[0072] Figure 4 It is a schematic diagram of the extended single-Pod topology in the cluster load balancing system provided by the embodiments of the present application;

[0073] Figure 5 It is a schematic diagram of ECMP hashing in the prior art;

[0074] Figure 6 It is a schematic diagram of the process of an embodiment of the cluster load balancing method provided by the embodiments of the present application;

[0075] Figure 7 It is a schematic diagram of the process of another embodiment of the cluster load balancing method provided by the embodiments of the present application;

[0076] Figure 8 It is a schematic diagram of the routing hash configuration of each switch in the cluster load balancing method provided by the embodiments of the present application;

[0077] Figure 9 It is a schematic diagram of the source port number grouping in the cluster load balancing method provided by the embodiments of the present application;

[0078] Figure 10 It is a schematic diagram of the source port number grouping of the aggregation layer in the cluster load balancing method provided by the embodiments of the present application;

[0079] Figure 11 It is a schematic diagram of the source port number grouping of the core layer in the cluster load balancing method provided by the embodiments of the present application;

[0080] Figure 12 It is a schematic diagram of the source port number grouping of the access layer in the cluster load balancing method provided by the embodiments of the present application;

[0081] Figure 13 It is a schematic diagram of the server status information maintained by the server in the cluster load balancing method provided by the embodiments of the present application;

[0082] Figure 14 It is a schematic diagram of the switch status information, server status information, and topological view of the target cluster maintained by the central controller in the cluster load balancing method provided by the embodiments of the present application;

[0083] Figure 15 It is a schematic flowchart of another embodiment of the cluster load balancing method provided by an embodiment of the present application;

[0084] Figure 16 It is a schematic flowchart of another embodiment of the cluster load balancing method provided by an embodiment of the present application;

[0085] Figure 17 It is a schematic flowchart of another embodiment of the cluster load balancing method provided by an embodiment of the present application;

[0086] Figure 18 It is a schematic diagram of the blocking probability of at least one connection in the cluster load balancing method provided by an embodiment of the present application;

[0087] Figure 19 It is a schematic diagram of the blocking probability of a connection in the cluster load balancing method provided by an embodiment of the present application;

[0088] Figure 20 It is a schematic structural diagram of an embodiment of the cluster load balancing device provided by an embodiment of the present application;

[0089] Figure 21 It is a schematic structural diagram of another embodiment of the cluster load balancing device provided by an embodiment of the present application;

[0090] Figure 22 It is a schematic structural diagram of a switch, a centralized controller, and a server provided by an embodiment of the present application;

[0091] Figure 23 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0092] It should be noted that the principle of the present application is illustrated by being implemented in a suitable computing environment. The following description is based on the specific embodiments of the present application illustrated, and it should not be regarded as limiting other specific embodiments of the present application not detailed herein.

[0093] In the following description of the present application, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0094] In the following description of the present application, the terms "first / second / third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged in a specific order or sequence when allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

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

[0096] 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.

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

[0098] Please refer to Figure 1 ,This application also provides a cluster load balancing system, such as Figure 1 As shown, 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. The switches include multiple switch interfaces. The centralized controller and the servers are integrated with the cluster load balancing device provided by the present application.

[0099] 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.

[0100] like Figure 2 As shown, 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, the core layer Core, and the server Host of one layer. The switch of the access layer and its downstream servers are collectively referred to as a rack. The switch of the access layer and all the aggregation layer switches connected to it and all the downstream servers are collectively referred to as a module (Pod), and multiple core layer switches are combined into a plane. For example, in Figure 2In the figure, access layer switches L0 and L1 and their downstream servers H0 and H1 form a rack; all devices within the first dashed box form a network module (Pod). It's important to note that in mainstream data center networks, to increase communication bandwidth and connection reliability between servers, servers typically use two links to connect to two access layer switches. A server's network interface card has two network ports, each connected to two switches. The aggregation switches with the same sequence number in each pod connect to all Core switches in the same Core plane. For example, the first aggregation switch S0 in Pod 0 and the first aggregation switch S4 in Pod 1 connect to all switches in plane 0 of the Core layer. The number of Core planes in a pod is the same as the number of aggregation switches in a pod. In real data centers, there are typically eight Core planes, each with eight Core switches. Furthermore, the network has more than a dozen pods, with each pod typically having eight aggregation switches and more than a dozen racks, and a rack containing dozens of servers. We denote the number of aggregation switches per pod as NS, the number of switches per Core plane as NC, and the number of leaf switches per rack as NL.

[0101] like Figure 2 As shown in the figure, 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-C17, and the core layer includes 4 planes numbered plane0-plane3. The server layer (Host) includes 16 servers numbered HC0-H17. The target cluster is divided into 4 pods numbered Pod0-Pod3.

[0102] like Figure 3 As shown, for a server group, a server group includes two servers. Figure 2 In the network topology diagram, there can be multiple paths between a pair of servers.

[0103] Of course, in other embodiments, the topology of the target cluster 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 general Clos topology, all aggregation layer switches of each Pod are connected to all core layer switches. Figure 4 shown.

[0104] like Figure 5As shown, the switch stores a hash function and a hash seed. The hash function is used to calculate a hash output value based on the multi-dimensional identifier group of the data packet and the hash seed. Specifically, the multi-dimensional identifier group of the data packet is a five-dimensional identifier group. Specifically, in the prior art, the hash function in the switch is an ECMP (Equal-Cost-Multi-Path) hash function, and the ECMP hash function is used to perform routing addressing on the data packet. Generally, on a certain switch, multiple equal-length paths leading to the same destination server can be seen. Here, the length 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 this port. For example Figure 2 On switch L0 as shown, it can be seen that there are 4 candidate output ports that can all lead to server H4. The 4 candidate output ports respectively correspond to 4 aggregation layer switches in the aggregation layer. When selecting the output port, ECMP hash will extract the five-dimensional identifier group (source IP, destination IP, protocol number in the IP header, and source port and destination port in the TCP or UDP header) in the data packet for hash calculation. For example Figure 5 As shown, data packets of the same flow (a set of data packets with the same five-tuple) will reach the destination server along the same path in the order they are sent. It should be noted that the result calculated by the hash is the index number of the candidate output port list, not the port number itself. The candidate output port list is [8, 9, 1, 1], and the result 1 calculated by the hash represents the port with index 1 in the candidate output port list (the index number starts from 0), that is, port 9.

[0105] In addition, for example Figure 1 As shown, the cluster load balancing system may further include a memory for storing the original data, intermediate data, and result data during the audio processing.

[0106] 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 combines a large number of different types of storage devices (storage devices are also called storage nodes) in the network through functions such as cluster applications, grid technology, and distributed file systems, and collaborates through application software or application interfaces to jointly provide data storage and service access functions to the outside world.

[0107] Currently, the storage method of the storage system is as follows: Create a logical volume. When creating a logical volume, physical storage space is allocated for each logical volume. This physical storage space may be a certain storage device or the disks of several storage devices. The client stores data on a certain logical volume, that is, stores the data on the file system. The file system divides the data into many parts, and each part is an object. The object not only contains data but also contains additional information such as data identification (ID entity, ID), etc. The file system writes each object into the physical storage space of the logical volume respectively, and the file system will record the storage location information of each object. Thus, when the client requests to access the data, the file system can enable the client to access the data according to the storage location information of each object.

[0108] The process of the storage system allocating physical storage space for a logical volume is specifically as follows: According to the capacity estimation of the objects stored in the logical volume (this estimation often has a large margin relative to the capacity of the actually to-be-stored objects) and the group of the Redundant Array of Independent Disk (RAID), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space for the logical volume.

[0109] It should be noted that Figure 1 The scene schematic diagram of the cluster load balancing system shown is only an example. The cluster load balancing system and the scene described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art know that with the evolution of the cluster load balancing system and the emergence of new service scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0110] The following will be described in detail respectively. It should be noted that the serial numbers of the following embodiments do not limit the preferred order of the embodiments.

[0111] Please refer to Figure 6 , Figure 6 which is a schematic flowchart of an embodiment of the cluster load balancing method provided by the embodiments of the present application. As Figure 6 shown, the process of the cluster load balancing method provided by the present application is as follows:

[0112] 201. When congestion information reported by the target server is obtained, obtain the congestion ports and server status information of the target cluster.

[0113] Among them, the target server can be any server in the target cluster.

[0114] In the embodiments of the present application, the server status information includes the active connection table and the corresponding candidate connection table among various servers. 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 for the active connection table.

[0115] Among them, both the active connection and the candidate connection include a path, and the path includes each switch passed by the connection. For example, a server group is H0 and H4, and the path of the active connection of the server group is L0->S0->L2, indicating that the active connection transmits data between server H0 and server H4 through the L0->S0->L2 path. Server H0 sequentially passes the data through switch L0, switch S0, and switch L2, and finally reaches server H4.

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

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

[0118] In the embodiments of the present application, obtain the switch ports passed by the paths of each active connection, and determine the active connection passing through the congested port as the connection to be switched.

[0119] For example, the target cluster is the AI training cluster network. The AI training cluster network is usually configured without bandwidth convergence, that is, the sum of the downstream bandwidths of each layer of switches is equal to the sum of the upstream bandwidths, in order to eliminate the throughput bottleneck of the training network. However, due to reasons such as single-path connection and uneven routing hashing, the actual data flow often forms a certain degree of congestion in the network, resulting in the inability to fully utilize these theoretically non-convergent bandwidths. The congestion types include:

[0120] Leaf upstream congestion: The traffic of multiple servers in the same Rack is hashed to the same upstream port when hashing the Leaf upstream route. For example, H0->L0->S0->L2->H2 and H1->L0->S0->L2->H3 are congested at the upstream port of L0.

[0121] Spine upstream congestion: The traffic of multiple servers in the same Pod is hashed to the same upstream port when hashing the Spine upstream route. For example, H0->L0->S0->C0->S4->L4->H4 and H2->L3->S0->C0->S8->L8->H8 are congested at the upstream port of S0.

[0122] Core Downlink Congestion: When traffic from one or more Pods is directed to the same Pod, it may hash to the same downlink port during the downlink routing hash in the Core. For example, H0->L0->S0->C0->S4->L4->H4 and H8->L8->S8->C0->S4->L5->H5 congest the downlink port of C0.

[0123] Spine Downlink Congestion: When traffic across Pods or across Racks is hashed to the same downlink port during the Spine downlink routing hash. For example, H2->L2->S0->L0->H0 and H3->L3->S0->L0->H0 congest the downlink port of S0.

[0124] Leaf Downlink Congestion: Traffic directed to the same node congests the Leaf downlink port. This type of congestion is generally because the traffic is not balanced to two Leafs during the Spine downlink on the receiving side. For example, H0->L0->S0->L2->H2 and H0->L1->S1->L2->H2 congest the downlink port of L2.

[0125] When congestion occurs, the throughput of the connection will be significantly impaired, generally reduced by more than 50%. At this time, multiple parallel connections between a pair of nodes will be dragged down by the congested connection (waiting for the congested connection to complete 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 ultimately lead to a serious impairment of the throughput of the entire cluster. It can be seen that the training performance of the cluster is closely related to network congestion, and even a small amount of network congestion will cause a significant decline in the performance of the entire cluster.

[0126] For example, when the traffic of multiple servers is hashed to the same uplink port during the uplink routing hash of switch L0, such as the paths of two active connections are H0->L0->S0->L2->H2 and H1->L0->S0->L2->H3 respectively, and the paths of the two active connections congest 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.

[0127] 203. 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.

[0128] In a specific embodiment, randomly determine the path of a candidate connection in the candidate connection table as the target switching path.

[0129] 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 handover path. In other embodiments, the path of a candidate connection can also be selected from the candidate connection table according to other methods and determined as the target handover path, which is not limited in this application.

[0130] 204. Send the connection to be switched and the target handover 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 handover path.

[0131] In the embodiment of this application, after determining the connection to be switched and the target handover 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 handover 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 handover path.

[0132] Please refer to Figure 7 , Figure 7 which is another schematic flowchart of the cluster load balancing method provided by the embodiment of this application. As Figure 7 shown, the process of the cluster load balancing method provided by this application is as follows:

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

[0134] In the embodiment of this 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 as Figure 2 shown.

[0135] In the embodiment of this application, the preset network topology information includes the routing hash configuration of each switch layer. The routing hash configuration includes a hash function and a hash seed. Specifically, the hash function and the 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.

[0136] As Figure 8As shown in the figure, specifically, in this application, switches at the same level all use a hash function based on exclusive OR (XOR). For example, the hash function based on exclusive OR (XOR) can be the CRC32 algorithm or toeplitz, etc., and the same hash seed is used. For example, all access layer switches in the Leaf layer use the same exclusive OR-based hash algorithm L and hash seed L, all aggregation layer switches in the Spine layer use the exclusive OR-based hash algorithm S and hash seed S, and all core layer switches in the core layer use the exclusive OR-based hash algorithm and hash seed C. In practice, modern data center switches basically support the exclusive OR-based hash method, so this requirement can be met on switches.

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

[0138] Among them, 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. One target identifier joint group corresponds to one flow path. For example, the flow path is L0->S0->L2, indicating that the data packet is transmitted between server groups through the switch ports of switch L0, switch S0, and switch L2 in sequence.

[0139] In the embodiment of this application, the target identifier can be the source port number of the data packet. In other embodiments, the target identifier can be some bits (such as the lower 8 bits) in the source port number. In addition, in IPv6 network routing, we have more options to identify the logical path, as long as this field is freely variable and participates in the routing hash calculation. For example, the target identifier is the flow label field in the IPv6 packet header or some of its bits.

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

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

[0142] In the embodiments of the present application, the target identifiers of the data packets between server groups are divided into different target identifier groups based on each switch layer respectively, including: inputting test data packets with different multi-group identifiers between server groups into the switch layer to obtain the switch ports corresponding to each test data packet, where the multi-group identifier includes the target identifier, and the target identifiers in each multi-group identifier are different; putting the target identifiers of the multi-group identifiers of the test data packets on the same switch port into the same target identifier group to obtain multiple target identifier groups.

[0143] In the embodiments of the present application, the test data packets with different multi-group identifiers between server groups can be generated by a first preset tool. After inputting the test data packets with different multi-group identifiers between server groups into the switch layer, the first preset tool is used for detection to obtain the switch ports corresponding to each test data packet.

[0144] Among them, the first preset tool can be the traceroute tool. Traceroute is an important network diagnostic tool that can help developers identify connection problems, bottleneck points, and packet losses in the network. This tool detects the path of the data packet from the source computer to the destination, and provides detailed information about each intermediate hop by identifying the hosts along the way. Traceroute aims to provide developers with a clear picture of the path that the data packet takes through the network, which is achieved by using the Time-To-Live (TTL) field in the data packet header, which specifies the number of hops that the data packet can make before being discarded. The Traceroute tool sends data packets with TTL values gradually increasing from 1, and records the hosts from which ICMP TTL exceeded messages are received by repeating this process. This tool can build a network map and identify each hop that the data packet passes through before reaching the destination. Traceroute has several key features that make it an essential tool for developers. Packet timing: Traceroute records the time required for each data packet to travel from the source to the destination, allowing developers to identify slow points or bottleneck points in the network. Reverse DNS query: For each hop, Traceroute performs a reverse Dns lookup to resolve the ip address to a hostname, making it easier to identify network devices on the path. Customizable parameters: Traceroute allows developers to customize the data packet size, port number, and TTL value, providing greater flexibility in solving network problems. To use Traceroute, simply open a command prompt or terminal window and type Traceroute, then enter the IP address or hostname of the target, and other options can also be added, such as the maximum TTL value or data packet size.

[0145] The underlying principle of relative path control is that the output of a hash function based on exclusive or (XOR) has a linear property in the sense of XOR with respect to the offset of the input. That is, the same input offset can produce the same output offset (regardless of the non-offset part). In this application, we control the output of the network routing hash function by controlling its input (the target identifier), so as to obtain groups of target identifiers that can produce different outputs. Finally, the central controller configures the target identifiers of the data stream to control the path of the data stream, achieving the goal of avoiding congestion.

[0146] As Figure 9 shown, taking the multi-tuple identifier as a five-tuple and the target identifier as the source port number in the five-tuple as an example. Keeping the other four tuples of the five-tuple unchanged and traversing the source port numbers, multiple different five-tuple identifiers are obtained. These multiple different five-tuple identifiers are input into the hash function of the switch layer to obtain the hash offsets of each five-tuple identifier. The source port numbers in the five-tuple identifiers with the same hash offset are put into the same source port number group. In these groups, all the source port numbers within the same group can produce the same offset of the hash function.

[0147] By grouping the source port numbers, the efficiency of alternative path detection can be improved. If the network does not have the ability of relative path control, when detecting alternative connection paths or detecting new paths for congested active paths, we have to traverse the source port numbers for individual detection. Such detection efficiency is very low, and it is not certain that new available paths can be detected. However, with the ability of relative path control, we can clearly know how many paths have only partial overlap or complete non-overlap, and can calculate which source port numbers can correspond to these paths.

[0148] In other embodiments, test data packets with different multi-tuple identifiers between server groups can be generated by a virtual router. That is, on the switch, inputting a certain five-tuple into the virtual routing function can obtain the hash result. For example, on the aggregation layer switch, traverse all five-tuples to obtain the output of the virtual routing function, and perform a modulo operation on the number of candidate output ports according to the output. Then, group the source port numbers with the same remainder into one group to obtain the corresponding group.

[0149] In the embodiments of this application, the target cluster includes an access layer, an aggregation layer, and a core layer.

[0150] As Figure 10 shown, first, based on the aggregation layer, the target identifiers of the data packets between server groups are divided into different target identifier groups. Based on Figure 9With the described method, we can obtain the source port number groups hashed to different aggregation layer switches on the access layer Leaf switches, denoted by SGi (Spine Group index), such as SG0, SG1, SG2, SG3. Note that for the groups obtained here, what we can determine is that they can be routed to different aggregation layer switches.

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

[0152] Such as Figure 12 As shown, based on the access layer, the destination identifiers of the data packets between server groups are divided into different destination identifier groups. Similarly, we can obtain the source port number groups hashed to different access layer switches on the aggregation layer switches, denoted by LGi (Leaf Group index), namely LG0, LG1.

[0153] (2) Combine the destination identifier groups of different switch layers to obtain multiple combined destination identifier groups.

[0154] Among them, the destination identifier in the combined destination identifier group is the intersection of the destination identifiers in the destination identifier groups that make up the combined destination identifier group.

[0155] In the embodiments of this application, after obtaining the destination identifier groups of each layer of switches, we can further process to obtain the combined destination identifier groups of multiple layers of switches. We intersect the destination identifier groups of different layers pairwise to obtain the combined destination identifier groups.

[0156] Specifically, when the destination identifier is the source port number, after obtaining the source port number groups of each layer of switches, we can further process to obtain the combined source port number groups of multiple layers of switches. We intersect two or more types of groups pairwise to obtain two or more types of combined groups. For example, based on Figure 2Regarding the topology, we can obtain 4 source port number groups for the aggregation layer, 2 source port number groups for the core layer, and 2 source port number groups for the access layer. We perform pairwise intersections on the 4 source port number groups of the aggregation layer and the 2 source port number groups of the core layer, and we get 8 SL (Spine-Leaf) combined groups. The source port numbers in each group correspond to the paths passing through specific aggregation layer switches and access layer switches, and there are a total of 8 different paths. Furthermore, by taking the intersection twice on the 4 source port number groups of the aggregation layer, the 2 source port number groups of the core layer, and the 2 source port number groups of the access layer, we can obtain 16 SCL (Spine-Core-Leaf) combined groups, that is, 16 target identification combined groups. The source port number of each group corresponds to the path passing through specific Spine-Core-Leaf switches, and there are a total of 16 different paths.

[0157] It should be noted that the target identification combined groups mainly play their roles within a server group, and can balance the connection traffic within the IP pair to the network. However, the traffic of different server groups cannot be simply solved by the combined groups, but requires our centralized controller to perform path re-scheduling to solve. There is an exception in one extreme case, that is, if the server group uses enough connections, so many that it can cover all SCL groups, it can ensure that the traffic at the server group granularity is load-balanced throughout the network, so that the mixed traffic of all server groups is also load-balanced and congestion-free throughout the network.

[0158] In another specific embodiment, based on the target cluster, the target identifications of the data packets between server groups are divided into different target identification combined groups, including: inputting the test data packets with different multi-tuple identifications between server groups into the switch layer to obtain the switch ports corresponding to each test data packet, where the multi-tuple identification includes the target identification, and the target identifications in each multi-tuple identification are different; putting the target identifications of the multi-tuple identifications of the test data packets on the same switch port into the same target identification group to obtain multiple target identification groups.

[0159] 303. Send multiple target identification combined groups to each server.

[0160] In the embodiments 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 that congestion points may appear on any switch, we hope to be able to control the path to any combination of switch paths, so combined groups are required as the input for candidate connection detection. Therefore, multiple target identification combined groups are sent to each server so that the server can more accurately detect candidate connection paths.

[0161] 304. When congestion information reported by a target server is obtained, obtain the congested ports and server status information of the target cluster.

[0162] Among them, the target server can be any server in the target cluster.

[0163] In the embodiments of this application, the server status information includes the active connection table between each server and the corresponding candidate connection table. 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. 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 mainly used after congestion is sensed. The centralized controller will issue a path switching decision and select a path from the candidate connection table for switching.

[0164] In the implementation of this application, obtaining the congested ports and server status information of the target cluster includes: obtaining the switch status information maintained locally, where 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; determining the congested ports based on the switch status. In the embodiments of this application, the congested ports reported by the switch are determined as the congested ports.

[0165] As Figure 13 shown, the target identifier is the source port number. The active connection includes the source port number, the sending port, and the path. For example, the server maintains an active connection table with destination IP1, destination IP2... destination IPN. The active connection table between the server and destination IP1 includes: Connection 1: source port number 1, sending port 1, path 1; Connection 2: source port number 2, sending port 2, path 2; Connection 3: source port number 3, sending port 3, path 3;... Connection M: source port number M, sending port M, path M. The server maintains a candidate connection table corresponding to the active connection table with destination IP1, destination IP2... destination IPN. 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.

[0166] In the embodiments of this application, the centralized controller obtains the switch status information at a preset period. The switch status information includes the load and congestion status of each switch port of each switch.

[0167] As Figure 14 shown, the centralized controller obtains the switch status information and the server status information at a period, and maintains the switch status information, the server status information, and the topology view of the target cluster locally. Figure 14 The topology view ofFigure 2 The same.

[0168] Such as Figure 14 As shown, the switch status information includes the status of each port of switches 1 to S. For example, the status information of switch 1 includes: the load, congestion status, etc. in the outbound direction of port 1, the load, congestion status, etc. in the outbound direction of port 2, …… the load in the outbound direction of port 3.

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

[0170] In the embodiment of the present application, obtain the switch ports through which the paths of each active connection pass, and determine the active connection passing through the congested port as the connection to be switched.

[0171] 306. 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.

[0172] In a specific embodiment, randomly determine the path of a candidate connection in the candidate connection table as the target switching path.

[0173] In another specific embodiment, obtain the throughput of each candidate connection in the candidate connection table, and determine the path of the candidate connection with the minimum throughput as the target switching path. In other embodiments, it is also possible to select the path of a candidate connection from the candidate connection table according to other methods and determine it as the target switching path, and the present application does not limit this.

[0174] 307. Send 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.

[0175] In the embodiment of the present application, after determining the connection to be switched and the target switching path, determine the server corresponding to the connection to be switched according to the server status information, and send 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.

[0176] Please refer to Figure 15 , Figure 15 is another schematic flowchart of the embodiment of the cluster load balancing method provided by the embodiment of the present application. As Figure 15 shown, this cluster load balancing method is applied to the server. The flow of the cluster load balancing method provided by the present application is as follows:

[0177] 401. Establish an active connection with the servers in the target cluster and transmit the target data packets.

[0178] In the embodiments of the present application, the active connection table records active connections in an active state. The active state represents a connection state with data transmission or data that can be transmitted immediately. The active connection table includes multiple active connections, and each active connection includes a target identifier and a flow path.

[0179] 402. Detect whether there is a congested connection among the active connections.

[0180] In a specific embodiment, when the server receives a congestion packet sent back by the receiving end, it determines whether there is a congested connection among the active connections. For example, the congestion packet is a CNP (Congestion Notification Packets) packet.

[0181] In another specific embodiment, when the server periodically detects the rate of each active connection, and when the rate of the active connection is lower than the preset rate, it determines whether there is a congested connection among the active connections.

[0182] 403. When there is a congested connection among the active connections, send congestion information to the centralized controller.

[0183] In the embodiments of the present application, when there is a congested connection among the active connections, it indicates that the server perceives congestion, and reports the relevant information of the congested connection to the centralized controller for its reference in positioning and making path switching decisions. Among them, the congestion information may or may not include the congested connection.

[0184] Please refer to Figure 16 , Figure 16 which is a schematic flowchart of another embodiment of the cluster load balancing method provided by the embodiments of the present application. As Figure 16 shown, this cluster load balancing method is applied to the server. The process of the cluster load balancing method provided by the present application is as follows:

[0185] 501. When obtaining a combined packet of multiple target identifiers issued by the centralized controller, establish active connections with other servers in the target cluster.

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

[0187] In the embodiments of the present application, when obtaining a combined packet of multiple target identifiers issued by the centralized controller, establish active connections with other servers in the target cluster. The active connection includes a target identifier and a path.

[0188] 502. Transmit the target data packet with the same target identifier as the active connection along the path of the active connection through the active connection.

[0189] In the embodiments 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 at the same time.

[0190] 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.

[0191] Among them, the active connection table of the server group includes each active connection established between server groups. The combined grouping of target identifiers of each candidate connection in the candidate connection table is different from the combined grouping of target identifiers of each candidate connection in the active connection table. Since different combined groupings of target identifiers correspond to different paths, the paths of each candidate connection in the candidate connection table are different from the paths of each candidate connection in the active connection table.

[0192] In the embodiments of the present application, after establishing an active connection with other servers in the target cluster, perform path detection on the paths corresponding to the combined grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group.

[0193] Specifically, the candidate connection table is used to maintain candidate connection information. The candidate connection table includes target identifiers and paths. The candidate connection table is mainly used for the centralized controller to issue a path switching decision after detecting congestion and select a path from the candidate connection table for switching.

[0194] Such as Figure 13 shown, the target identifier is the source port number. The candidate connection includes 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 each of the destination IP1, destination IP2... destination IPN. The candidate connection table between the server and the 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.

[0195] Specifically, use the INT tool to 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. Input each target identifier of the combined grouping of target identifiers into the INT tool to obtain each path of each target identifier in the combined grouping of target identifiers detected by the INT tool. Exclude the paths of the active connections from the paths of each target identifier in the detected combined grouping of target identifiers to obtain candidate paths, and determine candidate connections based on the candidate paths and the corresponding source port numbers.

[0196] INT's common practice is to insert an OAM (Operation, Administration, and Maintenance) layer between the header of the data packet and the data inside the packet. Then, this data packet changes from an ordinary network data packet to a "tagged" data packet by us. IOAM (In-band Operation, Administration, and Maintenance) is a network measurement technology. It samples the service traffic in real time and at high speed, adds IOAM information (Metadata, including device ID, in and out interfaces, timestamp, etc.) to the sampled data, and then actively sends the sampled data to the analyzer for analysis to achieve real-time perception of the network operation status. The INT function detects the physical path of the packet with a specific five-tuple in the network. The complete path form is like (sending side) Leaf -> (sending side) Spine -> Core -> (receiving side) Spine -> (receiving side) Leaf. For example, the physical path is L0 -> S0 -> C0 -> S4 -> L4.

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

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

[0199] 505. When obtaining the connection to be switched and the target switching path sent by the centralized controller, obtain the target identifier of the path of the connection to be switched and the target identifier of the target switching path.

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

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

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

[0203] Please refer to Figure 17 , Figure 17 which is a schematic flowchart of another embodiment of the cluster load balancing method provided by the embodiment of the present application. As Figure 17 shown, the process of the cluster load balancing method provided by the present application is as follows:

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

[0205] 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 acquires switch status information at preset intervals.

[0206] In an embodiment of this 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 as Figure 2 shown.

[0207] In an embodiment of this application, the preset network topology information includes the routing hash configuration of each switch layer. 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 function and hash seed used in different switch layers are different.

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

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

[0210] 603. Send multiple target identifier combined groups to each server.

[0211] In the implementation of this application, the centralized controller sends multiple target identifier combined groups to each server.

[0212] In an embodiment of this application, in order to provide sufficient path control accuracy when the server detects candidate connection paths. Given the complexity of network traffic and the fact that congestion points may appear on any switch, we hope to be able to control the path to any combination of switches. Therefore, combined groups are required as the input for candidate connection detection. Thus, multiple target identifier combined groups are sent to each server so that the server can more accurately detect candidate connection paths.

[0213] 604. When multiple target identifier combined groups sent by the centralized controller are obtained, establish active connections with other servers in the target cluster.

[0214] In the implementation of this application, when the server obtains multiple target identifier combined groups sent by the centralized controller, it establishes active connections with other servers in the target cluster.

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

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

[0217] In an embodiment of the present application, when obtaining a combined grouping of multiple target identifiers sent by the centralized controller, active connections are established with other servers in the target cluster, and the active connections include the target identifier and the path.

[0218] 605. Transmit the target data packets with the same target identifier as the active connection along the path of the active connection through the active connection.

[0219] In an implementation of the present application, the server transmits the target data packets with the same target identifier as the active connection along the path of the active connection through the active connection.

[0220] In an 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.

[0221] 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.

[0222] In an implementation of the present application, the server performs 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.

[0223] Among them, the active connection table of the server group includes each active connection established between server groups. The combined grouping of target identifiers of each candidate connection in the candidate connection table is different from that of each candidate connection in the active connection table. Since different combined groupings of target identifiers correspond to different paths, the paths of each candidate connection in the candidate connection table are different from those of each candidate connection in the active connection table.

[0224] In an 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 combined grouping of multiple target identifiers to obtain a candidate connection table corresponding to the active connection table of each server group.

[0225] 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 mainly used after congestion is sensed. The centralized controller issues a path switching decision and selects a path from the candidate connection table for switching.

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

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

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

[0229] 608. When obtaining the congestion information reported by the target server, obtain the congested ports and server status information of the target cluster.

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

[0231] Among them, the target server can be any server in the target cluster.

[0232] In an embodiment of this application, the server status information includes the active connection table and the corresponding candidate connection table among each server. The active connection table includes multiple active connections, the candidate connection table includes multiple candidate connections, and each candidate connection in the candidate connection table is a backup connection of 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 mainly used after congestion is sensed. The centralized controller issues a path switching decision and selects a path from the candidate connection table for switching.

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

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

[0235] In an embodiment of this application, obtain the switch ports passed by the paths of each active connection, and determine the active connection passing through the congested port as the connection to be switched.

[0236] 610. 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.

[0237] In the implementation of this 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.

[0238] In a specific embodiment, randomly determine the path of a candidate connection in the candidate connection table as the target switching path.

[0239] In another specific embodiment, obtain the throughput of each candidate connection in the candidate connection table, and determine the path of the candidate connection with the minimum throughput as the target switching path. In other embodiments, it is also possible to select the path of a candidate connection from the candidate connection table according to other methods as the target switching path, and this application does not make any limitations in this regard.

[0240] 611. Send 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.

[0241] In the implementation of this 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.

[0242] 612. When obtaining the connection to be switched and the target switching path sent by the centralized controller, obtain the target identifier of the path of the connection to be switched and the target identifier of the target switching path.

[0243] In the implementation of this 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.

[0244] In the embodiment of this application, the target identifier is the source port number.

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

[0246] In the implementation of this application, the server modifies the target identifier of the path of the connection to be switched to the target identifier of the target switching path.

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

[0248] This application uses the Monte Carlo method to simulate and test the relationship between the number of flows on the Leaf uplink of a Rack and the congestion probability. Refer to Figure 18 and Figure 19 , Figure 18 and Figure 19It is shown that the abscissa represents the number of upstream flows, and the ordinate 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 from the solution without optimization by this application, and the optimized curve is the curve obtained from the solution optimized by this application. As Figure 18 shown, when a server group uses 2 connections, in a typical AI training cluster network (such as Figure 4 shown), the probability of congestion in the Leaf uplink of a Rack approaches 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 with the increase in the number of flows. 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 2 flows will be affected, thereby affecting the AI training tasks where these 2 flows are located, resulting in a 50% decrease in task throughput and a 100% increase in training duration. The effect of this application is shown by the lower curve in the figure, that is, after the centralized controller scheduling converges, the probability of Rack congestion and the probability of congestion in each link both drop to 0, that is, congestion is completely eliminated (maximizing the throughput of AI training services). Of course, when a new training task is initiated, there may be very short-term 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.

[0249] To facilitate better implementation of the cluster load balancing method provided by the embodiments of this application, the embodiments of this application also provide a cluster load balancing device based on the above cluster load balancing method. The meanings of the nouns are the same as those in the above cluster load balancing method. For specific implementation details, please refer to the descriptions in the above method embodiments.

[0250] Please refer to Figure 20 , Figure 20 which is a schematic structural diagram of an embodiment of the cluster load balancing device provided by the embodiments of this application. The cluster load balancing device may include an acquisition module 701, a connection determination module 702, a path determination module 703, and a distribution module 704. Among them,

[0251] The acquisition module 701 is configured to obtain the congested ports and server status information of the target cluster when obtaining the congestion information reported by the target server. Among them, the server status information includes the active connection table and the corresponding candidate connection table between each server;

[0252] The connection determination module 702 is configured to determine the active connection passing through the congested port as the connection to be switched;

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

[0254] A distribution module 704, configured to distribute the connection to be switched and the target switching path to a server corresponding to the connection to be switched.

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

[0256] Initialize a plurality of servers and a plurality of switches based on preset network topology information to obtain a target cluster;

[0257] Divide target identifiers of data packets between server groups into different target identifier combined groups based on the target cluster, where a server group includes two servers, and data packets belonging to a target identifier combined group are transmitted between server groups along a flow-through path corresponding to the target identifier combined group, and the flow-through path includes a plurality of switch ports;

[0258] Distribute a plurality of target identifier combined groups to each server.

[0259] In an optional embodiment, the target cluster includes a plurality of switch layers, and each switch layer includes a plurality of switches; the acquisition module is configured to:

[0260] Respectively divide target identifiers of data packets between server groups into different target identifier groups based on each switch layer;

[0261] Combine target identifier groups of different switch layers to obtain a plurality of target identifier combined groups, where target identifiers in a target identifier combined group are the intersection of target identifiers in target identifier groups that make up the target identifier combined group.

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

[0263] Input test data packets with different multi-tuple identifiers between server groups into a switch layer to obtain switch ports corresponding to each test data packet, where the multi-tuple identifier includes a target identifier, and target identifiers in each multi-tuple identifier are different;

[0264] Put target identifiers of multi-tuple identifiers of test data packets on the same switch port into the same target identifier group to obtain a plurality of target identifier groups.

[0265] In an optional embodiment, the hash function and hash seed used by the same switch layer are the same, and the hash function and hash seed used by different switch layers are different.

[0266] For specific implementations of each of the above modules, reference may be made to the previous embodiments, which will not be elaborated here.

[0267] Please refer to Figure 21 , Figure 21 which is a schematic structural diagram of the cluster load balancing device provided by an embodiment of the present application. The cluster load balancing device may include a transmission module 801, a detection module 802, and a sending module 803. Among them,

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

[0269] The detection module is used to detect whether there is a congested connection in each active connection;

[0270] The sending module is used to send congestion information to the centralized controller when there is a congested connection in each active connection.

[0271] In an optional embodiment, the transmission module is used for:

[0272] When obtaining multiple combined target identifier packets sent by the centralized controller, establish an active connection with other servers in the target cluster. The active connection includes a target identifier and a path;

[0273] Transmit the target data packet with the same target identifier as the active connection along the path of the active connection through the active connection.

[0274] In an optional embodiment, the sending module is used for:

[0275] When obtaining the connection to be switched and the target switching path sent by the centralized controller, obtain the target identifier of the path of the connection to be switched and the target identifier of the target switching path;

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

[0277] In an optional embodiment, the sending module is used for:

[0278] When obtaining multiple combined target identifier packets sent by the centralized controller, perform path detection based on the multiple combined target identifier packets to obtain a candidate connection table corresponding to the active connection table of each server group. Among them, the active connection table of the server group includes each active connection established between server groups, and the combined target identifier packets of each candidate connection in the candidate connection table are different from the combined target identifier packets of each candidate connection in the active connection table;

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

[0280] For the specific implementation of each of the above modules, reference may be made to the previous embodiments, which will not be elaborated here.

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

[0282] As Figure 22 shown, 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.

[0283] The centralized controller is used to collect and comprehensively process information such as traffic and congestion reported by the servers and switch agents, and form a decision on traffic scheduling, and then send it to the servers to control the physical path of their data streams. The centralized controller includes an information engine and a decision engine. The information engine is used to construct a topological view of the entire network, and superimpose connection, traffic, and congestion information on the topological view to form a global traffic view, and comprehensively process and store various types of information into structured data that can be efficiently searched and indexed. The decision engine is used to send down the source port number grouping configuration for relative path control and the path switching decision for congested connections.

[0284] The server agent is used to detect congestion through a sensing module and report the path, traffic, and congestion data of the data stream, so that the centralized controller can form a global traffic view, and execute the scheduling decision sent down by the controller to switch the path of the data stream. Among them, the execution module can use the INT function to detect the physical path of a packet with a specific five-tuple in the network, and the complete path form is (sending side) Leaf -> (sending side) Spine -> Core -> (receiving side) Spine -> (receiving side) Leaf. The actual INT detection result will also carry out the id of the port and the queuing time in the outgoing port queue. The execution module can also switch its network path by changing the source port number of a certain connection (such as the source port number of QP in RoCEv2 / RDMA). In addition, the sensing module can sense the performance status of the connection by reading the congestion counter of the connection and report these statuses to the controller.

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

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

[0287] The electronic device can be a centralized controller, a server, or a switch.

[0288] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 of one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not limit the electronic device, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements. Among them:

[0289] The processor 101 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 102, and by calling the data stored in the memory 102, it executes various functions of the electronic device and processes data. Optionally, the processor 101 may include one or more processing cores; optionally, the processor 101 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 101 either.

[0290] 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 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device. In addition, the memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.

[0291] The electronic device also includes a power supply 103 that powers each component. Optionally, the power supply 103 may be logically connected to the processor 101 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 103 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

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

[0293] Although not shown, the electronic device may further include a display unit, an image acquisition element, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 101 in the electronic device will load the executable code 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 by this application, such as:

[0294] When obtaining the congestion information reported by the target server, obtain the congestion ports and server status information of the target cluster, where the server status information includes the active connection table and the corresponding candidate connection table among each server; determine the active connections passing through the congestion ports as the connections to be switched; 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; send the connection to be switched and the target switching path to the server corresponding to the connection to be switched.

[0295] Or, establish an active connection with the servers in the target cluster and transmit the target data packet.

[0296] Detect whether there are congested connections among all active connections.

[0297] When there are congested connections among all active connections, send the congestion information to the centralized controller.

[0298] It should be noted that the electronic device provided in the embodiment of this application and the cluster load balancing method in the above embodiment belong to the same concept. For the specific implementation process, please refer to the above relevant embodiments, which will not be elaborated here.

[0299] This application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program stored thereon is executed by the processor of the electronic device provided in the embodiment of this application, it enables the processor of the electronic device to execute the steps in the cluster load balancing method provided by this application. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0300] This application also provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, enabling the computer device to execute various optional implementation manners of the above cluster load balancing method.

[0301] The above has introduced in detail a cluster load balancing method and device provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner 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 idea; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present application.

[0302] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, involving relevant data of users, user permission or consent needs to be obtained, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.

Claims

1. A cluster load balancing method, characterized in that A centralized controller applied to a target cluster, where the target cluster includes multiple servers and multiple switches, the switches include multiple switch ports, and the cluster load balancing method includes: When congestion information reported by a target server is obtained, obtain the congested ports and server status information of the target cluster. Among them, the server status information includes the active connection table and the corresponding candidate connection table between each server. The target identifiers of the data packets between server groups in the target cluster are divided into different target identifier joint groups. The server group includes two servers. 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. The flow path includes multiple switch ports. The target identifier joint groups of each candidate connection in the candidate connection table are different from the target identifier joint groups of each candidate connection in the active connection table; Determine the active connection passing through the congested port as the connection to be switched; 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; Send the connection to be switched and the target switching path to the server corresponding to the connection to be switched.

2. The cluster load balancing method according to claim 1, wherein The cluster load balancing method includes: Initialize the multiple servers and the multiple switches based on preset network topology information to obtain the target cluster; Divide the target identifiers of the data packets between server groups into different target identifier joint groups based on the target cluster; Send multiple target identifier joint groups to each server.

3. The cluster load balancing method according to claim 2, wherein The target cluster includes multiple switch layers, and each switch layer includes multiple switches; The dividing the target identifiers of the data packets between server groups into different target identifier joint groups based on the target cluster includes: Divide the target identifiers of the data packets between server groups into different target identifier groups based on each switch layer respectively; Combine the target identifier groups of different switch layers to obtain multiple target identifier joint groups. Among them, the target identifiers in the target identifier joint group are the intersections of the target identifiers in the target identifier groups that make up the target identifier joint group.

4. The cluster load balancing method according to claim 3, wherein The dividing the target identifiers of the data packets between server groups into different target identifier groups based on each switch layer respectively includes: Input test data packets with different multi-tuple identifiers between server groups into the switch layer to obtain the switch ports corresponding to each test data packet. Among them, the multi-tuple identifier includes a target identifier, and the target identifiers in each multi-tuple identifier are different; Put the target identifiers of the multi-tuple identifiers of the test data packets on the same switch port 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 by the same switch layer are the same, and the hash functions and hash seeds used by different switch layers are different.

6. The cluster load balancing method according to claim 1, wherein The determining 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 includes: Obtain the throughput of each candidate connection in the candidate connection table; Determine the path of the candidate connection with the minimum throughput in the candidate connection table as the target handover path.

7. 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.

8. The cluster load balancing method according to claim 1, wherein The obtaining of the congested ports and server status information of the target cluster includes: Obtain the switch status information maintained locally, where 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; Determine the congested ports based on the switch status.

9. A cluster load balancing method, characterized in that, Applied to a cluster load balancing system, the cluster load balancing system includes a target cluster, the target cluster includes a central controller, multiple servers and multiple switches, the switches include multiple ports, and the cluster load balancing method includes: Establish an active connection with the servers in the target cluster and transmit target data packets. The target identifiers of the data packets between server groups in the target cluster are divided into different target identifier combined groups. The server group includes two servers. The data packets belonging to the target identifier combined group are transmitted between the server groups along the flow-through path corresponding to the target identifier combined group. The flow-through path includes multiple switch ports. The target cluster includes server status information, and the server status information includes an active connection table and a corresponding candidate connection table between each server. The active connection table records the active connections in the active state, and the candidate connection table is used to maintain candidate connection information. The target identifier combined groups of each candidate connection in the candidate connection table are different from those of each candidate connection in the active connection table; Detect whether there are congested connections in each of the active connections; When there are congested connections in each of the active connections, send congestion information to the central controller.

10. The cluster load balancing method according to claim 9, characterized in that, The establishing of an active connection with the servers in the target cluster and transmitting target data packets includes: When multiple target identifier combined groups sent by the central controller are obtained, establish active connections with other servers in the target cluster. The active connections include target identifiers and paths; Transmit the target data packets with the same target identifier as the active connection along the path of the active connection through the active connection.

11. The cluster load balancing method according to claim 9, wherein The cluster load balancing method includes: When the to-be-switched connection and the target handover path sent by the central controller are obtained, obtain the target identifier of the path of the to-be-switched connection and the target identifier of the target handover path; Modify the target identifier of the path of the to-be-switched connection to the target identifier of the target handover path.

12. The cluster load balancing method according to claim 10, wherein The cluster load balancing method includes: When obtaining the combined grouping of multiple target identifiers sent by the centralized controller, 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, where the active connection table of the server group includes each active connection established between server groups, and the combined grouping of target identifiers of each candidate connection in the candidate connection table is different from the combined grouping of target identifiers of each candidate connection in the active connection table; Send the active connection table and the corresponding candidate connection table to the centralized controller.

13. The cluster load balancing method according to claim 12, wherein The cluster load balancing method includes: Update the active connection table and the corresponding candidate connection table at a preset period and send them to the centralized controller.

14. The cluster load balancing method according to claim 9, characterized in that The detection of whether there is a congested connection in each active connection includes: Detect whether the receiving end of each active connection sends back a congestion message and the rate of each active connection; Determine the active connection that sends back the congestion message or the active connection with a rate lower than the preset rate as the congested connection.

15. A cluster load balancing device, characterized in that, Applied to the centralized controller of the target cluster, the target cluster includes multiple servers and multiple switches, the switches include multiple switch ports, and the cluster load balancing device includes: An acquisition module, configured to obtain the congested ports and server status information of the target cluster when obtaining the congestion information reported by the target server, where the server status information includes the active connection table and the corresponding candidate connection table between each server, the target identifiers of the data packets between server groups in the target cluster are divided into different combined groupings of target identifiers, the server group includes two servers, and the data packets belonging to the combined grouping of target identifiers are transmitted between the server groups along the flow path corresponding to the combined grouping of target identifiers. The flow path includes multiple switch ports, and the combined grouping of target identifiers of each candidate connection in the candidate connection table is different from the combined grouping of target identifiers of each candidate connection in the active connection table; A connection determination module, configured to determine the active connection passing through the congested port as the connection to be switched; A path determination module, configured to 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; A sending module, configured to send the connection to be switched and the target switching path to the server corresponding to the connection to be switched.

16. A cluster load balancing device, characterized in that, Applied to a cluster load balancing system, the cluster load balancing system includes a target cluster, the target cluster includes a centralized controller, multiple servers and multiple switches, the switches include multiple ports, and the cluster load balancing device includes: A transmission module, configured to establish an active connection with a server in the target cluster and transmit target data packets. The target identifiers of the data packets between server groups in the target cluster are divided into different target identifier union groups. The server group includes two servers. The data packets belonging to the target identifier union group are transmitted between the server groups along the flow path corresponding to the target identifier union group. The flow path includes multiple switch ports. The target cluster includes server status information, and the server status information includes an active connection table between each server and a corresponding candidate connection table. The active connection table records the active connections in the active state. The candidate connection table is used to maintain candidate connection information. The target identifier union groups of the candidate connections in the candidate connection table are different from those of the candidate connections in the active connection table; A detection module, configured to detect whether there are congested connections in each of the active connections; A sending module, configured to send congestion information to the centralized controller when there are congested connections in each of the active connections.

17. An electronic device, characterized in that, It includes a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program in the memory to execute the steps in the cluster load balancing method according to any one of claims 1 to 14.

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

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

Citation Information

Patent Citations

  • Load balancing method and device, front-end scheduling server, storage medium and equipment

    CN111600806A