Load balancing method for realizing remote synchronization of backup system under distributed cluster
By adopting load balancing methods and multi-node deployment in distributed clusters, the high cost and inefficient performance problems of remote synchronization technology in large data volume scenarios are solved, horizontal expansion and automatic failover of remote synchronization are achieved, and the system is improved. The stability and reliability meet the efficiency and business continuity needs of small and medium-sized enterprises.
Patent Information
- Application Number
- CN202410795238.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-01
AI Technical Summary
Existing off-site synchronization technology has problems such as high cost, inefficient performance and fragile fault tolerance in large data volume scenarios. It cannot meet the efficiency and timeliness needs of small and medium-sized enterprises, and cannot realize automatic switching when a fault occurs, affecting business continuity. sex and stability.
Adopting the load balancing method under the distributed cluster, through the load balancing algorithm and multi-node deployment, it realizes the horizontal expansion and automatic fault transfer of the remote synchronization. It combines the pipeline network communication detection and the heartbeat detection of the synchronization task to dynamically allocate tasks to optimize the utilization of network and CPU resources. , to ensure system stability and reliability.
Significantly improves remote synchronization performance, reduces server configuration requirements, achieves concurrent synchronization of large data volumes and 24-hour timeliness, enhances system stability and reliability, ensures business continuity and availability, and reduces maintenance costs.
Smart Images

Figure CN118733261A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data backup, and in particular to a load balancing method for realizing remote synchronization of a backup system in a distributed cluster. Background Art
[0002] In the modern information society, data has become an important asset for enterprises and organizations. With the rapid development of Internet technology and big data technology, the amount of data in enterprises and organizations is also growing rapidly. In order to ensure the security, availability and consistency of data, remote synchronization technology is widely used in fields such as data backup and disaster recovery.
[0003] Remote synchronization, also known as "remote replication", is a process of maintaining data consistency between different geographical locations in real time or on a scheduled basis over a network connection. The process involves transferring data from one location to another to ensure that copies of data in multiple locations remain synchronized and the system presents a consistent view at each location.
[0004] Improving remote synchronization performance usually requires continuous improvement of the server's CPU and memory configuration, which requires high investment and operating costs, making it difficult for small and medium-sized enterprises to afford it. The current backup service mainly provides remote synchronization capabilities on a single node. Although the synchronization performance has been improved, the horizontal expansion capability is weak and the vertical expansion cost is high. In large data volume scenarios, the data throughput capacity is limited. As the scale of user business expands, it can no longer meet the urgent needs for efficiency and timeliness. In addition, when the backup service fails, such as when one of the servers loses power or the Internet, the overall remote synchronization service will be seriously affected and it will not be able to automatically switch to the normal node to continue to provide remote synchronization services, which poses a potential threat to business continuity and stability.
[0005] Most of the existing solutions use asynchronous methods to improve synchronization performance, or reduce the size of incremental data to indirectly improve synchronization performance. These have threshold upper limits and cannot meet the needs of large data volume scenarios. For example, the invention patent with publication number CN115576911A and the name "A distributed file storage asynchronous remote replication method and device" uses a multi-level difference record method to record differences in detail. While consuming fewer resources, it can meet the needs of asynchronous remote replication of file storage in different scenarios and scales. Although it can indirectly improve the transmission performance of remote synchronization to a certain extent, it is still limited to optimizing a single node at the business level. In the current context of large data volumes, resource and network limitations still exist, and these solutions have limited ability to improve synchronization performance in this scenario. Summary of the invention
[0006] In order to solve the problems of high cost, low performance and fragile fault tolerance when improving the performance of remote synchronization, the present invention provides a load balancing method for realizing remote synchronization of a backup system under a distributed cluster. By using a load balancing algorithm and combining it with multi-node deployment, horizontal expansion of remote synchronization and automatic transfer of single-node failures in a distributed environment can be realized, thereby further improving the synchronization performance.
[0007] In order to achieve the above object, the present invention is implemented by the following technical solutions: A load balancing method for implementing remote synchronization of a backup system in a distributed cluster, the method comprising: Configure a distributed cluster environment, deploy remote synchronization service management modules, synchronization task management modules, and load balancing modules, and ensure that the synchronization task management module on each load node can operate independently and receive task allocation instructions from the load balancing module; Run the remote synchronization service management module on the load node of the distributed cluster to perform pipeline network communication detection and synchronization task heartbeat detection, and generate network monitoring reports and heartbeat detection logs; After the remote synchronization service management module receives the synchronization request, the load balancing module selects the node with the highest comprehensive weight value through the weight mechanism to assign the synchronization task, and notifies the synchronization task management module to start the synchronization task process on the selected node, and monitors and manages the entire life cycle of the synchronization task; Through the heartbeat detection mechanism, the remote synchronization service management module monitors the synchronization task status of each node. When an abnormality occurs in any node, the abnormality is immediately recorded and the load balancing module is automatically triggered to reallocate tasks.
[0008] As a preferred solution of the present invention, the method for the remote synchronization service management module to perform pipeline network communication detection specifically includes: Configure and start network monitoring tools to monitor network traffic and communication status; Set network monitoring thresholds and alarm mechanisms according to system requirements, including delay time and packet loss rate; Continuously monitor network communication status and analyze network quality by collecting network data packets; When a network communication anomaly is detected, the system triggers an alarm and records the anomaly, while trying to automatically recover or switch to an alternate network path; Generate regular network monitoring reports to analyze communication status and exception handling to optimize network configuration and improve transmission efficiency.
[0009] As a preferred solution of the present invention, the method for the remote synchronization service management module to perform synchronization task heartbeat detection specifically includes: Configure a heartbeat signal for each synchronization task, wherein the heartbeat signal includes a heartbeat interval and a timeout period; When each synchronization task is started, it starts to send heartbeat signals regularly and waits for the heartbeat response within the predetermined time. Continuously monitor the sending and receiving of heartbeat signals, and record the timestamp and status of each heartbeat; When it is detected that the heartbeat signal does not return within the scheduled time, the system marks the synchronization task as abnormal, records the log and triggers an alarm; According to the exception handling strategy, the load balancing module is automatically triggered to redistribute tasks and migrate tasks to other normal nodes for continued execution; Generate heartbeat detection logs and exception handling reports, analyze the causes and recovery status of task exceptions, and optimize the heartbeat detection mechanism.
[0010] As a preferred solution of the present invention, the weight mechanism includes: The number of node synchronization tasks, the amount of data that the node synchronization tasks need to process, and the transmission speed of the node synchronization tasks are used as the main evaluation indicators. The overall CPU utilization of the system, memory configuration, server load, and network bandwidth usage are used as secondary evaluation indicators. Each indicator is assigned a weight to calculate the comprehensive weight value of each node. The higher the comprehensive weight value, the higher the priority of the corresponding node. Set scheduled tasks for each node and continuously update the comprehensive weight value of each node to ensure that the load balancing module can dynamically allocate synchronization tasks.
[0011] As a preferred solution of the present invention, the calculation method of the comprehensive weight value of each node is: the number of node synchronization tasks + the amount of data to be processed by the node synchronization task + the transmission speed of the node synchronization task + the overall CPU utilization of the system + the memory configuration + the server load + the network bandwidth usage multiplied by the corresponding weights. The weight corresponding to each indicator is configured or adjusted according to the actual situation of the system.
[0012] As a preferred solution of the present invention, the number of node synchronization tasks = (1-the number of current node synchronization tasks / the total number of tasks) * 100, and the weight range is 0-100; The amount of data that the node synchronization task needs to process = (1-the amount of data that the current node synchronization task needs to process / the total amount of data) * 100, and the weight range is 0-100; The node synchronization task transmission speed is determined by the median of the speeds of each synchronization task in this node, with a weight range of 0-100. The larger the median, the larger the weight range. When the median is greater than 200Mb / s, the weight range of the node synchronization task transmission speed is 90-100; when the median is between 150Mb / s-200Mb / s, the weight range of the node synchronization task transmission speed is 80-90; when the median is between 100Mb / s-150Mb / s, the weight range of the node synchronization task transmission speed is 70-80, and so on. System overall CPU utilization = (1-CPU utilization)*100, with a weight range of 0-100; Memory configuration = (1-memory usage) * 100, the weight range is 0-100; The weight range of server load is 0-100. When the average load value is lower than the number of CPU cores, the server load is calculated as: (1-(number of CPU cores-average load value) / number of CPU cores)*100; when the average load value is greater than the number of CPU cores, the weight of server load is 0. The network bandwidth usage is calculated as: (1-bandwidth usage / total bandwidth)*100, and the weight range is 0-100.
[0013] As a preferred solution of the present invention, the weights of the number of node synchronization tasks, the amount of data to be processed by the node synchronization tasks, the transmission speed of the node synchronization tasks, the CPU utilization, the memory configuration, the server load and the network bandwidth usage are specifically set to: 30%, 10%, 10%, 20%, 10%, 10%, 10%.
[0014] As a preferred solution of the present invention, when any node is abnormal, the remote synchronization service management module detects the abnormal heartbeat of each synchronization task under the node and automatically restarts after the service is interrupted; After restarting the service, the remote synchronization service management module actively checks the synchronization tasks that were previously running, restarts the synchronization tasks that were previously running, calls the load balancing module to calculate the comprehensive weight value of the currently available nodes through the weight mechanism, obtains the optimal node to allocate the synchronization task, and starts the synchronization task process; The script on each node detects whether there are any residual processes in the synchronization task restarted by the current node. If there are any residual processes, they are terminated immediately to ensure that the residual processes are cleaned up normally.
[0015] As a preferred embodiment of the present invention, the method also includes a predictive maintenance and performance optimization framework, which predicts potential system failures and performance bottlenecks through historical data and machine learning technology, and takes optimization and maintenance measures in advance.
[0016] The beneficial effects of the present invention are as follows: when the customer backup set is at the PB level, the amount of synchronized data per day is huge. By increasing the number of load nodes and utilizing their horizontal expansion capabilities, the server configuration requirements are reduced and the synchronization performance is improved. Through the load balancing algorithm, the horizontal expansion of multiple nodes is realized, which significantly reduces the demand for server configuration, thereby effectively reducing the cost of system construction and maintenance; through the load balancing capability of remote synchronization, the business throughput of remote synchronization services is improved, and it can support concurrent synchronization of large amounts of data and meet the 24-hour timeliness requirements. By utilizing the load balancing algorithm, the remote synchronization concurrent capability in a distributed cluster environment is further improved, which not only enhances the data transmission efficiency of remote synchronization, but also enhances the stability and reliability of the system when processing multi-node remote synchronization; through the load balancing algorithm, the requirements for automatic takeover of faults are met, and automatic switching of remote synchronization business services is realized, ensuring that the system can quickly and automatically switch to other available nodes to provide remote synchronization services when a fault or disaster recovery event occurs, ensuring the continuity and availability of the business, and reducing the maintenance cost of manpower. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing 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 labor. Among them: Figure 1 is a diagram of the overall relationship structure in an embodiment of the present invention; Figure 2 is a load balancing relationship diagram in an embodiment of the present invention; Figure 3 A flow chart of a method for calculating node weight values in an embodiment of the present invention; Figure 4 A flow chart of a method for obtaining a node with the highest priority in an embodiment of the present invention; Figure 5 This is a structural diagram of automatic node abnormality switching in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0019] Traditional backup systems usually use a centralized architecture. The main problems with this architecture are high single-point failure risk, difficulty in expansion, and obvious performance bottlenecks when processing large-scale data. With the continuous growth of data volume and the increasing requirements for data reliability, the centralized architecture can no longer meet actual needs.
[0020] Currently, distributed cluster backup systems are widely used in various big data processing environments, such as cloud computing platforms, enterprise-level data centers, etc. They achieve data redundancy and high availability by distributing and storing data on multiple nodes. However, in practical applications, traditional remote synchronization methods usually rely on scheduled tasks or manual triggering, which is not only inefficient but also prone to data inconsistency.
[0021] Load balancing is a technology that ensures that network or computing resources are effectively utilized by properly allocating them, and avoids performance degradation or system failure caused by overloading a certain resource. Load balancing can not only improve the overall performance of the system, but also improve the fault tolerance and stability of the system. In a remote synchronization system, the application of load balancing technology can significantly improve data transmission efficiency, reduce the risk of single point failure, and thus enhance the reliability and availability of the system. However, how to reasonably allocate data transmission tasks among multiple nodes to avoid overloading certain nodes and thus affecting the overall system performance is the difficulty in applying load balancing technology in a distributed environment.
[0022] like Figure 1 As shown, it is an embodiment of the present invention, which provides a load balancing method for implementing remote synchronization in a backup system under a distributed cluster, involving a remote synchronization service management module, a synchronization task management module, a load balancing module and a synchronization task process, specifically including: Initialize the system environment: configure the distributed cluster environment, deploy the remote synchronization service management module, synchronization task management module and load balancing module, and ensure that the synchronization task management module on each load node can operate independently and receive task allocation instructions from the load balancing module; Deploying each module and configuring the system environment is the basis for achieving remote synchronous load balancing. By configuring a distributed cluster, ensure that each node can run its own synchronization task management module normally and receive task allocation instructions from the load balancing module. Ensure the stability of the system environment and the correctness of the configuration to provide a reliable foundation for subsequent task execution and load balancing.
[0023] As a centralized management component, the remote synchronization service management module is responsible for the communication detection and synchronization task heartbeat detection of the entire system. Its main purpose is to uniformly manage the synchronization tasks of each node. It can run on multiple nodes, but not every node may independently run a remote synchronization service management module. It depends on the system requirements to improve management efficiency and resource utilization. The synchronization task management module is deployed on each load node. Each node runs independently and is responsible for managing all synchronization tasks on this node. This design ensures that each node can independently process and manage its own synchronization tasks, thereby improving the reliability and scalability of the system and effectively balancing the management efficiency of the system and the independence of each node.
[0024] Run the remote synchronization service management module on the load node of the distributed cluster to perform pipeline network communication detection and synchronization task heartbeat detection, and generate network monitoring reports and heartbeat detection logs; In one embodiment, the method for the remote synchronization service management module to perform pipeline network communication detection specifically includes: Initialize network monitoring tools: configure and start network monitoring tools to monitor network traffic and communication status; Set monitoring parameters: Set network monitoring thresholds and alarm mechanisms according to specific needs, such as delay time, packet loss rate, etc. Real-time monitoring of network status: Continuously monitor network communication status and analyze network quality by collecting network data packets; Anomaly detection and handling: When a network communication anomaly (such as high latency or packet loss) is detected, the system triggers an alarm and records the anomaly, while trying to automatically recover or switch to an alternate network path; Regular reporting and analysis: Generate regular network monitoring reports to analyze communication status and exception handling to optimize network configuration and improve transmission efficiency.
[0025] The main function of pipeline network communication detection is to ensure that the data transmission path between nodes is unobstructed. By continuously monitoring the network communication status, network anomalies can be discovered and handled in a timely manner to prevent packet loss, delays and other problems during data synchronization. Network communication detection can improve the reliability and efficiency of data transmission, ensure that data between nodes can be transmitted stably and quickly, and ensure the smooth operation of the entire remote synchronization service. After the remote synchronization service management module receives the synchronization request, the load balancing module selects the node with the highest comprehensive weight value through the weight mechanism to assign the synchronization task, and notifies the synchronization task management module to start the synchronization task process on the selected node, and monitors and manages the entire life cycle of the synchronization task; like Figure 2-Figure 4As shown, the load balancing module obtains the number of available nodes according to the weight mechanism and returns the available node information each time to ensure that each node shares the pressure of remote synchronization, improves the throughput of business data, and enhances the transmission performance of remote synchronization services.
[0026] The weighting mechanism includes: The number of node synchronization tasks, the amount of data that the node synchronization tasks need to process, and the transmission speed of the node synchronization tasks are used as the main evaluation indicators. The overall CPU utilization of the system, memory configuration, server load, and network bandwidth usage are used as secondary evaluation indicators. Each indicator is assigned a weight to calculate the comprehensive weight value of each node. The higher the comprehensive weight value, the higher the priority of the corresponding node, and the node with the highest priority is selected as the available node.
[0027] Set scheduled tasks for each node and continuously update the comprehensive weight value of each node to ensure that the load balancing module can dynamically allocate synchronization tasks.
[0028] The comprehensive weight value is calculated based on the performance indicators of the nodes, and these indicators are collected regularly through scheduled tasks to calculate the weight value. The load balancing module can dynamically adjust the task allocation to ensure the load balance of the system. The core of this step lies in the accuracy and real-time performance of the weight calculation to achieve the optimal load distribution.
[0029] Furthermore, the comprehensive weight value of each node is calculated as follows: the number of node synchronization tasks + the amount of data to be processed by the node synchronization tasks + the transmission speed of the node synchronization tasks + the overall CPU utilization of the system + the memory configuration + the server load + the network bandwidth usage multiplied by their respective corresponding weights. The weight corresponding to each indicator is configured or adjusted according to the actual situation of the system.
[0030] Preferably, in this embodiment, the weights of the number of node synchronization tasks, the amount of data to be processed by the node synchronization tasks, the transmission speed of the node synchronization tasks, the CPU utilization, the memory configuration, the server load and the network bandwidth usage are specifically set to: 30%, 10%, 10%, 20%, 10%, 10%, 10%.
[0031] In one embodiment, the number of node synchronization tasks = (1-the number of current node synchronization tasks / the total number of tasks)*100, and the weight range is 0-100; The amount of data that the node synchronization task needs to process = (1-the amount of data that the current node synchronization task needs to process / the total amount of data) * 100, and the weight range is 0-100; The transmission speed of the node synchronization task is determined by the median of the speeds of each synchronization task in this node, and the weight range is 0-100. The larger the median, the larger the weight range. For example, when the median is greater than 200Mb / s, the weight range of the node synchronization task transmission speed is 90-100; when the median is between 150Mb / s-200Mb / s, the weight range of the node synchronization task transmission speed is 80-90; when the median is between 100Mb / s-150Mb / s, the weight range of the node synchronization task transmission speed is 70-80, and so on. Of course, these are all configurable and adjustable.
[0032] System overall CPU utilization = (1-CPU utilization)*100, with a weight range of 0-100; Memory configuration = (1-memory usage) * 100, the weight range is 0-100; The weight range of server load is 0-100. When the average load value is lower than the number of CPU cores, the server load is calculated as: (1-(number of CPU cores-average load value) / number of CPU cores)*100; when the average load value is greater than the number of CPU cores, the weight of server load is 0. The network bandwidth usage is calculated as: (1-bandwidth usage / total bandwidth)*100, and the weight range is 0-100.
[0033] Taking the calculation process of the overall system CPU utilization as an example, (1-CPU utilization) represents the CPU idle rate. Assuming that the CPU utilization of a node is 40%, 1-CPU utilization = 1-0.40 = 0.60, that is, the idle rate is 60%. In order to convert the ratio into a weight range of 0 to 100, it needs to be multiplied by 100, that is, 0.60×100=60. Assuming that the overall system CPU utilization accounts for 20% of the weight calculation, the final weight value needs to be multiplied by 0.20, that is, the final weight is 60×0.20=12. Therefore, the weight value of a node with a CPU utilization of 40% contributes 12 to the total weight.
[0034] Assume there are three nodes, and their CPU utilization is 30%, 50%, and 70% respectively. Node A: (1−0.30)×100=70, 70×0.20=14; Node B: (1−0.50)×100=50, 50×0.20=10; Node C: (1−0.70)×100=30, 30×0.20=6; It can be seen that nodes with lower CPU utilization (nodes with higher idle rates) will receive higher weight values, thus giving priority to more tasks. On the contrary, nodes with higher CPU utilization will receive lower weight values, resulting in fewer tasks being assigned. This calculation method ensures that the system can dynamically assign tasks to nodes with less resource usage and lighter loads, thereby achieving effective load balancing. By dynamically calculating the weight values of each node and assigning tasks based on these weight values, the overall performance and resource utilization of the system can be maximized, avoiding situations where some nodes are overloaded while other nodes are idle.
[0035] When calculating the comprehensive weight value of a node, first check whether the node is normal. If normal, obtain the weight ratio of each indicator, calculate the weight value according to the algorithm formula and store it in the database.
[0036] Through the heartbeat detection mechanism, the remote synchronization service management module monitors the synchronization task status of each node. When any node is abnormal, it immediately records the abnormal situation and automatically triggers the load balancing module to reallocate tasks. Combined with the load balancing algorithm, it realizes automatic transfer of single node failure in a distributed environment. The whole process is automatically started by the remote synchronization service management module without manual operation.
[0037] like Figure 5 As shown, in one of the embodiments, when an abnormality occurs in any node, the remote synchronization service management module detects the abnormal heartbeat of each synchronization task under the node and automatically restarts after the service is interrupted; After restarting the service, the remote synchronization service management module actively checks the synchronization tasks that were previously running, restarts the synchronization tasks that were previously running, calls the load balancing module to calculate the comprehensive weight value of the currently available nodes through the weight mechanism, obtains the optimal node to allocate the synchronization task, and starts the synchronization task process; The script on each node detects whether there are any residual processes in the synchronization task restarted by the current node. If there are any residual processes, they are terminated immediately to ensure that the residual processes are cleaned up normally.
[0038] Specifically, the method for performing synchronization task heartbeat detection by the remote synchronization service management module (i.e., the heartbeat detection mechanism) specifically includes: Heartbeat signal configuration: configure the heartbeat signal for each synchronization task, including parameters such as heartbeat interval and timeout; Start heartbeat detection: When each synchronization task is started, it starts to send heartbeat signals regularly and waits for the heartbeat response within the predetermined time. Monitor heartbeat signals: Continuously monitor the sending and receiving of heartbeat signals, and record the timestamp and status of each heartbeat; Exception handling mechanism: When it is detected that the heartbeat signal does not return within the scheduled time, the system marks the task as abnormal, records the log and triggers an alarm; Task recovery and migration: According to the exception handling strategy, the load balancing module is automatically triggered to reallocate tasks and migrate tasks to other normal nodes for continued execution; Log and report generation: Generate heartbeat detection logs and exception handling reports to analyze the causes and recovery status of task exceptions to optimize the heartbeat detection mechanism.
[0039] The role of synchronization task heartbeat detection is to monitor the running status of synchronization tasks. By regularly sending and receiving heartbeat signals, it can be determined whether each synchronization task is running normally. Once it is detected that a task does not respond to the heartbeat signal as expected, the system can immediately take measures, such as restarting the task or transferring the task to other nodes, to ensure that the data synchronization process is not interrupted. The heartbeat detection mechanism can improve the fault tolerance and stability of the system, ensuring that the synchronization operation can be quickly restored and continued when a task exception occurs.
[0040] Furthermore, the method in another embodiment also includes a predictive maintenance and performance optimization framework, which predicts potential system failures and performance bottlenecks through historical data and machine learning technology, and takes optimization and maintenance measures in advance, including: Continuously collect the operation data of each node, including CPU utilization, memory utilization, network bandwidth usage, etc.; Analyze the collected data using machine learning algorithms to identify potential system failures and performance bottlenecks; Establish a prediction model to predict possible failure time and failure type; When potential failures are predicted, optimization and maintenance measures are taken in advance, such as adjusting task allocation and adding spare nodes, to prevent system failures from affecting normal operation; Generate predictive maintenance and performance optimization reports, record prediction results and measures taken, and continuously improve system maintenance and optimization strategies.
[0041] In summary, when the customer backup set is at the PB level, the amount of synchronized data is huge every day. By increasing the number of load nodes and utilizing their horizontal expansion capabilities, the server configuration requirements are reduced and the synchronization performance is improved. Through the load balancing algorithm, multi-node horizontal expansion is achieved, which significantly reduces the demand for server configuration, thereby effectively reducing the cost of system construction and maintenance; through the load balancing capability of remote synchronization, the business throughput of remote synchronization services is improved, which can support concurrent synchronization of large amounts of data and meet the 24-hour timeliness requirements. The load balancing algorithm is used to further improve the remote synchronization concurrency capability in a distributed cluster environment, which not only strengthens the data transmission efficiency of remote synchronization, but also enhances the stability and reliability of the system when processing multi-node remote synchronization; through the load balancing algorithm, the requirements for automatic takeover of faults are met, and automatic switching of remote synchronization business services is achieved, ensuring that in the event of a fault or disaster recovery event, the system can quickly and automatically switch to other available nodes to provide remote synchronization services, ensuring business continuity and availability, and reducing human maintenance costs.
[0042] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or other arbitrary combinations. When implemented using software, it can be implemented in whole or in part in the form of a computer program product, which includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0043] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0044] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0045] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0046] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0047] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0048] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0049] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. Load balancing method for implementing remote synchronization of backup system in distributed cluster. It is characterized in that The method comprises: Configure a distributed cluster environment, deploy remote synchronization service management modules, synchronization task management modules, and load balancing modules, and ensure that the synchronization task management module on each load node can operate independently and receive task allocation instructions from the load balancing module; Run the remote synchronization service management module on the load node of the distributed cluster to perform pipeline network communication detection and synchronization task heartbeat detection, and generate network monitoring reports and heartbeat detection logs; After the remote synchronization service management module receives the synchronization request, the load balancing module selects the node with the highest comprehensive weight value through the weight mechanism to assign the synchronization task, and notifies the synchronization task management module to start the synchronization task process on the selected node, and monitors and manages the entire life cycle of the synchronization task; Through the heartbeat detection mechanism, the remote synchronization service management module monitors the synchronization task status of each node. When an abnormality occurs in any node, the abnormality is immediately recorded and the load balancing module is automatically triggered to reallocate tasks.
2. According to claim 1, the load balancing method for realizing remote synchronization of the backup system in the distributed cluster, It is characterized in that The method for the remote synchronization service management module to perform pipeline network communication detection specifically includes: Configure and start network monitoring tools to monitor network traffic and communication status; Set network monitoring thresholds and alarm mechanisms according to system requirements, including delay time and packet loss rate; Continuously monitor network communication status and analyze network quality by collecting network data packets; When a network communication anomaly is detected, the system triggers an alarm and records the anomaly, while trying to automatically recover or switch to an alternate network path; Generate regular network monitoring reports to analyze communication status and exception handling to optimize network configuration and improve transmission efficiency.
3. According to claim 1, the load balancing method for realizing remote synchronization of the backup system in the distributed cluster, It is characterized in that The method for the remote synchronization service management module to perform synchronization task heartbeat detection specifically includes: Configure a heartbeat signal for each synchronization task, wherein the heartbeat signal includes a heartbeat interval and a timeout period; When each synchronization task is started, it starts to send heartbeat signals regularly and waits for the heartbeat response within the predetermined time. Continuously monitor the sending and receiving of heartbeat signals, and record the timestamp and status of each heartbeat; When it is detected that the heartbeat signal does not return within the scheduled time, the system marks the synchronization task as abnormal, records the log and triggers an alarm; According to the exception handling strategy, the load balancing module is automatically triggered to redistribute tasks and migrate tasks to other normal nodes for continued execution; Generate heartbeat detection logs and exception handling reports, analyze the causes and recovery status of task exceptions, and optimize the heartbeat detection mechanism.
4. According to claim 1, the load balancing method for realizing remote synchronization of the backup system in the distributed cluster, It is characterized in that The weighting mechanism includes: The number of node synchronization tasks, the amount of data that the node synchronization tasks need to process, and the transmission speed of the node synchronization tasks are used as the main evaluation indicators. The overall CPU utilization of the system, memory configuration, server load, and network bandwidth usage are used as secondary evaluation indicators. Each indicator is assigned a weight to calculate the comprehensive weight value of each node. The higher the comprehensive weight value, the higher the priority of the corresponding node. Set scheduled tasks for each node and continuously update the comprehensive weight value of each node to ensure that the load balancing module can dynamically allocate synchronization tasks.
5. According to claim 4, the load balancing method for realizing remote synchronization of the backup system in the distributed cluster, It is characterized in that The calculation method of the comprehensive weight value of each node is: the number of node synchronization tasks + the amount of data to be processed by the node synchronization tasks + the transmission speed of the node synchronization tasks + the overall CPU utilization of the system + the memory configuration + the server load + the network bandwidth usage multiplied by the corresponding weights. The weight corresponding to each indicator is configured or adjusted according to the actual situation of the system.
6. The load balancing method for realizing remote synchronization of a backup system in a distributed cluster according to claim 5, It is characterized in that Number of node synchronization tasks = (1-number of current node synchronization tasks / total number of tasks) * 100, with a weight range of 0-100; The amount of data that the node synchronization task needs to process = (1-the amount of data that the current node synchronization task needs to process / the total amount of data) * 100, and the weight range is 0-100; The node synchronization task transmission speed is determined by the median of the speeds of each synchronization task in this node, with a weight range of 0-100. The larger the median, the larger the weight range. When the median is greater than 200Mb / s, the weight range of the node synchronization task transmission speed is 90-100; when the median is between 150Mb / s-200Mb / s, the weight range of the node synchronization task transmission speed is 80-90; when the median is between 100Mb / s-150Mb / s, the weight range of the node synchronization task transmission speed is 70-80, and so on. System overall CPU utilization = (1-CPU utilization)*100, with a weight range of 0-100; Memory configuration = (1-memory usage) * 100, the weight range is 0-100; The weight range of server load is 0-100. When the average load value is lower than the number of CPU cores, the server load is calculated as: (1-(number of CPU cores-average load value) / number of CPU cores)*100; when the average load value is greater than the number of CPU cores, the weight of server load is 0. The network bandwidth usage is calculated as: (1-bandwidth usage / total bandwidth)*100, and the weight range is 0-100.
7. The load balancing method for realizing remote synchronization of a backup system in a distributed cluster according to claim 4, It is characterized in that The weights of the number of node synchronization tasks, the amount of data to be processed by the node synchronization tasks, the transmission speed of the node synchronization tasks, the CPU utilization, the memory configuration, the server load, and the network bandwidth usage are specifically set to: 30%, 10%, 10%, 20%, 10%, 10%, 10%.
8. The load balancing method for realizing remote synchronization of a backup system in a distributed cluster according to claim 1, It is characterized in that When an abnormality occurs on any node, the remote synchronization service management module detects the abnormal heartbeat of each synchronization task under the node and automatically restarts after the service is interrupted; After restarting the service, the remote synchronization service management module actively checks the synchronization tasks that were previously running, restarts the synchronization tasks that were previously running, calls the load balancing module to calculate the comprehensive weight value of the currently available nodes through the weight mechanism, obtains the optimal node to allocate the synchronization task, and starts the synchronization task process; The script on each node detects whether there are any residual processes in the synchronization task restarted by the current node. If there are any residual processes, they are terminated immediately to ensure that the residual processes are cleaned up normally.
9. The load balancing method for realizing remote synchronization of a backup system in a distributed cluster according to claim 1, It is characterized in that The method also includes a predictive maintenance and performance optimization framework, which uses historical data and machine learning technology to predict potential system failures and performance bottlenecks, and take optimization and maintenance measures in advance.
Citation Information
Cited By
Machine room intelligent temperature control monitoring system and early warning method based on situation awareness
CN119536214A
Task allocation method and device, equipment and storage medium
CN119537002A
Performance prediction method and device, computer equipment, readable storage medium and program product
CN119537176A
Dynamic allocation method, system and equipment of communication link and storage medium
CN119766751A
