Database configuration management method, device, electronic equipment and computer storage medium

By obtaining the global configuration template and monitoring the operating status of nodes and generating target configuration files, the limitations of traditional distributed database configuration management methods in terms of flexibility, real-timeness and automation are solved, efficient and automated configuration management is achieved, and the stability and operation and maintenance efficiency of the system are improved.

CN119739696APending Publication Date: 2025-04-01JINZHUAN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411925912.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

Traditional distributed database configuration management methods show limitations in terms of flexibility, real-timeness and automation, especially when the number of nodes is large and widely distributed, configuration updates are large, inefficient, and error-prone.

Method used

By obtaining the global configuration template, monitoring the operating status of each node in the database cluster, and generating target configuration files based on the operating status of each node, a unified update management and dynamic adjustment mechanism for distributed database nodes is realized.

Benefits of technology

It significantly improves the convenience and adaptability of distributed database configuration management, realizes higher-level automated operation and maintenance of the database management system, and reduces the possibility of manual intervention and errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739696A_ABST
    Figure CN119739696A_ABST
Patent Text Reader

Abstract

The present application discloses a database configuration management method, device, electronic device and computer storage medium, which belongs to the field of distributed database management. Among them, the method includes: obtaining a global configuration template; monitoring the operating status of each node in the database cluster; generating a target configuration value corresponding to each configuration item in the global configuration template according to the operating status of each node, and obtaining a target configuration file, wherein the target configuration file includes the target configuration value; distributing the target configuration file to the corresponding node. The present application uses a global configuration template to uniformly update and manage the nodes in the cluster, and through a dynamic adjustment mechanism, automatically updates the configuration information in real time according to the actual operating status of the cluster, which significantly improves the efficiency of distributed database configuration management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of distributed database management, and in particular to a database configuration management method, device, electronic device and computer storage medium. Background Art

[0002] With the rapid development of big data and cloud computing technologies, distributed database systems are widely used due to their high availability and scalability. However, facing complex scenarios where nodes (each computer in a distributed database system is called a node) are diverse in type, numerous in number, and widely distributed, traditional configuration management methods have shown limitations in terms of flexibility, real-time, and automation.

[0003] In the current technologies related to distributed database configuration management, the conventional practice is to maintain independent configuration files for each database node. When the configuration needs to be updated, the administrator needs to manually log in to each node and modify the configuration files one by one. Especially when there are a large number of nodes and they are widely distributed, the configuration update workload is large, the efficiency is low, and it is prone to errors.

[0004] Therefore, how to achieve efficient management of the configuration of a large number of distributed database nodes is a core technical problem that needs to be solved urgently in this field.

[0005] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention

[0006] The present application provides a database configuration management method, device, electronic device and computer storage medium to solve the above-mentioned technical problems existing in the related technology.

[0007] According to an embodiment of the present application, a database configuration management method is provided, including: obtaining a global configuration template; monitoring the operating status of each node in a database cluster; generating a target configuration value corresponding to each configuration item in the global configuration template according to the operating status of each node, and obtaining a target configuration file, wherein the target configuration file includes the target configuration value; and distributing the target configuration file to corresponding nodes.

[0008] According to another embodiment of the present application, a database configuration management device is provided, including: a configuration file library, used to obtain a global configuration template; a monitoring module, used to monitor the operating status of each node in the database cluster; a configuration module, used to generate a target configuration value corresponding to each configuration item in the global configuration template according to the operating status of each node, and obtain a target configuration file, wherein the target configuration file includes the target configuration value; and distribute the target configuration file to the corresponding nodes.

[0009] Optionally, the monitoring module includes a first detection unit, used to monitor the hardware resource usage of the current node; the configuration module includes a parsing unit, used to parse the preset conditions corresponding to the hardware resource configuration items in the global configuration template; a generation unit, used to increase the configuration value of the hardware resource configuration item according to the preset conditions, generate a first target configuration value corresponding to the hardware resource configuration item, and obtain a first target configuration file when the hardware resource usage is greater than a first preset threshold value; and reduce the configuration value of the hardware resource configuration item when the hardware resource usage is less than a second preset threshold value, generate a second target configuration value corresponding to the hardware resource configuration item, and obtain a second target configuration file.

[0010] Optionally, the monitoring module includes a second detection unit, which is used to monitor whether new components are added or reduced for the current node; the configuration module includes an allocation unit, which is used to parse the total available resource value of the current node corresponding to the hardware resource configuration item in the global configuration template if new components are added or reduced for the current node; and reallocate the total available resources to the newly added or reduced components.

[0011] Optionally, the configuration module includes a distribution unit, which is used to initiate a change request to an agent component of a corresponding node; when the agent component responds to the change request, the target configuration file is distributed to the corresponding node.

[0012] Optionally, the database configuration management device further comprises a verification module, which is used to perform local verification on the target configuration file in the node; after the verification is passed, the configuration parameters of the node are updated according to the target configuration file.

[0013] Optionally, the verification module further includes a rollback unit, which is used to detect whether there is an abnormality in the operation of the node; if there is an abnormality in the operation of the node, roll back to the last version of the valid configuration file.

[0014] Optionally, the rollback unit also includes a comparison subunit, which is used to detect the current performance index of the node during operation; compare the current performance index with the previous version of the performance index; if the current performance index is lower than the previous version of the performance index, it is determined that there is an abnormality in the node during operation.

[0015] According to another embodiment of the present application, a computer storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.

[0016] According to another embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.

[0017] According to yet another embodiment of the present application, a computer program product comprising instructions is also provided, which enables the computer to execute the steps in the above method when the computer program product is executed on the computer.

[0018] The embodiment of the present application uses a programmable global configuration template to uniformly update and manage all nodes in the cluster, and through a dynamic adjustment mechanism, can automatically update configuration information in real time according to the actual operating status of the cluster. This significantly improves the convenience and adaptability of distributed database configuration management, and strongly promotes the development of database management systems to a higher level of automated operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 is a hardware structure block diagram of a computer according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of a database configuration management method according to an embodiment of the present application;

[0022] Figure 3 It is a schematic diagram of a database configuration management system framework according to an embodiment of the present application;

[0023] Figure 4 It is a structural block diagram of a database configuration management device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] Example 1

[0027] The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, a computer, a tablet or a similar computing device. Taking running on a computer as an example, Figure 1 is a hardware structure block diagram of a computer in an embodiment of the present application. Figure 1 As shown, the computer may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a database configuration management method in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer 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 combinations thereof.

[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] In this embodiment, a database configuration management method is provided. Figure 2 is a flowchart of a database configuration management method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0031] Step S10, obtaining a global configuration template;

[0032] In this embodiment, the user can use the editor to write and customize a global configuration template suitable for a distributed database using a specific global configuration parsing language, and the template includes configuration items such as node configuration, network topology, and load balancing strategy. Among them, the node configuration includes relevant configuration items for each component in the node (components include computing components, data components, and management components, etc.), such as the component ID, IP address, memory usage upper limit, file IO open upper limit (the maximum number of files that a component can open at the same time), CPU usage upper limit, function or performance configuration and other configuration items. The above configuration items can be set as static configuration items or conditional logic configuration items according to actual needs, wherein the conditional logic configuration items can be written through conditional statements (If-Then statements) and / or loop structures (while loops), so that the subsequent global configuration parsing engine can dynamically adjust its configuration value based on the conditional logic and the operating status of each node.

[0033] When writing a global configuration template, users do not need to specify a specific IP address, and can use placeholders or specific syntax to indicate the use of the local IP. The global configuration parsing engine will automatically extract the local IP information of the node and replace it with the corresponding configuration item position in the global configuration template.

[0034] Step S20, monitoring the operating status of each node in the database cluster;

[0035] Real-time monitoring of the operating status of each node in the distributed database cluster, including but not limited to key indicators such as CPU usage, memory usage, disk I / O, and network bandwidth.

[0036] Step S30, generating a target configuration value corresponding to each configuration item in the global configuration template according to the running status of each node, and obtaining a target configuration file, wherein the target configuration file includes the target configuration value;

[0037] Step S40: Distribute the target configuration value to corresponding nodes.

[0038] The global configuration parsing engine dynamically calculates the target configuration value of each configuration item in the global configuration template according to the running status of each node, and generates a target configuration file containing these target configuration values. The generated target configuration file is distributed to the corresponding nodes to achieve automatic update management of the configuration information of each node.

[0039] This embodiment uses a programmable global configuration template to uniformly update and manage all nodes in the cluster, and through a dynamic adjustment mechanism, it can automatically update configuration information in real time according to the actual operating status of the cluster. This significantly improves the convenience and adaptability of distributed database configuration management, and strongly promotes the development of database management systems towards a higher level of automated operation and maintenance.

[0040] In one implementation of this embodiment, according to the running status of each node, the target configuration value corresponding to each configuration item in the global configuration template is generated, and the target configuration file obtained includes:

[0041] A31, for a current node, monitoring the hardware resource usage of the current node;

[0042] A32, parsing the preset conditions corresponding to the hardware resource configuration items in the global configuration template;

[0043] A33, according to the preset conditions, when the hardware resource usage is greater than the first preset threshold, the configuration value of the hardware resource configuration item is increased, and a first target configuration value corresponding to the hardware resource configuration item is generated to obtain a first target configuration file; when the hardware resource usage is less than the second preset threshold, the configuration value of the hardware resource configuration item is reduced, and a second target configuration value corresponding to the hardware resource configuration item is generated to obtain a second target configuration file.

[0044] In this embodiment, the hardware resource usage (such as CPU, memory, disk space, etc.) of each node in the database cluster is continuously monitored, and the monitored hardware resource usage is fed back to the global configuration parsing engine; the global configuration parsing engine dynamically adjusts the configuration parameters according to the hardware resource usage and the preset conditions corresponding to the hardware resource configuration items in the global configuration template.

[0045] The preset conditions corresponding to the hardware resource configuration items in the global configuration template are as follows: If the hardware resource usage is greater than the first preset threshold, it means that the load of the current node is high. At this time, the configuration value of the hardware resource configuration item is increased, such as increasing the CPU quota or memory, and a new configuration file is generated, namely the first target configuration file. When the hardware resource usage is less than the second preset threshold, it means that the resources of the current node are too idle. At this time, the resource allocation is reduced accordingly, and the configuration value of the hardware resource configuration item is reduced to improve the overall resource utilization efficiency, and a new configuration file is generated, namely the second target configuration file.

[0046] This implementation enables the database to automatically adjust its configuration according to resource usage, reduces the occurrence of excessive load, downtime or crash on nodes, and improves the elastic scaling capability and operation and maintenance efficiency of the database system.

[0047] In another implementation of this embodiment, according to the running status of each node, the target configuration value corresponding to each configuration item in the global configuration template is generated, and the target configuration file is obtained, including:

[0048] B31, for the current node, monitoring whether the current node has a new component or a new component;

[0049] B32, if the current node has a new component or a reduced component, parsing the total available resource value of the current node corresponding to the hardware resource configuration item in the global configuration template;

[0050] B33, reallocate the total available resources to the newly added or reduced components.

[0051] Continuously monitor whether each node in the database cluster has added or reduced components; if a new component is added to the current node, for example, the current node originally has only one data component a, then data component a occupies the total available resource value of the entire current node; when it is detected that a new data component b has been added to the current node, it is necessary to dynamically adjust the configuration to reallocate the total available resources for the newly added components, for example, data components a and b are each allocated half of the total available resource value. In this embodiment, resources can be reallocated according to another preset condition corresponding to the hardware resource configuration item. Optionally, if the types of the newly added components are the same, the total available resources are evenly allocated. If the types of the newly added components include data components and computing components, the first available resources are allocated to the data components, and the second available resources are allocated to the computing components, wherein the sum of the first available resources and the second available resources is equal to the total available resources, and the first available resources are greater than the second available resources.

[0052] This implementation method dynamically adjusts the configuration according to the increase or decrease in the type and quantity of node components and the resource status, thereby improving the flexibility of configuration adjustment.

[0053] In another implementation of this embodiment, before distributing the target configuration file to the corresponding node, the method also includes: initiating a change request to the agent component of the corresponding node; when the agent component responds to the change request, distributing the target configuration file to the corresponding node.

[0054] This embodiment performs version control and audit on the newly generated target configuration file before distributing the target configuration file to the corresponding nodes. The configuration file library receives and stores the target configuration file, and uses the version control system to track and compare versions to ensure that each change is recorded and goes through the necessary audit process. The audit process may include automated checks (such as syntax verification, configuration compliance checks) or manual approval (such as by a database administrator or IT manager). When the configuration file in the configuration file library changes, a change pre-notification is issued to all relevant database nodes. First, a change request is initiated to the proxy component of the corresponding node to check whether the proxy component is online and able to respond. When the proxy component receives the change request, it returns a confirmation response, indicating that it is online and ready to receive and execute subsequent configuration change instructions. This embodiment improves the reliability of configuration updates through a configuration change notification mechanism.

[0055] In another implementation of this embodiment, after distributing the target configuration file to the corresponding node, the method further includes: locally verifying the target configuration file in the node; after the verification is passed, updating the configuration parameters of the node according to the target configuration file.

[0056] In this embodiment, after receiving the new target configuration file, the corresponding node first performs local verification to confirm the validity and compatibility of the configuration, and then updates its own operating status according to the new configuration parameters. After all nodes have completed the configuration update, the system synchronizes the status of the entire cluster to ensure that all nodes have successfully applied the new configuration. For example, after all nodes have completed the configuration update, each node is restarted to detect whether the configuration item information on the node has been successfully modified to ensure that all nodes have successfully applied the new configuration.

[0057] In this embodiment, after updating the configuration parameters of the node according to the target configuration file, the method further includes: detecting whether there is an abnormality in the operation of the node; if there is an abnormality in the operation of the node, rolling back to the last version of the valid configuration file.

[0058] After the configuration update is completed, this implementation method continuously detects whether there are any abnormalities in the node during operation, such as significant performance degradation, frequent errors, or service interruptions. If there are any abnormalities, the abnormality handling mechanism is immediately triggered to roll back the node to the last valid configuration, and notify the configuration management module to troubleshoot and repair the problem. Problems that may be introduced by the new configuration can be quickly eliminated to ensure the continuity and stability of the service.

[0059] In this embodiment, detecting whether there is an abnormality in the operation of the node includes: detecting the current performance index of the node during the operation; comparing the current performance index with the previous version of the performance index; if the current performance index is lower than the previous version of the performance index, it is determined that there is an abnormality in the operation of the node.

[0060] After the node runs the new configuration, it continuously monitors and records various performance indicators of the node, such as CPU usage, memory usage, response time, throughput, etc. These indicators can fully reflect the operating status of the node under the current configuration. The recorded current performance indicators are compared one by one with the performance indicators of the previous version (i.e. before the update). If the current performance indicators are significantly lower than the previous version of the performance indicators in multiple key areas (such as response time, throughput, etc.), the system will determine that there is an abnormality in the operation of the node.

[0061] The solution of this embodiment provides an application example of a database configuration management method. Figure 3 As shown in the database configuration management system architecture diagram, the database configuration management system includes a configuration center module, a node resource monitoring module, a configuration file library, a configuration management interface module, and a distributed database cluster. Among them, the configuration center template: is the core component of the entire system, including a global configuration parsing engine, which is used to receive, parse, and publish configuration information. The engine uses an innovative global configuration parsing language that can understand and process configuration files containing conditional logic. Node resource monitoring module: is used to collect and analyze the hardware resource usage of each node in the database cluster in real time (such as CPU, memory, disk space, etc.), and feed this information back to the configuration center module (if implemented at the database level, the interface provided by the database side can be used). Configuration file library (global configuration): stores global configuration templates written in the global configuration parsing language. These templates can dynamically generate specific configuration items for different node characteristics according to predefined rules. Configuration management interface module: provides a graphical interface for system administrators to edit, view, review, and publish configurations, interacts with the configuration center server, and realizes remote configuration management of distributed database clusters. Distributed database cluster: It is composed of multiple nodes of different types and functions. They are connected to the configuration center server through the network and can receive and apply dynamic configuration information issued by the configuration center.

[0062] The application example of the database configuration management method of this embodiment includes the following steps:

[0063] Step 1.1 The user writes a global configuration file through an editor: The user uses a global configuration parsing language to write and customize various configuration items applicable to the distributed database, such as node configuration, network topology, load balancing strategy, etc.

[0064] Step 1.2 Configuration file generation: After editing is completed, the editor converts the user-defined configuration into a configuration file in a standard format, saves it, and submits it to the configuration file library.

[0065] Step 2.1 Configuration file version control and review: The configuration file library receives and stores configuration files, and uses a version control system to track and compare versions to ensure that each change is recorded and goes through the necessary review process.

[0066] Step 2.2 Configuration change notification: When the configuration changes, a pre-change notification is sent to all relevant database nodes.

[0067] Step 3.1 Configuration parsing: Each time a global configuration file is created or updated, the configuration parsing engine reads the latest global configuration file, parses it according to predefined grammar rules, and converts the text-based configuration into an internal structured data model.

[0068] Step 3.2 Hardware resource monitoring and feedback: Continuously monitor the hardware resource usage (such as CPU, memory, disk space, etc.) of each node in the database cluster, and feed this information back to the configuration parsing engine.

[0069] Step 3.3 Dynamic configuration generation: The parsing engine dynamically adjusts configuration parameters based on cluster metadata and hardware resource conditions, where metadata is used to identify component information, such as automatically expanding or shrinking resource allocation based on node load conditions.

[0070] Step 4.1 Configuration distribution: Push the dynamically generated new configuration to each database node through a unified configuration distribution mechanism.

[0071] Step 4.2 Configuration verification and application: After each node receives the new configuration, it first performs local verification to confirm the validity and compatibility of the configuration, and then updates its own operating status according to the new configuration parameters.

[0072] Step 4.3: Status synchronization: After all nodes have completed the configuration update, the system performs status synchronization of the entire cluster to ensure that all nodes have successfully applied the new configuration.

[0073] Step 5.1 Anomaly detection: If an error is found or unacceptable performance degradation occurs during the configuration of the application, the exception handling mechanism is triggered immediately.

[0074] Step 5.2 Configuration rollback: Roll back the node to the last valid configuration, and notify the configuration management module to troubleshoot and repair the problem.

[0075] This embodiment proposes an integrated dynamic configuration engine, which can automatically parse and execute adaptive configuration policies according to the real-time status and business needs of each node in the cluster at runtime. It allows administrators to define configuration templates containing conditional statements and loop structures, and dynamically generate optimal configurations based on the characteristics of different nodes, solving the problem that traditional methods are difficult to deal with complex configuration scenarios, achieving highly automated and intelligent resource configuration, greatly improving the stability of the system and the convenience of operation and maintenance, while reducing labor costs and potential operation and maintenance risks.

[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0077] Example 2

[0078] In this embodiment, a database configuration management device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0079] Figure 4 is a structural block diagram of a database configuration management device according to an embodiment of the present application, such as Figure 4 As shown, the device comprises:

[0080] Configuration file library 41, used to obtain global configuration templates;

[0081] A monitoring module 42, used to monitor the operating status of each node in the database cluster;

[0082] The configuration module 43 is used to generate the target configuration value corresponding to each configuration item in the global configuration template according to the running status of each node, obtain the target configuration file, and the target configuration file includes the target configuration value; distribute the target configuration file to the corresponding node.

[0083] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0084] Example 3

[0085] An embodiment of the present application further provides a computer storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0086] Optionally, in this embodiment, the computer storage medium may be configured to store a computer program for performing the following steps:

[0087] S1, obtain the global configuration template;

[0088] S2, monitors the operating status of each node in the database cluster;

[0089] S3, generating a target configuration value corresponding to each configuration item in the global configuration template according to the running status of each node, and obtaining a target configuration file, wherein the target configuration file includes the target configuration value;

[0090] S4, distributing the target configuration file to corresponding nodes.

[0091] Optionally, in this embodiment, the above-mentioned computer storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0092] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0093] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0094] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0095] S1, obtain the global configuration template;

[0096] S2, monitors the operating status of each node in the database cluster;

[0097] S3, generating a target configuration value corresponding to each configuration item in the global configuration template according to the running status of each node, and obtaining a target configuration file, wherein the target configuration file includes the target configuration value;

[0098] S4, distributing the target configuration file to corresponding nodes.

[0099] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0100] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0101] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned computer storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0106] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A database configuration management method, characterized in that: The method comprises: Get the global configuration template; Monitor the operating status of each node in the database cluster; Generate a target configuration value corresponding to each configuration item in the global configuration template according to the running status of each node, and obtain a target configuration file, wherein the target configuration file includes the target configuration value; Distribute the target configuration file to corresponding nodes.

2. The method according to claim 1, characterized in that According to the running status of each node, the target configuration value corresponding to each configuration item in the global configuration template is generated, and the target configuration file obtained includes: For the current node, monitoring the hardware resource usage of the current node; Parsing the preset conditions corresponding to the hardware resource configuration items in the global configuration template; According to the preset conditions, when the hardware resource usage is greater than a first preset threshold, the configuration value of the hardware resource configuration item is increased, a first target configuration value corresponding to the hardware resource configuration item is generated, and a first target configuration file is obtained; when the hardware resource usage is less than a second preset threshold, the configuration value of the hardware resource configuration item is reduced, a second target configuration value corresponding to the hardware resource configuration item is generated, and a second target configuration file is obtained.

3. The method according to claim 1, characterized in that According to the running status of each node, the target configuration value corresponding to each configuration item in the global configuration template is generated, and the target configuration file obtained includes: For the current node, monitoring whether a component is added or reduced in the current node; If the current node has a newly added or reduced component, parsing the total available resource value of the current node corresponding to the hardware resource configuration item in the global configuration template; The total available resources are reallocated to the newly added or reduced components.

4. The method according to claim 1, characterized in that: Before distributing the target configuration file to the corresponding nodes, the method further includes: Initiate a change request to the proxy component of the corresponding node; When the proxy component responds to the change request, the target configuration file is distributed to the corresponding node.

5. The method according to claim 1, characterized in that: After distributing the target configuration file to the corresponding nodes, the method further includes: locally verifying the target configuration file in the node; After verification, the configuration parameters of the node are updated according to the target configuration file.

6. The method according to claim 5, characterized in that After updating the configuration parameters of the node according to the target configuration file, the method further includes: Check whether there are any abnormalities in the operation of the node; If an exception occurs during the operation of a node, roll back to the last valid configuration file.

7. The method according to claim 6, characterized in that Checking whether there are any abnormalities in the node during operation includes: Detect the current performance index value of the node during operation; Compare the current performance indicator value with the previous version of the performance indicator value; If the current performance indicator value is lower than the previous version of the performance indicator value, it is determined that there is an abnormality in the operation of the node.

8. A database configuration management device, characterized in that: include: Configuration file library, used to obtain global configuration templates; Monitoring module, used to monitor the operating status of each node in the database cluster; The configuration module is used to generate a target configuration value corresponding to each configuration item in the global configuration template according to the running status of each node, obtain a target configuration file, and the target configuration file includes the target configuration value; and distribute the target configuration file to the corresponding node.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the database configuration management method according to any one of claims 1 to 7 by running a program stored in a memory.

10. A computer storage medium, characterized in that: The computer storage medium includes a stored program, wherein the database configuration management method according to any one of claims 1 to 7 is executed when the program is run.

Citation Information

Cited By

  • Storage system management method and device, electronic equipment, medium and product

    CN121050659A

  • Storage system management method and device, electronic equipment, medium and product

    CN121050659B