A load balancing method and device for distributed edge servers

By setting up a redirection rule table in each edge server node, the redirection scheme is determined based on the relationship between the node load and the global load average, the problem of existing distributed systems relying on centralized scheduling when dealing with burst loads is solved, decentralized load balancing and load scheduling are realized, and the availability and capacity of the system are improved.

CN115567531BActive Publication Date: 2025-04-25FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211085366.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2025-04-25
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

When handling burst loads, existing distributed systems still rely on centralized scheduling, resulting in complex software algorithms, high hardware resource requirements, and poor capacity expansion.

Method used

By setting up a redirection rule table in each edge server node, the redirection scheme is determined based on the relationship between the node load and the global load average, and other nodes are notified to modify the redirection rule table to achieve decentralized load balancing and load scheduling.

Benefits of technology

It realizes the decentralization of the load balancing function of the server cluster, improves the availability of the load balancing function, simplifies the deployment network topology, reduces hardware resource consumption, reduces system deployment costs, and improves the support capacity of server cluster expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567531B_ABST
    Figure CN115567531B_ABST
Patent Text Reader

Abstract

The present invention relates to a load balancing method and device for a distributed edge server, characterized in that a redirection rule table is provided in an edge server node, and the redirection rule table stores all edge server nodes for redirection scheduling, and the method comprises the steps of: each edge server node determines a redirection scheme according to the relationship between its own node load and the global load average and notifies other associated edge server nodes to modify their respective redirection rule tables according to the redirection scheme when necessary; when redirection scheduling is required, the edge server node performs redirection scheduling according to its own redirection rule table. The method can realize the decentralization of the load balancing function of the server cluster while realizing the load scheduling function of each node itself.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a load balancing technology in a computer network, and in particular to a load balancing method and device for a distributed edge server. Background Art

[0002] In the current IoT system, the edge access layer needs to handle a massive amount of device connections and message data. In order to improve the concurrency of the edge access layer, the server side is usually deployed in a distributed architecture, and load balancing is an indispensable technology in the distributed architecture. Considering the frequent emergencies in actual business scenarios, in order to more reasonably handle sudden loads, the current distributed system gradually adopts load balancing technology that is dynamically adjusted according to the scenario.

[0003] In the related art, a centralized architecture is adopted to distribute the load centrally through an independent load balancing module. In this centralized architecture, the load balancing module, as the entrance to the data processing server cluster, needs to have high availability and high concurrency capabilities, and needs to meet the subsequent expansion of the data processing server cluster, which leads to the complexity of the module software algorithm and high hardware resource requirements of the server where it is located.

[0004] In other related technologies, a distributed architecture is adopted, but the MEC (Mobile Edge Computing) server of the edge node does not have a scheduling function. The data storage table used for scheduling is still stored in the scheduling center. The process of calculating the task transfer probability is executed in the scheduling center. Each edge node server needs to receive the scheduling arrangement of the scheduling center. In essence, it is still a centralized scheduling method. In addition, some related technologies use a preset resource threshold to judge the load level. When the remaining resources of all nodes do not meet the threshold required to execute the task, the edge node loses the ability to execute the task and is handed over to the cloud computing center for execution. Summary of the invention

[0005] The embodiments of the present invention provide a load balancing method and device for a distributed edge server, so as to realize the decentralization of the load balancing function of a server cluster and the load scheduling function of each node itself.

[0006] On the one hand, an embodiment of the present invention provides a load balancing method for a distributed edge server, characterized in that a redirection rule table is provided in the edge server node, and the redirection rule table stores all edge server nodes for redirection scheduling, and the method comprises the steps of:

[0007] Each edge server node determines a redirection scheme according to the relationship between its own node load and the global load average and notifies other associated edge server nodes to modify their respective redirection rule tables according to the redirection scheme when necessary;

[0008] When redirection scheduling is required, the edge server node performs redirection scheduling according to its own redirection rule table.

[0009] In some embodiments, each edge server node determines a redirection scheme based on the relationship between its own node load and the global load average, including the steps of:

[0010] The edge server node calculates its own node load factor based on its own load history data, wherein the load history data includes the node operating system load factor, the current number of connections, the number of newly added connections, and the average number of connections;

[0011] The edge server node periodically synchronizes data with other edge server nodes, and the data synchronization includes synchronization of respective node load factors;

[0012] The edge server node calculates the global load mean based on the node load coefficients of all nodes.

[0013] In some embodiments, the edge server node calculates its own node load factor based on its own load history data, including the steps of:

[0014] The node load factor is calculated according to a first formula, wherein the first formula includes:

[0015] K=(C n +C d +CI)*(l a / l c ),

[0016] C d =C n -C n-1 ,

[0017] CI=(C n +C n-1 ) / 2*T,

[0018] Where K is the node load factor, C n is the number of devices connected to the edge server node in the current cycle, C n-1 is the number of devices connected to the edge server node in the previous cycle, C d , CI is the intermediate variable, l c is the number of CPU cores of the edge server, l a is the node operating system load factor, and T is the adoption period.

[0019] In some embodiments, each edge server node determines a redirection scheme according to a relationship between its own node load and a global load average, comprising the steps of:

[0020] If the node load factor of the own node is higher than the global load average, the redirection scheme is determined to be to delete the own server node information in the redirection rule table of other associated edge server nodes;

[0021] If the node load factor of the node itself is lower than the global load average, the redirection scheme is determined to be to add the node information of the server itself to the redirection rule table of other associated edge server nodes;

[0022] If the node load factor is equal to the global load average, the current redirection scheme is maintained, and other server nodes are not notified to modify the redirection rule table.

[0023] In some embodiments, each edge server node determines a redirection scheme according to a relationship between its own node load and a global load average, comprising the steps of:

[0024] Setting a load difference threshold, and taking the sum of the global load average and the load difference threshold as the global load threshold upper limit, and taking the difference between the global load average and the load difference threshold as the global load threshold lower limit;

[0025] If the node load factor of the server itself is higher than the upper limit of the global load threshold, the redirection scheme is determined to be to delete the server node information of the server itself in the redirection rule table of other associated edge server nodes;

[0026] If the node load factor of the server itself is lower than the lower limit of the global load threshold, the redirection scheme is determined to be to add the server node information of the server itself to the redirection rule table of other associated edge server nodes;

[0027] If its own node load factor is lower than the upper limit of the global load threshold and higher than the lower limit of the global load threshold, the current redirection scheme is maintained and other server nodes are not notified to modify the redirection rule table.

[0028] In some embodiments, the server node information includes a node redirection probability, and the node redirection probability is determined according to the node load coefficient, the global load mean, and a redirection coefficient.

[0029] In some embodiments, the node redirection probability is determined according to a second formula;

[0030] The second formula is: Among them, K is the node load factor, P is the redirection scheduling probability, is the global load mean, and M is the redirection coefficient.

[0031] In some embodiments, the edge server node performs redirection scheduling according to its own redirection rule table, including the steps of:

[0032] Obtain the redirection probability of the corresponding node according to the edge server node currently stored in the redirection rule table and the corresponding server node information;

[0033] The node with a high redirection probability is used as a server node for redirection scheduling and its corresponding IP address and port information are sent to the device for redirection connection.

[0034] In some embodiments, the method comprises the steps of:

[0035] If the node load factor of the edge server node is greater than or equal to the global load average, it is determined that redirection scheduling needs to be performed.

[0036] An embodiment of the present invention also provides a device, characterized in that the device includes: at least one processor; and a memory coupled to the at least one processor, the memory containing instructions stored therein, and the instructions are loaded and executed by the processor to implement a method as described in any one of the method embodiments.

[0037] The embodiment of the present invention provides a load balancing method for a distributed edge server, which realizes the decentralization of the load balancing function of the server cluster, and each node can have a load scheduling function. The failure of the load balancing function of a single node will not cause the failure of the function of the entire cluster, thereby improving the availability of the load balancing function of the entire cluster. In addition, each node does not need to connect to the front-end centralized load balancing node according to the traditional centralized load balancing method, the centralized load balancing node is eliminated, and the deployment network topology is simplified, thereby reducing the hardware resource consumption of the load balancing function and reducing the cost of system deployment. The embodiment of the present invention also improves the support capability for the expansion of the server cluster and realizes the plug-and-play of the newly added nodes. After adding or deleting nodes, the server cluster can automatically balance the connection load of all nodes without manual adjustment, thereby improving the scalability of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1A schematic diagram of a flow chart of a load balancing method for a distributed edge server provided in an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of the structure of a distributed dynamic load balancing system provided by an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of a flow chart of a load calculation method provided by an embodiment of the present invention;

[0042] Figure 4 A schematic diagram of the process of rule determination and release provided by an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of a process for publishing rules between server nodes in a cluster provided by an embodiment of the present invention;

[0044] Figure 6 A schematic diagram of the device connection layer operation provided by an embodiment of the present invention;

[0045] Figure 7 A schematic diagram of a redirection process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] like Figure 1 As shown, an embodiment of the present invention provides a load balancing method for a distributed edge server, comprising the steps of:

[0048] S100: Each edge server node determines a redirection scheme according to the relationship between its own node load and the global load average and notifies other associated edge server nodes to modify their respective redirection rule tables according to the redirection scheme when necessary;

[0049] S200: When redirection scheduling is required, the edge server node performs redirection scheduling according to its own redirection rule table.

[0050] It should be noted that each edge server node (hereinafter referred to as server node) is provided with a redirection rule table, and the redirection rule table stores all edge server nodes used for redirection scheduling.

[0051] It is understandable that each server node in the cluster will periodically collect system performance indicators, calculate the current load factor of the server (i.e., its own node load factor), and compare the local load with the average load factor of the entire cluster to determine whether the current server accepts new device connections or transfers existing device connections to adjust its own load and achieve load balancing. Accepting new connections and transferring existing connections are determined by the redirection rule table (hereinafter referred to as the rule table) in the local load balancing service of the server.

[0052] The embodiment of the present invention realizes the decentralization of the load balancing function of the server cluster, and each node can have a load scheduling function. The failure of the load balancing function of a single node will not cause the failure of the function of the entire cluster, thereby improving the availability of the load balancing function of the entire cluster. In addition, each node does not need to connect to the front-end centralized load balancing node according to the traditional centralized load balancing method, the centralized load balancing node is cancelled, and the deployment network topology is simplified, thereby reducing the hardware resource consumption of the load balancing function and reducing the cost of system deployment.

[0053] In some embodiments, when calculating the global load average in S100, the steps include:

[0054] S110: The edge server node calculates its own node load factor according to its own load history data, where the load history data includes the node operating system load factor, the current number of connections, the number of newly added connections, and the average number of connections;

[0055] S120: The edge server node periodically synchronizes data with other edge server nodes, and the data synchronization includes synchronization of respective node load factors;

[0056] S130: The edge server node calculates the global load mean according to the node load coefficients of all nodes.

[0057] Preferably, in S110, the node load factor is calculated according to a first formula, and the first formula includes:

[0058] K=(C n +C d +CI)*(l a / l c ),

[0059] C d =C n -C n-1 ,

[0060] CI=(C n +C n-1 ) / 2*T,

[0061] Where K is the node load factor, C n is the number of devices connected to the edge server node in the current cycle, C n-1 is the number of devices connected to the edge server node in the previous cycle, C d , CI is the intermediate variable, l c is the number of CPU cores of the edge server, l a is the load value of the node's operating system, and T is the adoption period.

[0062] It is understandable that the global load average is the average value of the load factor K of all nodes:

[0063]

[0064] In some embodiments, when determining the redirection scheme in S100, the steps include:

[0065] S141: If the node load factor is higher than the global load average The redirection scheme is determined to be deleting the own server node information in the redirection rule table of other associated edge server nodes;

[0066] S142: If the node load factor is lower than the global load average The redirection scheme is determined to be to add the own server node information in the redirection rule table of other associated edge server nodes;

[0067] S143: If the node load factor is equal to the global load average , the current redirection scheme is maintained, and other server nodes are not notified to modify the redirection rule table.

[0068] It is understandable that, in this embodiment, after each server node determines its own redirection scheme based on the relationship between its own calculated node load coefficient and the global load average, it will decide whether to notify other associated server nodes to make modifications according to the redirection scheme based on the content of the redirection scheme. If the redirection scheme is to delete its own server node information in the redirection rule table of other associated edge server nodes, it means that the load of this server node is too high, and when other edge server nodes corresponding to the next cycle need to be redirected and scheduled, this server node will no longer be used as a schedulable object.

[0069] In some preferred embodiments, when determining the redirection scheme in S100, the steps include:

[0070] S150: setting a load difference threshold, and taking the sum of the global load average and the load difference threshold as the upper limit of the global load threshold, and taking the difference between the global load average and the load difference threshold as the lower limit of the global load threshold;

[0071] S151: If the node load factor of the own node is higher than the upper limit of the global load threshold, determine the redirection scheme to delete the own server node information in the redirection rule table of other associated edge server nodes;

[0072] S152: If the node load factor of the server itself is lower than the lower limit of the global load threshold, determine the redirection solution to add the server node information of the server itself to the redirection rule table of other associated edge server nodes;

[0073] S153: If the node load factor of the node itself is lower than the upper limit of the global load threshold and higher than the lower limit of the global load threshold, the current redirection scheme is maintained and other server nodes are not notified to modify the redirection rule table.

[0074] In this embodiment, a load difference threshold is set and used to determine the redirection scheme, so that when the node load coefficient is compared with the global load average, it can fluctuate within the threshold range, thereby avoiding frequent load scheduling and consuming resources.

[0075] In some embodiments, the server node information includes a node redirection probability, and the node redirection probability is determined according to the node load coefficient, the global load mean, and a redirection coefficient.

[0076] It can be understood that the node redirection probability is used to reflect the probability that all server nodes belonging to the same redirection rule table are selected to perform redirection when redirection scheduling is required.

[0077] Preferably, the node redirection probability is determined according to the second formula:

[0078] The first formula is:

[0079] Among them, K is the node load factor, P is the redirection scheduling probability, is the global load average, M is the redirection factor and can be configured as needed.

[0080] In some embodiments, S200 includes the steps of:

[0081] S210: Obtain the redirection probability of the corresponding node according to the edge server node and the corresponding server node information currently stored in the redirection rule table;

[0082] S220: Use the node with a high redirection probability as the server node for redirection scheduling and send its corresponding IP address and port information to the device for redirection connection.

[0083] In some embodiments, when a server node determines whether redirection scheduling needs to be executed, if the node load coefficient of the server node is greater than or equal to the global load average, it is determined that redirection scheduling needs to be executed.

[0084] Preferably, the redirection rule table also includes the judgment result of whether the server node needs to execute redirection scheduling. If the device is connected to the IoT server and sends a connection request to the server node, the server node can judge whether the device is connected to the node or redirected to other server nodes according to the redirection rule table. If the server node load is too high (i.e., higher than the global load average of the cluster), it will be redirected to other server nodes. If the load factor of the server node is lower than the global load average, it will accept new device requests.

[0085] The embodiment of the present invention can improve the support capability for the expansion of the server cluster and realize the plug-and-play of the newly added nodes. After adding or deleting nodes, the server cluster can automatically balance the connection load of all nodes without manual adjustment, thereby improving the scalability of the entire system.

[0086] like Figure 2 As shown, in a specific embodiment, a distributed IoT (Internet of things) edge server cluster consisting of multiple edge servers (such as server node 1 or server node 2, hereinafter referred to as server node) and a registration center 11 is provided. The system (a distributed cluster consisting of multiple server nodes and a registration center) provides device access and load balancing capabilities for device connections, while achieving distributed management of load strategies and distributed scheduling capabilities. The server node includes a metadata module, a historical load data module, a load balancing module, and a device connection layer, and the server node periodically reports metadata and historical load data to the registration center through the metadata module and the historical load data module; wherein the metadata module records the server's current IP address and open port exposed to the device connection.

[0087] like Figure 3 As shown, the load calculation method includes:

[0088] S1. At the beginning of each collection cycle, the load factor of the server Linux system is collected first. a (loadaverage, load average);

[0089] S2. Collect the total number of device connections currently connected to the server C n ;

[0090] S3, according to the device connection C collected in the last cycle n-1 Calculate the number of new connections C in the current cycle d =C n -C n-1 ;

[0091] S4. Calculate the product of the average number of device connections in two cycles and the sampling interval CI = (C n +C n-1 ) / 2*T;

[0092] S5, according to the above collection and calculation to obtain l a , C n , C d , CI and other values ​​to calculate the server load factor K = (C n +C d +CI)*(l a / l c );

[0093] S6, update the current C before calculating the next cycle n-1 The value of C n ;

[0094] S7, the thread goes into sleep mode and waits for the next cycle.

[0095] Where K is the node load factor, C n is the number of devices connected to the edge server node in the current cycle, C n-1 is the number of devices connected to the edge server node in the previous cycle, C d , CI is the intermediate variable, l c is the number of CPU cores of the edge server, l a is the load factor of the edge server operating system, and T is the adoption period.

[0096] like Figure 2 As shown in the figure, after the calculation of the load factor K of the current cycle is completed, the server node reports the load factor to the registration center and synchronizes the load factor reported by each node in the cluster to the local node to prepare for the subsequent calculation of complex redirection rules, including:

[0097] S8. The node reports the node load factor K and metadata information of the current period to the registration center;

[0098] S9. Pull the load factor and metadata information of other servers in the cluster from the registration center to the local load balancing service of the node.

[0099] When the server node calculates its current load K and obtains the load coefficients of other nodes in the cluster, it calculates and publishes the load balancing rules.

[0100] It is understandable that the server node needs to calculate the average load factor of the current cluster based on the load of other server nodes to determine the redirection action. If the load factor of this server node is lower than the system average load factor, it will tell other nodes to add the connection information of this server node to each node rule table. If the load factor of this server node is higher than the average load factor, it will notify other server nodes to delete the rule table of this server node in the rule table. Figure 4 As shown, the specific steps include:

[0101] S10, obtaining cluster data, including: the server node obtains the load coefficients of other server nodes in the cluster from the registration center and stores them locally;

[0102] S11, load factor average calculation, including calculating the load factor average of the entire cluster by combining the load factors collected by the local machine;

[0103] S12, judging whether the load of the current server node is higher than the sum of the average load coefficient (i.e., the global load mean) and the load difference threshold D, if the load of the current server node is higher than the average load coefficient plus the load difference threshold D, jump to S14, otherwise jump to S13;

[0104] S13, judging whether the load of the current server node is lower than the difference between the average load coefficient and the load difference threshold D, if yes, jump to S15, otherwise, it indicates that the load capacity of the server node has reached a balanced state, and no rule adjustment is required;

[0105] S14, notify other nodes to delete the node information in the rule table;

[0106] S15. Notify other nodes to add the node information to the rule table.

[0107] The introduction of the load difference threshold D allows the server load to fluctuate within the threshold range of the load average value ± the load difference threshold D, thereby avoiding frequent load scheduling and consuming resources.

[0108] like Figure 5As shown, in a specific embodiment, server node 2 is in a low load state (i.e., the load of server node 2 is lower than the difference between the average load coefficient and the load difference threshold D), and rule a is added to tell other servers to add the information of server node 2 to server nodes 1 and 3, indicating that server node 2 can receive device redirection connections. Server node 1 is in a high load state, and rule b is deleted to tell servers 2 and 3 to delete the information of server node 1 from the redirection rule table of servers 2 and 3, indicating that device redirection connections are no longer received.

[0109] It should be noted that node 3 is in a medium load state. The server maintains the current rule publishing policy and will not send new rule notifications to other servers, nor will it send rule deletion notifications to other servers.

[0110] like Figure 6 As shown, in a specific embodiment, after the rules are issued to each server node, the connection layer processing device of the server node creates a new connection request, specifically including:

[0111] S16, the device establishes a connection for the first time through the session initialization module 13;

[0112] S17, the server decides whether to redirect the connection request of the device according to the load balancing rule table 4;

[0113] S18. After the device session connection is established, the device messages are processed by the session awareness module 14, including the device's heartbeat, notification and other information.

[0114] It should be noted that the initialization module is responsible for processing the device's request message to initiate a new connection to the platform. The initialization module will determine which server node the device will establish a connection with. If redirection is not required, the information of the current node's 'session awareness' module (local IP information and port information) will be returned. If it is currently determined that redirection is required, the server node information will be selected from the rule table and returned to the device.

[0115] like Figure 7 As shown in Figure 4, when the server node needs to adjust the load to redirect the newly created devices and existing devices, the device connection layer module will determine whether the connection of the current device needs to be reallocated based on the data in rule table 4. The rule table will record the IP information and port information of each node in the cluster and the probability of being hit (i.e., the probability of node redirection). If the current load factor K minus the load mean is less than 0, the rule table will not be executed.

[0116] like Figure 7 As shown in the figure, the process of redirecting the device's initial connection includes:

[0117] S19, connection session initialization module 13;

[0118] S20, query rule table 4, and return the connection information of the redirection target server;

[0119] S21, a connection request is initiated to the target server and the session initialization module 17 completes the processing.

[0120] The process of redirecting a connected device includes:

[0121] S22, the device has been connected to the session awareness module 18;

[0122] S23, query rule table 16, and return the connection information of the redirection target server;

[0123] S24: Initiate a connection request to the target node, which is processed by the server session initialization module 13.

[0124] It should be noted that for server nodes, when a device first connects, the session initialization module will schedule the load, telling the device which server node's session to establish a connection with. The session initialization module specifically handles new device connection messages, rather than maintaining long connections. The scheduling overhead is relatively small. The session awareness module is the server's scheduling of existing connections, mainly processing the data and heartbeats reported by the device, redirection processes, etc. At this time, the scheduling is mainly to achieve dynamic load scheduling for long device connections, and the scheduling overhead of the session awareness layer is relatively high.

[0125] In the embodiment of the present invention, each server node in the cluster has the ability of policy management and distribution, and each server node has the ability of load scheduling, so as to realize the decentralization of complex balance. Dynamic distributed IoT device connection system load balancing can be realized without a separate load balancing service cluster, which reduces the resource consumption of the system. The expansion of the cluster also does not require manual load policy adjustment and deployment, so it can be plug-and-play.

[0126] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer-readable storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0127] It should be noted that, in the present invention, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0128] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A load balancing method for a distributed edge server, characterized in that: A redirection rule table is provided in the edge server node, and the redirection rule table stores all edge server nodes used for redirection scheduling. The method comprises the steps of: Each edge server node determines a redirection scheme according to the relationship between its own node load and the global load average and notifies other associated edge server nodes to modify their respective redirection rule tables according to the redirection scheme when necessary; When redirection scheduling is required, the edge server node performs redirection scheduling according to its own redirection rule table; Wherein, each edge server node determines a redirection scheme according to the relationship between its own node load and the global load average, including the steps of: The edge server node calculates its own node load factor based on its own load history data, wherein the load history data includes the node operating system load factor, the current number of connections, the number of newly added connections, and the average number of connections; The edge server node periodically synchronizes data with other edge server nodes, and the data synchronization includes synchronization of respective node load factors; The edge server node calculates the global load mean based on the node load coefficients of all nodes; The edge server node calculates its own node load factor according to its own load history data, including the steps of: The node load factor is calculated according to a first formula, wherein the first formula includes: C=(C n +C d +CI)*(l a / l c ), C d =C n -C n-1 , CI=(C n +C n-1 ) / 2*T, Where K is the node load factor, C n is the number of devices connected to the edge server node in the current cycle, C n-1 is the number of devices connected to the edge server node in the previous cycle, C d , CI is the intermediate variable, l c is the number of CPU cores of the edge server, l a is the node operating system load factor, and T is the adoption period.

2. A load balancing method for a distributed edge server as claimed in claim 1, characterized in that: Each edge server node determines a redirection scheme according to the relationship between its own node load and the global load average, including the steps of: If the node load factor of the own node is higher than the global load average, the redirection scheme is determined to be to delete the own server node information in the redirection rule table of other associated edge server nodes; If the node load factor of the node itself is lower than the global load average, the redirection scheme is determined to be to add the node information of the server itself to the redirection rule table of other associated edge server nodes; If the node load factor is equal to the global load average, the current redirection scheme is maintained, and other server nodes are not notified to modify the redirection rule table.

3. A load balancing method for a distributed edge server as claimed in claim 1, characterized in that: Each edge server node determines a redirection scheme according to the relationship between its own node load and the global load average, including the steps of: Setting a load difference threshold, and taking the sum of the global load average and the load difference threshold as the global load threshold upper limit, and taking the difference between the global load average and the load difference threshold as the global load threshold lower limit; If the node load factor of the server itself is higher than the upper limit of the global load threshold, the redirection scheme is determined to be to delete the server node information of the server itself in the redirection rule table of other associated edge server nodes; If the node load factor of the server itself is lower than the lower limit of the global load threshold, the redirection scheme is determined to be to add the server node information of the server itself to the redirection rule table of other associated edge server nodes; If its own node load factor is lower than the upper limit of the global load threshold and higher than the lower limit of the global load threshold, the current redirection scheme is maintained and other server nodes are not notified to modify the redirection rule table.

4. A load balancing method for a distributed edge server as claimed in any one of claims 2 or 3, characterized in that: The server node information includes a node redirection probability, and the node redirection probability is determined according to the node load coefficient, the global load mean, and a redirection coefficient.

5. A load balancing method for a distributed edge server as claimed in claim 4, characterized in that: The node redirection probability is determined according to a second formula; The second formula is: Among them, K is the node load factor, P is the redirection scheduling probability, is the global load mean, and M is the redirection coefficient.

6. A load balancing method for a distributed edge server as claimed in claim 1, characterized in that: The edge server node performs redirection scheduling according to its own redirection rule table, including the steps of: Obtain the redirection probability of the corresponding node according to the edge server node currently stored in the redirection rule table and the corresponding server node information; The node with a high redirection probability is used as a server node for redirection scheduling and its corresponding IP address and port information are sent to the device for redirection connection.

7. A load balancing method for a distributed edge server as claimed in claim 1, characterized in that: The method comprises the steps of: If the node load factor of the edge server node is greater than or equal to the global load average, it is determined that redirection scheduling needs to be performed.

8. A device, characterized in that The device comprises: at least one processor; and a memory coupled to the at least one processor, wherein the memory contains instructions stored therein, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A load balance method based on the static position information in the wireless LAN

    CN1996909A