Load balancing algorithm system of server cluster
By designing a load balancing algorithm system that integrates modules such as priority management, resource monitoring, load allocation, collaborative communication and cost evaluation, the problem of large-scale process algorithms running in designated order under multiple load balancing is solved, and efficient resource utilization and cost-effective optimization are achieved.
Patent Information
- Application Number
- CN202510156317.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-06-27
AI Technical Summary
The existing load balancing algorithms are difficult to split large process algorithms and run in designated orders under multiple load balancing, resulting in inefficiency in the system and waste of resources, which cannot meet the needs of complex business scenarios.
Design a load balancing algorithm system for server clusters, including priority management module, resource monitoring module, load allocation module, collaborative communication module, cost evaluation module and large-scale process algorithm split and sequential execution module. Through the coordinated work of these modules, the split and sequential execution of large-scale process algorithms can be realized.
It realizes that large-scale process algorithms operate in designated orders under multiple load balancing, improves the system's ability to handle complex business, improves resource utilization, system performance and cost-effectiveness, and enhances the load balancing effect and reliability of server clusters.
Smart Images

Figure CN120216164A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer server clusters, and particularly to a load balancing algorithm system for a server cluster. Background Art
[0002] With the rapid development of Internet technology, server clusters are widely used in various large-scale application systems to meet the growing business needs. In a server cluster environment, load balancing becomes a key technology, which can reasonably allocate service requests and improve system resource utilization and service quality. However, existing load balancing algorithms often have difficulty in splitting large process algorithms and making them run in a specified order under multiple load balancers when dealing with large process algorithms, resulting in low system efficiency, resource waste, and inability to meet the requirements of complex business scenarios. Summary of the Invention
[0003] The purpose of the present invention is to provide a load balancing algorithm system for a server cluster, which can effectively split large process algorithms and make them run in a specified order under multiple load balancers. At the same time, by combining various algorithms such as business priority, resource adaptation, distributed cooperation, and cost-benefit optimization, the overall performance, resource utilization, and cost-benefit of the system are improved.
[0004] To achieve the above object of the invention, the technical solution adopted by the present invention is as follows:
[0005] A load balancing algorithm system for a server cluster, comprising: a priority management module: used to set priority weights for different business applications and adjust the priority in real time according to changes in business types and requirements;
[0006] A resource monitoring module: to monitor the resource status of the server in real time, such as CPU usage, memory usage, network bandwidth, etc., and at the same time monitor the resource requirements of business applications;
[0007] A load distribution module: combining business priority and resource adaptation algorithms, distributed cooperation load balancing algorithms, and cost-benefit optimization algorithms to perform load distribution on service requests;
[0008] A collaborative communication module: using a reliable message passing protocol to implement message passing between server nodes and ensure the stable operation of the distributed cooperation mechanism;
[0009] A cost evaluation module: to perform real-time evaluation and analysis on the operating costs of the server, such as energy consumption cost, hardware purchase cost, cloud service lease cost, etc., and provide cost data basis for the load distribution module;
[0010] A large process algorithm splitting and sequential execution module: including a process splitting unit, a sequential arrangement unit, and a load balancing execution unit.
[0011] As an improvement, the algorithm based on service priority and resource adaptation is as follows: Set priority weights for different business applications. When allocating loads, preferentially allocate high-priority services to high-performance and stable servers to ensure that their quality of service requirements can be met. According to the resource characteristics of the servers, such as the richness of memory resources, CPU performance, etc., and the resource requirements of the applications, allocate memory-intensive applications to servers with rich memory resources and allocate compute-intensive applications to servers with strong CPU performance.
[0012] As an improvement, the steps of the distributed cooperative load balancing algorithm are as follows: Server nodes have load perception and decision-making capabilities, and nodes communicate and cooperate with each other through a message passing protocol. When the load of a server node reaches a specific proportion (such as 80%) of the preset threshold (the preset threshold is 90%), it sends a request for assistance signal to surrounding nodes, and the surrounding nodes negotiate to share the load according to their own load conditions and resource availability.
[0013] As an improvement, the steps of the cost-benefit optimization algorithm are as follows: During the load balancing allocation process, comprehensively consider operating cost factors such as the energy consumption cost, hardware purchase cost, and cloud service lease cost of the server cluster. On the premise of meeting the quality of service requirements, preferentially allocate requests to servers with lower energy consumption during low-load periods, appropriately allocate non-critical services to cloud service instances with lower costs, and keep critical services on local high-performance servers to pursue the maximization of cost-benefit.
[0014] As an improvement, the process splitting unit: Conduct a detailed analysis of large process algorithms. According to their functions and data dependencies, split them into multiple relatively independent sub-processes with clear functions, and define a unique identifier for each sub-process.
[0015] As an improvement, the sequence arrangement unit: Establish a process execution sequence list. According to the dependency relationship and logical order between sub-processes, add sub-processes to the list in a predetermined order, and be responsible for maintaining and updating the list. According to changes in business requirements or system performance feedback, dynamically adjust the execution order of sub-processes without destroying the logical dependency relationship between sub-processes.
[0016] As an improvement, the load balancing execution unit: combines a priority management module, a resource monitoring module, a load distribution module, a collaborative communication module, and a cost evaluation module, allocates resources and server nodes for each sub-process, and ensures execution in the order set by the sequence arrangement unit; before the sub-process starts to execute, according to its business priority and resource requirements, uses the priority management module to allocate priority weights; the resource monitoring module monitors the server resource status and business application resource requirements in real time, and allocates the sub-process to a suitable server node; during the execution process, the load distribution module combines the distributed collaborative load balancing algorithm to ensure reasonable load distribution, and the cost evaluation module evaluates the cost in real time and makes distribution adjustments according to the cost-benefit optimization algorithm; after the sub-process is completed, it notifies the sequence arrangement unit through the collaborative communication module to start the next sub-process until all sub-processes are completed.
[0017] The beneficial effects of the present invention are as follows: By reasonably splitting the large-scale process algorithm and arranging it in sequence, the present invention realizes its operation in multiple load balancings in a specified order, improving the system's ability to process complex services; at the same time, by comprehensively applying algorithms such as business priority, resource adaptation, distributed collaboration, and cost-benefit optimization, it effectively improves resource utilization, system performance, and cost-benefit, enhances the load balancing effect and reliability of the server cluster, and the distributed collaboration mechanism avoids single-point failures, can quickly respond to local load changes, and improves the stability and availability of the cluster. Description of the Drawings
[0018] Figure 1 It is a block diagram of a load balancing algorithm system for a server cluster of the present invention. Detailed Embodiments
[0019] As Figure 1 shown, a load balancing algorithm system for a server cluster includes a priority management module: used to set priority weights for different business applications and adjust the priorities in real time according to changes in business types and requirements;
[0020] A resource monitoring module: monitors the resource status such as CPU usage, memory usage, and network bandwidth of the server in real time, and at the same time monitors the resource requirements of business applications;
[0021] A load distribution module: combines business priority and resource adaptation algorithms, distributed collaborative load balancing algorithms, and cost-benefit optimization algorithms to perform load distribution on business requests;
[0022] A collaborative communication module: adopts a reliable message passing protocol to realize message passing between server nodes and ensure the stable operation of the distributed collaboration mechanism;
[0023] Cost Evaluation Module: It conducts real-time evaluation and analysis on operation costs such as the energy consumption cost, hardware acquisition cost, and cloud service leasing cost of the server, providing cost data basis for the Load Allocation Module.
[0024] Large Process Algorithm Splitting and Sequential Execution Module: It includes a process splitting unit, a sequential orchestration unit, and a load balancing execution unit. The process splitting unit: conducts a detailed analysis on the large process algorithm, and according to its functions and data dependencies, splits it into multiple relatively independent sub-processes with clear functions, and defines a unique identifier for each sub-process; the sequential orchestration unit: establishes a process execution order list, and according to the dependencies and logical order between sub-processes, adds the sub-processes to the list in a predetermined order, and is responsible for maintaining and updating the list, dynamically adjusting the execution order of sub-processes according to changes in business requirements or system performance feedback, and not destroying the logical dependencies between sub-processes; the load balancing execution unit: combines the Priority Management Module, the Resource Monitoring Module, the Load Allocation Module, the Collaborative Communication Module, and the Cost Evaluation Module, allocates resources and server nodes for each sub-process, and ensures that they are executed in the order set by the sequential orchestration unit; before a sub-process starts to execute, according to its business priority and resource requirements, uses the Priority Management Module to allocate priority weights; the Resource Monitoring Module monitors the server resource status and business application resource requirements in real time, and allocates the sub-processes to appropriate server nodes; during the execution process, the Load Allocation Module combines the distributed collaborative load balancing algorithm to ensure reasonable load distribution, and the Cost Evaluation Module evaluates the cost in real time and conducts allocation adjustment according to the cost-benefit optimization algorithm; after a sub-process is completed, it notifies the sequential orchestration unit through the Collaborative Communication Module to start the next sub-process until all sub-processes are completed.
[0025] The algorithm based on business priority and resource adaptation is as follows: Set priority weights for different business applications. When allocating loads, give priority to allocating high-priority services to high-performance and stable servers to ensure that they can meet the service quality requirements of high-priority services; according to the resource characteristics of the servers, such as the richness of memory resources, CPU performance, etc., and the resource requirements of the applications, allocate memory-intensive applications to servers with rich memory resources, and allocate compute-intensive applications to servers with strong CPU performance.
[0026] The distributed collaborative load balancing algorithm is as follows: Server nodes have load awareness and decision-making capabilities, and nodes communicate and cooperate with each other through a message passing protocol; when the load of a server node reaches a specific proportion (such as 80%) of the preset threshold (the preset threshold is 90%), it sends a request for assistance signal to the surrounding nodes, and the surrounding nodes negotiate to share the load according to their own load conditions and resource availability.
[0027] The steps of the cost-benefit optimization algorithm are as follows: During the load balancing distribution process, comprehensively consider operating cost factors such as the energy consumption cost, hardware acquisition cost, and cloud service leasing cost of the server cluster; on the premise of meeting the service quality requirements, preferentially allocate requests to servers with lower energy consumption during low-load periods, appropriately allocate non-critical services to cloud service instances with lower costs, and keep critical services on local high-performance servers to pursue the maximization of cost-benefit.
[0028] The present invention also employs virtual algorithms, including details of dynamic resource allocation and recycling: elaborates on how virtual resources are dynamically allocated and recycled according to the changing resource requirements of business applications in a virtual computing environment. When the resource requirements of a business application increase, additional virtual resources can be quickly allocated from the resource pool; when the application is finished using, the resources are promptly recycled for reallocation. This not only enriches the dynamic process of resource management in virtual computing but also reflects the efficient utilization of resources by the system, ensuring that resources are not left idle and wasted and can meet business requirements in a timely manner; the principle of abstract management of virtual resources: introduces how hardware resources such as the CPU, memory, and storage of a server are virtualized into virtual resources that can be flexibly allocated to different business applications through virtualization software. For example, how to allocate a specific number of virtual CPU cores and virtual memory size to a virtual machine according to business requirements when creating a virtual machine. This makes the implementation method of hardware resource virtualization in virtual computing clearer and highlights the unified management ability of the system for hardware resources;
[0029] Microservices and micro-container technologies: Priority management in the microservices architecture: explains how the priority management module in the microservices architecture accurately identifies the business importance of each microservice. In addition to setting priority weights based on business types and requirements, it also considers the call relationships between microservices and the continuity of the business process to comprehensively adjust the priorities, ensuring that critical services are processed first and the efficient operation of the entire business process. This emphasizes the collaboration between microservices and the complexity and importance of priority management in the microservices architecture; Resource monitoring of microservices in micro-containers: mentions using container orchestration tools to deeply monitor the resource usage of microservices in micro-containers and accurately obtain the resource usage patterns of each microservice in a virtual environment. This not only reflects the application of micro-container technology in microservice resource management but also provides more detailed data support for load distribution; Load distribution based on the principle of high cohesion and low coupling: elaborates on how the load distribution module operates according to the characteristics of microservices and the resource occupancy of micro-containers, following the principle of high cohesion and low coupling when allocating business requests. That is, try to allocate closely related microservices to similar resources to reduce network transmission overhead, and at the same time avoid excessive coupling between unrelated microservices, optimizing the system architecture and improving system performance;
[0030] High cohesion and low coupling structure: Data support for judging the coupling degree of microservices. The resource monitoring module newly monitors the data interaction volume between microservices, providing data support for judging the coupling degree between microservices, so as to optimize the system structure. This provides a quantitative analysis method for constructing a high cohesion and low coupling structure, helping to discover and solve unreasonable coupling problems that may exist between microservices; Embodiments of high cohesion and low coupling in each module: In the priority management module, the priority is adjusted by considering the microservice call relationship and the continuity of the business process, avoiding unnecessary coupling between microservices caused by unreasonable priority settings; In the load distribution module, resources are allocated based on the principle of high cohesion and low coupling, optimizing the system structure from the perspective of resource allocation, enhancing the cohesion of microservices, and reducing the coupling degree, so that the high cohesion and low coupling structure can be reflected and strengthened in different links of system operation.
[0031] When in use, first, through the priority management module, according to the importance and real-time requirements of the business, set the initial priority weights for different business applications. Through the resource monitoring module, deploy a resource monitoring program on the server, start the regular collection of resource status such as the CPU usage rate, memory usage, and network bandwidth of the server, and start analyzing the resource demand patterns of business applications. Through the cost assessment module, establish a cost model, comprehensively consider the server energy consumption cost, hardware purchase cost, and cloud service rental cost, and initialize the cost data collection work;
[0032] When a business request arrives or a large process algorithm is started, the system begins to work;
[0033] The large process algorithm splitting and sequential execution module conducts a detailed analysis of the large process algorithm, splits it into multiple relatively independent and clearly defined sub-processes according to the function and data dependency relationship, and defines a unique identifier for each sub-process. For example, split the complex order processing process into sub-processes such as order reception, order verification, inventory query, payment processing, and order delivery, and assign identifiers such as "OR-001"; According to the dependency relationship and logical order between sub-processes, add the sub-processes to the process execution order list. For example, the order of the order processing process is order reception, order verification, inventory query, payment processing, and order delivery. This module is responsible for maintaining and updating the list, and can dynamically adjust the execution order of sub-processes according to changes in business requirements or system performance feedback, but ensure that the logical dependency relationship is not damaged;
[0034] Through the priority management module, the priority weights of business applications are adjusted in real time according to the business type and demand changes; through the resource monitoring module, the server resource status data is collected in real time, and at the same time, the resource demand patterns of business applications are determined to judge which applications are memory-intensive, which are computing-intensive, etc.; through the cost assessment module, information such as server energy consumption data, hardware purchase costs, and cloud service lease fees is collected in real time, the cost data is updated regularly, and provided to the load distribution module;
[0035] According to the priority weights set by the priority management module, the load distribution module preferentially allocates high-priority business requests or sub-processes to high-performance and stable servers; for memory-intensive business applications or sub-processes, query the data of the resource monitoring module and allocate them to servers with a memory usage rate lower than 60% and a larger total memory; for computing-intensive ones, allocate them to servers with a CPU usage rate lower than 70%, more CPU cores, and a higher main frequency. For example, the order verification sub-process is computing-intensive and is allocated to a server with strong CPU performance;
[0036] Each server node regularly monitors its own load. When the load reaches the threshold, it broadcasts a request for assistance signal to the surrounding nodes; after receiving the signal, the surrounding nodes check their own load conditions and resource availability. If a certain node has a load lower than 50% and has idle CPU cores and memory space, it responds to the request and negotiates with the node sending the signal to share the load, and migrates some tasks to this node for execution. For example, when the server where the payment processing sub-process is located has too high a load, the surrounding nodes assist in sharing some payment processing tasks;
[0037] During low-load periods, according to the cost-benefit optimization algorithm, the load distribution module preferentially allocates non-critical business or sub-processes to old and low-energy-consuming servers, and for business or sub-processes with non-real-time requirements, allocates them to cloud service instances with lower costs. Critical businesses are always retained on local high-performance servers;
[0038] Through the collaborative communication module, using the TCP / IP protocol combined with the message queue technology, reliable message transmission between server nodes is achieved. During the distributed collaborative load balancing process, server nodes send and receive request assistance signals, load information, etc. through the message queue. During the execution of large process algorithms, after a sub-process is completed, it notifies the sequence orchestration module through the message queue. For example, after the order reception sub-process is completed, it sends a completion message to the sequence orchestration module through the collaborative communication module;
[0039] Through the sequence orchestration unit, after receiving the sub-process completion message, it starts the next sub-process according to the process execution sequence list. This cycle continues until all sub-processes are completed, realizing the operation of large process algorithms in multiple load balancings in the specified order and completing the entire business processing.
[0040] The above are only the preferred embodiments of the present invention patent, and are not intended to limit the present invention patent. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention patent shall be included within the protection scope of the present invention patent.
Claims
1. A load balancing algorithm system for a server cluster, characterized in that: Including, priority management module: used to set priority weights for different business applications, and adjust the priority in real time according to changes in business types and needs; Resource monitoring module: real-time monitoring of server CPU usage, memory usage, network bandwidth and other resource status, while monitoring the resource requirements of business applications; Load distribution module: It distributes the load of business requests by combining business priority and resource adaptation algorithm, distributed collaborative load balancing algorithm and cost-effectiveness optimization algorithm; Collaborative communication module: adopts a reliable message transmission protocol to realize message transmission between server nodes and ensure the stable operation of the distributed collaboration mechanism; Cost assessment module: conducts real-time assessment and analysis of server energy consumption costs, hardware purchase costs, cloud service rental costs and other operating costs, providing cost data basis for the load distribution module; Large process algorithm splitting and sequential execution module: includes process splitting unit, sequential orchestration unit and load balancing execution unit.
2. A server cluster load balancing algorithm system according to claim 1, characterized in that: The algorithm steps based on business priority and resource adaptation are as follows: set priority weights for different business applications, and when distributing loads, prioritize high-priority businesses to high-performance and stable servers to ensure that they can meet the service quality requirements of high-priority businesses; based on the resource characteristics of the server, such as the richness of memory resources, CPU performance, etc., as well as the resource requirements of the application, memory-intensive applications are allocated to servers with rich memory resources, and computing-intensive applications are allocated to servers with strong CPU performance.
3. A server cluster load balancing algorithm system according to claim 1, characterized in that: The steps of the distributed collaborative load balancing algorithm are as follows: the server nodes have load perception and decision-making capabilities, and the nodes communicate and collaborate with each other through a message passing protocol; when the load of a server node reaches a specific proportion of a preset threshold (such as 80%, the preset threshold is 90%), a request for assistance signal is sent to the surrounding nodes, and the surrounding nodes negotiate to share the load based on their own load conditions and resource availability.
4. A server cluster load balancing algorithm system according to claim 1, characterized in that: The steps of the cost-effectiveness optimization algorithm are as follows: in the process of load balancing distribution, the energy consumption cost of the server cluster, the hardware purchase cost, the cloud service rental cost and other operating cost factors are fully considered; under the premise of meeting the service quality requirements, requests are preferentially allocated to servers with lower energy consumption during low-load periods, non-critical businesses are appropriately allocated to lower-cost cloud service instances, and critical businesses are retained on local high-performance servers in order to maximize cost-effectiveness.
5. The load balancing algorithm system for a server cluster according to claim 1, characterized in that: The process splitting unit: performs a detailed analysis on a large process algorithm, splits it into multiple relatively independent sub-processes with clear functions according to its functions and data dependencies, and defines a unique identifier for each sub-process.
6. A server cluster load balancing algorithm system according to claim 1, characterized in that: The sequence scheduling unit: establishes a process execution sequence list, adds sub-processes to the list in a predetermined order according to the dependencies and logical sequence between sub-processes, and is responsible for maintaining and updating the list, dynamically adjusting the sub-process execution sequence according to changes in business requirements or system performance feedback without destroying the logical dependencies between sub-processes.
7. A server cluster load balancing algorithm system according to claim 1, characterized in that: The load balancing execution unit: combines the priority management module, resource monitoring module, load distribution module, collaborative communication module and cost evaluation module to allocate resources and server nodes to each sub-process, and ensures execution in the order set by the sequential scheduling unit; before the sub-process starts execution, the priority management module is used to allocate priority weights according to its business priority and resource requirements; the resource monitoring module monitors the server resource status and business application resource requirements in real time, and allocates the sub-process to the appropriate server node; during the execution process, the load distribution module combines the distributed collaborative load balancing algorithm to ensure reasonable load distribution, and the cost evaluation module evaluates the cost in real time and makes allocation adjustments based on the cost-effectiveness optimization algorithm; after the sub-process is completed, the sequential scheduling unit is notified through the collaborative communication module to start the next sub-process until all sub-processes are completed.
Citation Information
Cited By
Energy-saving server cluster management system based on distributed architecture
CN120821582A
Main Monitor service pressure optimization method in distributed storage cluster
CN121037377A