A database resource pool automatic management and distribution method and system

CN115599547BActive Publication Date: 2026-08-11CITIC AIBANK CORPORATION LIMITED
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]已有资源利用情况不清楚:出现过物理机的物理资源够用,但逻辑资源用光导致的后续数据库集群创建不成功的情况

Benefits of technology

[0043]采用本发明所述一种数据库资源池自动化管理和分配方法及系统,对主从角色的物理机,根据业务系统三位编码和等级,严格限制同一台物理机核心业务系统数据库实例的个数和主从实例的个数;可定时采集和更新资源池物理机资源使用的元数据库,为策略引擎提供数据支撑;解决了靠人为经验判断选择资源池机器的不准确性,规避人为操作失败的风险。因此本发明所述方法及系统实现了对资源池物理机的物理和逻辑资源使用情况的元数据采集、更新,以及同事件平台的告警整合,能够有效的帮助数据库管理员了解当前资源池物理机利用率情况。通过定制的决策引擎,从业务的稳定性、持续性角度出发,更合理的分配物理机硬件资源给数据库。本发明所述方法及系统可以提高资源管理器分配资源的时效性和稳定性,有效提高资源使用率,同时避免人员误操作带来的负面影响,最大程度减少数据库集群创建前置工作的负担,提高了整个PaaS MySQL集群交付的自动化程度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599547B_ABST
    Figure CN115599547B_ABST
Patent Text Reader

Abstract

This invention relates to an automated management and allocation method for database resource pools, comprising: obtaining configuration information required for creating a database cluster; determining the database cluster architecture category based on the business system level, identifying it as the target data cluster architecture category; obtaining configuration information required for creating the target cluster architecture category, selecting a corresponding filtering combination strategy based on the role resource pool category, and establishing a target filtering combination strategy; selecting a target number of physical machines from the role resource pool as target physical machines based on the target filtering strategy; activating the target physical machines; and updating metadata database information based on the activation status of the target physical machines. The method and system described in this invention can improve the timeliness and stability of resource allocation by the resource manager, effectively increase resource utilization, avoid the negative impact of human error, minimize the burden of pre-creation work for database clusters, and improve the automation level of the entire PaaS MySQL cluster delivery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database technology, and in particular to a method and system for automated management and allocation of database resource pools. Background Technology

[0002] Currently, PaaS products based on private clouds require physical machines to be added to a designated resource pool before creating a MySQL cluster. Then, the activation and freezing of these machines are determined manually to ensure that database instances with different roles in the subsequent MySQL cluster are hosted on these pre-specified machines. This results in an inability to allocate and utilize physical machine resources rationally from a business and actual resource utilization perspective. It also fails to accumulate real resource usage data, hindering data-driven planning and coordination for subsequent resource allocation, and ultimately relying entirely on human experience for implementation.

[0003] The current resource pool machine allocation has the following three shortcomings:

[0004] The utilization of existing resources is unclear: there have been instances where the physical resources of the physical machines were sufficient, but the logical resources were exhausted, resulting in the failure of subsequent database cluster creation.

[0005] The process is slow and prone to errors: it requires selecting a few suitable physical machines from hundreds or thousands of existing resource pools and manually activating them.

[0006] Unreasonable resource allocation: It is impossible to coordinate the use of physical machine resources according to unified rules, resulting in situations where business databases deployed on the same machine are too concentrated.

[0007] The above three points will seriously affect the delivery efficiency of PaaS MySQL clusters and the rationality of physical machine resource utilization, posing serious hidden dangers to future resource management and stable business operation. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention proposes an automated management and allocation method and system for database resource pools. It provides a method based on a machine selection strategy algorithm that can collect and monitor resource pool asset data and integrate both into the entire process of resource pool machine selection.

[0009] To achieve the above objectives, the technical solution adopted by the present invention includes:

[0010] A method for automated management and allocation of database resource pools, characterized by comprising:

[0011] Obtain the configuration information required to create a database cluster; the configuration information required to create a database cluster includes at least: business system level; determine the database cluster architecture category based on the business system level, and identify the target data cluster architecture category;

[0012] Obtain the configuration information required to create the target cluster architecture category. The configuration information required to create the target cluster architecture category includes: the role resource pool category and the corresponding number of instances for the role resource pool category.

[0013] Based on the category of the role resource pool, select the corresponding filtering and combination strategy as the target filtering and combination strategy; based on the target filtering strategy, select the target number of physical machines from the role resource pool as the target physical machines; activate the target physical machines;

[0014] Update the metadata database information based on the activation status of the target physical machine.

[0015] Furthermore, the configuration information required to create the database cluster also includes: initial memory size of a single node, initial capacity of a single node database, resource location region, business system level, and three-digit code of the business system; the database cluster architecture categories include: active-active data cluster architecture and non-active-active data cluster architecture; the target number of nodes is the number of instances corresponding to the role resource pool category.

[0016] Furthermore, the role resource pool categories include: master-slave role resource pool, standby role resource pool, backup role resource pool, and proxy role resource pool.

[0017] Furthermore, the step of selecting the appropriate filtering and combination strategy based on the role resource pool category, and selecting the target filtering and combination strategy, includes:

[0018] Obtain the character resource pool category and designate it as the target resource pool;

[0019] If the target resource pool is a master-slave role resource pool, then the first filtering combination strategy is the target filtering combination strategy;

[0020] If the target resource pool is a backup role resource pool, a standby role resource pool, or a proxy role resource pool, then the second filtering combination strategy is the target filtering combination strategy.

[0021] Furthermore, the first screening combination strategy includes: physical resource usage strategy, logical resource usage strategy, same system instance count strategy, and different system instance count strategy; the second screening combination strategy includes: physical resource usage strategy and logical resource usage strategy.

[0022] Furthermore, the physical resource usage strategy includes: obtaining the physical resource usage of each physical machine in the target resource pool, wherein the physical resource usage includes four resource parameters of the physical machine: cpuutil, memutil, diskutil, and ioutil resource parameters; setting resource parameter thresholds for each of the four resource parameters of the physical machine; adding the values ​​of the four resource parameters of the physical machine to obtain the sum of the resource parameter values; and selecting a preset number of physical machines with the smallest sum of resource parameter values ​​as a candidate set of resource physical machines.

[0023] Furthermore, the logical resource usage strategy includes: obtaining the logical resource usage of each physical machine in the candidate set of target physical machines, wherein the logical resource usage includes three logical resource parameters of the physical machine: use_cpuInCore, use_memSizeInMB, and use_sizeInGB; adding the values ​​of the three logical resource parameters of the physical machine to obtain the sum of the logical resource parameter values; and selecting a preset number of physical machines with the smallest sum of logical resource parameter values ​​as the candidate set of logical resource physical machines.

[0024] Furthermore, the same system instance count strategy includes: obtaining the three-digit code of the business system and the number of business instances of each physical machine in the logical resource physical machine candidate set; selecting physical machines with fewer than three business instances based on the three-digit code of the business system and adding them to the same system instance count physical machine candidate set.

[0025] Furthermore, the different system instance count strategy includes: obtaining the number of business system-level instances corresponding to each physical machine in the candidate set of physical machines with the same system instance count; selecting the physical machine with the smallest number of instances based on the business system level and the three-dimensional code of the business system as the candidate set of physical machines with different system instance counts.

[0026] Furthermore, the threshold values ​​for the four resource parameters of the physical machine are set as follows: the threshold value for cpuutil is set to 70; the threshold value for memutil is set to 70; the threshold value for diskutil is set to 80; and the threshold value for ioutil is set to 80.

[0027] Furthermore, the physical resource usage strategy also includes: if any one of the four resource parameters of a physical machine exceeds the resource parameter threshold, the physical machine will be removed from the role resource pool.

[0028] Furthermore, the logical resource usage strategy also includes: if any one of the three logical resource parameters of a physical machine exceeds five percent of its initial value, then the physical machine will be removed from the resource physical machine candidate set.

[0029] Furthermore, updating the metadata database information based on the activation status of the target physical machine includes:

[0030] A scheduled task is triggered daily to collect monitoring data from the Zabbix database; the monitoring data includes: CPU, memory usage, home usage, and disk I / O %util data of the target resource pool physical machines from yesterday.

[0031] The monitoring data is processed to obtain the processed results; the processed results are updated to the metadata database; the remaining physical resources of the target resource pool physical machines are determined based on the metadata database; if the physical resources of the target resource pool physical machines are insufficient, a notification command is triggered.

[0032] This invention also relates to an automated management and allocation system for database resource pools, characterized in that it includes:

[0033] The information acquisition module is used to acquire the configuration information required to create a database cluster; the configuration information required to create a database cluster includes at least: business system level; and the database cluster architecture category is determined based on the business system level to identify the target data cluster architecture category.

[0034] Obtain the configuration information required to create the target cluster architecture category. The configuration information required to create the target cluster architecture category includes: the role resource pool category and the corresponding number of instances for the role resource pool category.

[0035] The physical machine filtering module is used to select the corresponding filtering combination strategy based on the category of the character resource pool, and to select the target filtering combination strategy; based on the target filtering strategy, it filters out the target number of physical machines from the character resource pool as the target physical machines; and activates the target physical machines.

[0036] The metadata database update module is used to update the metadata database information based on the activation status of the target physical machine.

[0037] The present invention also relates to a computer-readable storage medium, characterized in that the storage medium stores a computer program, which, when executed by a processor, implements the above-described automated management and allocation method for database resource pools.

[0038] The present invention also relates to an electronic device, characterized in that it includes a processor and a memory;

[0039] The memory is used to store physical resource usage policies, logical resource usage policies, same-system instance count policies, and different-system instance count policies.

[0040] The processor is used to execute the above-mentioned automated management and allocation method for the database resource pool by invoking the physical resource usage policy, the logical resource usage policy, the same system instance number policy, and the different system instance number policy.

[0041] The present invention also relates to a computer program product, including a computer program and / or instructions, characterized in that, when the computer program and / or instructions are executed by a processor, they implement the steps of the above-described automated management and allocation method for database resource pools.

[0042] The beneficial effects of this invention are as follows:

[0043] The automated management and allocation method and system for database resource pools described in this invention strictly limits the number of core business system database instances and master-slave instances on the same physical machine based on the three-digit code and level of the business system. It can periodically collect and update the metadata database of resource pool physical machine resource usage, providing data support for the strategy engine. This solves the inaccuracy of relying on human experience to select resource pool machines and avoids the risk of human error. Therefore, the method and system of this invention realizes the collection and updating of metadata on the physical and logical resource usage of resource pool physical machines, as well as the integration of alarms with the event platform, effectively helping database administrators understand the current utilization rate of physical machines in the resource pool. Through a customized decision engine, physical machine hardware resources are allocated to the database more rationally from the perspective of business stability and continuity. The method and system of this invention can improve the timeliness and stability of resource allocation by the resource manager, effectively improve resource utilization, avoid the negative impact of human error, minimize the burden of pre-creation work for the database cluster, and improve the automation level of the entire PaaS MySQL cluster delivery. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of a method for automated management and allocation of database resource pools according to the present invention.

[0045] Figure 2 This is a schematic diagram of the structure of an automated database resource pool management and allocation system according to the present invention. Detailed Implementation

[0046] To better understand the content of this invention, it will be described in detail with reference to the accompanying drawings and embodiments.

[0047] PaaS: Short for Platform as a Service, it refers to a platform as a service, serving as an intermediate option in the IaaS-PaaS-SaaS successive weights. Many cloud databases are delivered in this way. Databases provided by PaaS further leverage the advantages of cloud computing, helping teams to more easily manage their databases through automation tools, such as automating provisioning, configuration, scaling, and other cluster management tasks.

[0048] Region: Name of the computer room.

[0049] Zone: Deployment area.

[0050] Resource pool: consists of multiple physical machines of a certain role in a zone of a certain region.

[0051] Resource pool ID: The unique name of the resource pool.

[0052] Resource Manager: It hides the underlying physical machine information and exposes standardized package resources to the upper layer.

[0053] ZK: Short for ZooKeeper, is a distributed coordination service. It is an important component of Hadoop and HBase. It is software that provides consistency services for distributed applications, offering functions such as configuration maintenance, domain name service, distributed synchronization, and group services.

[0054] Metadatabase: Stores database instance proxy information, logical resource information, and physical resource information of the physical machines in the resource pool.

[0055] Logical resource information: Machine information stored in ZooKeeper provides the resource specifications (mem, CPU, disk) required by upper-layer services.

[0056] Physical resource information: physical machine resource usage, such as CPU usage, memory usage, disk space usage, and disk %util.

[0057] Active-active cluster: A database cluster architecture that supports application services in two centers within the same city to simultaneously store and access business data in the database.

[0058] Role: A collective term for database instances that provide the same service to the outside world. For example, a master-slave role provides read and write services to applications. A backup role is specifically used to provide backup services.

[0059] Master-slave role: Provides data read and write services to the application.

[0060] Backup database role: Provides big data extraction and query operations.

[0061] Backup role: An instance of backup program operation.

[0062] Agent roles include: master-slave database fault detection and removal, backend connection pool, automatic SQL interception and filtering, traffic grouping and control, etc.

[0063] Machine Instance Details Table: Stores hostname, IP address, instance port, system level, system three-digit code, and role information.

[0064] Machine Proxy Details Table: Stores hostname, IP address, and proxy port information.

[0065] Machine instance selection table: Stores hostname, IP, region, zone, resource pool ID, cpuInCore, memSizeInMB, sizeInGB, number of instances in each level, and number of instances in each system.

[0066] Machine agent selection table: stores hostname, IP, region, zone, resource pool ID, cpuInCore, memSizeInMB, and sizeInGB information.

[0067] Machine physical resource usage table: stores hostname, IP address, cpuutil, memutil, diskutil, and ioutil information.

[0068] Machine logical resource usage table: hostname, IP, use_cpuInCore, use_memSizeInMB, use_sizeInGB information.

[0069] Metadatabase: Records information related to physical machines in the resource pool, including machine instance details table, machine agent details table, machine instance selection table, machine agent selection table, machine physical resource usage table, and machine logical resource usage table.

[0070] The first aspect of this invention relates to a method for automated management and allocation of database resource pools, with the following steps: Figure 1 The method shown includes:

[0071] The cloud management platform inputs the package configuration information required to create the database cluster, such as the number of shards, the initial memory size of a single-node database instance, the initial capacity size of a single-node database, the region (region, zone) where the resource is located, the business system level, and the three-digit code of the business system.

[0072] Based on the business system level, a decision is made on whether to create a dual-active or non-dual-active cluster, and the roles that need to create the cluster and the number of instances for each role are obtained.

[0073] The strategy engine is used to select the physical machines needed for a specific resource pool. (This example uses selecting physical machines for a master-slave resource pool.)

[0074] Select the corresponding resource pool physical machine based on the role, including:

[0075] The resource pool includes: master-slave role resource pool, standby role resource pool, backup role resource pool, and proxy role resource pool;

[0076] The combination of screening strategies includes:

[0077] Master-slave resource pool: Strategy 1, 2, 3, and 4 combination;

[0078] Backup resource pool for roles: Strategy 1 and 2 combination;

[0079] Backup library role resource pool: Strategy 1 and 2 combination;

[0080] Agent role resource pool: Strategy 1 and 2 combination;

[0081] The selection strategy combination depends on which role's resource pool to choose the machine from.

[0082] The four machine selection strategies are as follows:

[0083] (1) Filtering based on physical machine physical resource usage:

[0084] Retrieve the values ​​of cpuutil, memutil, diskutil, and ioutil for each machine from the machine physical resource usage table. The thresholds for each value are set to 70, 70, 80, and 80 respectively (pre-defined). If any field value of the current machine exceeds one of these four values, it is directly removed from the candidate resource pool. The machine with the smallest sum of these four values ​​for each machine is the optimal machine, and this is used as the sorting criterion for selecting candidate machines.

[0085] (2) Filtering based on physical machine logical resource usage:

[0086] Retrieve the values ​​of use_cpuInCore, use_memSizeInMB, and use_sizeInGB for each machine from the machine logical resource usage table. If any of these values ​​decreases to less than 5% of the initial value, the machine is removed from the candidate resource pool. The machine with the smallest sum of these three values ​​for each machine is the optimal machine, and this is used as the sorting criterion for selecting candidate machines.

[0087] (3) Filter by the number of instances of the same system on a single physical machine:

[0088] Using the machine instance details table, select the candidate machine from the physical machines that belong to less than 3 instances of this business system by using the three-digit code.

[0089] (4) Filter by the number of instances of different system levels on a single physical machine:

[0090] The machine instance selection table is used to obtain the number of instances for each level of the candidate machines in the resource pool. Then, the system level and three-digit system code of the database to be deployed are used to select the machine with the fewest instances for the corresponding level, and this is used as the sorting method to select the candidate machines.

[0091] Determine the physical resource usage of the physical machines and select the top X physical machines with the highest physical resource scores (X here depends on the number of shards, and the same applies below).

[0092] Determine the physical machine's logical resource usage and select the top X physical machines with the highest logical resource scores.

[0093] Based on the three-digit code of the business system previously passed in, select the top X physical machines with the fewest instances of that business system.

[0094] Based on the previously passed business system level, select the top X physical machines with the fewest instances of that business system level currently existing on the physical machine.

[0095] After completing the first 5 steps, select X physical machines.

[0096] Activate the physical machines corresponding to each selected resource pool.

[0097] Updating the metadata database information (machine logical resource usage table) includes the following steps:

[0098] 1. Trigger a scheduled task at midnight every day to collect monitoring data from the Zabbix database.

[0099] 2. Collect yesterday's data from the Zabbix database, including CPU % usage, memory usage, / home usage, and disk I / O % utility for the physical machines in the resource pool.

[0100] 3. Process the collected data to obtain the maximum value of each indicator for the day.

[0101] 4. Update the processed data in the metadata database. (Machine physical resource usage table)

[0102] 5. Determine the remaining physical resources of the physical machines in the resource pool.

[0103] 6. If resources are insufficient, notify the database administrator of the resource shortage via the event platform (email, SMS).

[0104] Another aspect of the present invention relates to an automated management and allocation system for database resource pools, the structure of which is as follows: Figure 2 As shown, it includes:

[0105] The information acquisition module is used to acquire the configuration information required to create a database cluster; the configuration information required to create a database cluster includes at least: business system level; and the database cluster architecture category is determined based on the business system level to identify the target data cluster architecture category.

[0106] Obtain the configuration information required to create the target cluster architecture category. The configuration information required to create the target cluster architecture category includes: the role resource pool category and the corresponding number of instances for the role resource pool category.

[0107] The physical machine filtering module is used to select the corresponding filtering combination strategy based on the category of the character resource pool, and to select the target filtering combination strategy; based on the target filtering strategy, it filters out the target number of physical machines from the character resource pool as the target physical machines; and activates the target physical machines.

[0108] The metadata database update module is used to update the metadata database information based on the activation status of the target physical machine.

[0109] By using this system, the aforementioned computational processing methods can be executed and the corresponding technical effects can be achieved.

[0110] The deployment of the master databases for multiple core system databases on the same machine poses a technical problem: if a hardware failure occurs or a database instance consumes too many resources, multiple core business operations will be affected simultaneously.

[0111] This invention, by targeting physical machines with master-slave roles, strictly limits the number of core business system database instances and master-slave instances on the same physical machine based on the three-digit code and level of the business system.

[0112] The lack of monitoring of resource usage and alerts for insufficient resources in the physical machines within the resource pool prevents timely replenishment of physical machine resources, thus affecting the subsequent creation of the database cluster.

[0113] This invention provides data support for the strategy engine by periodically collecting and updating the metadata database of physical machine resource usage in the resource pool.

[0114] This addresses the technical issue that the activation or freezing of physical machines in the resource pool can only be performed manually, making it impossible to implement strategic and automated operations.

[0115] This invention solves the inaccuracy of relying on human experience to select resource pool machines and avoids the risk of human operation failure.

[0116] Therefore, the automated management and allocation method and system for database resource pools described in this invention realizes the collection and updating of metadata regarding the physical and logical resource usage of physical machines in the resource pool, as well as the integration of alarms with the event platform, effectively helping database administrators understand the current utilization rate of physical machines in the resource pool. An automated strategy selection engine is implemented. Through a customized decision engine, physical machine hardware resources are allocated to the database more rationally from the perspective of business stability and continuity.

[0117] The method and system described in this invention can improve the timeliness and stability of resource allocation by the resource manager, effectively increase resource utilization, avoid the negative impact of human error, minimize the burden of pre-creation work for database clusters, and improve the automation level of the entire PaaS MySQL cluster delivery.

[0118] Embodiments of the present invention also provide a computer-readable storage medium capable of implementing all the steps of the methods in the above embodiments, wherein the computer-readable storage medium stores a computer program that, when executed by a processor, implements all the steps of the methods in the above embodiments.

[0119] Embodiments of the present invention also provide an electronic device for executing the above-described method. As an implementation device for the method, the electronic device includes at least a processor and a memory. In particular, the memory stores data and related computer programs required for executing the method, such as physical resource usage strategies, logical resource usage strategies, same-system instance count strategies, and different-system instance count strategies. The processor calls the data and programs in the memory to execute all steps of the method and obtain the corresponding technical effects.

[0120] Preferably, the electronic device may include a bus architecture, which may include any number of interconnected buses and bridges. The bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same element, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor during operation.

[0121] Additionally, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operating control) used may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a buffer, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices, which can store the aforementioned data information, and may also store programs for executing the information, and the processor can execute the program stored in the memory to achieve information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it can be a button or touch input device; the power supply is used to provide power to the electronic device; the display is used to display images and text, for example, it can be an LCD display. The communication module is a transmitter / receiver that transmits and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which can be the same as in conventional mobile communication terminals. Based on different communication technologies, multiple communication modules can be incorporated into the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) is also coupled to a speaker and microphone via an audio processor to provide audio output through the speaker and receive audio input from the microphone, thereby enabling typical telecommunications functions. The audio processor can include any suitable buffer, decoder, amplifier, etc. Furthermore, the audio processor is coupled to a central processing unit, enabling on-device recording via the microphone and on-device playback of stored sound via the speaker.

[0122] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0123] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0124] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0125] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0126] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for automated management and allocation of database resource pools, characterized in that, include: Obtain the configuration information required to create a database cluster; The configuration information required to create a database cluster includes at least: business system level; determining the database cluster architecture category based on the business system level, and identifying the target data cluster architecture category; Obtain the configuration information required to create the target cluster architecture category. The configuration information required to create the target cluster architecture category includes: the role resource pool category and the corresponding number of instances for the role resource pool category. Based on the category of the role resource pool, select the corresponding filtering and combination strategy as the target filtering and combination strategy; based on the target filtering strategy, select the target number of physical machines from the role resource pool as the target physical machines; activate the target physical machines; Update the metadata database information based on the activation status of the target physical machine; The role resource pool categories include: master-slave role resource pool, standby role resource pool, backup role resource pool, and proxy role resource pool; the step of selecting the corresponding filtering combination strategy based on the role resource pool category as the target filtering combination strategy includes: obtaining the role resource pool category as the target resource pool; if the target resource pool is a master-slave role resource pool, then the first filtering combination strategy is the target filtering combination strategy. If the target resource pool is a standby database role resource pool, a backup database role resource pool, or a proxy role resource pool, then the second filtering combination strategy is the target filtering combination strategy; the first filtering combination strategy includes: physical resource usage strategy, logical resource usage strategy, same system instance count strategy, and different system instance count strategy; the second filtering combination strategy includes: physical resource usage strategy and logical resource usage strategy.

2. The method as described in claim 1, characterized in that, The configuration information required to create a database cluster also includes: initial memory size of a single node, initial capacity of a single node database, resource location region, business system level, and three-digit code of the business system; the database cluster architecture categories include: active-active data cluster architecture and non-active-active data cluster architecture; the target number of nodes is the number of instances corresponding to the role resource pool category.

3. The method as described in claim 1, characterized in that, The physical resource usage strategy includes: obtaining the physical resource usage of each physical machine in the target resource pool, wherein the physical resource usage includes four resource parameters of the physical machine: cpuutil, memutil, diskutil, and ioutil resource parameters; setting resource parameter thresholds for each of the four resource parameters of the physical machine; adding the values ​​of the four resource parameters of the physical machine to obtain the sum of the resource parameter values; and selecting a preset number of physical machines with the smallest sum of resource parameter values ​​as a candidate set of resource physical machines.

4. The method as described in claim 1, characterized in that, The logical resource usage strategy includes: obtaining the logical resource usage of each physical machine in the candidate set of target physical machines, wherein the logical resource usage includes three logical resource parameters of the physical machine: use_cpuInCore, use_memSizeInMB, and use_sizeInGB; adding the values ​​of the three logical resource parameters of the physical machine to obtain the sum of the logical resource parameter values; and selecting a preset number of physical machines with the smallest sum of logical resource parameter values ​​as the candidate set of logical resource physical machines.

5. The method as described in claim 1, characterized in that, The same system instance count strategy includes: obtaining the business system three-digit code and the number of business instances of each physical machine in the logical resource physical machine candidate set; selecting physical machines with fewer than three business instances based on the business system three-digit code and adding them to the same system instance count physical machine candidate set.

6. The method as described in claim 1, characterized in that, The different system instance count strategy includes: obtaining the number of business system-level instances corresponding to each physical machine in the candidate set of physical machines with the same system instance count; selecting the physical machine with the smallest number of instances based on the business system level and the three-dimensional code of the business system as the candidate set of physical machines with different system instance counts.

7. The method as described in claim 3, characterized in that, The threshold values ​​for the four resource parameters of the physical machine are set as follows: cpuutil resource parameter threshold is set to 70; memutil resource parameter threshold is set to 70; diskutil resource parameter threshold is set to 80; ioutil resource parameter threshold is set to 80.

8. The method as described in claim 3, characterized in that, The physical resource usage strategy also includes: if any one of the four resource parameters of a physical machine exceeds the resource parameter threshold, the physical machine will be removed from the role resource pool.

9. The method as described in claim 4, characterized in that, The logical resource usage strategy further includes: if any one of the three logical resource parameters of a physical machine exceeds five percent of its initial value, then the physical machine will be removed from the resource physical machine candidate set.

10. The method as described in claim 1, characterized in that, The update of metadata information based on the activation status of the target physical machine includes: A scheduled task is triggered daily to collect monitoring data from the Zabbix database; the monitoring data includes: CPU, memory usage, home usage, and disk I / O %util (yesterday's data) of the physical machines in the target resource pool; The monitoring data is processed to obtain the processed results; the processed results are updated to the metadata database; the remaining physical resources of the target resource pool physical machines are determined based on the metadata database; if the physical resources of the target resource pool physical machines are insufficient, a notification command is triggered.

11. A database resource pool automated management and allocation system, characterized in that, include: The information acquisition module is used to acquire the configuration information required to create a database cluster; The configuration information required to create a database cluster includes at least: business system level; determining the database cluster architecture category based on the business system level, and identifying the target data cluster architecture category; Obtain the configuration information required to create the target cluster architecture category. The configuration information required to create the target cluster architecture category includes: the role resource pool category and the corresponding number of instances for the role resource pool category. The physical machine filtering module is used to select a corresponding filtering combination strategy based on the role resource pool category as the target filtering combination strategy. The role resource pool categories include master-slave role resource pools, standby role resource pools, backup role resource pools, and proxy role resource pools. Based on the target filtering strategy, physical machines of a target number are filtered from the role resource pools as target physical machines. The selection of the corresponding filtering combination strategy based on the role resource pool category as the target filtering combination strategy includes: obtaining the role category as the target resource pool; if the target resource pool is a master-slave role resource pool, then the first filtering combination strategy is the target filtering combination strategy; if the target resource pool is a standby role resource pool, backup role resource pool, or proxy role resource pool, then the second filtering combination strategy is the target filtering combination strategy; the first filtering combination strategy includes: physical resource usage strategy, logical resource usage strategy, same-system instance count strategy, and different-system instance count strategy; the second filtering combination strategy includes: physical resource usage strategy and logical resource usage strategy; and activating the target physical machines. The metadata database update module is used to update the metadata database information based on the activation status of the target physical machine.

12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the automated management and allocation method for the database resource pool as described in any one of claims 1 to 10.

13. An electronic device, characterized in that, Including processor and memory; The memory is used to store physical resource usage strategies, logical resource usage strategies, same-system instance count strategies, and different-system instance count strategies. The processor is configured to execute the automated management and allocation method for the database resource pool as described in any one of claims 1 to 10 by invoking physical resource usage policies, logical resource usage policies, same-system instance count policies, and different-system instance count policies.

14. A computer program product comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by the processor, they implement the steps of the automated management and allocation method for the database resource pool as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Resource allocation method and device of database service system

    CN106686081A

  • Database resource management method and device, resource management equipment and storage medium

    CN111400046A

  • Cloud platform, cloud platform management method and device, electronic equipment and storage medium

    CN112286632A

  • Policy-based resource pool allocation for low-latency IIOT and other applications

    WO2021099064A1