Network load balancing method and system, electronic equipment and program product
By polling the port status of the Spine switch and sending slowdown notice messages, the problem of large overhead and long adjustment time in the existing technology is solved, and the global load balancing effect of lightweight software is achieved, reducing network deployment costs.
Patent Information
- Application Number
- CN202510281685.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-05-30
AI Technical Summary
When the prior art realizes global load balancing, the equipment and controllers have large overhead, long adjustment time, and a large amount of bandwidth will be consumed based on message triggering.
By polling the port status of the Spine switch, in response to port congestion, the target routing information and sharing ratio are determined, and a speed reduction notification message is sent to adjacent network devices, instructing the second switch to reduce the sharing ratio of the Spine switch to the target traffic according to the target sharing ratio.
It realizes the global load balancing effect based on lightweight software, reduces the network deployment costs of operators and Internet manufacturers, and avoids a large amount of bandwidth consumption between devices.
Smart Images

Figure CN120075146A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of switches and routers, and particularly to a network load balancing method, system, electronic device, and program product. Background Art
[0002] In related technologies, when network devices generally implement the GLB (Global Load Balancing) function, in one way, by monitoring the congestion status or unavailable status of the routing egress, special processing is performed on forwarded packets to notify related devices, which requires the support of the chips of switches and routers. At the same time, triggered by packets, a large amount of bandwidth between devices will be consumed instantaneously. In another way, port information is uniformly reported to the controller, and the controller calculates the routes uniformly. This solution requires the cooperation of the controller, and the global perspective of route adjustment is more reasonable. However, the overhead of the device and the controller is large, and the adjustment time is also long. Summary of the Invention
[0003] Embodiments of the present disclosure provide a routing network load balancing method, system, electronic device, and program product.
[0004] In a first aspect, embodiments of the present disclosure provide a network load balancing method, which is applied to a target network device, and the target network device is a network device in an Equal-Cost Multi-Path (ECMP) group; the method includes:
[0005] Poll the status of the first port of the Spine switch;
[0006] In response to the first port status indicating congestion of the target port, determine the target routing information and the target sharing ratio corresponding to the forwarded packets in the target port;
[0007] Send a speed reduction notice packet to an adjacent network device of the Spine switch, where the speed reduction notice packet includes the target routing information and the target sharing ratio; the speed reduction notice packet is used to instruct a second switch in the adjacent network device to reduce the sharing ratio of the Spine switch for the target traffic based on the target sharing ratio; the target traffic is the traffic corresponding to the target routing information, and the second switch is a leaf switch in the ECMP group that performs load sharing and forwarding on the target traffic and is upstream of the Spine switch.
[0008] In a second aspect, embodiments of the present disclosure further provide a network load balancing method, which is applied to a second switch, and the method includes:
[0009] Receive the sent speed reduction notice message; the speed reduction notice message includes target routing information and a target sharing ratio; the target routing information is the routing information of the forwarded message corresponding to the congested port of the Spine switch that sends the speed reduction notice message;
[0010] In response to determining that the second switch itself is a leaf device that performs load sharing forwarding on the target traffic in the equal-cost multi-path (ECMP) group according to the target routing information, reduce the sharing ratio of the Spine switch to the target traffic according to the target sharing ratio; the target traffic is the traffic corresponding to the target routing information.
[0011] In a third aspect, an embodiment of the present disclosure further provides a global load balancing system, including: a Spine switch and a second switch among the adjacent network devices of the Spine switch;
[0012] The Spine switch is configured to implement the network load balancing method described above;
[0013] The second switch is configured to implement the network load balancing method described above;
[0014] The Spine switch and the second switch are located in the same equal-cost multi-path (ECMP) group, and the second switch is a leaf switch in the ECMP group that is located upstream of the Spine switch and performs load sharing forwarding on the traffic corresponding to the target routing information; the target routing information is the routing information of the forwarded message corresponding to the congested port of the Spine switch.
[0015] In a fourth aspect, an embodiment of the present disclosure further provides an electronic device, including:
[0016] One or more processors;
[0017] A memory, on which one or more programs are stored. When the one or more programs are executed by the one or more processors, the one or more processors implement the network load balancing method;
[0018] One or more input / output (I / O) interfaces, connected between the processor and the memory, and configured to implement information interaction between the processor and the memory.
[0019] In a fifth aspect, a computer program product includes a computer program, and when the computer program is executed by a processor, the network load balancing method described above is implemented.
[0020] The solution of the embodiment of the present disclosure polls the status of the first port of the Spine switch; in response to the first port status indicating congestion of the target port, determines the target routing information and the target sharing ratio corresponding to the forwarded packets in the target port; sends a speed reduction notice packet to the adjacent network device of the Spine switch, the speed reduction notice packet includes the target routing information and the target sharing ratio; the speed reduction notice packet is used to instruct the second switch in the adjacent network device to reduce the sharing ratio of the Spine switch for the target traffic based on the target sharing ratio; the target traffic is the traffic corresponding to the target routing information, and the second switch is the leaf switch located upstream of the Spine switch in the ECMP group that performs load sharing forwarding on the target traffic. Through the solution of this embodiment, the effect of global load balancing can be achieved based on lightweight software, and the cost of network deployment for operators and Internet manufacturers can be reduced. Description of the Drawings
[0021] In the drawings of the embodiments of the present disclosure:
[0022] Figure 1 is the flowchart of the network load balancing method on the target network device side provided by the embodiment of the present disclosure;
[0023] Figure 2 is the flowchart of the network load balancing method on the adjacent network device side provided by the embodiment of the present disclosure;
[0024] Figure 3 is the schematic diagram of the routing structure of an ECMP group provided by the embodiment of the present disclosure;
[0025] Figure 4 is the block diagram of the composition of the global load balancing system provided by the embodiment of the present disclosure;
[0026] Figure 5 is the block diagram of the composition of the electronic device provided by the embodiment of the present disclosure. Detailed Embodiments
[0027] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the communication perception data processing method and computer-readable storage medium provided by the embodiments of the present disclosure will be described in detail below with reference to the drawings.
[0028] In the following, the present disclosure will be described more fully with reference to the drawings. However, the illustrated embodiments may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. On the contrary, these embodiments are provided to make the present disclosure thorough and complete, and will enable those skilled in the art to fully understand the scope of the present disclosure.
[0029] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification. Together with the detailed embodiments, they are used to explain the present disclosure and do not constitute a limitation to the present disclosure. By describing the detailed embodiments with reference to the accompanying drawings, the above and other features and advantages will become more obvious to those skilled in the art.
[0030] The present disclosure can be described with reference to plan views and / or cross-sectional views by means of the ideal schematic diagrams of the present disclosure. Therefore, the example illustrations can be modified according to the manufacturing technology and / or tolerances.
[0031] Without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
[0032] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. As used in the present disclosure, the term "and / or" includes any and all combinations of one or more related listed items. As used in the present disclosure, the singular forms "a" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. As used in the present disclosure, the terms "comprising", "made of...", specify the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their groups.
[0033] Unless otherwise defined, the meanings of all terms (including technical and scientific terms) used in the present disclosure are the same as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless the present disclosure clearly so defines.
[0034] In the network architecture of an intelligent computing center (referred to as an intelligent computing center for short), before the implementation of GLB (Global Load Balancing, global load balancing), there are usually some challenges and problems. These problems mainly stem from the special requirements of the intelligent computing center and the fact that the traditional network architecture cannot fully meet the requirements of high availability, low latency, dynamic expansion, and high throughput. The following are some common problems in the intelligent computing center network before the implementation of GLB:
[0035] 1. Load imbalance
[0036] Problem description: Without global load balancing, traditional load balancing methods (such as load balancing based on a single data center or region) may cause some data centers to be overloaded, while other data centers have idle resources or low loads. Due to the lack of a global view, the load cannot be dynamically adjusted according to real-time situations.
[0037] Impact: Some data centers may encounter performance bottlenecks or overloads, while other data centers have low resource utilization due to idleness, and the overall system performance deteriorates, unable to provide high availability and high throughput.
[0038] 2. Poor fault recovery ability
[0039] Problem description: Without global load balancing, the failure of a data center or server cannot be immediately detected and switched, and traffic may still be directed to an unavailable or degraded server or data center, resulting in service interruption or poor user experience.
[0040] Impact: Applications with requirements for high availability and disaster recovery (DR) are prone to single points of failure when a server fails or a problem occurs in a data center, causing irreparable impacts. For example, failures in the financial industry or cloud computing platforms often result in huge losses.
[0041] Currently, network devices implement the GLB function in two ways:
[0042] 1. The network device monitors unavailable states such as congestion status at the routing exit, performs special processing on the forwarded packets, finds the adjacent network devices to be notified based on the source IP (Internet Protocol) of the packet, and notifies the adjacent network devices based on the destination IP of the packet. The adjacent network devices update the path for the relevant destination IP. This requires the support of the chips of switches and routers. At the same time, triggered by the packet, it will instantaneously consume a large amount of bandwidth between devices.
[0043] 2. The network device sends the port information and queue information on the device to the controller through telemetry (a new generation of network monitoring technology for remotely and rapidly collecting data from devices). The controller calculates the routing uniformly. If a port on a certain device is congested or unavailable, then the global routing is adjusted, and the relevant devices are updated with the routing. This solution requires the cooperation of the controller. The global perspective of the routing adjustment is more reasonable, but the overhead of the device and the controller is large, and the adjustment time is also long.
[0044] The solution of the embodiment of the present disclosure polls the status of the first port of the Spine switch; in response to the first port status indicating congestion of the target port, determines the target routing information and the target sharing ratio corresponding to the forwarded packets in the target port; sends a speed reduction notice message to the adjacent network device of the Spine switch, where the speed reduction notice message includes the target routing information and the target sharing ratio; the speed reduction notice message is used to instruct the second switch in the adjacent network device to reduce the sharing ratio of the Spine switch for the target traffic based on the target sharing ratio; the target traffic is the traffic corresponding to the target routing information, and the second switch is the leaf switch in the ECMP group that is upstream of the Spine switch and performs load-sharing forwarding for the target traffic. Through the solution of this embodiment, the effect of global load balancing can be simply achieved based on lightweight software, and the cost of network deployment for operators and Internet manufacturers can be reduced.
[0045] The solution of the embodiment of the present disclosure can be applied to any network device in the data center network, especially to the network devices in the ECMP (Equal-Cost Multi-Path) group. The application environment of the solution of the embodiment of the present disclosure can include but is not limited to the intelligent computing network lossless Ethernet. Lossless Ethernet is a basic requirement for subsequent data centers. The intelligent computing network is the basis for the development of AI, and there is huge room for development in the next few years.
[0046] The solution of the embodiment of the present disclosure will be introduced in detail below.
[0047] The embodiment of the present disclosure provides a network load balancing method, which is applied to a Spine switch in an Equal-Cost Multi-Path (ECMP) group, as Figure 1 shown, the method may include: Steps S11 - S13:
[0048] S11. Poll the status of the first port of the Spine switch.
[0049] In an embodiment of the present disclosure, the CPU of the Spine switch can periodically poll the status of its own ports. For example, it can poll with a polling period of 50 ms (milliseconds); the polled port status can include, but is not limited to, whether the port is congested. Among them, port congestion can be caused by any of the following situations: excessive single-flow of the port under normal conditions, the port being in the down state, etc. The port being down usually means that the port is currently in an unconnected state, or there is a problem with the connected device. The port being down may be caused by various reasons. For example, the port may have physical failures, poor contacts, etc.; it may encounter VLAN (Virtual Local Area Network) threshold control, resulting in the port being down; if multiple devices use the same MAC (Media Access Control Address) address, then the port may disconnect the connection; it may encounter an overload of the switch QoS (Quality of Service) queue, resulting in the port being down; there may be a power supply problem, resulting in the port being down.
[0050] S12. In response to the first port status indicating that the target port is congested, determine the target routing information and the target sharing ratio corresponding to the forwarded packets in the target port.
[0051] In an embodiment of the present disclosure, the congestion of the target port can be determined by, but is not limited to, ECN (Explicit Congestion Notification), PFC (Priority Flow Control) markings. For example, if any target port triggers an ECN marking, it can be determined that the target port is congested.
[0052] In an embodiment of the present disclosure, the port status of each target port can be encoded by preset bit (e.g., 8-bit) data, indicating whether the target port is congested (including ECN markings).
[0053] In the embodiments of the present disclosure, the specific meaning of the target sharing ratio can be defined according to different application scenarios and different requirements. In one embodiment, the target sharing ratio may refer to the ratio to be adjusted (for example, the reduction amplitude), that is, the traffic of the target sharing ratio is adjusted to the peer device for sharing based on the initial sharing ratio. For example, the target sharing ratio is 1 / 4, the first target sharing ratio is 1 / 4, and the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2. Then the sharing ratio of the second switch after the first adjustment is 3 / 8 (that is: 1 / 2 - 1 / 2 * 1 / 4); In another embodiment, the target sharing ratio refers to the ratio of the adjusted value to the initial sharing ratio. For example, the target sharing ratio is 1 / 4, and the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2. Then the sharing ratio of the second switch after adjustment is 1 / 8 (that is: 1 / 2 * 1 / 4).
[0054] S13. Send a speed reduction notification message to the adjacent network device of the Spine switch. The speed reduction notification message includes target routing information and a target sharing ratio; the speed reduction notification message is used to instruct the second switch in the adjacent network device to reduce the sharing ratio of the Spine switch for the target traffic based on the target sharing ratio; the target traffic is the traffic corresponding to the target routing information, and the second switch is the leaf switch in the ECMP group that is located upstream of the Spine switch and performs load sharing and forwarding for the target traffic.
[0055] In the embodiments of the present disclosure, the speed reduction notification message may include, but is not limited to, an RFN message.
[0056] In the embodiments of the present disclosure, before sending the notification message to the adjacent network device, the first port state of the Spine switch can be sent to a preset RFN (route failure notification) routing processing module in the form of a UDP (User Datagram Protocol) message. The RFN routing processing module can generate an RFN message based on the UDP message. Each RFN message included in the RFN message may include multiple fields, and the multiple fields may include, but are not limited to: version number, target sharing ratio, etc. The RFN routing processing module passes the RFN message to the adjacent network device, so that in the case where the next hop of the adjacent network device is the Spine switch, the routing state can be updated in a timely manner according to the RFN message (for example, adjusting the load sharing ratio of the target route where the Spine switch is located based on the target sharing ratio). Through this mechanism, the network device can adjust the traffic forwarding path in real time, avoid congestion and achieve dynamic traffic load balancing.
[0057] In an embodiment of the present disclosure, the Spine switch may send RFN messages to each adjacent network device of the Spine switch respectively by unicast transmission.
[0058] In an embodiment of the present disclosure, the speed reduction notification message further includes the media access control (MAC) information of the Spine switch;
[0059] The MAC information is used for the second switch to determine that the next-hop network device for reducing the sharing ratio of the target traffic is the Spine switch.
[0060] In an embodiment of the present disclosure, the RFN message may further include the MAC address of the Spine switch, so that the adjacent network device (such as the second switch) receiving the notification message can confirm which network device's traffic needs to be adjusted based on the target sharing ratio according to the MAC address and the target routing information included in the RFN message.
[0061] In an embodiment of the present disclosure, for an application scenario where different routes are implemented based on different ports in the Spine switch, on the basis that the RFN message includes the target routing information, the MAC address of the Spine switch, and the target sharing ratio, the RFN message may further include the target address (i.e., the port address or port number of the congested port) corresponding to the target port (i.e., the congested port) in the Spine switch, so that the adjacent network device (such as the second switch) receiving the RFN message can confirm which port of which network device has port congestion according to the MAC address and the target address in the RFN message, and adjust the traffic of the target port based on the target sharing ratio.
[0062] In an embodiment of the present disclosure, when the Spine switch sends the RFN message, it can be directly sent through software, or the RFN message can be sent based on the hardware forwarding module or forwarding chip in the RFN message. Triggering the sending of the RFN message through hardware can make the forwarding speed faster. Sending through software can solve the problems of increased hardware complexity and increased hardware cost, and can also solve the problem that hardware triggering is based on data messages, with too many quantities affecting the network forwarding bandwidth.
[0063] In an embodiment of the present disclosure, after sending the speed reduction notification message to the adjacent network device of the Spine switch, the method may further include:
[0064] Regularly obtain the second port status of the Spine switch;
[0065] For each obtained second port status, adjust the target sharing ratio according to the second port status;
[0066] In response to the reduction ratio of the sharing ratio of the target traffic being greater than a preset value according to the adjusted target sharing ratio indication, send a speed reduction notice message carrying the adjusted target sharing ratio;
[0067] In response to the reduction ratio of the sharing ratio of the target traffic being less than or equal to a preset value according to the adjusted target sharing ratio indication, no longer send a speed reduction notice message.
[0068] In an embodiment of the present disclosure, after the first adjustment of the load sharing ratio of the Spine switch according to the target sharing ratio, the port status of the Spine switch (i.e., the second port status) can be continuously monitored, and it is determined whether it is necessary to send a speed reduction notice message again according to the newly monitored port status, and the load sharing ratio of the Spine switch is readjusted.
[0069] In an embodiment of the present disclosure, when it is determined that the adjustment ratio of the load sharing ratio to the load of the Spine switch is small, for example, less than or equal to a preset value, a speed reduction notice message may no longer be sent. In some embodiments, the target sharing ratio may refer to the ratio that needs to be adjusted. When the target sharing ratio is less than a first threshold, it is determined that the reduction ratio of the sharing ratio of the target traffic is less than or equal to a preset value; in another embodiment, the target sharing ratio refers to the occupancy ratio adjusted to the initial sharing ratio. When the target sharing ratio is greater than a second threshold, it is determined that the reduction ratio of the sharing ratio of the target traffic is less than or equal to a preset value.
[0070] In an embodiment of the present disclosure, the second port status may include but is not limited to: port congestion status and port bandwidth utilization rate.
[0071] In an embodiment of the present disclosure, adjusting the target sharing ratio according to the second port status may include:
[0072] In response to the second port status indicating port congestion, adjust the target sharing ratio according to the relationship between the port bandwidth utilization rate and a preset first utilization rate threshold;
[0073] In response to the second port status indicating that the port is normal, adjust the target sharing ratio according to the relationship between the port bandwidth utilization rate and a preset second utilization rate threshold.
[0074] In an embodiment of the present disclosure, the first utilization rate threshold can be set according to requirements, and the specific value of the first utilization rate threshold is not limited here. For example, it may include but is not limited to 90%, 95%, etc.
[0075] In an embodiment of the present disclosure, adjusting the target sharing ratio according to the relationship between the port bandwidth utilization rate and a preset first utilization rate threshold may include:
[0076] In response to the port bandwidth utilization rate being greater than the first utilization threshold, adjust the target sharing ratio so that the second switch further reduces the sharing ratio of the target traffic;
[0077] In response to the port bandwidth utilization rate being less than or equal to the first utilization threshold, adjust the target sharing ratio so that the second switch increases the sharing ratio of the target traffic.
[0078] In the embodiments of the present disclosure, if it is detected again that the port state of any first port of the Spine switch is port congestion, and the bandwidth utilization rate of the first port is greater than 90%, and it is determined that the load sharing ratio of the target network device has been adjusted, for example, the load sharing ratio has been reduced, at this time, the load sharing ratio can be further reduced based on the reduced load sharing ratio. Among them, if the target sharing ratio is the reduction amplitude of the load sharing ratio, the size of the target sharing ratio is inversely proportional to the sharing ratio of the target traffic. Adjust the target sharing ratio so that the second switch further reduces the sharing ratio of the target traffic, that is, increase the target sharing ratio according to the first preset ratio. On the contrary, adjust the target sharing ratio so that the second switch increases the sharing ratio of the target traffic, that is, reduce the target sharing ratio according to the second preset ratio, so that the second switch determines a new load sharing ratio according to the adjusted target sharing ratio; take adjusting the target sharing ratio so that the second switch further reduces the sharing ratio of the target traffic as an example: the initial target sharing ratio is 1 / 4, and the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2. The load sharing ratio of the Spine switch after the first adjustment is 3 / 8 (that is: 1 / 2 - 1 / 2 * 1 / 4). In response to the port bandwidth utilization rate being greater than the first utilization threshold, the target sharing ratio is adjusted to 1 / 2, and the load sharing ratio of the Spine switch after the second adjustment is 1 / 4 (that is: 1 / 2 - 1 / 2 * 1 / 2); if the target sharing ratio is the occupancy ratio of the determined initial sharing ratio, for example, 1 / 2, the traffic can be directly adjusted according to the target sharing ratio. For example, if the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2, the load sharing ratio of the adjusted Spine switch is 1 / 4 (that is: 1 / 2 * 1 / 2).
[0079] In an embodiment of the present disclosure, if it is detected again that the port state of any first port of the Spine switch is port congestion, and the bandwidth utilization rate of the first port is less than or equal to 90%, and it is determined that the load sharing ratio of the target network device has been adjusted, for example, the load sharing ratio has been reduced. At this time, the load sharing ratio can be increased again based on the reduced load sharing ratio to callback the load sharing ratio. Among them, if the target sharing ratio is the increase amplitude of the load sharing ratio, the size of the target sharing ratio is proportional to the sharing ratio of the target traffic. Adjust the target sharing ratio to make the second switch further increase the sharing ratio of the target traffic, that is, increase the target sharing ratio according to the first preset ratio. On the contrary, adjust the target sharing ratio to make the second switch reduce the sharing ratio of the target traffic, that is, reduce the target sharing ratio according to the second preset ratio, so that the second switch determines a new load sharing ratio according to the adjusted target sharing ratio; taking the adjustment of the target sharing ratio to make the second switch further reduce the sharing ratio of the target traffic as an example: the first target sharing ratio is 1 / 4, and the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2. The load sharing ratio of the Spine switch after the first adjustment is 5 / 8 (that is: 1 / 2 + 1 / 2 * 1 / 4). In response to the port bandwidth utilization rate being less than or equal to the first utilization threshold, the target sharing ratio is adjusted to 1 / 2, and the load sharing ratio of the Spine switch after the second adjustment is 3 / 4 (that is: 1 / 2 + 1 / 2 * 1 / 2); if the target sharing ratio is the occupancy ratio of the determined initial sharing ratio, such as 1 / 2, the traffic can be directly adjusted according to the target sharing ratio. For example, if the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2, the load sharing ratio of the adjusted Spine switch is 1 / 4 (that is: 1 / 2 * 1 / 2).
[0080] In an embodiment of the present disclosure, the second utilization threshold is less than the first utilization threshold, and the second utilization threshold can be set according to requirements. The detailed value of the second utilization threshold is not limited here. For example, it can include but is not limited to 50%, 55%, etc.
[0081] In an embodiment of the present disclosure, according to the relationship between the port bandwidth utilization rate and the preset second utilization threshold, the target sharing ratio can be adjusted as follows:
[0082] In response to the port bandwidth utilization rate being greater than the second utilization threshold, keep the target sharing ratio unchanged to make the second switch maintain the sharing ratio of the target traffic;
[0083] In response to the port bandwidth utilization rate being less than or equal to the second utilization threshold, adjust the target sharing ratio to make the second switch increase the sharing ratio of the target traffic.
[0084] In an embodiment of the present disclosure, if the port status of any first port of the Spine switch is detected again as normal (for example, without an ECN mark), and the bandwidth utilization rate of the first port is less than or equal to 50%, if the load sharing ratio of the Spine switch has been adjusted, for example, the load sharing ratio has been reduced, at this time, the load sharing ratio can be increased again based on the reduced load sharing ratio, and the load sharing ratio is called back. Among them, if the target sharing ratio is the increase amplitude of the load sharing ratio, the size of the target sharing ratio is proportional to the sharing ratio of the target traffic. Adjust the target sharing ratio so that the second switch further increases the sharing ratio of the target traffic, that is, increase the target sharing ratio according to the first preset ratio. On the contrary, adjust the target sharing ratio so that the second switch reduces the sharing ratio of the target traffic, that is, reduce the target sharing ratio according to the second preset ratio, so that the second switch determines a new load sharing ratio according to the adjusted target sharing ratio; taking the adjustment of the target sharing ratio so that the second switch further reduces the sharing ratio of the target traffic as an example: the first target sharing ratio is 1 / 4, and the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2. The load sharing ratio of the Spine switch after the first adjustment is 5 / 8 (that is: 1 / 2 + 1 / 2 * 1 / 4). In response to the port bandwidth utilization rate being less than or equal to the second utilization threshold, the target sharing ratio is adjusted to 1 / 2, and the load sharing ratio of the Spine switch after the second adjustment is 3 / 4 (that is: 1 / 2 + 1 / 2 * 1 / 2); if the target sharing ratio is the occupancy ratio of the determined initial sharing ratio, for example, 1 / 2, the traffic can be directly adjusted according to the target sharing ratio. For example, if the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2, the load sharing ratio of the adjusted Spine switch is 1 / 4 (that is: 1 / 2 * 1 / 2).
[0085] In an embodiment of the present disclosure, if it is detected again that the port state of any first port of the Spine switch is normal (for example, without an ECN mark), and the bandwidth utilization rate of the first port is greater than 50%, and it is determined that the load sharing ratio of the Spine switch has been adjusted, for example, the load sharing ratio has been reduced, the target sharing ratio can be kept unchanged at this time so that the second switch maintains the sharing ratio of the target traffic. Among them, if the target sharing ratio is the increase range of the load sharing ratio, the size of the target sharing ratio is proportional to the sharing ratio of the target traffic. The target sharing ratio is adjusted so that the second switch further increases the sharing ratio of the target traffic, that is, the target sharing ratio is increased according to the first preset ratio. On the contrary, the target sharing ratio is adjusted so that the second switch reduces the sharing ratio of the target traffic, that is, the target sharing ratio is reduced according to the second preset ratio, so that the second switch determines a new load sharing ratio according to the adjusted target sharing ratio; taking the adjustment of the target sharing ratio to make the second switch further reduce the sharing ratio of the target traffic as an example: the first target sharing ratio is 1 / 4, and the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2. The load sharing ratio of the Spine switch after the first adjustment is 5 / 8 (that is: 1 / 2 + 1 / 2 * 1 / 4). In response to the port bandwidth utilization rate being greater than the second utilization threshold, the target sharing ratio is adjusted to 1 / 2, and the load sharing ratio of the Spine switch after the second adjustment is 3 / 4 (that is: 1 / 2 + 1 / 2 * 1 / 2). If the target sharing ratio is the reduction range of the load sharing ratio, the size of the target sharing ratio is inversely proportional to the sharing ratio of the target traffic. The target sharing ratio is adjusted so that the second switch further reduces the sharing ratio of the target traffic, that is, the target sharing ratio is increased according to the first preset ratio. On the contrary, the target sharing ratio is adjusted so that the second switch increases the sharing ratio of the target traffic, that is, the target sharing ratio is reduced according to the second preset ratio, so that the second switch determines a new load sharing ratio according to the adjusted target sharing ratio; taking the adjustment of the target sharing ratio to make the second switch further reduce the sharing ratio of the target traffic as an example: the first target sharing ratio is 1 / 4, and the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2. The load sharing ratio of the Spine switch after the first adjustment is 3 / 8 (that is: 1 / 2 - 1 / 2 * 1 / 4). In response to the port bandwidth utilization rate being greater than the second utilization threshold, the target sharing ratio is adjusted to 1 / 2, and the load sharing ratio of the Spine switch after the second adjustment is 1 / 4 (that is: 1 / 2 - 1 / 2 * 1 / 2). If the target sharing ratio is the occupancy ratio of the determined initial sharing ratio, for example, 1 / 2, the traffic can be directly adjusted according to the target sharing ratio. For example, if the initial sharing ratios of the two devices in ECMP are both 1 / 2 and 1 / 2, the load sharing ratio of the adjusted Spine switch is 1 / 4 (that is: 1 / 2 * 1 / 2).
[0086] In an embodiment of the present disclosure, while keeping the target sharing ratio unchanged, it is possible to periodically (for example, once every 10 seconds) send a speed reduction notification message to an adjacent network device until the port state changes, for example, becomes port abnormal or the bandwidth utilization rate changes.
[0087] The solution of the embodiment of the present disclosure also provides a network load balancing method, which is applied to a second switch, as Figure 2 shown, the method may include steps S21 - S22:
[0088] S21. Receive the sent speed reduction notification message; the speed reduction notification message includes target routing information and a target sharing ratio; the target routing information is the routing information of the forwarding message corresponding to the congested port of the Spine switch that sends the speed reduction notification message.
[0089] In an embodiment of the present disclosure, the speed reduction notification message may further include the media access control (MAC) information of the Spine switch;
[0090] Before reducing the sharing ratio of the Spine switch for the target traffic according to the target sharing ratio, the method may further include: determining, according to the MAC information, that the next-hop network device to reduce the sharing ratio of the target traffic is the Spine switch.
[0091] In an embodiment of the present disclosure, the CPU of the adjacent network device may receive the speed reduction notification message and identify the speed reduction notification message through a preset identification method. For example, it may be identified through a preset message feature annotation, such as, identified through special annotations of the UDP port number and / or the destination number (such as annotated as 65535).
[0092] In an embodiment of the present disclosure, after the CPU of the adjacent network device receives the speed reduction notification message, it parses the speed reduction notification message to obtain the MAC address of the Spine switch and the target routing information; and determines, according to the MAC address, that the next-hop network device in the routing table corresponding to the target routing information is the Spine switch.
[0093] In an embodiment of the present disclosure, the adjacent network device may quickly find the network device corresponding to the MAC address based on the MAC address and the reverse index table, where the reverse index table may include the correspondence between the MAC address and the network device in the corresponding route. For the determined network device, the load traffic may be adjusted based on the target sharing ratio in the speed reduction notification message.
[0094] S22. In response to determining that the second switch itself is a leaf device for load - sharing and forwarding of target traffic in an Equal - Cost Multi - Path (ECMP) group according to the target routing information, reduce the sharing ratio of the Spine switch for the target traffic according to the target sharing ratio; the target traffic is the traffic corresponding to the target routing information.
[0095] In the embodiments of the present disclosure, before adjusting the load traffic, it can be first determined whether the target route included in the target routing information is a route in the ECMP group. For example, it can be determined whether the target route is a route in the ECMP group by the target route and the corresponding mask. In the case where it is determined that any one or more target routes are not routes in the ECMP group, the target route can be ignored and not processed; in the case where it is determined that any one or more target routes are routes in the ECMP group, load traffic adjustment can be performed for the target route.
[0096] In the embodiments of the present disclosure, the method further includes:
[0097] In response to not receiving a speed - reduction notification message corresponding to the target routing information within a preset duration, restore to the default ECMP state.
[0098] In the embodiments of the present disclosure, in order to avoid the influence of outdated information, an aging mechanism is set in adjacent network devices. The aging mechanism includes: after the adjacent network device adjusts the load - sharing ratio of the target route based on the received speed - reduction notification message, if no speed - reduction notification message is received again in a subsequent long time (i.e., the preset duration), the load - sharing ratio of the target route can be restored to the default load - sharing ratio.
[0099] In the embodiments of the present disclosure, the method may further include:
[0100] In response to receiving a first speed - reduction notification message corresponding to the target routing information within a preset duration, adjust the ratio of sending the target traffic to the Spine switch based on the first target sharing ratio carried in the first speed - reduction notification message. The first speed - reduction notification message is sent by the Spine switch in response to the reduction ratio of the sharing ratio of the target traffic indicated by the first target sharing ratio being greater than a preset value, and the first target sharing ratio is adjusted according to the second port state of the Spine switch.
[0101] In the embodiments of the present disclosure, reducing the sharing ratio of the Spine switch for the target traffic according to the target sharing ratio includes:
[0102] Reduce the weight of the target route corresponding to the Spine switch in the ECMP group according to the target sharing ratio. The weight is the proportion of the target traffic sent by the second switch to the Spine switch.
[0103] In an embodiment of the present disclosure, when adjusting the weight of a target route in an ECMP group, the target sharing ratio can be directly used as the adjusted weight value for adjustment, or a value with a preset format corresponding to the target sharing ratio can be used as the adjusted weight value for adjustment.
[0104] In an embodiment of the present disclosure, if the target sharing ratio is the reduction amplitude of the load sharing ratio, the magnitude of the target sharing ratio is inversely proportional to the sharing ratio of the target traffic. For example, if the first target sharing ratio is 1 / 4, and the initial sharing ratios of two devices in the ECMP are both 1 / 2 and 1 / 2, then the load sharing ratio of the Spine switch after the first adjustment by the second switch based on this target sharing ratio is 3 / 8 (i.e., 1 / 2 - 1 / 2 * 1 / 4). If the target sharing ratio at the second adjustment is 1 / 2, the load sharing ratio of the Spine switch after the second adjustment by the second switch based on this target sharing ratio is 1 / 4 (i.e., 1 / 2 - 1 / 2 * 1 / 2).
[0105] In an embodiment of the present disclosure, if the target sharing ratio is the occupancy ratio of the determined initial sharing ratio, such as 1 / 2, the traffic can be directly adjusted according to this target sharing ratio. For example, if the initial sharing ratios of two devices in the ECMP are both 1 / 2 and 1 / 2, then the load sharing ratio of the adjusted Spine switch is 1 / 4 (i.e., 1 / 2 * 1 / 2).
[0106] In an embodiment of the present disclosure, for the adjusted load sharing ratios 3 / 8, 1 / 4, 1 / 4 of the Spine switch obtained in the above embodiments, they can be directly used as the weights of the Spine switch, or 3 / 8, 1 / 4, 1 / 4 can be multiplied by a preset factor a to be used as the weights of the Spine switch. For example, 3a / 8, a / 4, a / 4 are used as the weights of the Spine switch.
[0107] In an embodiment of the present disclosure, the specific value of a can be defined according to different application scenarios and will not be specifically limited here.
[0108] In an embodiment of the present disclosure, if the target route adjusts the load sharing ratio for the first time or the load sharing ratio is adjusted, the hardware table corresponding to the target route (which may record the network device corresponding to the target route, for example, the corresponding chip identifier) can be updated accordingly. If the target route does not adjust the load sharing ratio for the first time, only the software table of this target route needs to be updated (the software table may include software information of each target network device, for example, it may include but is not limited to information such as the target sharing ratio and the update time). Among them, adjacent network devices can calculate the time when the speed reduction notification message was received last time based on this update time, and determine whether to perform aging processing on themselves based on this time.
[0109] In an embodiment of the present disclosure, based on the synchronous update of the hardware table and the software table, it can ensure the correct forwarding of the load traffic after balanced processing. Based on the adjustment of the load traffic of the target route, the effect of achieving global routing load balancing simply through lightweight software is realized.
[0110] In an embodiment of the present disclosure, the solution of the embodiment of the present application will be described below through detailed embodiments.
[0111] In an embodiment of the present disclosure, as Figure 3 shown, it is a schematic diagram of the routing structure of an ECMP group in an embodiment of the present application. It includes four terminal devices, such as the first terminal device GPU1, the second terminal device GPU2, the third terminal device GPU3, and the fourth terminal device GPU4. It also includes four network devices (such as switches), such as the first network device lerf1, the second network device lerf2, the third network device spine1, and the fourth network device spine2. The first terminal device GPU1 and the second terminal device GPU2 are both connected to the first network device lerf1, and the third terminal device GPU3 and the fourth terminal device GPU4 are both connected to the second network device lerf2. Here, the target sharing ratio refers to the adjustment range of the load sharing ratio each time.
[0112] In an embodiment of the present disclosure, the first terminal device GPU1 accesses the third terminal device GPU3 through two ECMP paths, lerf1 - spine2 - leaf2 and lerf1 - spine1 - leaf2. Assume that the MAC addresses of the first network device lerf1, the second network device lerf2, the third network device spine1, and the fourth network device spine2 are 1, 2, 3, and 4 respectively. The route for the first terminal device GPU1 to access the third terminal device GPU3 is 10.10.10.1 / 24 (i.e., the route for forwarding packets). Then, if the path between the fourth network device spine2 and the second network device lerf2 is congested, the embodiment of the processing flow is as follows:
[0113] (1) The CPU of the fourth network device spine2 periodically polls the port status of the fourth network device spine2 through a timer. If it is found that the exit connecting the fourth network device spine2 and the second network device lerf2 is congested, the CPU of the fourth network device spine2 triggers an RFN message to notify the adjacent network devices (for example, including but not limited to the first network device lerf1) by querying the route pointing to this exit. The RFN message contains: the route 10.10.10.1 / 24 of the forwarding message, the MAC address of the next hop network device in question (i.e., the fourth network device spine2, as the target network device) is 4, and the target sharing ratio defaults to 50% for the first time (i.e., the first reduction is 50%).
[0114] (2) After receiving the RFN message, the CPU of the first network device lerf1 parses the RFN message and finds that the route of the forwarded message is 10.10.10.1 / 24, the MAC address of the next-hop network device is 4, and the target sharing ratio is 50%. Then, the first network device lerf1 updates the load sharing ratio of each path (i.e., route) in the ECMP group pointed to by the route 10.10.10.1 / 24 based on the target sharing ratio of 50%, and 50% (i.e., half) of the load flow to the fourth network device spine2 is changed to the load flow to the third network device spine1. In this way, through the route 0.10.10.1 / 24, three-quarters of the load flow of the first network device lerf1 goes to the path spine1-leaf2, and one-quarter goes to the path spine2-leaf2 (before the first adjustment, the path spine1-leaf2 and the path spine2-leaf2 each bear half of the load flow), thus achieving the first load balancing adjustment.
[0115] (3) The CPU of the fourth network device spine2 continues to periodically poll the congestion status of the port of the fourth network device spine2 through a timer, and finds that the exit connecting the fourth network device spine2 and the second network device lerf2 continues to be congested. The CPU of the fourth network device spine2 triggers an RFN message to notify the adjacent network devices (for example, including but not limited to the first network device lerf1) by querying the route pointing to this exit. The RFN message contains: the route 10.10.10.1 / 24 of the forwarding message, the MAC address of the next hop network device in question (i.e., the fourth network device spine2, as the target network device) is 4, and the target sharing ratio is still 50% (i.e., the load sharing ratio is reduced by 50% again on the basis of the first reduction of 50%, and the reduction at this time is 50% of the previous 50%, a total reduction of 75%).
[0116] (4) After the CPU of the first network device lerf1 receives this RFN message, it parses the RFN message and finds that the route of the forwarded message is 10.10.10.1 / 24, the MAC address of the next-hop network device is 4, and the target sharing ratio is 25%. Then, the first network device lerf1 updates the load sharing ratio of each path (i.e., route) in the ECMP group pointed to by the route 10.10.10.1 / 24 based on this 25% target sharing ratio. Another 50% (i.e., half) of the load traffic going to the fourth network device spine2 is changed to the load traffic going to the third network device spine1. In this way, through the route 0.10.10.1 / 24, seven-eighths of the load traffic of the first network device lerf1 goes to the spine1-leaf2 path, and one-eighth goes to the spine2-leaf2 path (before the second adjustment, the load sharing ratio of the spine1-leaf2 path is three-quarters, and the load sharing ratio of the spine2-leaf2 path is one-quarter), realizing the second load balancing adjustment.
[0117] (5) The CPU of the fourth network device spine2 polls the congestion status of the port through the timer and finds that the egress connected to the second network device lerf2 of the fourth network device spine2 is not congested or continues to be congested. Considering the change of the bandwidth utilization rate at the same time, it can determine the corresponding load balancing scheme according to the detailed situation:
[0118] If it is determined according to the ECN mark that the port status of any first port of the target network device is port abnormal, and the bandwidth utilization rate of the first port is greater than 90%, and it is determined that the load sharing ratio of the target network device has not been adjusted, the load sharing ratio of the target network device can be reduced at this time.
[0119] If it is determined according to the ECN mark that the port status of any first port of the target network device is port abnormal, and the bandwidth utilization rate of the first port is greater than 90%, and it is determined that the load sharing ratio of the target network device has been adjusted, for example, the load sharing ratio has been reduced. At this time, the load sharing ratio can be further reduced based on the reduced load sharing ratio.
[0120] If it is detected again that the port state of any first port of the Spine switch is port congestion, and the bandwidth utilization rate of the first port is less than or equal to 90%, and it is determined that the load sharing ratio of the target network device has been adjusted, for example, the load sharing ratio has been reduced. At this time, the load sharing ratio can be increased again based on the reduced load sharing ratio, the load sharing ratio is called back, and an RFN message is sent to the adjacent network device periodically (for example, once every 10 seconds) until the port state changes, for example, it becomes port normal or the bandwidth utilization rate changes.
[0121] In the embodiment of the present disclosure, if it is detected again that the port state of any first port of the Spine switch is port normal (for example, without an ECN mark), and the bandwidth utilization rate of the first port is less than or equal to 50%, if the load sharing ratio of the Spine switch has been adjusted, for example, the load sharing ratio has been reduced. At this time, the load sharing ratio can be increased again based on the reduced load sharing ratio, and the load sharing ratio is called back.
[0122] If it is detected again that the port state of any first port of the Spine switch is port normal (for example, without an ECN mark), and the bandwidth utilization rate of the first port is greater than 50%, and it is determined that the load sharing ratio of the Spine switch has been adjusted, for example, the load sharing ratio has been reduced. At this time, the target sharing ratio can be kept unchanged so that the second switch maintains the load sharing ratio for the target traffic, and an RFN message is sent to the adjacent network device periodically (for example, once every 10 seconds) until the port state changes, for example, it becomes port abnormal or the bandwidth utilization rate changes.
[0123] (6) The first network device lerf1 and the second network device lerf2 can continue to monitor the RFN messages of the relevant routes and perform necessary updates based on the RFN messages. If no RFN messages of the relevant routes are received for a long time (such as 3 cycles, that is, 30 seconds), then the default states of the respective paths in the ECMP group (that is, the default set load sharing ratio) are restored.
[0124] In the embodiment of the present disclosure, the solution of the embodiment of the present disclosure has at least the following advantages:
[0125] There is no need for additional deployment of controller configuration, no need for network device hardware support, and it can be implemented through lightweight software. It can achieve the intelligent computing network effect of routing GLB, and can save a large amount of operating costs for operators and Internet manufacturers.
[0126] The solution of the embodiment of the present disclosure also provides a load balancing system A, such as Figure 4As shown in the figure, it includes: Spine switch A1 and the second switch A2 among the adjacent network devices of the Spine switch;
[0127] The Spine switch A1 is configured to implement the network load balancing method on the Spine switch A1 side;
[0128] The second switch A2 is configured to implement the network load balancing method of the second switch A2;
[0129] The Spine switch and the second switch are in the same Equal-Cost Multi-Path (ECMP) group. The second switch is a leaf switch in the ECMP group that is upstream of the Spine switch and performs load-sharing forwarding on the traffic corresponding to the target routing information. The target routing information is the routing information of the forwarding packet corresponding to the congested port of the Spine switch.
[0130] The solution of the embodiment of the present disclosure also provides an electronic device 100, as Figure 5 shown, including:
[0131] One or more processors 101;
[0132] A memory 102, on which one or more programs are stored. When the one or more programs are executed by the one or more processors 101, the one or more processors 101 implement the network load balancing method;
[0133] One or more input / output (I / O) interfaces 103, connected between the processor 101 and the memory 102, and configured to implement the information interaction between the processor 101 and the memory 102.
[0134] The solution of the embodiment of the present disclosure also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the network load balancing method is implemented.
[0135] Any of the above embodiments of the network load balancing method can be applied to this electronic device, computer program product, and global load balancing system embodiment, and will not be elaborated one by one here.
[0136] Those of ordinary skill in the art can understand that all or some of the above-mentioned functional modules / units can be implemented as software, firmware, hardware, and their appropriate combinations.
[0137] In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be executed by several physical components in cooperation.
[0138] Some or all physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH), or other magnetic disk storage; compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical disc storage; magnetic cassettes, tapes, magnetic disk storage, or other magnetic storage; and any other medium that can be used to store the desired information and that can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0139] The present disclosure has disclosed example embodiments, and although specific terms have been employed, they are used only and should be construed only as of a general illustrative meaning and not for a limiting purpose. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in connection with other embodiments. Accordingly, those skilled in the art will understand that various forms and details may be changed without departing from the scope of the present disclosure as set forth by the appended claims.
Claims
1. A network load balancing method, applied to a spine switch in an equal-cost multi-path ECMP group, the method comprising: Polling the first port status of the Spine switch; In response to the first port status indicating that the target port is congested, determining target routing information and a target sharing ratio corresponding to the forwarding message in the target port; A speed reduction notification message is sent to the adjacent network devices of the Spine switch, wherein the speed reduction notification message includes the target routing information and the target sharing ratio; the speed reduction notification message is used to instruct the second switch in the adjacent network device to reduce the Spine switch's share of the target traffic based on the target sharing ratio; the target traffic is the traffic corresponding to the target routing information, and the second switch is a leaf switch in the ECMP group located upstream of the Spine switch and performs load sharing and forwarding on the target traffic.
2. The network load balancing method according to claim 1, wherein: The speed reduction notification message also includes the media access control MAC information of the spine switch; The MAC information is used by the second switch to determine that the next-hop network device whose share ratio of the target traffic is to be reduced is the Spine switch.
3. The network load balancing method according to claim 1, wherein: After sending the speed reduction notification message to the adjacent network device of the Spine switch, the method further includes: Regularly obtain the status of the second port of the Spine switch; For each acquired second port state, adjusting the target sharing ratio according to the second port state; In response to the adjusted target sharing ratio indicating that the reduction ratio of the sharing ratio of the target traffic is greater than a preset value, sending the speed reduction notification message carrying the adjusted target sharing ratio; In response to the adjusted target sharing ratio indicating that the reduction ratio of the sharing ratio of the target traffic is less than or equal to a preset value, the speed reduction notification message is no longer sent.
4. The network load balancing method according to claim 3, wherein: The second port status includes: port congestion status and port bandwidth utilization.
5. The network load balancing method according to claim 4, wherein: The adjusting the target sharing ratio according to the second port state includes: In response to the second port status indicating port congestion, adjusting the target sharing ratio according to a relationship between the port bandwidth utilization and a preset first utilization threshold; In response to the second port status indicating that the port is normal, the target sharing ratio is adjusted according to a relationship between the port bandwidth utilization and a preset second utilization threshold.
6. The network load balancing method according to claim 5, wherein: The adjusting the target sharing ratio according to the relationship between the port bandwidth utilization and a preset first utilization threshold comprises: In response to the port bandwidth utilization being greater than the first utilization threshold, adjusting the target sharing ratio so that the second switch further reduces the sharing ratio of the target traffic; In response to the port bandwidth utilization being less than or equal to the first utilization threshold, the target sharing ratio is adjusted to enable the second switch to increase the sharing ratio of the target traffic.
7. The network load balancing method according to claim 5, wherein: The adjusting the target sharing ratio according to the relationship between the port bandwidth utilization and a preset second utilization threshold comprises: In response to the port bandwidth utilization being greater than the second utilization threshold, maintaining the target sharing ratio unchanged so that the second switch maintains the sharing ratio of the target traffic; In response to the port bandwidth utilization being less than or equal to the second utilization threshold, the target sharing ratio is adjusted to enable the second switch to increase the sharing ratio of the target traffic.
8. A network load balancing method, applied to a second switch, the method comprising: Receive the speed reduction notification message sent; The speed reduction notification message includes target routing information and target sharing ratio; The target routing information is routing information of a forwarding message corresponding to a congested port of the Spine switch that sends the speed reduction notification message; In response to determining, based on the target routing information, that the second switch itself is a leaf device in an equal-cost multipath ECMP group that performs load-sharing forwarding on the target traffic, the Spine switch reduces the share ratio of the target traffic according to the target sharing ratio; the target traffic is the traffic corresponding to the target routing information.
9. The network load balancing method according to claim 8, wherein: The speed reduction notification message also includes the media access control MAC information of the spine switch; Before reducing the share ratio of the Spine switch to the target traffic according to the target share ratio, the method further includes: According to the MAC information, it is determined that the next-hop network device whose share of the target traffic is to be reduced is the Spine switch.
10. The network load balancing method according to claim 8, wherein: The reducing the share ratio of the target traffic by the spine switch according to the target share ratio includes: The weight of the target route corresponding to the Spine switch in the ECMP group is reduced according to the target sharing ratio, where the weight is the proportion of the target traffic sent by the second switch to the Spine switch.
11. The network load balancing method according to claim 8, wherein: The method further comprises: In response to not receiving a speed reduction notification message corresponding to the target routing information within a preset time period, restoring to a default ECMP state.
12. The network load balancing method according to claim 8, wherein: The method further comprises: In response to receiving a first speed reduction notification message corresponding to the target routing information within a preset time period, the proportion of the target traffic sent to the Spine switch is adjusted based on the first target sharing ratio carried in the first speed reduction notification message. The first speed reduction notification message is sent by the Spine switch in response to the first target sharing ratio indicating that the reduction ratio of the sharing ratio of the target traffic is greater than a preset value. The first target sharing ratio is adjusted according to the second port status of the Spine switch.
13. A load balancing system, comprising: A spine switch and a second switch in an adjacent network device of the spine switch; The Spine switch is configured to implement the network load balancing method according to any one of claims 1 to 7; The second switch is configured to implement the network load balancing method according to any one of claims 8 to 12; The spine switch and the second switch are located in the same equal-cost multi-path ECMP group. The second switch is a leaf switch in the ECMP group located upstream of the spine switch and performs load balancing and forwarding on the traffic corresponding to the target routing information. The target routing information is the routing information of the forwarding message corresponding to the port of the spine switch that is in a congested state.
14. An electronic device comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the network load balancing method according to any one of claims 1 to 7 or 8 to 12; One or more input / output I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.
15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the network load balancing method according to any one of claims 1 to 7 or 8 to 12 is implemented.