Soft load balancing cluster capacity expansion system, method, equipment, medium and product
By monitoring the busyness of the cluster in real time and generating capacity expansion instructions, combined with the resource scheduling of the temporary resource pool scheduling module, the rapid expansion and immediate use of the soft load balancing cluster are achieved, solving the problem of cumbersome expansion solutions in the existing technology.
Patent Information
- Application Number
- CN202411801961.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-07
AI Technical Summary
The existing soft load balancing cluster expansion solution is cumbersome, and it is difficult to quickly expand the load balancing nodes, and it cannot meet the rapid expansion requirements when business increases sharply.
The soft load cluster management and control module monitors the busyness of the cluster in real time, generates expansion instructions based on preset expansion conditions and policies, and the temporary resource pool scheduling module schedules the soft load balancer to expand the capacity from the temporary resource pool to achieve rapid expansion nodes.
It improves the accuracy and timeliness of expansion decisions, realizes rapid expansion of soft load balancing clusters and instantly put into use, ensures system stability when business increases sharply, and reduces business losses caused by server resource bottlenecks.
Smart Images

Figure CN119576577A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing technology, and in particular to a soft load balancing cluster expansion system, method, device, medium and product. Background Art
[0002] In today's Internet and enterprise-level application environments, high availability and performance optimization of services are crucial. With the continuous development of business and the continuous growth of user access, application systems are facing increasing pressure. As an effective solution, soft load balancing technology is widely used in distributed systems to achieve reasonable distribution of traffic and efficient use of system resources.
[0003] The steps of the current expansion plan can be summarized as follows: 1. Add a new server; 2. Install the load balancing software; 3. Copy the existing load balancing parameters to the new server; 4. Configure the new server as a new load balancer member. Looking at the entire expansion plan, the process is relatively cumbersome, especially the fourth point, which requires the new server to be included in the original load balancer member, which means that the server IP needs to be added to the hardware load balancer, or added to the address pool of the client using this soft load cluster, which is difficult to implement quickly. In general, the current soft load cluster expansion plan has a long process, involves many aspects, and is difficult to achieve rapid expansion. When faced with certain scenarios where business suddenly increases, it is impossible to quickly expand the load balancing nodes to meet business needs. Summary of the invention
[0004] The present invention provides a soft load balancing cluster expansion system, method, device, medium and product, so as to quickly complete the load balancing node expansion when the business increases suddenly, improve the emergency efficiency, and minimize the business loss caused by the server resource bottleneck.
[0005] According to one aspect of the present invention, a soft load balancing cluster expansion system is provided, the system comprising: a soft load cluster management and control module, a temporary resource pool scheduling module connected to the soft load cluster management and control module;
[0006] The soft load cluster control module is used to obtain the cluster busyness of the soft load balancing cluster, and obtain the expansion conditions and expansion strategies. When the cluster busyness reaches the expansion conditions, an expansion instruction is generated according to the expansion strategy and sent to the temporary resource pool scheduling module;
[0007] The temporary resource pool scheduling module is used to generate a cluster expansion task list based on the expansion instruction, and start the soft load balancer corresponding to the temporary resource pool as the soft load balancer to be expanded.
[0008] Optionally, the system also includes: a load balancing policy synchronization module connected to the soft load cluster management and control module and the temporary resource pool scheduling module; a temporary resource pool scheduling module, used to generate policy synchronization instructions based on the cluster expansion task list, and send the policy synchronization instructions to the load balancing policy synchronization module; a load balancing policy synchronization module, used to synchronize the load balancing configuration of the original soft load balancing cluster to the soft load balancer to be expanded based on the policy synchronization instructions.
[0009] Optionally, the system also includes: a cluster performance monitoring module connected to the soft load cluster management and control module; the cluster performance monitoring module is used to collect the load conditions and performance indicators of each soft load balancer in the soft load balancing cluster in real time, and calculate the cluster busyness based on the load conditions and performance indicators, and send the cluster busyness to the soft load cluster management and control module.
[0010] Optionally, the system also includes: an expansion strategy customization module connected to the soft load cluster management and control module; the expansion strategy customization module is used to obtain the expansion conditions and expansion strategies set by the user, and send the expansion conditions and expansion strategies to the soft load cluster management and control module.
[0011] Optionally, the system also includes: a request redirection module connected to the temporary resource pool scheduling module; the temporary resource pool scheduling module is used to generate a redirection control instruction based on the cluster expansion task list, and send the redirection control instruction to the request redirection module; the request redirection module is used to obtain business requests, and extract a specified proportion of business requests from the business requests according to the redirection control instruction to generate packaged business.
[0012] Optionally, the system also includes: a redirection request processing module connected to the request redirection module; the request redirection module is also used to send the packaged service to the redirection request processing module; the redirection request processing module is used to forward the packaged service to the corresponding back-end server, and receive the request response from the back-end server, convert the request response into a specified format and feed it back to the request redirection module.
[0013] According to another aspect of the present invention, a method for expanding a soft load balancing cluster is provided, the method comprising:
[0014] The cluster busyness of the soft load balancing cluster is obtained through the soft load cluster control module, and the expansion conditions and expansion strategies are obtained. When the cluster busyness reaches the expansion conditions, an expansion instruction is generated according to the expansion strategy and sent to the temporary resource pool scheduling module;
[0015] A cluster expansion task list is generated based on the expansion instruction through the temporary resource pool scheduling module, and the soft load balancer corresponding to the temporary resource pool is started as the soft load balancer to be expanded.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a soft load balancing cluster expansion method described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a soft load balancing cluster expansion method described in any embodiment of the present invention when executed.
[0021] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the computer program implements a method for expanding a soft load balancing cluster according to any embodiment of the present invention.
[0022] The technical solution of the embodiment of the present invention can monitor the operating status of the soft load balancing cluster in real time through the soft load cluster management and control module, timely discover the busy situation of the cluster, and automatically generate expansion instructions according to preset expansion conditions and policies, thereby improving the accuracy and timeliness of expansion decisions. The temporary resource pool scheduling module can schedule the soft load balancer from the temporary resource pool for expansion, and can quickly expand the nodes of the soft load balancing cluster, and can carry the soft load balancing processing of a certain business flow without incorporating the newly expanded nodes into the original load balancer members, thereby achieving the effect of rapid expansion and immediate commissioning of the soft load balancing cluster, ensuring system stability when business suddenly increases, improving resource utilization efficiency and emergency efficiency, and minimizing business losses caused by server resource bottlenecks.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] 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.
[0025] Figure 1 This is a structural diagram of a soft load balancing cluster expansion system provided according to Embodiment 1 of the present invention;
[0026] Figure 2 is a structural diagram of another soft load balancing cluster expansion system provided according to the first embodiment of the present invention;
[0027] Figure 3 is a structural diagram of another soft load balancing cluster expansion system provided according to Embodiment 2 of the present invention;
[0028] Figure 4 This is a schematic diagram of a soft load balancing cluster expansion process for a transaction request provided in Embodiment 2 of the present invention;
[0029] Figure 5 This is a flow chart of a method for expanding a soft load balancing cluster provided according to Embodiment 3 of the present invention;
[0030] Figure 6 The present invention is a schematic diagram of the structure of an electronic device for implementing a soft load balancing cluster expansion method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only 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 should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1 A structural diagram of a soft load balancing cluster expansion system is provided for the first embodiment of the present invention. The system includes: a soft load cluster management and control module 110 and a temporary resource pool scheduling module 120 connected to the soft load cluster management and control module 110.
[0035] Optionally, the soft load cluster management and control module 110 is used to obtain the cluster busyness of the soft load balancing cluster, and obtain the expansion conditions and expansion strategies. When the cluster busyness reaches the expansion conditions, an expansion instruction is generated according to the expansion strategy, and the expansion instruction is sent to the temporary resource pool scheduling module 120; the temporary resource pool scheduling module 120 is used to generate a cluster expansion task list based on the expansion instruction, and start the soft load balancer corresponding to the temporary resource pool as the soft load balancer to be expanded.
[0036] Among them, the soft load cluster control module 110 is responsible for monitoring, managing and making relevant decisions on the overall operating status of the soft load balancing cluster, and plays a role in coordinating cluster resources and expansion processes. The soft load balancing cluster is a cluster composed of multiple servers or nodes. Through load balancing technology, incoming network traffic, task requests, etc. are reasonably distributed, so that the load of each node is relatively balanced, thereby improving the processing capacity and reliability of the entire cluster. Cluster busyness refers to an indicator used to measure the current busyness of the soft load balancing cluster. It can be determined by comprehensively calculating the resource usage of each node in the cluster, such as CPU usage, memory occupancy, number of connections, network bandwidth utilization, etc. Expansion conditions refer to some pre-set standards or thresholds. When the operating status of the soft load balancing cluster reaches the expansion condition, it indicates that the existing resources of the cluster may not be sufficient to meet the demand and expansion operations are required. For example, when the cluster busyness reaches 80%, the expansion condition is triggered. The expansion strategy includes but is not limited to how many nodes to add, how to allocate new resources, and in what order to expand. Exemplarily, the expansion strategy can be a step-by-step expansion strategy, such as expanding 1 unit when the cluster busyness reaches 80%, expanding 2 units when it reaches 90%, and redirecting a certain percentage of traffic of which load strategies to the new load strategy node after the expansion. When it is calculated that the cluster busyness reaches the set expansion condition, the soft load cluster control module 110 will generate an expansion instruction according to the established expansion strategy, and send the expansion instruction to the temporary resource pool scheduling module 120 to start the subsequent expansion process.
[0037] Specifically, the temporary resource pool scheduling module 120 is connected to the soft load cluster control module 110, and is mainly responsible for reasonably scheduling and arranging the resources in the temporary resource pool according to the expansion instruction sent by the soft load cluster control module 110 to complete the cluster expansion task. The temporary resource pool scheduling module 120 can generate a cluster expansion task list and start the corresponding soft load balancer and other operations to ensure that the newly added resources can be effectively integrated into the soft load balancing cluster.
[0038] Among them, the temporary resource pool is a resource collection that stores various types of resources that can be used for capacity expansion. When the cluster needs to be expanded, the resources therein can be deployed and used by the temporary resource pool scheduling module 120 to meet the needs of cluster expansion. The cluster expansion task list is a task list generated by the temporary resource pool scheduling module 120 based on the expansion instruction, which includes determining the number of soft load balancers to be expanded, synchronizing the load balancing strategy of the original cluster, activating the redirection mechanism of the original cluster soft load balancer, and sending the load balancing strategy and traffic ratio to be redirected to which new load balancer to be expanded. The soft load balancer to be expanded refers to the soft load balancer selected from the temporary resource pool. After the startup and related configuration operations of the temporary resource pool scheduling module 120, it will be connected to the soft load balancing cluster and take on the task of sharing the load, thereby realizing the expansion of the cluster.
[0039] Figure 2 A schematic diagram of the structure of a soft load balancing cluster expansion system is provided for the first embodiment of the present invention. Figure 2 The system also includes: a load balancing strategy synchronization module 130 connected to the soft load cluster management and control module 110 and the temporary resource pool scheduling module 120; a cluster performance monitoring module 140 and a capacity expansion strategy customization module 150 connected to the soft load cluster management and control module 110.
[0040] Optionally, the system also includes: a load balancing policy synchronization module 130 connected to the soft load cluster management and control module 110 and the temporary resource pool scheduling module 120; the temporary resource pool scheduling module 120 is used to generate a policy synchronization instruction based on the cluster expansion task list, and send the policy synchronization instruction to the load balancing policy synchronization module 130; the load balancing policy synchronization module 130 is used to synchronize the load balancing configuration of the original soft load balancing cluster to the soft load balancer to be expanded based on the policy synchronization instruction.
[0041] The load balancing strategy synchronization module 130 is used to ensure that the soft load balancer to be expanded has a load balancing configuration consistent with the original soft load balancing cluster, so as to achieve coordination and unification of the load balancing function of the entire cluster after expansion.
[0042] Specifically, after the temporary resource pool scheduling module 120 generates a cluster expansion task list based on the received expansion instruction, it will further analyze the various tasks in the task list and the overall expansion requirements. Since the soft load balancer to be expanded needs to be integrated into the original soft load balancing cluster and work together, it needs to have the same load balancing policy configuration. Therefore, the temporary resource pool scheduling module 120 will generate a policy synchronization instruction based on the relevant information of the soft load balancer to be expanded involved in the cluster expansion task list and the load balancing policy characteristics of the original cluster, and send the policy synchronization instruction to the load balancing policy synchronization module 130.
[0043] Furthermore, after receiving the policy synchronization instruction, the load balancing policy synchronization module 130 will parse the instruction to determine which specific load balancing configuration information needs to be obtained from the original soft load balancing cluster. After obtaining the load balancing configuration information of the original soft load balancing cluster, the load balancing policy synchronization module 130 will use relevant technical means and configuration interfaces to copy and apply the configuration information to the soft load balancer to be expanded.
[0044] Optionally, the system also includes: a cluster performance monitoring module 140 connected to the soft load cluster management and control module 110; the cluster performance monitoring module 140 is used to collect the load conditions and performance indicators of each soft load balancer in the soft load balancing cluster in real time, and calculate the cluster busyness based on the load conditions and performance indicators, and send the cluster busyness to the soft load cluster management and control module 110.
[0045] The cluster performance monitoring module 140 is used to timely and accurately transmit the collected and analyzed relevant data to the soft load cluster management and control module 110 so that the soft load cluster management and control module 110 can make relevant decisions on cluster expansion.
[0046] Specifically, the cluster performance monitoring module 140 will collect the load status of each soft load balancer from multiple dimensions. For example, the cluster performance monitoring module 140 will monitor the number of requests currently being processed by each soft load balancer, which can be determined by counting the number of request packets received and being processed within a specific time period. At the same time, it will also pay attention to the type distribution of requests, because different types of requests may consume resources to different degrees, such as data query requests and data write requests may occupy different CPU, memory and other resources. The cluster performance monitoring module 140 will also monitor the connection status between each soft load balancer and the back-end server, including the number of connections, the stability of the connection, etc. If the number of connections is too large and there are frequent interruptions or reconnections, it may mean that the load is too high or there is a problem with the network.
[0047] In addition, the cluster performance monitoring module 140 also collects key indicators such as CPU usage, memory occupancy, number of connections, and network bandwidth utilization. For example, the proportion of the running time of the soft load balancer process on the CPU to the total time can be obtained through the relevant interface or tool provided by the operating system to determine the busyness of the CPU.
[0048] Furthermore, after collecting the load conditions and performance indicators, the cluster performance monitoring module 140 will comprehensively calculate the cluster busyness. Specifically, it can be calculated by weighted average method, that is, different weights are assigned to different indicators. For example, since CPU usage and memory occupancy have a greater impact on the operation of the soft load balancer, they may be given higher weights, such as a weight of 0.3, while indicators such as network bandwidth utilization and number of requests may be given relatively low weights, such as a weight of 0.2. Finally, the actual value of each indicator is multiplied by the corresponding weight and added together to obtain the cluster busyness. The cluster busyness calculated by multi-dimensional comprehensive calculation can more comprehensively and accurately reflect the overall busy state of the soft load balancing cluster.
[0049] Optionally, the system also includes: an expansion strategy customization module 150 connected to the soft load cluster management and control module 110; the expansion strategy customization module 150 is used to obtain the expansion conditions and expansion strategies set by the user, and send the expansion conditions and expansion strategies to the soft load cluster management and control module 110.
[0050] The expansion strategy customization module 150 can provide a platform for users to independently set expansion conditions and expansion strategies, so as to meet the personalized needs of different users for expansion of the soft load balancing cluster in different application scenarios.
[0051] Specifically, users will set expansion conditions based on their own performance requirements for the soft load balancing cluster, business growth expectations, resource budgets and other factors. For example, based on the cluster load during previous business peak hours, users may set that when the cluster busyness reaches a certain specific value, such as 80% CPU usage or 70% memory occupancy, the cluster needs to be expanded. Users can also formulate expansion strategies based on business characteristics, resource allocation methods, and expected expansion effects. For example, users may want to increase the number of nodes according to a fixed number when expanding, such as adding 5 nodes each time, or increase the number of nodes proportionally according to the degree to which the cluster busyness exceeds the threshold, such as adding 2 nodes if it exceeds the threshold by 10%; adding 4 nodes if it exceeds the threshold by 20%, etc.
[0052] The technical solution of the embodiment of the present invention can monitor the operating status of the soft load balancing cluster in real time through the soft load cluster management and control module, timely discover the busy situation of the cluster, and automatically generate expansion instructions according to preset expansion conditions and policies, thereby improving the accuracy and timeliness of expansion decisions. The temporary resource pool scheduling module can schedule the soft load balancer from the temporary resource pool for expansion, and can quickly expand the nodes of the soft load balancing cluster, and can carry the soft load balancing processing of a certain business flow without incorporating the newly expanded nodes into the original load balancer members, thereby achieving the effect of rapid expansion and immediate commissioning of the soft load balancing cluster, ensuring system stability when business suddenly increases, improving resource utilization efficiency and emergency efficiency, and minimizing business losses caused by server resource bottlenecks.
[0053] Embodiment 2
[0054] Figure 3 A structural diagram of a soft load balancing cluster expansion system is provided for the second embodiment of the present invention. Figure 3 On the basis of the first embodiment, a request redirection module 160 and a redirection request processing module 170 are added.
[0055] Optionally, the system also includes: a request redirection module 160 connected to the temporary resource pool scheduling module 120; the temporary resource pool scheduling module 120 is used to generate a redirection control instruction based on the cluster expansion task list, and send the redirection control instruction to the request redirection module 160; the request redirection module 160 is used to obtain business requests, and extract a specified proportion of business requests from the business requests according to the redirection control instruction to generate packaged business.
[0056] When the temporary resource pool scheduling module 120 performs work according to the cluster expansion task list, it will comprehensively consider the requirements of the expansion task and the distribution of current business requests and other factors to generate a redirection instruction and send it to the request redirection module 160. The redirection control instruction includes which load balancing strategies to redirect, which new load balancer to redirect to, and what is the redirected traffic ratio.
[0057] Specifically, the request redirection module 160 is deployed on the load balancer in the original cluster, and can repackage a certain proportion of the service requests of a specific port according to the instruction and forward them to the newly expanded load balancer. That is, after receiving the redirection control instruction sent by the temporary resource pool scheduling module 120, the request redirection module 160 will extract a specified proportion of service requests from a large number of acquired service requests according to the requirements in the instruction to generate packaged services. By allocating a part of the service requests to the newly expanded soft load balancer for processing, a more reasonable service request allocation can be achieved, the overall processing efficiency of the cluster can be improved, and it can also help the newly expanded soft load balancer to gradually adapt to the service load and achieve a smooth transition.
[0058] Optionally, the system also includes: a redirection request processing module 170 connected to the request redirection module 160; the request redirection module 160 is also used to send the packaged service to the redirection request processing module 170; the redirection request processing module 170 is used to forward the packaged service to the corresponding back-end server, and receive the request response from the back-end server, convert the request response into a specified format and feed it back to the request redirection module 160.
[0059] The redirection request processing module 170 is connected to the request redirection module 160, and the request redirection module 160 can transmit the packaged service to the redirection request processing module 170. The redirection request processing module 170 is deployed on the newly expanded load balancer, and can parse the message according to the TCP protocol, forward the actual service request after receiving it, and package the response message into a TCP message after receiving the request response and return it by the original route.
[0060] Specifically, after receiving the packaged service, the redirection request processing module 170 will determine which backend server to forward to based on the relevant information contained in the packaged service, such as the type of service request, the target server identifier, etc. The redirection request processing module 170 will perform network addressing, establish connections, and other operations to ensure that the packaged service can smoothly reach the correct backend server. After receiving the packaged service forwarded by the redirection request processing module 170, the backend server will process it and generate a corresponding request response. The redirection request processing module 170 will maintain a listening state through the previously established network connection so as to receive the request response returned by the backend server in a timely manner. After receiving the request response from the backend server, the redirection request processing module 170 will convert the request response into a specified format and feedback it along the original path.
[0061] Specific application scenarios: Figure 4A schematic diagram of a soft load balancing cluster expansion process for transaction requests is provided for Embodiment 2 of the present invention, which includes a soft load balancing cluster expansion system 101 for transaction requests, a cluster performance monitoring module 102, an expansion strategy customization module 103, a soft load cluster management and control module 104, a temporary resource pool scheduling module 105, a load balancing strategy synchronization module 106, a request redirection module 107, and a redirection request processing module 108. Figure 4 The overall implementation principle is: maintain a certain number of temporary load balancer resource pools for temporary expansion. When a specific cluster needs to be expanded, the new load balancer is quickly equipped through resource scheduling and configuration synchronization. At the same time, by starting the redirection module on the original load balancer of the cluster, a certain proportion of business requests are packaged as TCP protocol messages and redirected to the new load balancer. The new load balancer unpacks and forwards according to the load strategy, and receives the response result and returns it on the original path, thereby achieving the effect of transferring the computing power load of the soft load balancing to the new node, thereby realizing the rapid expansion of the soft load cluster and avoiding the overall resource bottleneck problem of the cluster.
[0062] Among them, the cluster performance monitoring module 102: collects the traffic data and overall performance indicators of each load balancer in the cluster, counts the number of requests, inbound and outbound traffic, response time and other data of each load strategy and sorts them according to the consumed server resources. Expansion strategy customization module 103: customizes the step-by-step expansion strategy of the soft load cluster, such as expanding 1 unit when the cluster busyness reaches 80%, expanding 2 units when it reaches 90%, and redirecting which load strategies and what percentage of traffic to the new load strategy node after expansion. Soft load cluster management and control module 104: integrates the statistical data collected by the expansion strategy customization module 103 and the cluster performance monitoring module 102, regularly calculates whether there is a cluster that needs to be expanded, and if expansion is required, sends the expansion instruction to the temporary resource pool scheduling module 105. Temporary resource pool scheduling module 105: According to the instructions issued by the soft load cluster control module 104, a cluster expansion task list is generated, including determining the number of soft load balancers to be expanded, synchronizing the load balancing strategy of the original cluster, activating the redirection mechanism of the original cluster soft load balancer, and sending the load balancing strategy and traffic ratio to be redirected to which newly expanded load balancer, etc. Load balancing strategy synchronization module 106: According to the instructions issued by the temporary resource pool scheduling module 105, the load balancing configuration of the original cluster is synchronized to the soft load balancer to be expanded. Request redirection module 107: This module is installed in the soft load balancer of the original cluster and is controlled by the temporary resource pool scheduling module 105. The control instructions include which load balancing strategies to redirect, which new load balancer to redirect to, and what the redirected traffic ratio is. Redirection request processing module 108: This module is installed in the newly expanded soft load balancer to parse the TCP message packaged and forwarded by the original cluster node, and forward the service request therein to the corresponding backend server, and receive the response message to repackage and return it.
[0063] The technical solution of the embodiment of the present invention can accurately control the redirection strategy of business requests through the temporary resource pool scheduling module to ensure the reasonable allocation of resources. The request redirection module can be used to select some business requests for processing in a targeted manner, thereby improving processing efficiency. The business request is forwarded to the back-end server through the redirection request processing module and the request response is received and returned along the original path, thereby achieving the effect of transferring the computing power load of the soft load balancing to the new node, thereby realizing the rapid expansion of the soft load cluster and avoiding the resource bottleneck problem of the entire cluster.
[0064] Embodiment 3
[0065] Figure 5 A flowchart of a method for expanding a soft load balancing cluster is provided for the third embodiment of the present invention. This embodiment is applicable to the scenario of hardware-in-the-loop fault injection testing of hybrid motors. Figure 5 As shown, the method includes:
[0066] S310. Obtain the cluster busyness of the soft load balancing cluster through the soft load cluster management and control module, and obtain the expansion conditions and expansion strategy. When the cluster busyness reaches the expansion condition, generate an expansion instruction according to the expansion strategy, and send the expansion instruction to the temporary resource pool scheduling module.
[0067] Among them, the soft load cluster control module is responsible for monitoring, managing and making relevant decisions on the overall operation status of the soft load balancing cluster, and plays a role in coordinating cluster resources and expansion processes. The soft load balancing cluster is a cluster composed of multiple servers or nodes. Through load balancing technology, it reasonably distributes incoming network traffic, task requests, etc., so that the load of each node is relatively balanced, thereby improving the processing capacity and reliability of the entire cluster. Cluster busyness refers to an indicator used to measure the current busyness of the soft load balancing cluster. It can be determined by comprehensively calculating the resource usage of each node in the cluster, such as CPU usage, memory occupancy, number of connections, network bandwidth utilization, etc. Expansion conditions refer to some pre-set standards or thresholds. When the operating status of the soft load balancing cluster reaches the expansion condition, it indicates that the existing resources of the cluster may not be sufficient to meet the demand and expansion operations are required. For example, when the cluster busyness reaches 80%, the expansion condition is triggered. Expansion strategies include but are not limited to how many nodes to add, how to allocate new resources, and in what order to expand. Exemplarily, the expansion strategy can be a step-by-step expansion strategy, such as expanding 1 unit when the cluster busyness reaches 80%, expanding 2 units when it reaches 90%, and redirecting a certain percentage of traffic of which load strategies to the new load strategy node after the expansion. When it is calculated that the cluster busyness reaches the set expansion condition, the soft load cluster control module will generate an expansion instruction according to the established expansion strategy, and send the expansion instruction to the temporary resource pool scheduling module to start the subsequent expansion process.
[0068] S320. Generate a cluster expansion task list based on the expansion instruction through the temporary resource pool scheduling module, and start the soft load balancer corresponding to the temporary resource pool as the soft load balancer to be expanded.
[0069] Specifically, the temporary resource pool scheduling module is connected to the soft load cluster control module, and is mainly responsible for reasonably scheduling and arranging the resources in the temporary resource pool according to the expansion instructions sent by the soft load cluster control module to complete the cluster expansion task. The temporary resource pool scheduling module can generate a cluster expansion task list and start the corresponding soft load balancer and other operations to ensure that the newly added resources can be effectively integrated into the soft load balancing cluster.
[0070] Among them, the temporary resource pool is a resource collection that stores various resources that can be used for capacity expansion. When the cluster needs to be expanded, the resources in it can be allocated and used by the temporary resource pool scheduling module to meet the needs of cluster expansion. The cluster expansion task list is a task list generated by the temporary resource pool scheduling module based on the expansion instruction, which includes determining the number of soft load balancers to be expanded, synchronizing the load balancing strategy of the original cluster, activating the redirection mechanism of the original cluster soft load balancer, and sending the load balancing strategy and traffic ratio to be redirected to which new load balancer to be expanded. The soft load balancer to be expanded refers to the soft load balancer selected from the temporary resource pool. After the temporary resource pool scheduling module is started and related configuration operations are performed, it will be connected to the soft load balancing cluster and take on the task of sharing the load, thereby realizing cluster expansion.
[0071] The technical solution of the embodiment of the present invention can monitor the operating status of the soft load balancing cluster in real time through the soft load cluster management and control module, timely discover the busy situation of the cluster, and automatically generate expansion instructions according to preset expansion conditions and policies, thereby improving the accuracy and timeliness of expansion decisions. The temporary resource pool scheduling module can schedule the soft load balancer from the temporary resource pool for expansion, and can quickly expand the nodes of the soft load balancing cluster, and can carry the soft load balancing processing of a certain business flow without incorporating the newly expanded nodes into the original load balancer members, thereby achieving the effect of rapid expansion and immediate commissioning of the soft load balancing cluster, ensuring system stability when business suddenly increases, improving resource utilization efficiency and emergency efficiency, and minimizing business losses caused by server resource bottlenecks.
[0072] Embodiment 4
[0073] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0074] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0075] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0076] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a soft load balancing cluster expansion method.
[0077] In some embodiments, a method for expanding the capacity of a soft load balancing cluster may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for expanding the capacity of a soft load balancing cluster described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a method for expanding the capacity of a soft load balancing cluster in any other appropriate manner (e.g., by means of firmware).
[0078] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0079] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0080] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0081] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0082] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0083] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0084] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0085] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A soft load balancing cluster expansion system, characterized in that: include: A soft load cluster control module, and a temporary resource pool scheduling module connected to the soft load cluster control module; The soft load cluster control module is used to obtain the cluster busyness of the soft load balancing cluster, and obtain the expansion condition and expansion strategy. When the cluster busyness reaches the expansion condition, an expansion instruction is generated according to the expansion strategy, and the expansion instruction is sent to the temporary resource pool scheduling module; The temporary resource pool scheduling module is used to generate a cluster expansion task list based on the expansion instruction, and start the soft load balancer corresponding to the temporary resource pool as the soft load balancer to be expanded.
2. The system according to claim 1, characterized in that The system further comprises: a load balancing strategy synchronization module connected to the soft load cluster management and control module and the temporary resource pool scheduling module; The temporary resource pool scheduling module is used to generate a policy synchronization instruction according to the cluster expansion task list, and send the policy synchronization instruction to the load balancing policy synchronization module; The load balancing policy synchronization module is used to synchronize the load balancing configuration of the original soft load balancing cluster to the soft load balancer to be expanded based on the policy synchronization instruction.
3. The system according to claim 1, characterized in that The system further comprises: a cluster performance monitoring module connected to the soft load cluster management and control module; The cluster performance monitoring module is used to collect the load conditions and performance indicators of each soft load balancer in the soft load balancing cluster in real time, calculate the cluster busyness according to the load conditions and performance indicators, and send the cluster busyness to the soft load cluster management and control module.
4. The system according to claim 1, characterized in that The system further comprises: a capacity expansion strategy customization module connected to the soft load cluster management and control module; The expansion strategy customization module is used to obtain the expansion conditions and expansion strategies set by the user, and send the expansion conditions and the expansion strategies to the soft load cluster management and control module.
5. The system according to claim 1, characterized in that The system further comprises: a request redirection module connected to the temporary resource pool scheduling module; The temporary resource pool scheduling module is used to generate a redirection control instruction according to the cluster expansion task list, and send the redirection control instruction to the request redirection module; The request redirection module is used to obtain service requests and extract a specified proportion of service requests from the service requests according to the redirection control instruction to generate packaged services.
6. The system according to claim 5, characterized in that The system further comprises: a redirection request processing module connected to the request redirection module; The request redirection module is further used to send the packaged service to the redirection request processing module; The redirection request processing module is used to forward the packaging service to the corresponding back-end server, receive the request response from the back-end server, convert the request response into a specified format and feed it back to the request redirection module.
7. A method for expanding a soft load balancing cluster, characterized in that: A soft load balancing cluster expansion system as described in any one of claims 1 to 6, comprising: The cluster busyness of the soft load balancing cluster is obtained through the soft load cluster management and control module, and the expansion condition and expansion strategy are obtained. When the cluster busyness reaches the expansion condition, an expansion instruction is generated according to the expansion strategy, and the expansion instruction is sent to the temporary resource pool scheduling module; A cluster expansion task list is generated based on the expansion instruction through a temporary resource pool scheduling module, and a soft load balancer corresponding to the temporary resource pool is started as a soft load balancer to be expanded.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, wherein the computer program is executed by the at least one processor so as to enable the at least one processor to perform the method of claim 7.
9. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and the computer instructions are used to implement the method described in claim 7 when the processor executes the instructions.
10. A computer program product, characterized in that The computer program product comprises a computer program which, when executed by a processor, implements the method according to claim 7.
Citation Information
Cited By
Decentralized database management system
US20260187100A1