Process configuration method and device for cluster service node, equipment and storage medium

By combining the configuration daemon process with the configuration center, unified management and real-time monitoring of the process configuration information of the cluster service node are achieved, solving the problem of low configuration efficiency in the existing technology and improving the configuration efficiency and system reliability of the cluster service node.

CN120670247APending Publication Date: 2025-09-19广州三七极耀网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510547435.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The existing technology lacks a centralized management mechanism in the process configuration of cluster service nodes, resulting in low process configuration efficiency and difficulty in achieving rapid update and synchronization of multi-task configurations.

Method used

By configuring the daemon process to connect to the configuration center, read and generate new configuration files, use the configuration center to uniformly manage the configuration information of cluster service nodes, and execute task changes through the process supervision tool to achieve synchronous update and real-time monitoring of configuration information.

Benefits of technology

It improves the process configuration efficiency of cluster service nodes, realizes the rapid update and synchronization of configuration information, and enhances the system's self-healing ability and operational reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670247A_ABST
    Figure CN120670247A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a process configuration method and device of a cluster service node, equipment and a storage medium. The process configuration method comprises the following steps: starting a process supervision tool of the cluster service node; a corresponding configuration daemon process is started and managed through a process supervision tool according to the main configuration file, each cluster service node belongs to a corresponding cluster service, and each cluster service corresponds to a configuration center; connecting to a corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and reading the configuration information of the configuration center; when it is read that the configuration information is changed, a new configuration file corresponding to the process supervision tool is generated according to the changed configuration information, and the new configuration file is used for the process supervision tool to execute task change according to the new configuration file. According to the scheme, the problem of low efficiency during the process configuration of the cluster service node is solved, and the working efficiency of the process configuration of the cluster service node is improved by uniformly configuring and updating all the cluster service nodes of the cluster service through the configuration center.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a process configuration method, apparatus, device, and storage medium for a cluster service node. Background Art

[0002] In modern distributed systems, resident task processes (such as microservice instances, data processing consumers, and real-time computing engines) are core components supporting business continuity and service reliability. These processes often perform critical functions such as real-time data processing, service status maintenance, and resource scheduling. The stability of their operational status directly determines system availability and service quality. If a process is interrupted due to abnormal exit, resource contention, or node failure, it can lead to service degradation, data loss, or even complete paralysis of the business chain. Therefore, efficient and reliable real-time monitoring and clustered management of processes are crucial.

[0003] Related technologies typically maintain process activity through scheduled tasks and shell scripts (e.g., Shell scripts). For example, using the system's Crontab tool (a scheduled task list tool), a scheduled task is set up every minute, such as executing a script every minute. The script periodically scans the process list to determine if the target process is alive. If the process disappears or is not running, the Shell script invokes a task start command to restart the process.

[0004] The related art approach of maintaining processes based on scheduled tasks and external shell scripts requires manual maintenance of multiple sets of shell scripts and configuration files for different cluster service nodes. When it comes to unified management and configuration of numerous tasks across multiple nodes in a cluster service, the approach provided by the related art lacks a centralized management mechanism, making it difficult to quickly update and synchronize multi-task configurations, resulting in low process configuration efficiency. Summary of the Invention

[0005] The embodiments of the present application provide a process configuration method, apparatus, device, and storage medium for a cluster service node, which can solve the technical problem of low efficiency in process configuration of a cluster service node and improve the working efficiency of process configuration of a cluster service node.

[0006] In a first aspect, an embodiment of the present application provides a process configuration method for a cluster service node, including:

[0007] When receiving the system startup instruction, start the process monitoring tool of the cluster service node;

[0008] The process monitoring tool reads the main configuration file and starts and hosts the corresponding configuration daemon process based on the main configuration file. The configuration daemon process configuration file includes the path information of the configuration center corresponding to the corresponding process monitoring tool. Each cluster service node belongs to the corresponding cluster service, and each cluster service corresponds to a configuration center. The path information of the configuration center of different cluster services is different.

[0009] Connect to the corresponding configuration center through the configuration daemon according to the path information in the configuration file, and read the configuration information of the configuration center through the configuration daemon;

[0010] When the configuration daemon reads that the configuration information of the configuration center has changed, the configuration daemon generates a new configuration file for the corresponding process monitoring tool based on the changed configuration information read, and the corresponding process monitoring tool executes the corresponding task change according to the new configuration file.

[0011] Furthermore, when the configuration daemon process reads that the configuration information of the configuration center has changed, after the configuration daemon process generates a new configuration file of the corresponding process monitoring tool according to the read changed configuration information, the method further includes:

[0012] Generate update notifications by configuring the daemon;

[0013] Send update notifications to the corresponding process monitoring tool by configuring the daemon process;

[0014] The new configuration file is loaded through the process monitoring tool according to the received update notification, and the corresponding task changes are executed through the process monitoring tool according to the new configuration file. The task changes include task start, task update or task stop.

[0015] Furthermore, after executing the corresponding task change according to the new configuration file through the process monitoring tool, the following is also included:

[0016] Send the new configuration file to the version management warehouse through the configuration daemon process, so that the version management warehouse can save the new configuration file. The version management warehouse stores at least one set of configuration files corresponding to each process monitoring tool. Each set of configuration files is configured with a version number and generation time.

[0017] If the task change of the process monitoring tool is interrupted or fails, the configuration information of the old configuration file of the previous version number of the process monitoring tool is selected from the version management warehouse and pushed to the corresponding configuration center, so that the configuration center can update its own configuration information based on the received configuration information;

[0018] When the configuration information subscribed to the configuration center by the configuration daemon process changes, the configuration daemon process reads the latest configuration information from the configuration center, generates the target configuration file based on the read configuration information, and generates an update notification;

[0019] Send update notifications to the corresponding process monitoring tool by configuring the daemon process;

[0020] The target configuration file is loaded through the process monitoring tool according to the received update notification, and the corresponding task changes are executed according to the target configuration file.

[0021] Furthermore, according to the path information in the configuration file, connect to the corresponding configuration center, including:

[0022] Load the transport layer security certificate and role access control authentication information according to the configuration file, determine the encrypted transmission channel according to the transport layer security certificate, and generate an authentication request according to the role access control authentication information;

[0023] Based on the encrypted transmission channel, an authentication request is sent to the corresponding configuration center according to the path information in the configuration file, so as to establish a communication connection with the configuration center after the authentication is passed by the configuration center.

[0024] Furthermore, after starting the process monitoring tool of the cluster service node, it also includes:

[0025] Real-time collection of resource utilization and / or task queue backlog status of each cluster service node. Resource utilization includes CPU utilization, memory usage, and disk input and output rates. Task queue backlog status includes queue length, processing delay time, and number of backlog tasks.

[0026] Adjust the process parameters of the corresponding cluster service node based on resource utilization and / or task queue backlog status. The process parameters include the number of processes and resource parameters of each process.

[0027] The process parameters are sent to the corresponding configuration center so that the configuration center can change the corresponding configuration information according to the received process parameters.

[0028] Furthermore, each process monitoring tool is configured with at least two configuration daemons;

[0029] Connect to the corresponding configuration center through the configuration daemon according to the path information in the configuration file, and read the configuration information of the configuration center through the configuration daemon, including:

[0030] All configuration daemons connect to the corresponding configuration center according to the path information in the configuration file, and the configuration center presets a lock key;

[0031] Each configuration daemon atomically acquires the lock key based on the transaction interface of the configuration center;

[0032] The configuration daemon process that obtains the lock key is determined as the main process, and the remaining configuration daemon processes are determined as backup processes;

[0033] The main process reads the configuration information of the configuration center and sends a renewal request to the configuration center at preset intervals to extend the lock key holding time;

[0034] The standby process monitors the lock key status of the main process. When the lock key status is invalid or deleted, all standby processes re-acquire the lock key atomically.

[0035] Furthermore, when the configuration daemon reads that the configuration information of the configuration center has changed, the configuration daemon generates a new configuration file for the corresponding process monitoring tool based on the read changed configuration information, including:

[0036] Subscribe to configuration change events from the configuration center through the configuration daemon based on long polling or monitoring mechanisms;

[0037] When the configuration daemon subscribes to a configuration change event in the configuration center, the configuration daemon reads the changed configuration information from the configuration center.

[0038] The configuration daemon process generates a new configuration file for the corresponding process monitoring tool according to the read configuration information and the preset generation template.

[0039] Furthermore, the configuration daemon can subscribe to configuration change events in the configuration center based on long polling or monitoring mechanisms, including:

[0040] The configuration daemon process periodically sends query requests to the configuration center to inquire whether a configuration change event has occurred.

[0041] If no configuration change occurs in the configuration center within the preset response time, the configuration daemon receives an empty response or status code from the configuration center.

[0042] If a configuration change event occurs in the configuration center within the preset response time, the configuration daemon receives the change event response returned by the configuration center;

[0043] Or, when a configuration change event occurs in the configuration center, the configuration daemon receives the change event notification sent by the configuration center.

[0044] In a second aspect, an embodiment of the present application provides a process configuration device for a cluster service node, including:

[0045] The process monitoring tool startup module is used to start the process monitoring tool of the cluster service node when receiving the system startup instruction;

[0046] The configuration daemon startup module is used to read the main configuration file through the process monitoring tool, and start and host the corresponding configuration daemon according to the main configuration file. The configuration daemon configuration file includes the path information of the configuration center corresponding to the corresponding process monitoring tool. Each cluster service node belongs to the corresponding cluster service, and each cluster service corresponds to a configuration center. The path information of the configuration center of different cluster services is different;

[0047] The communication connection module is used to connect to the corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and read the configuration information of the configuration center through the configuration daemon process;

[0048] A new configuration file generation module is used to generate a new configuration file for the corresponding process monitoring tool based on the changed configuration information read by the configuration daemon process when the configuration information of the configuration center has changed, so that the corresponding process monitoring tool can execute the corresponding task changes according to the new configuration file.

[0049] In a third aspect, an embodiment of the present application provides a process configuration device for a cluster service node, including:

[0050] memory and one or more processors;

[0051] a memory for storing one or more programs;

[0052] When one or more programs are executed by one or more processors, the one or more processors implement the process configuration of the cluster service node according to the first aspect.

[0053] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer-executable instructions, where the computer-executable instructions, when executed by a computer processor, are used to execute the process configuration of the cluster service node according to the first aspect.

[0054] In the embodiment of the present application, when configuring the process of a cluster service node, upon receiving a system startup instruction, the process monitoring tool of the cluster service node is started, the main configuration file is read by the process monitoring tool, and the corresponding configuration daemon process is started and hosted according to the main configuration file; the configuration daemon process is connected to the corresponding configuration center according to the path information in the configuration file, and the configuration information of the configuration center is read; when the configuration daemon process reads that the configuration information of the configuration center has changed, the configuration daemon process generates a new configuration file of the corresponding process monitoring tool according to the read changed configuration information, which is used by the corresponding process monitoring tool to execute the corresponding task change according to the new configuration file. By adopting the above technical means, the configuration information of all cluster service nodes in the cluster service can be uniformly managed by the configuration center of the cluster service. When the configuration of the cluster service node needs to be changed, only the configuration information in the corresponding configuration center needs to be changed to realize the change of the configuration information of all cluster service nodes in the corresponding cluster service. In this way, the technical problem of low efficiency of the cluster service node in process configuration can be avoided. Based on the unified management and configuration update of the configuration center, the configuration information of all cluster service nodes in the corresponding cluster service can be synchronously updated, thereby improving the working efficiency of the process configuration of the cluster service node. In addition, by hosting the corresponding configuration daemon process, the configuration information of the corresponding configuration center is monitored in real time. When the configuration information of the configuration center is monitored to be changed, a new configuration file for the corresponding process monitoring tool can be immediately generated based on the changed configuration information, so that the corresponding process monitoring tool can execute the corresponding task changes according to the new configuration file, further improving the work efficiency of the process configuration of the cluster service node.

[0055] The beneficial effects of the process configuration apparatus for a cluster service node, the process configuration device for a cluster service node, and the storage medium provided above may refer to the beneficial effects of the process configuration method for a cluster service node. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a flowchart of a process configuration method for a cluster service node provided by an embodiment of the present application;

[0057] Figure 2 This is a first configuration diagram of a configuration center and cluster service nodes provided in an embodiment of the present application;

[0058] Figure 3 This is a flowchart of another cluster service node process configuration method provided by an embodiment of the present application;

[0059] Figure 4 This is a flowchart of another process configuration method for a cluster service node provided in an embodiment of the present application;

[0060] Figure 5 This is a flowchart of another cluster service node process configuration method provided by an embodiment of the present application;

[0061] Figure 6 This is a second configuration diagram of a configuration center and cluster service nodes provided in an embodiment of the present application;

[0062] Figure 7 This is a structural diagram of a process configuration device for a cluster service node provided in an embodiment of the present application;

[0063] Figure 8 This is a structural diagram of a process configuration device for a cluster service node provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. It should also be noted that, for ease of description, only parts related to the present application, not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0065] Related technologies usually implement process maintenance based on scheduled tasks and shell scripts (such as Shell scripts). For example, the Crontab tool (scheduled task table tool) in the system is used to set minute-level scheduled tasks, such as executing a script once every minute, periodically scanning the process list, and judging whether the target process is alive. If it is found that the process disappears or the process is not running, the task start command is called through the Shell script to restart the process. The related technology uses scheduled tasks and external Shell scripts to implement process maintenance. For different cluster service nodes, it is necessary to manually maintain multiple sets of Shell scripts and configuration files. When it is necessary to uniformly manage and configure numerous tasks of multiple nodes in a cluster service, the method provided by the related technology lacks a centralized management mechanism, making it difficult to quickly update and synchronize multi-task configurations, resulting in low efficiency of process configuration.

[0066] Based on this, a process configuration method, apparatus, device and storage medium for a cluster service node of an embodiment of the present application are provided, which aims to start the process monitoring tool of the cluster service node when receiving a system startup instruction during process configuration of the cluster service node, read the main configuration file through the process monitoring tool, and start and host the corresponding configuration daemon process according to the main configuration file; connect to the corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and read the configuration information of the configuration center; when the configuration daemon process reads that the configuration information of the configuration center has changed, generate a new configuration file for the corresponding process monitoring tool according to the read changed configuration information through the configuration daemon process, so that the corresponding process monitoring tool executes the corresponding task change according to the new configuration file. By adopting the above technical means, the configuration information of all cluster service nodes in the cluster service can be uniformly managed through the configuration center of the cluster service. When the configuration of the cluster service node needs to be changed, it is only necessary to change the configuration information in the corresponding configuration center to realize the change of the configuration information of all cluster service nodes in the corresponding cluster service. Compared with the method of realizing process maintenance based on timed tasks and external shell scripts in the related technology, the embodiment of the present application is based on the unified management and configuration update of the configuration center, which can realize the synchronous update of the configuration information of all cluster service nodes in the corresponding cluster service, thereby avoiding the technical problem of low efficiency of cluster service nodes in process configuration, thereby improving the working efficiency of process configuration of cluster service nodes. In addition, by hosting the corresponding configuration daemon process to monitor the configuration information of the corresponding configuration center in real time, when the configuration information of the configuration center is monitored to change, a new configuration file of the corresponding process monitoring tool can be generated immediately based on the changed configuration information, so that the corresponding process monitoring tool can execute the corresponding task change according to the new configuration file, further improving the working efficiency of process configuration of cluster service nodes.

[0067] Figure 1 A flowchart of a cluster service node process configuration method provided in an embodiment of the present application is provided. The cluster service node process configuration method provided in this embodiment can be executed by a cluster service node process configuration device. The cluster service node process configuration device can be implemented via software and / or hardware. The cluster service node process configuration device can be composed of two or more physical entities or a single physical entity. Generally speaking, the cluster service node process configuration device can be a cluster service node server.

[0068] The following description is made by taking the server of the cluster service node as the subject of the process configuration method for executing the cluster service node. Figure 1 The process configuration method of the cluster service node specifically includes:

[0069] S101: Upon receiving a system startup instruction, start a process monitoring tool of a cluster service node.

[0070] When the server receives the system startup instruction, it starts the process monitoring tool of the cluster service node. Among them, each cluster service node is correspondingly provided with a process monitoring tool. The process monitoring tool is used to manage multiple processes on the cluster service node. It can start, stop and restart processes, and monitor the running status of processes in real time, such as whether they are running, stopped and abnormally exited. When a process exits unexpectedly due to various reasons (such as code errors, memory leaks or system failures, etc.), the process monitoring tool can automatically restart the process according to the configuration to ensure the continuous availability of the service. For example, if a script process that processes data suddenly crashes, the process monitoring tool can quickly restart it to reduce the service interruption time and avoid affecting the normal operation of the business. The process monitoring tool can also record the standard output and error output of the processes it manages, and direct these record information to the specified log file. Subsequent users can use the log file to understand whether there are abnormal error messages during the operation of the corresponding process and whether the input and output data meet expectations.

[0071] Exemplarily, the process monitoring tool may be a Supervisor process, a systemd server, an Upstart process, a launchd process, a pm2 process management tool, or a forever process management tool.

[0072] For example, upon receiving a system startup command, the server responds to the command and starts its own operating system. As the operating system starts, the corresponding cluster service node's process monitoring tool automatically starts. By configuring the process monitoring tool to automatically start at boot, it ensures that related services can function normally after the system boots, avoiding delays or omissions caused by manual intervention in starting the process monitoring tool, thereby ensuring service continuity and availability.

[0073] S102. Read the main configuration file through the process monitoring tool, and start and host the corresponding configuration daemon process according to the main configuration file, wherein the configuration file of the configuration daemon process includes the path information of the configuration center corresponding to the corresponding process monitoring tool. Each cluster service node belongs to the corresponding cluster service, and each cluster service corresponds to a configuration center. The path information of the configuration centers of different cluster services is different.

[0074] After the process monitoring tool is started, the main configuration file is read through the process monitoring tool, and the corresponding configuration daemon is started and hosted according to the main configuration file. Each process monitoring tool is configured with at least one configuration daemon. The configuration daemon is used to obtain the configuration information of the configuration center, and generate the corresponding configuration file according to the preset template based on the configuration information. Each cluster service node belongs to the corresponding cluster service, and each cluster service corresponds to a configuration center. The configuration file of the configuration daemon includes the path information of the configuration center corresponding to the corresponding process monitoring tool, and the path information of the configuration center of different cluster services is different. As described above, the corresponding configuration daemon is started and hosted by the process monitoring tool, so that the process monitoring tool can monitor the life cycle of the configuration daemon. If the configuration daemon crashes abnormally or exits unexpectedly, the daemon can be automatically reconfigured through the process monitoring tool, thereby improving the self-healing ability of the system and thus improving the operational reliability of the system.

[0075] In one embodiment, the configuration daemon is used to monitor updates to the configuration information of the corresponding configuration center. The configuration center includes one or more of a Consul center, a Zookeeper center, and an Etcd center. The configuration daemon may be a confd process.

[0076] Figure 2 This is a first configuration diagram of a configuration center and cluster service nodes provided in an embodiment of the present application, referring to Figure 2Each cluster service node belongs to a corresponding cluster service, for example, cluster service node 1, cluster service node 2, and cluster service node 3 all belong to cluster service 1; cluster service node 4 and cluster service node 5 all belong to cluster service 2. Each cluster service corresponds to a configuration center, for example, cluster service 1 corresponds to configuration center 1, that is, cluster service node 1, cluster service node 2, and cluster service node 3 all set and update configuration parameters based on configuration center 1; cluster service 2 corresponds to configuration center 2, that is, cluster service node 4 and cluster service node 5 all set and update configuration parameters based on configuration center 2. Each cluster service node is correspondingly set with a process monitoring tool, for example, cluster service node 1 is correspondingly set with process monitoring tool 11, cluster service node 2 is correspondingly set with process monitoring tool 21, cluster service node 3 is correspondingly set with process monitoring tool 31, cluster service node 4 is correspondingly set with process monitoring tool 41, and cluster service node 5 is correspondingly set with process monitoring tool 51. Each process monitoring tool is correspondingly configured with at least one configuration daemon process. This embodiment is explained by taking the example of each process monitoring tool being correspondingly configured with a configuration daemon process. For example, process monitoring tool 11 in cluster service node 1 is configured with configuration daemon 111, process monitoring tool 21 in cluster service node 2 is configured with configuration daemon 211, process monitoring tool 31 in cluster service node 3 is configured with configuration daemon 311, process monitoring tool 41 in cluster service node 4 is configured with configuration daemon 411, and process monitoring tool 51 in cluster service node 5 is configured with configuration daemon 511. The configuration file of each configuration daemon includes path information of the configuration center corresponding to the corresponding process monitoring tool. For example, the configuration file of configuration daemon 111 includes path information of configuration center 1 corresponding to process monitoring tool 11, the configuration file of configuration daemon 211 includes path information of configuration center 1 corresponding to process monitoring tool 21, and the configuration file of configuration daemon 311 includes path information of configuration center 1 corresponding to process monitoring tool 31; the configuration file of configuration daemon 411 includes path information of configuration center 2 corresponding to process monitoring tool 41, and the configuration file of configuration daemon 511 includes path information of configuration center 2 corresponding to process monitoring tool 51. The path information of the configuration centers of different cluster services is different. For example, the path information of configuration center 1 corresponding to cluster service 1 is different from the path information of configuration center 2 corresponding to cluster service 2. For example, the configuration path of configuration center 1 corresponding to cluster service 1 is / services / apps / cluster1, while the configuration path of configuration center 2 corresponding to cluster service 2 is / services / apps / cluster2, ensuring that the configurations of different cluster services do not interfere with each other.

[0077] By setting different paths for the configuration centers of different cluster services, we achieve configuration isolation for each cluster service, preventing conflicts or accidental overwriting caused by overlapping paths, thereby improving the security of process configuration on cluster service nodes. Furthermore, when adding a new cluster service, only the path information for the new configuration center needs to be assigned, eliminating the need to restructure the existing configuration structure, thus improving scalability.

[0078] S103: Connect to the corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and read the configuration information of the configuration center through the configuration daemon process.

[0079] Each configuration daemon's configuration file includes the path information for its corresponding configuration center. After the corresponding configuration daemon is started, it connects to the corresponding configuration center based on the path information in its own configuration file and reads the configuration information from the connected configuration center. The corresponding configuration daemon then determines whether to notify the process monitoring tool to make configuration changes based on the read configuration information. This enables real-time monitoring of the configuration center's configuration information, thereby improving the real-time and timely nature of configuration changes and, in turn, the overall efficiency of process configuration for cluster service nodes.

[0080] For example, refer to Figure 2 The configuration file based on the configuration daemon 111 includes the path information of the configuration center 1 corresponding to the process monitoring tool 11. Therefore, the cluster service node 1 can connect to the corresponding configuration center 1 based on the path information in the configuration file through the configuration daemon 111, and read the configuration information of the configuration center 1 through the configuration daemon 111. If the configuration information of the configuration center 1 is updated later, the process monitoring tool 11 can be notified through the configuration daemon 111 to update the configuration file and change the task. Similarly, the cluster service node 2 can connect to the corresponding configuration center 1 based on the path information in the configuration file through the configuration daemon 211, the cluster service node 3 can connect to the corresponding configuration center 1 based on the path information in the configuration file through the configuration daemon 311, the cluster service node 4 can connect to the corresponding configuration center 2 based on the path information in the configuration file through the configuration daemon 411, and the cluster service node 5 can connect to the corresponding configuration center 2 based on the path information in the configuration file through the configuration daemon 511.

[0081] S104. When the configuration daemon process reads that the configuration information of the configuration center has changed, the configuration daemon process generates a new configuration file for the corresponding process monitoring tool based on the read changed configuration information, so that the corresponding process monitoring tool executes the corresponding task change according to the new configuration file.

[0082] Based on reading the configuration information of the configuration center through the configuration daemon process, when the configuration information of the configuration center read by the configuration daemon process changes, the configuration daemon process generates a new configuration file for the corresponding process supervision tool based on the preset template according to the changed configuration information read, and the corresponding process supervision tool executes the corresponding task change according to the new configuration file. Among them, task changes include task start, task update or task stop. The new configuration file is parsed by the process supervision tool to identify the changed content. If the changed content is a new task entry, the task start is executed to start the new process; if the changed content is to modify the existing task parameters, the related process is re-updated to perform the task update; if the changed content is to delete the task entry, the task is stopped, that is, the corresponding process is stopped and cleaned up.

[0083] In one embodiment, a configuration daemon can subscribe to configuration change events from a configuration center using a long polling or monitoring mechanism. When subscribing to configuration change events from a configuration center using long polling, the configuration daemon can periodically send query requests to the configuration center, inquiring whether a configuration change event has occurred. If no configuration change event has occurred in the configuration center within a preset response time, the configuration daemon receives an empty response or a status code from the configuration center. If a configuration change event has occurred in the configuration center within a preset response time, the configuration daemon receives a change event response from the configuration center. When subscribing to configuration change events from a configuration center using a monitoring mechanism, when a configuration change event occurs in the configuration center, the configuration center can send a change event notification to the corresponding connected configuration daemon, i.e., the configuration daemon receives the change event notification from the configuration center. When the configuration daemon subscribes to a configuration change event from the configuration center, the configuration daemon reads the modified configuration information from the configuration center. The configuration daemon generates a new configuration file for the corresponding process monitoring tool based on the read configuration information and a preset generation template. As described above, by subscribing to the configuration change events of the configuration center through long polling or monitoring mechanisms, changes in the configuration information of the corresponding configuration center can be promptly learned, thereby improving the response efficiency of configuration changes.

[0084] For example, refer to Figure 2 For example, if the configuration information of the configuration center 1 read by the configuration daemon process 111 has changed, the configuration daemon process 111 generates a new configuration file for the corresponding process monitoring tool 11 based on the preset template according to the changed configuration information read, and the process monitoring tool 11 executes the corresponding task change according to the new configuration file.

[0085] For example, refer to Figure 2, the configuration daemon 111 corresponding to cluster service node 1, the configuration daemon 211 corresponding to cluster service node 2, and the configuration daemon 311 corresponding to cluster service node 3 can all be connected to the corresponding configuration center 1 based on the path information in their respective configuration files, that is, the configuration daemon 111, the configuration daemon 211, and the configuration daemon 311 can all read the configuration information of the configuration center 1. If the configuration parameters in cluster service node 1, cluster service node 2, and cluster service node 3 are uniformly updated, the configuration daemon 111, the configuration daemon 211, and the configuration daemon 311 can all read that the configuration information of the configuration center 1 has changed, and a new configuration file for the process monitoring tool 11 is generated by the configuration daemon 111, a new configuration file for the process monitoring tool 21 is generated by the configuration daemon 211, and a new configuration file for the process monitoring tool 31 is generated by the configuration daemon 311. By making corresponding task changes through process monitoring tool 11, process monitoring tool 21 and process monitoring tool 31 according to their corresponding new configuration files, unified task changes of all cluster service nodes under the unified cluster service can be achieved, avoiding the low efficiency caused by changing individual cluster service nodes one by one, thereby improving the work efficiency of process configuration of cluster service nodes.

[0086] It should be noted that each configuration center is configured with configuration information of a corresponding cluster service node. Configuration update can be performed on each cluster service node individually, or all cluster service nodes can be updated simultaneously.

[0087] As described above, unified management and configuration updates based on the configuration center can achieve synchronous updates of configuration information for all cluster service nodes in the corresponding cluster service, thereby improving the efficiency of cluster service node process configuration. In addition, by hosting the corresponding configuration daemon process to monitor the configuration information of the corresponding configuration center in real time, when changes are detected in the configuration center's configuration information, a new configuration file for the corresponding process monitoring tool can be immediately generated based on the changed configuration information, allowing the corresponding process monitoring tool to execute the corresponding task changes according to the new configuration file, further improving the efficiency of cluster service node process configuration.

[0088] In one embodiment, after a new configuration file for a corresponding process monitoring tool is generated based on a preset template according to the changed configuration information read by the configuration daemon process, an update notification is generated by the configuration daemon process. The update notification is sent to the corresponding process monitoring tool by the configuration daemon process, the new configuration file is loaded by the process monitoring tool according to the received update notification, and the corresponding task change is performed according to the new configuration file by the process monitoring tool based on the received change notification. As described above, the configuration daemon process automatically detects changes in configuration information, generates a new configuration file and notifies the process monitoring tool, and no manual operation is required throughout the process, thereby improving the automation and intelligence of the process configuration of the cluster service node; and the new configuration can be applied in real time without restarting the process monitoring tool, thus avoiding service interruption and improving the operational stability and reliability of the cluster service node.

[0089] For example, refer to Figure 2 For example, if the configuration information of the configuration center 1 read by the configuration daemon 111 has changed, the configuration daemon 111 generates a new configuration file for the corresponding process monitoring tool 11 based on the preset template according to the changed configuration information read and generates a change notification. The configuration daemon 111 sends the change notification to the process monitoring tool 11, and the process monitoring tool 11 executes the corresponding task change according to the new configuration file based on the change notification.

[0090] In one embodiment, when configuration information is configured for the first time, that is, when the configuration daemon process first connects to the corresponding configuration center, the configuration daemon process reads the configuration information from the configuration center and generates a configuration file for the corresponding process monitoring tool based on the read configuration information and generates a configuration notification. The configuration daemon process sends the configuration notification to the process monitoring tool. Based on the received configuration notification, the process monitoring tool starts the corresponding task according to the configuration file, such as starting the corresponding process.

[0091] In one embodiment, configuration parameters in the configuration center can be uniformly configured or modified by an administrator in the management backend, or they can be modified through automatic configuration. The automatic configuration method can collect the resource utilization and / or task queue backlog status of each cluster service node in real time. Resource utilization includes CPU utilization, memory usage, and disk input / output rate, and task queue backlog status includes queue length, processing delay time, and the number of backlog tasks. Based on the resource utilization and / or task queue backlog status, the process parameters of the corresponding cluster service node are adjusted. The process parameters include the number of processes and resource parameters for each process. The process parameters are sent to the corresponding configuration center, so that the configuration center changes the corresponding configuration information based on the received process parameters. For example, if the CPU utilization exceeds 80% for five consecutive minutes or the memory utilization exceeds 90%, the number of processes of the cluster service node can be adjusted to reduce or the resources for the corresponding process can be increased accordingly. Because the configuration center changes the corresponding configuration information based on the received process parameters, the aforementioned S104 can be executed, causing the corresponding process monitoring tool to execute the corresponding task changes. In the above, the number of processes and resource parameters of each process are dynamically adjusted through the resource utilization and / or task queue backlog status of each cluster service node to prevent the cluster service node from crashing due to resource exhaustion, thereby improving the operation stability and reliability of the cluster service node.

[0092] Based on the above implementation, Figure 3 This is a flowchart of another cluster service node process configuration method provided by an embodiment of the present application, referring to Figure 3 The process configuration method of the cluster service node specifically includes:

[0093] S201. Send the new configuration file to the version management warehouse through the configuration daemon process so that the version management warehouse can save the new configuration file. The version management warehouse stores at least one set of configuration files corresponding to each process supervision tool, and each set of configuration files is configured with a version number and generation time.

[0094] After the configuration daemon generates a new configuration file for the corresponding process monitoring tool based on the modified configuration information it reads, it sends the new configuration file to the version management repository, where it is stored. The version management repository stores at least one configuration file for each process monitoring tool, each of which is assigned a version number and generation time. By storing each generated configuration file in the version management repository, any subsequent need to return to an older version of the configuration file allows it to be retrieved from the repository.

[0095] S202. If the task change of the process monitoring tool is interrupted or fails, the configuration information of the old configuration file of the previous version number corresponding to the process monitoring tool is selected from the version management warehouse and pushed to the corresponding configuration center so that the configuration center updates its own configuration information according to the received configuration information.

[0096] When the process monitoring tool performs a task change based on the corresponding new configuration file, if the process monitoring tool task change is interrupted or fails, the server of the cluster service node can select the configuration information of the old configuration file with the previous version number corresponding to the process monitoring tool from the version management warehouse and push it to the corresponding configuration center, so that the configuration center can update its own configuration information according to the received configuration information.

[0097] S203. When the configuration information subscribed to the configuration center by the configuration daemon process changes, the configuration daemon process reads the latest configuration information of the configuration center, generates a target configuration file based on the read configuration information, and generates an update notification.

[0098] Based on the configuration information received from the previous version of the old configuration file, the configuration center updates its own configuration information. Therefore, the corresponding configuration daemon can subscribe to changes in the configuration information of the configuration center. When the configuration information subscribed to by the configuration daemon changes, the configuration daemon reads the latest configuration information from the configuration center, that is, the configuration information of the previous version of the old configuration file. The configuration daemon then generates a target configuration file based on the read configuration information and generates an update notification. It should be noted that the target configuration file at this time is the previous version of the old configuration file.

[0099] S204: Send an update notification to a corresponding process monitoring tool by configuring the daemon process.

[0100] After the configuration daemon generates the target configuration file based on the read configuration information and generates an update notification, the configuration daemon sends the update notification to the corresponding process monitoring tool to notify the corresponding process monitoring tool to parse the target configuration file to make corresponding task changes.

[0101] S205 : Load the target configuration file according to the received update notification through the process monitoring tool, and execute the corresponding task change according to the target configuration file.

[0102] The process monitoring tool loads the target configuration file based on the received update notification and executes the corresponding task changes based on the target configuration file. For example, the process monitoring tool parses the target configuration file and identifies the changes. If the change is a new task entry, a task start is executed to start the new process; if the change is a modification of an existing task parameter, the process is re-associated to perform the task update; if the change is a deletion of a task entry, a task stop is executed, i.e., the corresponding process is stopped and cleaned up.

[0103] For example, refer to Figure 2 , it is assumed that the configuration daemon 111 generates a new configuration file for the corresponding process monitoring tool 11 based on a preset template according to the changed configuration information read, and the process monitoring tool 11 executes the corresponding task change according to the new configuration file. In the process of the process monitoring tool 11 executing the task change, if the task change of the process monitoring tool 11 is interrupted or fails, it means that there may be a problem with the new configuration file and it cannot be executed normally. Therefore, the server of the cluster service node 1 selects the configuration information of the old configuration file of the previous version number corresponding to the process monitoring tool 11 from the version management warehouse and pushes it to the corresponding configuration center 1. The configuration center 1 updates its own configuration information based on the received configuration information of the old configuration file of the previous version number. At this time, the server of the cluster service node 1 can subscribe to the configuration information change of the configuration center 1 through the configuration daemon 111. Then, the configuration daemon 111 reads the latest configuration information of the configuration center 1, that is, the configuration information of the old configuration file of the previous version number, and generates the target configuration file and generates an update notification based on the read configuration information through the configuration daemon 111. The configuration daemon process 111 sends an update notification to the corresponding process monitoring tool 11 to notify the corresponding process monitoring tool 11 to parse the target configuration file and perform corresponding task changes, thereby avoiding service interruption of the cluster service node 1.

[0104] As mentioned above, the interruption or failure of the task change in the process monitoring tool indicates that there may be problems with the new configuration file and it cannot be executed normally. Therefore, this embodiment provides the configuration information of the old configuration file of the previous version number corresponding to the corresponding process monitoring tool based on the version management warehouse, so that when the new configuration file cannot be executed normally, the corresponding configuration center can be rolled back to the configuration information corresponding to the previous version number based on the configuration information of the old configuration file of the previous version number, so that the process monitoring tool of the corresponding cluster service node can operate normally based on the configuration information corresponding to the previous version number, avoiding service interruption of the corresponding cluster service node, and thereby improving the operation reliability and stability of the cluster service node.

[0105] Figure 4This is a flowchart of another process configuration method for a cluster service node provided in an embodiment of the present application. Figure 4 The process configuration method of the cluster service node specifically includes:

[0106] S1031. Load the transport layer security certificate and role access control authentication information according to the configuration file, determine the encrypted transmission channel according to the transport layer security certificate, and generate an authentication request according to the role access control authentication information.

[0107] In the aforementioned step S103, when the configuration daemon is connected to the corresponding configuration center according to the path information in the configuration file, the transport layer security certificate and role access control authentication information can be loaded according to the configuration file. Among them, the transport layer security certificate is a digital certificate used to encrypt and authenticate data in network communications. In the communication connection between the configuration daemon and the configuration center, the transport layer security certificate can ensure that the link between the two is encrypted, which can prevent data from being stolen or tampered with during transmission, and can also verify the identities of both communicating parties. Exemplarily, the transport layer security certificate can be TLS (Transport Layer Security). Role access control authentication information includes user identity (such as user name and password), role definition (such as administrator, member user and ordinary user) and permission rules (such as allowing reading and writing a certain path), which is mainly used to limit different users' access rights to the path. Exemplarily, the role access control authentication information can be RBAC (Role-Based Access Control) authentication information. According to the transport layer security certificate, the encrypted transmission channel is determined, and the authentication request is generated according to the role access control authentication information. Subsequently, the configuration center can perform encrypted communication and user identity verification, as well as user role authority verification, based on the transport layer security certificate corresponding to the encrypted channel and the role access control authentication information in the authentication request.

[0108] S1032. Based on the encrypted transmission channel, send an authentication request to the corresponding configuration center according to the path information in the configuration file, so as to establish a communication connection with the configuration center after the configuration center passes the authentication.

[0109] The configuration daemon sends an authentication request to the corresponding configuration center based on the encrypted transmission channel and the path information in the configuration file. The configuration center verifies the encrypted communication and user identity based on the transport layer security certificate corresponding to the encrypted channel. If the transport layer security certificate corresponding to the encrypted channel matches the transport layer security certificate pre-stored in the configuration center, it means that the encrypted communication and user identity verification are successful. The configuration center verifies the user's user role permissions based on the role access control authentication information in the authentication request. If the role access control authentication information in the authentication request matches the role access control authentication information pre-stored in the configuration center, the user role permission verification is successful. After the configuration center authentication is successful, that is, the encrypted communication and user identity verification are successful, as well as the user role permission verification is successful, the configuration center returns the corresponding communication response to the corresponding configuration daemon to establish a communication connection between the corresponding configuration daemon and the configuration center.

[0110] As described above, in the process of connecting to the corresponding configuration center through the configuration daemon according to the path information in the configuration file, the data transmission security is verified through the transport layer security certificate, and the data access security is verified through the role access control authentication information. This can improve the security of the communication connection between the configuration daemon and the configuration center, avoid the problem of illegal theft, tampering or super-privilege execution, and thus improve the overall security of the process configuration of the cluster service node.

[0111] Figure 5 This is a flowchart of another cluster service node process configuration method provided by an embodiment of the present application, referring to Figure 5 The process configuration method of the cluster service node specifically includes:

[0112] S1033. All configuration daemons are connected to the corresponding configuration center according to the path information in the configuration file. The configuration center presets a lock key.

[0113] Each process monitoring tool is configured with at least two configuration daemons. In step S103, when a configuration daemon connects to the corresponding configuration center based on the path information in the configuration file, all configuration daemons connect to the corresponding configuration center based on the path information in their own configuration files. The configuration center presets a lock key. The lock key is used to lock one of the configuration daemons as the master process, which is used to read the configuration information of the configuration center.

[0114] S1034. Each configuration daemon process atomically acquires the lock key based on the transaction interface of the configuration center.

[0115] After all configuration daemons connect to the corresponding configuration center using the path information in the configuration file, each configuration daemon atomically acquires the lock key using the configuration center's transaction interface. Atomic lock key acquisition means that only one configuration daemon can acquire the lock key. After the corresponding configuration daemon acquires the lock key, the remaining configuration daemons cannot acquire the lock key.

[0116] S1035: Determine the configuration daemon process that obtains the lock key as the main process, and determine the remaining configuration daemon processes as backup processes.

[0117] The configuration daemon that obtains the lock key is designated as the primary process. The primary process is subsequently used to read configuration information from the configuration center. The remaining configuration daemons are designated as backup processes. When the primary process's lock key with the configuration center is not renewed, the backup process will compete for the lock key and replace the primary process.

[0118] S1036. Read the configuration information of the configuration center through the main process, and send a renewal request to the configuration center every preset time to extend the holding time of the lock key.

[0119] The main process (the corresponding configuration daemon) reads the configuration information from the configuration center and executes the aforementioned step S104. Furthermore, the main process sends a renewal request to the configuration center at preset intervals to extend the lock key holding period. The corresponding configuration daemon, upon holding the lock key, acts as the main process, and is responsible for detecting changes to the configuration information of the corresponding configuration center.

[0120] S1037. Monitor the lock key status of the main process through the standby process. When the lock key status is invalid or deleted, atomically obtain the lock key again through all standby processes.

[0121] The lock key status of the main process is monitored by the standby process. When the lock key status is held, it means that the corresponding main process has successfully renewed the contract with the configuration center, and the corresponding main process continues to hold the lock key. When the lock key status is invalid or deleted, it means that the corresponding main process has failed to renew the contract with the configuration center or has not continued. In this case, all standby processes will re-atomicly obtain the lock key to select a new main process. As described above, when the main process fails, the standby process can try to become the new main process by atomically obtaining the lock key, thereby avoiding the suspension of configuration information monitoring due to the failure of the configuration daemon process as the main process, and can continue to detect the configuration information of the configuration center based on the new main process, thereby improving the timeliness of configuration update detection.

[0122] Figure 6 This is a second configuration diagram of a configuration center and cluster service nodes provided in an embodiment of the present application, referring to Figure 6This explanation will be given using the example of a process monitoring tool 11 configured with three configuration daemons. Process monitoring tool 11 is configured with three configuration daemons: configuration daemon 111, configuration daemon 112, and configuration daemon 113. Configuration daemons 111, 112, and 113 connect to the corresponding configuration center 1 based on the path information in their respective configuration files. Configuration center 1 presets a lock key. Configuration daemons 111, 112, and 113 atomically acquire the lock key based on the transaction interface of configuration center 1. Assuming that configuration daemon 111 acquires the lock key, configuration daemon 111 is designated as the primary process, and configuration daemons 112 and 113 are designated as backup processes. Configuration daemon 111 reads the configuration information of configuration center 1 and executes the aforementioned step S104. Configuration daemon 111 sends renewal requests to configuration center 1 at preset intervals. Configuration daemons 112 and 113 monitor the lock key status of the primary process. After the configuration daemon 111 sends a renewal request, if the configuration center 1 returns a successful renewal response, the lock key status is held, and the configuration daemon 111 extends the holding time of the lock key, and the corresponding configuration daemon 112 and configuration daemon 113 continue to monitor the lock key status of the main process. After the configuration daemon 111 sends a renewal request, if the configuration center 1 does not return a successful renewal response, the lock key status is invalid or deleted; or if the configuration daemon 111 does not send a renewal request to the configuration center 1 within the preset time, the lock key status is invalid or deleted. When the configuration daemon 112 and the configuration daemon 113 monitor that the lock key status is invalid or deleted, the configuration daemon 112 and the configuration daemon 113 re-atomicly obtain the lock key. Assuming that the configuration daemon 112 obtains the lock key at this time, the configuration daemon 112 is determined to be the main process, and the configuration daemon 111 and the configuration daemon 113 are determined to be the backup processes. The configuration daemon 112 reads the configuration information of the configuration center 1 and executes the aforementioned step S104.

[0123] As mentioned above, when the primary process fails, the backup process can atomically acquire the lock key and attempt to become the new primary process. This prevents the configuration daemon process, which serves as the primary process, from suspending configuration information monitoring. The new primary process can continue to monitor the configuration center's configuration information, thereby improving the timeliness of configuration update detection. Furthermore, through the election and failover of the primary and backup processes, cluster service node operation failures caused by a configuration daemon process failure and inability to detect configuration updates can be avoided, thereby improving the operational reliability of cluster service nodes.

[0124] Based on the above embodiments, Figure 7This is a schematic diagram of the structure of a process configuration device for a cluster service node provided by an embodiment of the present application. Figure 7 The process configuration device for a cluster service node provided in this embodiment specifically includes: a process monitoring tool starting module 21 , a configuration daemon process starting module 22 , a communication connection module 23 and a new configuration file generating module 24 .

[0125] Among them, the process monitoring tool startup module 21 is used to start the process monitoring tool of the cluster service node when receiving the system startup instruction;

[0126] The configuration daemon process startup module 22 is used to read the main configuration file through the process monitoring tool and start and host the corresponding configuration daemon process according to the main configuration file. The configuration daemon process configuration file includes the path information of the configuration center corresponding to the corresponding process monitoring tool. Each cluster service node belongs to a corresponding cluster service, and each cluster service corresponds to a configuration center. The path information of the configuration center of different cluster services is different;

[0127] The communication connection module 23 is used to connect to the corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and read the configuration information of the configuration center through the configuration daemon process;

[0128] The new configuration file generation module 24 is used to generate a new configuration file for the corresponding process monitoring tool according to the changed configuration information read by the configuration daemon process when the configuration information of the configuration center is changed, so that the corresponding process monitoring tool can execute the corresponding task change according to the new configuration file.

[0129] In one embodiment, the process configuration device of the cluster service node further includes: an update notification generating module and an update notification sending module;

[0130] Update notification generation module, used to generate update notifications by configuring the daemon process;

[0131] Update notification sending module, used to send update notifications to the corresponding process monitoring tool by configuring the daemon process;

[0132] The new configuration file generation module 24 is further used to load the new configuration file through the process monitoring tool according to the received update notification, and execute corresponding task changes according to the new configuration file through the process monitoring tool. Task changes include task start, task update or task stop.

[0133] In one embodiment, the process configuration device of the cluster service node further includes: a configuration file saving module, an old configuration pushing module and a target configuration file generating module;

[0134] The configuration file saving module is used to send the new configuration file to the version management warehouse through the configuration daemon process so that the version management warehouse can save the new configuration file. The version management warehouse stores at least one set of configuration files corresponding to each process supervision tool. Each set of configuration files is configured with a version number and generation time.

[0135] The old configuration push module is used to select the configuration information of the old configuration file of the previous version number corresponding to the process supervision tool from the version management warehouse if the task change of the process supervision tool is interrupted or fails, and push it to the corresponding configuration center, so that the configuration center can update its own configuration information according to the received configuration information;

[0136] The update notification generation module is also used to read the latest configuration information from the configuration center through the configuration daemon process when the configuration information subscribed to the configuration center changes, and generate a target configuration file and an update notification based on the read configuration information;

[0137] The update notification sending module is also used to send update notifications to the corresponding process monitoring tool by configuring the daemon process;

[0138] The target configuration file generation module is used to load the target configuration file according to the received update notification through the process monitoring tool, and execute the corresponding task changes according to the target configuration file.

[0139] In one embodiment, the root communication connection module 23 includes: an authentication request generation submodule and an authentication submodule;

[0140] The authentication request generation submodule is used to load the transport layer security certificate and role access control authentication information according to the configuration file, determine the encrypted transmission channel according to the transport layer security certificate, and generate an authentication request according to the role access control authentication information;

[0141] The authentication submodule is used to send an authentication request to the corresponding configuration center based on the encrypted transmission channel and the path information in the configuration file, so as to establish a communication connection with the configuration center after the configuration center passes the authentication.

[0142] In one embodiment, the process configuration device of the cluster service node further includes: an information collection module, a parameter adjustment module and a configuration information change module;

[0143] An information collection module is used to collect the resource utilization and / or task queue backlog status of each cluster service node in real time. Resource utilization includes CPU utilization, memory usage, and disk input and output rates. Task queue backlog status includes queue length, processing delay time, and the number of backlog tasks.

[0144] A parameter adjustment module is used to adjust the process parameters of the corresponding cluster service node according to resource utilization and / or task queue backlog status. The process parameters include the number of processes and resource parameters of each process;

[0145] The configuration information change module is used to send process parameters to the corresponding configuration center so that the configuration center can change the corresponding configuration information according to the received process parameters.

[0146] In one embodiment, each process supervisor tool is configured with at least two configuration daemons;

[0147] The communication connection module 23 includes: a communication connection submodule, a lock key acquisition submodule, a primary and standby process determination submodule, a lock key renewal submodule and a standby monitoring submodule;

[0148] The communication connection submodule is used to connect to the corresponding configuration center through all configuration daemons according to the path information in the configuration file. The configuration center presets a lock key;

[0149] The lock key acquisition submodule is used to atomically acquire the lock key through each configuration daemon based on the transaction interface of the configuration center;

[0150] The master / slave process determination submodule is used to determine the configuration daemon process that has obtained the lock key as the master process and the remaining configuration daemon processes as the backup processes;

[0151] The lock key renewal submodule is used to read the configuration information of the configuration center through the main process and send a renewal request to the configuration center at preset intervals to extend the holding time of the lock key;

[0152] The standby monitoring submodule is used to monitor the lock key status of the main process through the standby process. When the lock key status is invalid or deleted, the lock key is atomically re-acquired through all standby processes.

[0153] In one embodiment, the new configuration file generation module 24 includes: a change event subscription submodule, a change information reading submodule, and a configuration file generation submodule;

[0154] The change event subscription submodule is used to subscribe to the configuration change events of the configuration center through the configuration daemon based on long polling or monitoring mechanism;

[0155] The change information reading submodule is used to read the changed configuration information of the configuration center through the configuration daemon process when the configuration daemon process subscribes to the configuration change event of the configuration center;

[0156] The configuration file generation submodule is used to generate a new configuration file for the corresponding process monitoring tool according to the configuration information read by the configuration daemon process and the preset generation template.

[0157] In one embodiment, the change event subscription submodule includes: an inquiry request sending unit, a first response receiving unit, a second response receiving unit, and a change event notification receiving unit;

[0158] An inquiry request sending unit, configured to periodically send an inquiry request to the configuration center through the configuration daemon process, wherein the inquiry request is used to inquire the configuration center whether a configuration change event occurs;

[0159] A first response receiving unit is configured to receive an empty response or a status code returned by the configuration center through the configuration daemon process if no configuration change event occurs in the configuration center within a preset response time;

[0160] The second response receiving unit is configured to receive a change event response returned by the configuration center through the configuration daemon process if a configuration change event occurs in the configuration center within a preset response time;

[0161] The change event notification receiving unit is used to receive the change event notification sent by the configuration center through the configuration daemon process when a configuration change event occurs in the configuration center.

[0162] The process configuration device for a cluster service node provided in an embodiment of the present application can be used to execute the process configuration method for a cluster service node provided in the above embodiment, and has corresponding functions and beneficial effects.

[0163] The embodiment of the present application provides a process configuration device for a cluster service node, referring to Figure 8 The process configuration device of the cluster service node includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The number of processors in the process configuration device of the cluster service node can be one or more, and the number of memories in the process configuration device of the cluster service node can be one or more. The processor, memory, communication module, input device, and output device of the process configuration device of the cluster service node can be connected via a bus or other means.

[0164] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs, and modules, such as the program instructions / modules corresponding to the process configuration method of the cluster service node of any embodiment of the present application (for example, the process monitoring tool startup module, the configuration daemon startup module, the communication connection module, and the new configuration file generation module in the process configuration device of the cluster service node). The memory may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and applications required for at least one function; the data storage area can store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0165] The communication module 33 is used for data transmission.

[0166] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory, that is, implements the above-mentioned process configuration method of the cluster service node.

[0167] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.

[0168] The process configuration device for a cluster service node provided above can be used to execute the process configuration method for a cluster service node provided in the above embodiment, and has corresponding functions and beneficial effects.

[0169] An embodiment of the present application also provides a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to execute a process configuration method for a cluster service node. The process configuration method for the cluster service node includes: upon receiving a system startup instruction, starting a process monitoring tool for the cluster service node; reading a main configuration file through the process monitoring tool, and starting and hosting a corresponding configuration daemon process according to the main configuration file, wherein the configuration file of the configuration daemon process includes path information of a configuration center corresponding to the corresponding process monitoring tool, each cluster service node belongs to a corresponding cluster service, each cluster service corresponds to a configuration center, and the path information of the configuration centers of different cluster services is different; connecting to the corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and reading the configuration information of the configuration center through the configuration daemon process; when the configuration daemon process reads that the configuration information of the configuration center has changed, generating a new configuration file for the corresponding process monitoring tool through the configuration daemon process according to the read changed configuration information, for the corresponding process monitoring tool to execute the corresponding task change according to the new configuration file.

[0170] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape drives; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or it may be located in a different second computer system that is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that can be executed by one or more processors.

[0171] Of course, the computer executable instructions of the storage medium storing computer executable instructions provided in the embodiment of the present application are not limited to the process configuration method of the cluster service node described above, and can also execute related operations in the process configuration method of the cluster service node provided in any embodiment of the present application.

[0172] The process configuration device, storage medium and process configuration equipment of the cluster service node provided in the above embodiments can execute the process configuration method of the cluster service node provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the process configuration method of the cluster service node provided in any embodiment of the present application.

[0173] The above are only preferred embodiments of the present application and the technical principles employed. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that are possible for those skilled in the art will not depart from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include more other equivalent embodiments without departing from the concept of the present application. The scope of the present application is determined by the scope of the claims.

Claims

1. A process configuration method for a cluster service node, characterized in that: include: When receiving the system startup instruction, start the process monitoring tool of the cluster service node; The process monitoring tool reads the main configuration file and starts and hosts the corresponding configuration daemon process according to the main configuration file. The configuration file of the configuration daemon process includes the path information of the configuration center corresponding to the corresponding process monitoring tool. Each cluster service node belongs to a corresponding cluster service, and each cluster service corresponds to a configuration center. The path information of the configuration center of different cluster services is different. Connecting to the corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and reading the configuration information of the configuration center through the configuration daemon process; When the configuration daemon process reads that the configuration information of the configuration center has changed, the configuration daemon process generates a new configuration file for the corresponding process monitoring tool based on the read changed configuration information, so that the corresponding process monitoring tool executes the corresponding task change according to the new configuration file.

2. The method according to claim 1, characterized in that When the configuration daemon process reads that the configuration information of the configuration center has changed, after the configuration daemon process generates a new configuration file of the corresponding process monitoring tool according to the read changed configuration information, the method further includes: generating an update notification via the configuration daemon; Sending the update notification to the corresponding process monitoring tool through the configuration daemon process; The new configuration file is loaded by the process monitoring tool according to the received update notification, and the corresponding task change is executed by the process monitoring tool according to the new configuration file, where the task change includes task start, task update or task stop.

3. The method according to claim 2, characterized in that After the process monitoring tool executes the corresponding task change according to the new configuration file, the method further includes: Sending the new configuration file to the version management warehouse through the configuration daemon process so that the version management warehouse saves the new configuration file. The version management warehouse saves at least one set of configuration files corresponding to each process monitoring tool, and each set of configuration files is correspondingly configured with a version number and generation time; If the task change of the process monitoring tool is interrupted or fails, the configuration information of the old configuration file of the previous version number corresponding to the process monitoring tool is selected from the version management warehouse and pushed to the corresponding configuration center, so that the configuration center updates its own configuration information according to the received configuration information; When the configuration information subscribed to the configuration center by the configuration daemon process changes, the configuration daemon process reads the latest configuration information of the configuration center, generates a target configuration file based on the read configuration information, and generates an update notification; Sending the update notification to the corresponding process monitoring tool through the configuration daemon process; The target configuration file is loaded by the process monitoring tool according to the received update notification, and the corresponding task change is performed according to the target configuration file.

4. The method according to claim 1, wherein Connecting to the corresponding configuration center according to the path information in the configuration file includes: Loading the transport layer security certificate and role access control authentication information according to the configuration file, determining the encrypted transmission channel according to the transport layer security certificate, and generating an authentication request according to the role access control authentication information; Based on the encrypted transmission channel, the authentication request is sent to the corresponding configuration center according to the path information in the configuration file, so as to establish a communication connection with the configuration center after the authentication of the configuration center is passed.

5. The method according to claim 1, wherein After starting the process monitoring tool of the cluster service node, the method further includes: Real-time collection of resource utilization and / or task queue backlog status of each cluster service node. The resource utilization includes CPU utilization, memory usage, and disk input and output rates. The task queue backlog status includes queue length, processing delay time, and number of backlog tasks. Adjusting the process parameters of the corresponding cluster service node according to the resource utilization and / or task queue backlog status, the process parameters including the number of processes and resource parameters of each process; The process parameters are sent to a corresponding configuration center, so that the configuration center changes the corresponding configuration information according to the received process parameters.

6. The method according to claim 1, characterized in that Each of the process monitoring tools is configured with at least two configuration daemon processes; The connecting to the corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and reading the configuration information of the configuration center through the configuration daemon process, includes: All configuration daemons are connected to the corresponding configuration center according to the path information in the configuration file, and the configuration center has a preset lock key; Atomically acquiring the lock key through each configuration daemon based on the transaction interface of the configuration center; Determine the configuration daemon process that obtains the lock key as the main process, and determine the remaining configuration daemon processes as backup processes; Reading the configuration information of the configuration center through the main process, and sending a renewal request to the configuration center at preset intervals to extend the holding time of the lock key; The standby process monitors the lock key status of the main process, and when the lock key status is invalid or deleted, all standby processes atomically reacquire the lock key.

7. The method according to claim 1, characterized in that When the configuration daemon process reads that the configuration information of the configuration center has changed, the configuration daemon process generates a new configuration file of the corresponding process monitoring tool according to the read changed configuration information, including: Subscribe to the configuration change events of the configuration center through the configuration daemon based on long polling or monitoring mechanism; When the configuration daemon process subscribes to a configuration change event in the configuration center, the configuration daemon process reads the changed configuration information of the configuration center; The configuration daemon process generates a new configuration file for the corresponding process monitoring tool according to the read configuration information and a preset generation template.

8. The method according to claim 7, characterized in that Subscribing to the configuration change events of the configuration center through the configuration daemon based on a long polling or monitoring mechanism includes: Periodically sending a query request to the configuration center through the configuration daemon, wherein the query request is used to inquire the configuration center whether a configuration change event occurs; If no configuration change event occurs in the configuration center within the preset response time, an empty response or status code returned by the configuration center is received through the configuration daemon process; If a configuration change event occurs in the configuration center within a preset response time, the configuration daemon receives a change event response returned by the configuration center; Alternatively, when a configuration change event occurs in the configuration center, the configuration daemon receives a change event notification sent by the configuration center.

9. A process configuration device for a cluster service node, characterized in that: include: The process monitoring tool startup module is used to start the process monitoring tool of the cluster service node when receiving the system startup instruction; A configuration daemon startup module is used to read the main configuration file through the process monitoring tool and start and host the corresponding configuration daemon according to the main configuration file. The configuration daemon configuration file includes the path information of the configuration center corresponding to the corresponding process monitoring tool. Each cluster service node belongs to a corresponding cluster service, and each cluster service corresponds to a configuration center. The path information of the configuration center of different cluster services is different; A communication connection module, configured to connect to a corresponding configuration center according to the path information in the configuration file through the configuration daemon process, and read the configuration information of the configuration center through the configuration daemon process; A new configuration file generation module is used to generate a new configuration file for the corresponding process monitoring tool according to the changed configuration information read by the configuration daemon process when the configuration information of the configuration center is changed, so that the corresponding process monitoring tool can execute the corresponding task change according to the new configuration file.

10. A process configuration device for a cluster service node, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the process configuration of the cluster service node according to any one of claims 1 to 8.

11. A storage medium storing computer executable instructions, characterized in that: When executed by a processor, the computer executable instructions are used to execute the process configuration of the cluster service node according to any one of claims 1 to 8.