Point-to-point load balancing method, device, equipment, storage medium and program product

By using a low-priority network test connection in an enhanced Ethernet network to perform load balancing tests, the problem of traffic imbalance in point-to-point communication was solved, and network resources were fully utilized without affecting business traffic.

CN120602415BActive Publication Date: 2026-04-21CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2025-06-19
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In configuring a Bonding aggregation network, existing technologies suffer from traffic imbalance in point-to-point communication, leading to congestion on some links and idleness on others. Furthermore, traditional solutions impact business traffic when applied online and are difficult to scale online.

Method used

By using low-priority network test connections in an enhanced Ethernet network to perform load balancing tests, the target network test connection for load balancing is determined, and the service network connection is replaced without affecting service traffic, thus achieving point-to-point load balancing.

Benefits of technology

It enables full utilization of Bonding network interface traffic without affecting the original business traffic, solving the problem of difficult online expansion in traditional methods, and is suitable for online environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602415B_ABST
    Figure CN120602415B_ABST
Patent Text Reader

Abstract

This application relates to a point-to-point load balancing method, apparatus, device, storage medium, and program product, applied to a first node in an enhanced Ethernet network. The method includes: generating a load balancing task when establishing a service network connection between the first node and a second node; when executing the load balancing task, if the second node is idle, configuring a network test connection between the first node and the second node with a lower priority than the service network connection; performing a load balancing test on the first node and the second node through the network test connection; if the test result shows an unbalanced load, establishing a new network test connection between the first node and the second node, and performing the load balancing test again, until a target network test connection with a load-balanced result is obtained; and replacing the service network connection between the first node and the second node with the target network test connection. This method can achieve point-to-point load balancing in an online environment without affecting existing service traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data communication technology, and in particular to a point-to-point load balancing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] In a Bonded aggregated network, to address traffic imbalance, an ECMP (Equal-Cost Multi-Path) hash strategy is typically used. This involves the sending node and switch calculating the hash value of the five-tuple information in the data packet to determine which network interface to use for forwarding the packet. However, this method can lead to uneven load distribution when multiple high-traffic connections (such as point-to-point communication) have the same hash value. They will be mapped to the same path, resulting in some links being congested while others are idle.

[0003] In related technologies, a solution to the load imbalance problem is to fix the connection path before business deployment. However, this approach lacks online scalability and can only be used for offline testing in advance. If applied to online business, the large amount of test traffic generated during the point-to-point load balancing process will severely impact business operations. Summary of the Invention

[0004] Therefore, it is necessary to provide a point-to-point load balancing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can achieve load balancing in an online environment without affecting the original business traffic, in order to address the above-mentioned technical problems.

[0005] In a first aspect, this application provides a point-to-point load balancing method applied to a first node in an enhanced Ethernet network, the method comprising:

[0006] The current load balancing task to be processed by the first node and the corresponding second node are determined; the load balancing task between the first node and the second node is generated when the service network connection between the first node and the second node is established;

[0007] When the second node is idle, a network test connection is configured between the first node and the second node, and a load balancing test is performed on the first node and the second node through the network test connection to obtain the test results; the priority of the service network connection is higher than that of the network test connection.

[0008] If the test result is unbalanced load, a new network test connection is established between the first node and the second node, and the load balancing test is performed again until the target network test connection with a load balancing result is obtained.

[0009] Replace the service network connection between the first node and the second node with the target network test connection.

[0010] In one embodiment, configuring the network test connection between the first node and the second node includes:

[0011] Randomly select the source and destination port numbers;

[0012] A network test connection is established between the first node and the second node based on the source port number and the destination port number.

[0013] In one embodiment, both the first node and the second node aggregate multiple physical network ports into a single virtual interface using network aggregation technology, and the load balancing method is applied to load balancing between the first virtual interface of the first node and the second virtual interface of the second node.

[0014] The step of performing a load balancing test on the first node and the second node through the network test connection to obtain the test results includes:

[0015] At the first node, probe packets are periodically sent to the second node through the network test connection;

[0016] If the traffic at each physical network port associated with the first virtual interface of the first node and each physical network port associated with the second virtual interface of the second node both increase periodically, then load balancing between the first node and the second node is determined.

[0017] In one embodiment, determining the current load balancing task to be processed by the first node includes:

[0018] Select the current balance task to be processed from the balance task list corresponding to the first node; each balance task in the balance task list corresponds to a different second node.

[0019] In one embodiment, the method further includes:

[0020] If the second node is busy, or if the business network connection between the first node and the second node has been replaced by the target network test connection, exit the current load balancing task and determine the traversal status of other load balancing tasks in the load balancing task list.

[0021] If there are unvisited balancing tasks in the balancing task list, then select the next balancing task as the new balancing task to be processed, and return to the step of determining the second node corresponding to the balancing task.

[0022] In one embodiment, the method further includes:

[0023] If all the balanced tasks in the balanced task list have been traversed, then the state of the first node is set to idle state.

[0024] Monitor the duration of the first node's idle state. If the duration exceeds a threshold, proceed to the next round of balanced task traversal.

[0025] Secondly, this application also provides a point-to-point load balancing device, disposed at a first node in an enhanced Ethernet network, the device comprising:

[0026] The node determination module is used to determine the current load balancing task to be processed by the first node and the second node corresponding to the load balancing task; the load balancing task between the first node and the second node is generated when the service network connection between the first node and the second node is established;

[0027] The load balancing test module is used to configure a network test connection between the first node and the second node when the second node is in an idle state, and to perform load balancing tests on the first node and the second node through the network test connection to obtain test results; the service network connection has a higher priority than the network test connection.

[0028] The result processing module is used to establish a new network test connection between the first node and the second node if the test result is unbalanced load, and to perform the load balancing test again until the target network test connection with a load balancing result is obtained.

[0029] The connection replacement module is used to replace the service network connection between the first node and the second node with the target network test connection.

[0030] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any of the preceding claims.

[0031] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the preceding claims.

[0032] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the preceding claims.

[0033] The aforementioned point-to-point load balancing method, apparatus, computer equipment, computer-readable storage medium, and computer program product generate a load balancing task between the first and second nodes when establishing a service network connection between them. When the first node executes this load balancing task, it first determines the state of the second node corresponding to the task. If the second node is idle, a network test connection with a lower priority than the service network connection is configured between the first and second nodes. A load balancing test is performed on the first and second nodes through this network test connection, and the test results are obtained. If the test result indicates load imbalance, a new network test connection is established between the first and second nodes, and the load balancing test is performed again until a target network test connection that achieves load balancing is obtained. This target network test connection then replaces the service network connection between the first and second nodes. In an enhanced Ethernet environment, this method, by dividing test traffic and service traffic into different priorities and using a low-priority network test connection for load balancing testing, can determine the target network test connection for load balancing without affecting existing service traffic, thereby replacing the original service network connection and achieving point-to-point network load balancing. This ensures that the traffic on the Bonding interface is fully utilized across the entire link. On the other hand, since test traffic can be used without affecting existing business traffic, it can be applied to online testing and facilitates the replacement of network test connections, thus overcoming the shortcomings of traditional methods that are not easily scalable and can only be used for offline testing in advance. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 A schematic diagram of hash collisions in the Bonding aggregation network;

[0036] Figure 2 This is a diagram illustrating the application environment of a point-to-point load balancing method in one embodiment.

[0037] Figure 3 This is a flowchart illustrating a point-to-point load balancing method in one embodiment;

[0038] Figure 4 This is a flowchart illustrating a point-to-point load balancing method in another embodiment;

[0039] Figure 5 This is a schematic diagram of an online point-to-point traffic balancing strategy in one embodiment;

[0040] Figure 6 This is a structural block diagram of a point-to-point load balancing device in one embodiment;

[0041] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.

[0044] The advantage of Bonding technology in Linux systems lies in its ability to aggregate bandwidth and achieve redundancy by binding multiple physical network interfaces into a single virtual interface. This technology can combine the bandwidth of multiple network connections, providing higher total bandwidth and thus improving network throughput. Simultaneously, when one or more physical network interfaces fail, traffic automatically switches to other available physical interfaces, enhancing network reliability and fault tolerance. Through traffic or session-level load balancing, Bonding can optimize the utilization of network resources.

[0045] However, when configuring Bonding's aggregated network using the ECMP (Equal-Cost Multi-Path) hashing strategy, if multiple high-traffic connections (such as peer-to-peer communication) have the same hash value, they will be mapped to the same path, leading to traffic imbalance between peers. For example, see reference... Figure 1 The diagram shown illustrates hash collisions in the Bonding aggregation network, as follows: Figure 1 As shown in Figure (a), taking point-to-point communication between node 0 and node 1 as an example, both node 0 and node 1 have two physical network ports (port 0 and port 1), which are connected to ports 0 and 1 of the switch and ports 4 and 5 of the switch respectively through a Bonding aggregation network. Two independent network connections (e.g., TCP connections) are established between the two nodes, ideally as follows: Figure 1As shown in Figure (b), traffic will evenly enter the two inlets of node 0 and then flow into the switch. The switch will also evenly distribute the two traffic streams to its ports 4 and 5, finally delivering them to node 1. This ideal traffic distribution maximizes bandwidth utilization between point-to-point connections. However, as... Figure 1 As shown in Figure (c), when the switches all use the same sending port 4, then port 5 will not provide transmission services. In this case, the transmission bandwidth between points will only be half of the ideal situation. Furthermore, the traffic imbalance caused by hash collisions on the switch side can also cause network congestion. If the sending end cannot reduce the sending rate in time through congestion control algorithms, the buffer usage of port 4 on the switch will increase, ultimately leading to network packet loss. Another situation is as follows... Figure 1 As shown in Figure (d), when node 0 selects the same sending network port using the ECMP strategy, even if the network traffic is distributed on the switch side, the overall network bandwidth from node 0 to node 1 is still limited by the maximum transmission rate of a single network interface card.

[0046] The existing solution involves establishing multiple network connections between nodes before actual business applications, identifying and recording the connection paths that can achieve load balancing. During actual deployment, these recorded connection paths are used to ensure that the network between points is balanced during actual business operations. However, this method is not easily scalable and can only be tested offline beforehand. If applied to online business, the large amount of test traffic generated during the point-to-point load balancing process will severely impact business operations, and the testing process is complex and difficult to implement.

[0047] To address the aforementioned issues, this application proposes a point-to-point load balancing strategy for Converged Enhanced Ethernet (CEE) networks without impacting service traffic. CEE is an extension of traditional Ethernet, supporting traffic classification, flow control, and bandwidth management. It can provide Quality of Service (QoS) guarantees for different types of data flows, thereby achieving more efficient network resource utilization. Compared to traditional Ethernet, CEE can provide different traffic priority services and typically employs a bonding network architecture to improve system bandwidth performance and fault tolerance. The point-to-point load balancing method of this application can be run on each node in this network scenario.

[0048] refer to Figure 2This diagram illustrates an application scenario of the point-to-point load balancing method provided in this application. This method can be applied to any node in an enhanced Ethernet network (denoted as the first node), and the second node is any node other than the first node. The first node and the second node communicate through the network. Each node has communication capabilities to communicate with other nodes. For example, each node can be a terminal, a server, or a client. Terminals include, but are not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.

[0049] In the application scenario of this application, the first node 202 determines the current load balancing task to be processed and the corresponding second node 204. The load balancing task between the first node 202 and the second node 204 is generated when establishing a business network connection between them. When the second node 204 is idle, a network test connection is configured between them. A load balancing test is performed on the first node 202 and the second node 204 through this network test connection, and the test result is obtained. If the test result indicates load imbalance, a new network test connection is established between the first node 202 and the second node 204, and the load balancing test is performed again until a target network test connection with load balancing is obtained. The business network connection between the first node 202 and the second node 204 is replaced with the target network test connection. Thus, by using a low-priority network test connection for traffic balancing testing, bonding traffic balancing between nodes is achieved without interfering with existing business traffic, ensuring that the traffic of the bonding interface is fully utilized across the entire link.

[0050] In one exemplary embodiment, such as Figure 3 As shown, a point-to-point load balancing method is provided, which is then applied to... Figure 1 Taking the first node 202 as an example, the explanation includes the following steps S310 to S340. Wherein:

[0051] Step S310: Determine the current load balancing task to be processed by the first node and the second node corresponding to the load balancing task; the load balancing task between the first node and the second node is generated when the service network connection between the first node and the second node is established.

[0052] In this setup, both the first and second nodes are nodes within an enhanced Ethernet network, meaning they both use bonding to aggregate multiple network ports into a single virtual interface. Load balancing between the first and second nodes represents the balanced transmission and reception of data packets across their respective network ports.

[0053] Among them, the business network connection refers to the network connection for business communication between the first node and the second node.

[0054] In practice, when the first node establishes a service network connection with the second node based on a connection request, it can simultaneously generate a load balancing task between the first and second nodes and record this task in the first node's load balancing task list. When the first node selects this load balancing task from the load balancing list as the current load balancing task to be processed, it can also determine the associated second node based on the record.

[0055] Step S320: When the second node is in an idle state, configure a network test connection between the first node and the second node, and perform a load balancing test on the first node and the second node through the network test connection to obtain the test results; the priority of the service network connection is higher than that of the network test connection.

[0056] Among them, the priority of the business network connection is higher than that of the network test connection, which means that when there is a business communication requirement between the first node and the second node, the business communication is performed through the business network connection.

[0057] The idle state indicates that the device is not currently in a load balancing task, meaning it is not currently performing load balancing tests with any node, but it can still conduct business communication.

[0058] In practice, when the first node identifies the second node associated with the load balancing task to be processed (i.e., the second node with which to conduct load balancing tests), it first determines the current state of the second node. If the second node is currently busy, meaning it is already in a load balancing task and conducting load balancing tests with other nodes, the first node will exit the current load balancing task with the second node. If the second node is currently idle, indicating that load balancing tests can be conducted with it, a network test connection is configured between the first node and the second node to facilitate load balancing tests between the first node and the second node through this network test connection.

[0059] It's understandable that the load balancing of the network test connection between the first and second nodes is the same as the load balancing of the service network connection between the first and second nodes. Therefore, performing a load balancing test on the network test connection is equivalent to performing a load balancing test on the service network connection. If the test result is balanced, it indicates that the service network connection between the first and second nodes is load-balanced, and the initially established service network connection can be replaced, or it can remain unchanged. If the test result is unbalanced, it indicates that the service network connection between the first and second nodes is unbalanced, and a target network test connection that can achieve load balancing needs to be found to replace the initially established service network connection, thus ensuring load balancing between the first and second nodes.

[0060] Step S330: If the test result is unbalanced load, establish a new network test connection between the first node and the second node, and perform the load balancing test again until the target network test connection with a load balancing result is obtained.

[0061] In practice, if the load balancing test result for the network test connection between the first node and the second node is unbalanced, the network test connection needs to be replaced. A new network test connection is established between the first node and the second node, and the load balancing test is performed again until a network test connection with a load-balanced result is obtained. This is recorded as the target network test connection, and the loop ends.

[0062] Step S340: Replace the service network connection between the first node and the second node with the target network test connection.

[0063] In practice, after identifying a target network test connection that can achieve load balancing between the first and second nodes, the initially established unbalanced service network connection can be replaced with the target network test connection. That is, the target network test connection is used as the new service network connection between the first and second nodes to achieve load balancing. Furthermore, the target network test connection can be used to replace the initially established unbalanced service network connection during idle times when the first node is not engaged in service communication, to avoid interfering with normal service communication between the first and second nodes.

[0064] In the aforementioned point-to-point load balancing method, a load balancing task is generated between the first and second nodes when establishing the service network connection between them. When the first node executes this task, the state of the second node corresponding to the task is first determined. If the second node is idle, a network test connection with a lower priority than the service network connection is configured between the first and second nodes. A load balancing test is performed on the first and second nodes through this network test connection, and the test results are obtained. If the test result indicates an unbalanced load, a new network test connection is established between the first and second nodes, and the load balancing test is performed again until a target network test connection that achieves load balancing is obtained. This target network test connection then replaces the service network connection between the first and second nodes. In an enhanced Ethernet environment, this method, by dividing test traffic and service traffic into different priorities and using a low-priority network test connection for load balancing testing, can determine the target network test connection for load balancing without affecting existing service traffic, thereby replacing the original service network connection and achieving point-to-point network load balancing. This ensures that the traffic on the Bonding interface is fully utilized across the entire link. On the other hand, since test traffic can be used without affecting existing business traffic, it can be applied to online testing and facilitates the replacement of network test connections, thus overcoming the shortcomings of traditional methods that are not easily scalable and can only be used for offline testing in advance.

[0065] In an exemplary embodiment, configuring the network test connection between the first node and the second node in step S320 includes: randomly selecting a source port number and a destination port number; and establishing a network test connection between the first node and the second node based on the source port number and the destination port number.

[0066] Port numbers are numerical labels used in computer networks to identify different applications or services, ranging from 0 to 65535. In packet structures such as TCP / UDP protocols, the packet header contains the source port number and the destination port number to ensure that the response can be returned correctly.

[0067] In its implementation, the basic principle of using the ECMP (Equal Cost Multipath) hash strategy to determine which path traffic should take is to calculate the hash value of the source IP, destination IP, and port number of the data packet, and then map the result to an ECMP path. Since the IP address remains constant, establishing a network test connection can be achieved by adjusting the port numbers (including the source and destination port numbers). Specifically, a source port number and a destination port number can be randomly selected, hashed to obtain a hash value, and then mapped to the corresponding path to establish a network test connection between the first and second nodes.

[0068] In this embodiment, by randomly selecting the source port number and the destination port number, a network test connection is established between the first node and the second node based on the source port number and the destination port number. This achieves the effective establishment of the network test connection and facilitates the replacement of the port number and / or the destination port number to establish a new network test connection when the network test connection load is unbalanced.

[0069] It can be understood that the first node and the second node are nodes in an enhanced Ethernet network, which generally uses network aggregation to form a network. Therefore, both the first node and the second node use network aggregation (bonding) technology to aggregate multiple physical network ports into a single virtual interface. The virtual interface obtained by aggregation in the first node is denoted as the first virtual interface, and the virtual interface obtained by aggregation in the second node is denoted as the second virtual interface. The load balancing method between the first node and the second node is specifically applied to the load balancing between the first virtual interface of the first node and the second virtual interface of the second node.

[0070] In an exemplary embodiment, step S320 involves performing a load balancing test on the first node and the second node through a network test connection to obtain test results. This includes: periodically sending probe packets from the first node to the second node through the network test connection; if the traffic at each physical network port associated with the first virtual interface of the first node and each physical network port associated with the second virtual interface of the second node both increase periodically, then load balancing between the first node and the second node is determined.

[0071] In practice, traffic counters can be set at each physical network interface associated with the first virtual interface of the first node and each physical network interface associated with the second virtual interface of the second node. During load balancing testing, the first node periodically sends probe packets from its first virtual interface to the second virtual interface of the second node via a network test connection. If the traffic counters at each physical network interface associated with the first virtual interface of the first node and each physical network interface associated with the second virtual interface of the second node both increase periodically, similar to... Figure 1 The scenario in diagram (b) indicates load balancing between the first and second nodes. Conversely, if some physical network ports associated with the first virtual interface of the first node and some physical network ports associated with the second virtual interface of the second node have no traffic while others have high traffic, similar to... Figure 1 In the cases shown in diagrams (b) and (c), it is determined that the load is unbalanced between the first node and the second node.

[0072] For example, suppose the first node and the second node are both formed by aggregating two physical network ports into a single virtual interface. Then, there are two network test connections established between the first and second nodes. If the traffic counters on both network ports of each node show periodic increases, it indicates that the point-to-point traffic between the first and second nodes is balanced. Conversely, if they do not show a periodic increase, it indicates that the point-to-point traffic between the first and second nodes is unbalanced.

[0073] In this embodiment, probe packets are periodically sent from the first node to the second node through a network test connection. Based on the traffic situation at each physical network port associated with the first virtual interface of the first node and each physical network port associated with the second virtual interface of the second node, it is determined whether the first node and the second node are load-balanced. This enables load balancing testing between the first node and the second node, so as to determine whether the service network connection between the first node and the second node needs to be replaced based on the test results.

[0074] In an exemplary embodiment, step S310, determining the current balance task to be processed by the first node, includes: selecting the current balance task to be processed from the balance task list corresponding to the first node; each balance task in the balance task list corresponds to a different second node.

[0075] Specifically, the first node can communicate with any other node, thus establishing a load balancing task with any other node, thereby obtaining a load balancing task list corresponding to the first node. The first node can select a load balancing task to process each time from the load balancing task list. In some embodiments, when generating load balancing tasks between the first node and other nodes, the timestamp of the load balancing task generation can be recorded simultaneously, and a mapping relationship can be established between the load balancing task, the timestamp, and the corresponding node identifier of the second node, and stored in the load balancing task list. When selecting load balancing tasks from the load balancing task list, load balancing tasks can be selected according to the timestamp (e.g., from earliest to latest time). The load balancing task generated earlier has higher priority and is processed earlier.

[0076] In one implementation, once the load balancing task between the first node and the second node is completed, including when the load balancing test result between the first node and the second node is load balanced, or when the service network connection between the first node and the second node has been replaced with the target network test connection, that is, when the load balancing between the first node and the second node has been determined, the load balancing task between the first node and the second node can be deleted from the load balancing task list of the first node.

[0077] In this embodiment, by establishing a balanced task list for the first node, and selecting a balanced task to be processed from the balanced task list each time, the orderly processing of each balanced task of the first node can be guaranteed.

[0078] In an exemplary embodiment, the method further includes: when the second node is busy or the service network connection between the first node and the second node has been replaced by a target network test connection, exiting the current pending load balancing task, determining the traversal status of other load balancing tasks in the load balancing task list; if there are load balancing tasks that have not been traversed in the load balancing task list, selecting the next load balancing task as a new pending load balancing task, and returning to the step of determining the second node corresponding to the load balancing task.

[0079] In the specific implementation, a busy state for the second node indicates that it is currently performing a load balancing task, meaning it is conducting load balancing tests with other nodes and cannot perform load balancing tests with the first node. If the second node is busy, or if the load balancing task between the first and second nodes has been completed and the service network connection between the first and second nodes is already load-balanced (e.g., the service network connection between the first and second nodes has been replaced with the target network test connection, or the service network connection is already load-balanced), in either of these cases, the first node can exit the current load balancing task with the second node and select the next load balancing task to be processed from the task balancing list. Specifically, the traversal status of other load balancing tasks in the task balancing list can be determined first; if there are untraversed load balancing tasks in the task balancing list, the next load balancing task is selected from the untraversed tasks as the new load balancing task to be processed, and the process returns to step S310. The second node corresponding to the newly selected load balancing task is determined, the current state of the second node is checked, and then the load balancing test is performed. This process is repeated in a loop to achieve load balancing between the first node and other nodes, ensuring that the first node and other nodes are all load-balanced.

[0080] In this embodiment, when the second node is busy or the service network connection between the first and second nodes has been replaced by the target network test connection, the current pending load balancing task is exited, and the next load balancing task is selected from the load balancing task list of the first node for processing, so as to avoid waiting for the second node for too long and affecting the load balancing tasks of the first node and other nodes.

[0081] In an exemplary embodiment, the method further includes: if all the balancing tasks in the balancing task list have been traversed, then setting the state of the first node to an idle state; monitoring the duration of the first node in the idle state, and if the duration exceeds a threshold, then entering the next round of balancing task traversal process.

[0082] In practice, if all balancing tasks in the balancing task list have been traversed, it indicates that the first node currently has no balancing tasks to process. At this point, the first node's state can be set to idle, allowing it to passively wait for balancing tests initiated by other nodes. Simultaneously, the duration of the first node's idle state can be monitored, and a threshold can be set. The idle time of the first node is compared to this threshold. If the idle time exceeds the threshold, i.e., the first node has been idle for too long, a timeout event is triggered, and the next round of balancing task traversal begins. The system then checks the first node's balancing task list for any untraversed balancing tasks and processes them.

[0083] In this embodiment, if all the balancing tasks in the balancing task list have been traversed, the state of the first node is set to idle state. At the same time, the duration of the first node in the idle state is monitored. If the duration exceeds the threshold, the next round of balancing task traversal process is entered, thereby avoiding the first node from being in the idle state for too long.

[0084] refer to Figure 4 The following is a schematic diagram of the specific process of a point-to-point load balancing method in another embodiment, including the following steps:

[0085] S1, the first node selects a balanced task.

[0086] Specifically, each time the first node establishes a business network connection with other nodes, it simultaneously generates a load balancing task and stores it in the load balancing task list.

[0087] S2, determine whether the second node corresponding to the balancing task is in an idle state.

[0088] Scenario 1: The second node is in an idle state.

[0089] S3, configure the network test connection between the first node and the second node, set the test priority to be lower than the priority of the business network connection, and perform a load balancing test.

[0090] S4. If the test result is load balancing, replace the original business network connection with the current network test connection, or do not replace it, and proceed to step S6.

[0091] S5. If the test result is that the load is unbalanced, a new network test connection is established, and the load balancing test is performed again until a load-balanced network test connection is obtained. The original business network connection is replaced with the load-balanced network test connection, and then the process proceeds to step S6.

[0092] Scenario 2: The second node is in a busy state:

[0093] S6, Exit the current load balancing task and check if the load balancing task list has been traversed.

[0094] S7: If the traversal is complete, set the first node to an idle state and wait for the passive load balancing task. At the same time, monitor the duration of the first node's idle state. When the duration exceeds a threshold, trigger a timeout event and proceed to the next round of traversal of the load balancing task list.

[0095] S8. If the traversal is not complete and there are unexecuted balancing tasks in this round, proceed to step S1, select the next executable balancing task, and proceed to step S2.

[0096] This method provides a traffic balancing process design between two nodes, where one node acts as the initiator of the balancing task and periodically attempts to execute it. This design reduces implementation complexity and ensures that all balancing tasks are executed. Furthermore, in the enhanced Ethernet aggregation network, low-priority traffic balancing tests are used to achieve point-to-point network traffic balancing without affecting business traffic.

[0097] To more clearly illustrate the point-to-point load balancing method proposed in this application's embodiments, the following description will be provided in conjunction with specific examples in the accompanying drawings. This embodiment uses a first node as the client and a second node as the server as an example. The bonding aggregation for both the client and server involves aggregating two physical network ports into a single virtual interface.

[0098] refer to Figure 5 This is a schematic diagram illustrating an online point-to-point traffic balancing strategy in one embodiment. The following explanation uses the point-to-point balancing strategy in a single balancing process as an example. The process is as follows:

[0099] (1) When a business network connection is requested between the client and the server, a dual-channel business network connection (such as a TCP connection) is created, and a load balancing task is established at the same time.

[0100] (2) If the server is busy, exit the load balancing task.

[0101] (3) If the server is idle, the client randomly selects the source port number and the destination port number to establish two network test connections.

[0102] In this context, business network connections have a higher priority than network test connections. Network test connections must be reserved for load balancing strategies and not be used by other applications on the server side.

[0103] (3) Balanced testing is performed through two network test connections, specifically by the client periodically sending probe data packets (probe packets) to the server.

[0104] (4) If the traffic counters on the two network ports of the client and the server increase periodically, it means that the data is balanced in the entire end-to-end link. The information of this pair of network test connections can be used for business data connections. Therefore, the information of the network test connection can be saved and the original business network connection can be replaced on the application side, or it can be left unreplaced.

[0105] (5) If the traffic counters on the two network ports of the client and the server do not increase periodically and there is an imbalance, then establish two new network test connections, re-perform the balancing test until the traffic is balanced, save the information of the balanced network test connection, and replace the original business network connection on the application side to complete the balancing task between the client and the server.

[0106] (6) The client node attempts to process the next load balancing task. The server node returns to an idle state and waits for the next passive load balancing task.

[0107] This implementation aims to achieve bonding traffic balancing between nodes in an enhanced Ethernet environment without interfering with existing service traffic. This method ensures that the traffic on the bonding network ports is fully utilized across the entire link. To avoid impacting services, this application uses idle, low-priority channels for test traffic. Then, the traffic counters on the respective network ports of both the client and server are monitored. When periodic send and receive traffic is detected on both the client and server's network ports, the corresponding test connection information is saved, and the original data connection is replaced at an appropriate time to achieve point-to-point traffic balancing.

[0108] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0109] Based on the same inventive concept, this application also provides a point-to-point load balancing device for implementing the point-to-point load balancing method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations of one or more point-to-point load balancing device embodiments provided below can be found in the limitations of the point-to-point load balancing method described above, and will not be repeated here.

[0110] In one exemplary embodiment, such as Figure 6 As shown, a point-to-point load balancing device is provided, which is set in the first node of an enhanced Ethernet network. The device includes:

[0111] The node determination module 610 is used to determine the current load balancing task to be processed by the first node and the second node corresponding to the load balancing task; the load balancing task between the first node and the second node is generated when the service network connection between the first node and the second node is established.

[0112] The load balancing test module 620 is used to configure a network test connection between the first node and the second node when the second node is in an idle state. The load balancing test is performed on the first node and the second node through the network test connection to obtain the test results. The service network connection has higher priority than the network test connection.

[0113] The result processing module 630 is used to establish a new network test connection between the first node and the second node if the test result is unbalanced, and to perform the load balancing test again until the target network test connection with load balancing is obtained.

[0114] The connection replacement module 640 is used to replace the business network connection between the first node and the second node with the target network test connection.

[0115] In one embodiment, the load balancing test module 620 is further configured to randomly select a source port number and a destination port number; and establish a network test connection between the first node and the second node based on the source port number and the destination port number.

[0116] In one embodiment, both the first node and the second node aggregate multiple physical network ports into a single virtual interface using network aggregation technology. The load balancing method is applied to the load balancing between the first virtual interface of the first node and the second virtual interface of the second node. The load balancing test module 620 is also used to periodically send probe packets from the first node to the second node through a network test connection. If the traffic at each physical network port associated with the first virtual interface of the first node and each physical network port associated with the second virtual interface of the second node both increase periodically, then load balancing between the first node and the second node is determined.

[0117] In one embodiment, the node determination module 610 is further configured to select a current balance task to be processed from the balance task list corresponding to the first node; each balance task in the balance task list corresponds to a different second node.

[0118] In one embodiment, the load balancing test module 620 is further configured to exit the current load balancing task when the second node is busy or the service network connection between the first node and the second node has been replaced by the target network test connection, and determine the traversal status of other load balancing tasks in the load balancing task list; if there are load balancing tasks that have not been traversed in the load balancing task list, then select the next load balancing task as the new load balancing task to be processed, and return to the step of determining the second node corresponding to the load balancing task.

[0119] In one embodiment, the load balancing test module 620 is further configured to set the state of the first node to idle if all load balancing tasks in the load balancing task list have been traversed; monitor the duration of the first node in idle state, and if the duration exceeds a threshold, proceed to the next round of load balancing task traversal.

[0120] The modules in the aforementioned point-to-point load balancing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0121] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and input devices. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a point-to-point load balancing method.

[0122] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0123] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0124] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0125] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0126] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0127] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A point-to-point load balancing method, characterized in that, The method, applied to a first node in an enhanced Ethernet network, includes: Determine the load balancing task currently to be processed by the first node and the second node corresponding to the load balancing task; both the first node and the second node use the bonding method to aggregate multiple physical network ports into a virtual interface; the load balancing task between the first node and the second node is generated when the service network connection between the first node and the second node is established; the load balancing between the first node and the second node represents the load balancing of data packets sent and received by each physical network port of the first node and the second node. When the second node is in an idle state, a network test connection is configured between the first node and the second node. A load balancing test is performed between the first node and the second node through the network test connection to obtain the test results. The service network connection has a higher priority than the network test connection. The idle state indicates that no load balancing test is currently being performed with any node, but service communication can still be carried out. If the test result is unbalanced load, a new network test connection is established between the first node and the second node, and the load balancing test is performed again until the target network test connection with a load balancing result is obtained. Replace the service network connection between the first node and the second node with the target network test connection.

2. The method according to claim 1, characterized in that, The configuration of the network test connection between the first node and the second node includes: Randomly select the source and destination port numbers; A network test connection is established between the first node and the second node based on the source port number and the destination port number.

3. The method according to claim 1, characterized in that, The step of performing a load balancing test on the first node and the second node through the network test connection to obtain the test results includes: The virtual interface aggregated by the first node is determined to be the first virtual interface, and the virtual interface aggregated by the second node is determined to be the second virtual interface; At the first node, probe packets are periodically sent to the second node through the network test connection; If the traffic at each physical network port associated with the first virtual interface of the first node and each physical network port associated with the second virtual interface of the second node both increase periodically, then load balancing between the first node and the second node is determined.

4. The method according to claim 1, characterized in that, Determining the current load balancing task to be processed by the first node includes: Select the current balance task to be processed from the balance task list corresponding to the first node; each balance task in the balance task list corresponds to a different second node.

5. The method according to claim 4, characterized in that, The method further includes: If the second node is busy, or if the service network connection between the first node and the second node has been replaced by the target network test connection, the current pending load balancing task is exited, and the traversal of other load balancing tasks in the load balancing task list is determined; the busy state indicates that load balancing tests are currently being performed between other nodes. If there is an unvisited balancing task in the balancing task list, then select the next balancing task as the new balancing task to be processed, and return to the step of determining the second node corresponding to the balancing task.

6. The method according to claim 5, characterized in that, The method further includes: If all the balanced tasks in the balanced task list have been traversed, then the state of the first node is set to idle. Monitor the duration of the first node's idle state. If the duration exceeds a threshold, proceed to the next round of balanced task traversal.

7. A point-to-point load balancing device, characterized in that, The device, comprising a first node configured in an enhanced Ethernet network, includes: The node determination module is used to determine the load balancing task currently to be processed by the first node and the second node corresponding to the load balancing task; both the first node and the second node use the bonding method to aggregate multiple physical network ports into a virtual interface; the load balancing task between the first node and the second node is generated when the service network connection between the first node and the second node is established; the load balancing between the first node and the second node represents the load balancing of data packets sent and received by each physical network port of the first node and the second node. The load balancing test module is used to configure a network test connection between the first node and the second node when the second node is in an idle state, and to perform load balancing tests on the first node and the second node through the network test connection to obtain test results. The service network connection has a higher priority than the network test connection. The idle state indicates that no load balancing test is currently being performed with any node, but service communication can still be carried out. The result processing module is used to establish a new network test connection between the first node and the second node if the test result is unbalanced load, and to perform the load balancing test again until the target network test connection with a load balancing result is obtained. The connection replacement module is used to replace the service network connection between the first node and the second node with the target network test connection.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Priority-based load balancing algorithm in hybrid network

    CN105049368A

  • Method and system for automatically testing load balance under UDP

    CN112134733A