A method, device and medium for dynamically adjusting personalized service configuration
By monitoring and adjusting the resource occupancy of cloud platform virtual machines or clusters, dynamically expanding or shrinking nodes, and modifying service configurations, the performance problems of application services as business grows are solved, and efficient resource utilization and waste avoidance are achieved.
Patent Information
- Application Number
- CN202110928829.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-13
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-08-13
AI Technical Summary
The existing technology cannot effectively adjust resource configuration when application services face sudden business growth, resulting in slow service response or crash, and lacks technology for adjusting application services provided by the cluster.
By monitoring the resource occupancy of cloud platform virtual machines or clusters, implementing expansion or reduction strategies, adjusting the number of virtual machines or cluster nodes, and dynamically modifying service configurations based on business needs to optimize resource usage and performance.
It realizes resource adjustment and configuration optimization based on the operation of application services, avoids waste of resources, ensures smooth operation of services, adapts to different node resource needs, and releases cloud platform resources.
Smart Images

Figure CN113806010B
Abstract
Description
Technical Field
[0001] The present application relates to the field of service configuration adjustment, and in particular to a method, device and medium for dynamically adjusting personalized service configuration. Background Art
[0002] Currently, cloud platforms provide application services by installing software on virtual machines or clusters. For example, to provide database services through a cloud platform, you need to create a virtual machine on the cloud platform according to the database configuration. The cloud platform downloads the corresponding installation package from the cloud platform's software warehouse. If the database is provided as a virtual machine cluster, you need to install the corresponding cluster application on the virtual machine and configure the cluster.
[0003] When the virtual machine or cluster providing application services is configured and in normal use, if the application service encounters a sudden increase in business, the pressure on the application service increases, the CPU or memory usage of the single node or cluster node providing the application service increases, the storage IO usage rate increases, and the service response slows down. In serious cases, the service may crash and become unresponsive. In the prior art, patent CN107506241A solves this problem by monitoring the CPU and memory usage and expanding the capacity when the set threshold is reached. However, patent CN107506241A lacks modification of the application service configuration. When the business surge reaches the limit of the application service configuration, the configuration of the application service becomes a factor that limits the execution of the business. The CPU and memory resources are sufficient, and increasing the CPU and memory cannot further improve the user experience of the application service. In addition, for the application services provided by the cluster, patent CN107506241A does not involve corresponding adjustment technical features. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a method, device and medium for dynamically adjusting service personalized configuration.
[0005] In a first aspect, the present application provides a method for dynamically adjusting a personalized service configuration, comprising:
[0006] Monitor the overall resource usage of the cloud platform virtual machines or clusters that provide services.
[0007] When the overall resource occupancy is continuously higher than the first set threshold for the first set time, the target expansion strategy is executed. The target expansion strategy expands the overall resources of the virtual machine according to the expansion setting, or the target expansion strategy expands the overall resources of the cluster nodes according to the expansion setting and or increases the number of cluster nodes according to the expansion setting.
[0008] When the overall resource occupancy is lower than the second set threshold for a second set time, the target shrinking strategy is executed, and the target shrinking strategy shrinks the overall resources of the virtual machine according to the shrinking setting, or the target expansion strategy shrinks the overall resources of the cluster nodes according to the shrinking setting and or reduces the number of cluster nodes according to the shrinking setting;
[0009] Monitor the target resource occupancy of the target service. When the target resource occupancy continues to be higher than the third set threshold for a third set time, modify the target service configuration to increase the target service performance and increase the target service resources that can be occupied by the target service. When the target occupancy continues to be lower than the fourth set threshold for a fourth set time, modify the target service configuration to reduce the target service performance and reduce the target service resources that can be occupied by the target service.
[0010] Preferably, the resources include CPU resources, memory resources, storage IO resources, and storage resources.
[0011] Preferably, the monitoring of the overall resource occupancy of the cloud platform virtual machine or cluster providing the service includes:
[0012] Get the total amount of virtual machine or cluster resources through virtual machine configuration or cluster configuration.
[0013] Monitor the current resources used during the operation of a virtual machine or cluster.
[0014] The current resource usage is divided into the total amount of resources to obtain the overall resource usage.
[0015] Preferably, executing the target expansion strategy to expand the overall resources of the virtual machine according to the expansion setting includes:
[0016] Get the total amount of virtual machine resources through virtual machine configuration.
[0017] Monitor the current resources used during the operation of the virtual machine.
[0018] The total resource increment of the virtual machine is calculated, and the total amount of the virtual machine resources is added to the total resource increment of the virtual machine to obtain the updated total amount of the virtual machine resources. The ratio of the current used resources to the updated total amount of the total resources is greater than the second set threshold and less than the first set threshold.
[0019] Preferably, executing the target expansion strategy to expand the overall resources of the cluster nodes according to the expansion setting and or increase the number of cluster nodes according to the expansion setting includes:
[0020] Get the total amount of node resources through the configuration of cluster node virtual machines.
[0021] Monitor the current node resources occupied during the operation of cluster nodes.
[0022] Calculate the node resource increment, the total amount of node resources plus the node resource increment to obtain the updated total amount of node resources, and the ratio of the total amount of current node resources occupied to the updated total amount of node resources is greater than the second set threshold and less than the first set threshold;
[0023] and or,
[0024] Get the total amount of cluster resources through the configuration of cluster node virtual machines and the number of cluster nodes.
[0025] Monitor the current cluster resources used during cluster operation.
[0026] The number of cluster nodes added is calculated, and the total amount of cluster resources updated is obtained by adding the node resources provided by the added cluster nodes to the total amount of cluster resources. The ratio of the current total amount of cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold.
[0027] Create virtual machines according to the number of cluster nodes, and modify the cluster configuration to add the created virtual machines to the cluster.
[0028] Preferably, executing the target scaling-in strategy to scale down the overall resources of the virtual machine according to the scaling-down setting includes:
[0029] Get the total amount of virtual machine resources through virtual machine configuration.
[0030] Monitor the current resources used during the operation of the virtual machine.
[0031] The total resource reduction of the virtual machine is calculated, and the total amount of the virtual machine resources is subtracted from the total resource reduction of the virtual machine resources to obtain the updated total amount of the virtual machine resources, and the ratio of the current total amount of used resources to the updated total amount of the total resources is greater than the second set threshold and less than the first set threshold.
[0032] Preferably, executing the target scaling-down strategy to scale down the overall resources of the cluster nodes according to the scaling-down setting and / or reducing the number of cluster nodes according to the scaling-down setting comprises:
[0033] Get the total amount of node resources through the configuration of cluster node virtual machines.
[0034] Monitor the current node resources occupied during the operation of cluster nodes.
[0035] Calculate the node resource reduction, the total amount of node resources minus the node resource reduction to obtain the updated total amount of node resources, and the ratio of the total amount of current node resources occupied to the updated total amount of node resources is greater than the second set threshold and less than the first set threshold;
[0036] and or,
[0037] Get the total amount of cluster resources through the configuration of cluster node virtual machines and the number of cluster nodes.
[0038] Monitor the current cluster resources used during cluster operation.
[0039] The number of cluster nodes reduced is calculated, and the total amount of cluster resources minus the node resources lost by reducing the cluster nodes is used to obtain the total amount of updated cluster resources. The ratio of the current total amount of cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold.
[0040] Specify the virtual machines to be deleted according to the number of cluster nodes to be reduced, migrate the services of the virtual machines to be deleted to other nodes in the cluster, modify the cluster configuration to remove the virtual machines to be deleted from the cluster, and deregister the virtual machines to be deleted.
[0041] Preferably, monitoring target service resources occupied during the operation of the target service;
[0042] Calculate the change in the target service configuration of the target service,
[0043] Modifying the target service configuration of the target service according to the change amount so that the target service resources that can be occupied by the target service are changed to obtain updated target service resources that can be occupied, and the ratio of the occupied target service resources to the updated target service resources that can be occupied is greater than a fourth set threshold and less than a third set threshold;
[0044] Modify the target service configuration of the target service according to the change amount so that the target service performance meets the business requirements.
[0045] In a second aspect, the present application provides an apparatus for implementing dynamic allocation of resources required by a monitoring device, comprising:
[0046] A first configuration module, the first configuration module is used to configure and create a virtual machine;
[0047] A second configuration module, the second configuration module is used to configure the cluster;
[0048] A third configuration module, the third configuration module is used to set service configuration;
[0049] A fourth configuration module, the fourth configuration module is used to configure the first set time, the second set time, the third set time, the fourth set time, the first set threshold, the second set threshold, the third set threshold, and the fourth set threshold;
[0050] A first monitoring module, the first monitoring module is used to monitor the overall resource occupancy of the cloud platform virtual machine or cluster providing services;
[0051] A second monitoring module, the second monitoring module is used to monitor the target resource occupancy of the target service;
[0052] An execution module, the execution module determines whether the triggering conditions of the target expansion strategy and the target reduction strategy are met based on the data of the first monitoring module and the configuration of the fourth configuration module, and executes them if they are met; the execution module determines whether the triggering conditions for modifying the target service configuration are met based on the data of the second monitoring module and the configuration of the fourth configuration module, and modifies the target service configuration if they are met.
[0053] In a third aspect, the present application provides a storage medium for implementing a dynamic adjustment method for personalized service configuration, wherein the storage medium for implementing a dynamic adjustment method for personalized service configuration stores at least one instruction, and executing the instruction implements the dynamic adjustment method for personalized service configuration.
[0054] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0055] This application can provide different resource adjustments and application configuration adjustments according to the operation of the application service; resource adjustments include the adjustment of virtual machine or cluster resources. When the pressure on the application service increases and a certain resource of the virtual machine or cluster is fully loaded, the resource is expanded to ensure the smooth operation of the application service. When the application service business volume decreases and the application service has excess available resources, the application configuration is automatically modified to reduce the available resources, reduce the total amount of virtual machine or cluster resources, release cloud platform resources, and avoid resource waste. When the application service is under increased pressure due to increased business volume, this application optimizes the available resources through application configuration to ensure that the application service has sufficient resources to use and ensure the smooth operation of the application service.
[0056] In addition, for a cluster, the impact of application service operation on the resources of each cluster node in the cluster is different. For example, if one application service fully loads the CPU of a node in the cluster and fully loads the memory of another node, the impact on other application services may be different. This application can configure each resource of each cluster node according to the node to adapt to different application services.
[0057] The present application can also increase the number of nodes in the cluster to increase the total amount of cluster resources to meet the needs of smooth operation of application services when processing large business volumes. When the application service business volume decreases, the number of nodes in the cluster can be reduced to reduce the total amount of cluster resources, thereby releasing cloud platform resources and avoiding resource waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0060] Figure 1 A flow chart of a method for dynamically adjusting service personalized configuration provided in an embodiment of the present application;
[0061] Figure 2 A flowchart of the overall resource occupancy of a cloud platform virtual machine or cluster providing monitoring services provided in an embodiment of the present application;
[0062] Figure 3 A flowchart of executing a target expansion strategy to expand the overall resources of a virtual machine according to the expansion setting provided in an embodiment of the present application;
[0063] Figure 4 A flowchart of executing a target expansion strategy according to an embodiment of the present application to expand the overall resources of cluster nodes according to the expansion setting;
[0064] Figure 5 A flowchart of executing a target expansion strategy provided in an embodiment of the present application to increase the number of cluster nodes according to the expansion setting;
[0065] Figure 6 A flowchart of executing a target scaling-down strategy to scale down overall virtual machine resources according to scaling-down settings provided in an embodiment of the present application;
[0066] Figure 7 A flowchart of executing a target scaling-down strategy to set the overall resources of a scaling-down cluster node according to the scaling-down provided in an embodiment of the present application;
[0067] Figure 8 A flowchart of executing a target scaling-down strategy provided in an embodiment of the present application to reduce the number of cluster nodes according to the scaling-down setting;
[0068] Fig. 9 A schematic diagram of an apparatus for implementing dynamic allocation of resources required for monitoring equipment provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution 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 part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0070] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0071] Example 1
[0072] See also Figure 1 As shown, the embodiment of the present application provides a method for dynamically adjusting service personalized configuration, including:
[0073] S100, monitor the overall resource usage of the cloud platform virtual machine or cluster providing services, where the resources include CPU resources, memory resources, storage IO resources, and storage resources.
[0074] See also Figure 2 As shown, the overall resource occupancy of the cloud platform virtual machine or cluster provided by the monitoring service includes:
[0075] S101, obtaining the total amount of overall resources of the virtual machine or cluster through virtual machine configuration or cluster configuration, such as obtaining CPU resources through the number of CPUs, the number of CPU cores and the CPU performance in the virtual machine configuration; obtaining cluster CPU resources through the number of cluster nodes in the cluster, the number of CPUs of each cluster node, the number of CPU cores and the CPU performance.
[0076] S102, monitoring the currently used resources in the process of the virtual machine or cluster running various services.
[0077] S103, obtaining the overall resource occupancy by comparing the current used resources with the total amount of overall resources.
[0078] S104, timing is performed when the overall resource occupancy is higher than the first set threshold and lower than the second set threshold, and the timing is reset if the total timing time when the overall resource occupancy is higher than the first set threshold and lower than the second set threshold does not reach the first set time and the second set time respectively.
[0079] S200, determining whether the overall resource occupancy is higher than a first set threshold for a first set time, if yes, executing S300, otherwise executing S400.
[0080] S300, executing a target expansion strategy, wherein the target expansion strategy expands overall resources of virtual machines according to expansion settings, or the target expansion strategy expands overall resources of cluster nodes according to expansion settings and or increases the number of cluster nodes according to expansion settings.
[0081] See also Figure 3 As shown, executing the target expansion strategy to expand the overall resources of the virtual machine according to the expansion settings includes:
[0082] S301, obtaining the total amount of overall resources of the virtual machine through virtual machine configuration.
[0083] S302: monitor currently used resources during the operation of the virtual machine.
[0084] S303, calculating the total resource increment of the virtual machine, the total amount of the virtual machine's total resources plus the total resource increment of the virtual machine to obtain the updated total amount of the virtual machine's total resources, and the ratio of the current total amount of used resources to the updated total amount of total resources is greater than the second set threshold and less than the first set threshold.
[0085] S304: Expand the overall capacity of the virtual machine resources according to the updated total amount of the overall resources of the virtual machine.
[0086] See also Figure 4 and Figure 5 As shown, executing the target expansion strategy to expand the overall resources of the cluster nodes according to the expansion settings and / or increase the number of cluster nodes according to the expansion settings includes:
[0087] S310, obtaining the total amount of node resources of each virtual machine node through the configuration of the cluster node virtual machine,
[0088] S320, monitoring the current node resources occupied during the operation of the cluster nodes,
[0089] S330, calculating the node resource increment, the total amount of node resources plus the node resource increment to obtain the updated total amount of node resources, the ratio of the total amount of current node resources occupied to the updated total amount of node resources is greater than the second set threshold and less than the first set threshold;
[0090] S340: Expand the total amount of node resources according to the updated total amount of node resources.
[0091] and or,
[0092] S350, obtaining the total amount of cluster resources through the configuration of the cluster node virtual machine and the number of cluster nodes,
[0093] S360, monitors the current cluster resources used during cluster operation.
[0094] S370, calculating the number of cluster nodes added, the node resources provided by the added cluster nodes plus the total amount of cluster resources to obtain the updated total amount of cluster resources, the ratio of the current total amount of cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold,
[0095] S380, creating a virtual machine according to the increased number of cluster nodes, installing software for the virtual machine according to pre-set settings, modifying the cluster configuration to allow the created virtual machine to join the cluster, and configuring tasks for the newly added virtual machine.
[0096] S400, determining whether the overall resource occupancy is lower than a second set threshold for a second set time, if yes, executing S500, otherwise executing S600.
[0097] S500, executing a target shrinking strategy, wherein the target shrinking strategy shrinks the overall resources of the virtual machine according to the shrinking setting, or the target expansion strategy shrinks the overall resources of the cluster nodes according to the shrinking setting and or reduces the number of cluster nodes according to the shrinking setting.
[0098] See also Figure 6 As shown in the figure, executing the target scaling-in policy to scale down the overall resources of the virtual machine according to the scaling-in setting includes:
[0099] S501, obtaining the total amount of overall resources of the virtual machine through virtual machine configuration,
[0100] S502, monitoring the currently used resources during the operation of the virtual machine,
[0101] S503, calculate the reduction of the overall resources of the virtual machine, subtract the reduction of the overall resources of the virtual machine from the total amount of the overall resources of the virtual machine to obtain the updated total amount of the overall resources of the virtual machine, and the ratio of the current total amount of used resources to the updated total amount of overall resources is greater than the second set threshold and less than the first set threshold.
[0102] S504: Reduce the total amount of node resources according to the updated total amount of overall virtual machine resources.
[0103] See also Figure 7 and Figure 8 As shown, executing the target scaling-in strategy to scale down the overall resources of cluster nodes according to the scaling-in setting and / or reduce the number of cluster nodes according to the scaling-in setting includes:
[0104] S510, obtaining the total amount of node resources through the configuration of the cluster node virtual machine,
[0105] S520, monitoring the current node resources occupied during the operation of the cluster nodes,
[0106] S530, calculating the node resource reduction, the total amount of node resources minus the node resource reduction to obtain the updated total amount of node resources, and the ratio of the total amount of current node resources occupied to the updated total amount of node resources is greater than the second set threshold and less than the first set threshold;
[0107] S540: Reduce the total amount of node resources according to the updated total amount of node resources.
[0108] and or,
[0109] S550, obtaining the total amount of cluster resources through the configuration of the cluster node virtual machine and the number of cluster nodes,
[0110] S560 monitors the current cluster resources used during cluster operation.
[0111] S570, calculating the number of cluster nodes reduced, the total amount of cluster resources minus the node resources lost by reducing the cluster nodes to obtain the updated total amount of cluster resources, the ratio of the current total amount of cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold,
[0112] S580, designate the virtual machine to be deleted according to the reduced number of cluster nodes, migrate the services of the virtual machine to be deleted to other nodes in the cluster, modify the cluster configuration to move the virtual machine to be deleted out of the cluster, and deregister the virtual machine to be deleted.
[0113] S600, monitoring the target resource occupation of the target service. Specifically, the service operation process will occupy various resources such as CPU resources, memory resources, storage IO resources and storage resources. Monitor the target resource occupation of each target service.
[0114] When the target resource occupancy is greater than the third set threshold and less than the fourth set threshold, timing is performed respectively. If the timing time greater than the third set threshold and less than the fourth set threshold is less than the third set time and the fourth set time respectively, the timing is reset.
[0115] S700, determining whether the target resource occupancy is higher than a third set threshold value for a third set time, if yes, modifying the target service configuration to increase the target service performance and the target service resources that can be occupied by the target service, otherwise executing S800,
[0116] S800, determining whether the target occupancy is lower than a fourth set threshold value for a fourth set time period, if yes, modifying the target service configuration to reduce the target service performance and reduce the target service resources that can be occupied by the target service.
[0117] During the specific implementation process, the target service resources occupied during the operation of the target service are monitored;
[0118] The change amount of the target service configuration of the target service is calculated, and the change amount includes the change amount of the performance and the change amount of the target service resources that can be occupied.
[0119] The target service configuration of the target service is modified according to the change amount so that the target service resources that can be occupied by the target service are changed to obtain updated occupiable target service resources, and the ratio of the occupied target service resources to the updated occupiable target service resources is greater than the fourth set threshold and less than the third set threshold.
[0120] Modify the target service configuration of the target service according to the change amount so that the target service performance meets the business requirements.
[0121] Example 2
[0122] See also Fig. 9 As shown, an embodiment of the present application provides a device for dynamically allocating resources required by a monitoring device, including:
[0123] A first configuration module, the first configuration module is used to configure and create a virtual machine;
[0124] A second configuration module, the second configuration module is used to configure the cluster;
[0125] A third configuration module, the third configuration module is used to set service configuration;
[0126] A fourth configuration module, the fourth configuration module is used to configure the first set time, the second set time, the third set time, the fourth set time, the first set threshold, the second set threshold, the third set threshold, and the fourth set threshold;
[0127] A first monitoring module, the first monitoring module is used to monitor the overall resource occupancy of the cloud platform virtual machine or cluster providing services;
[0128] A second monitoring module, the second monitoring module is used to monitor the target resource occupancy of the target service;
[0129] An execution module, the execution module determines whether the triggering conditions of the target expansion strategy and the target reduction strategy are met based on the data of the first monitoring module and the configuration of the fourth configuration module, and executes them if they are met; the execution module determines whether the triggering conditions for modifying the target service configuration are met based on the data of the second monitoring module and the configuration of the fourth configuration module, and modifies the target service configuration if they are met.
[0130] Example 3
[0131] The embodiment of the present application provides a storage medium for implementing a dynamic adjustment method for personalized service configuration. The storage medium for implementing a dynamic adjustment method for personalized service configuration stores at least one instruction, and the instruction is executed to implement the dynamic adjustment method for personalized service configuration.
[0132] This application can provide different resource adjustments and application configuration adjustments according to the operation of the application service; resource adjustments include the adjustment of virtual machine or cluster resources. When the pressure on the application service increases and a certain resource of the virtual machine or cluster is fully loaded, the resource is expanded to ensure the smooth operation of the application service. When the application service business volume decreases and the application service has excess available resources, the application configuration is automatically modified to reduce the available resources, reduce the total amount of virtual machine or cluster resources, release cloud platform resources, and avoid resource waste. When the application service is under increased pressure due to increased business volume, this application optimizes the available resources through application configuration to ensure that the application service has sufficient resources to use and ensure the smooth operation of the application service.
[0133] In addition, for a cluster, the impact of application service operation on the resources of each cluster node in the cluster is different. For example, if one application service fully loads the CPU of a node in the cluster and fully loads the memory of another node, the impact on other application services may be different. This application can configure each resource of each cluster node according to the node to adapt to different application services.
[0134] The present application can also increase the number of nodes in the cluster to increase the total amount of cluster resources to meet the needs of smooth operation of application services when processing large business volumes. When the application service business volume decreases, the number of nodes in the cluster can be reduced to reduce the total amount of cluster resources, thereby releasing cloud platform resources and avoiding resource waste.
[0135] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, 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, such as 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 devices or units, which can be electrical, mechanical or other forms.
[0136] 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.
[0137] In addition, each functional unit in each embodiment of the present invention 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.
[0138] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for dynamically adjusting service personalized configuration, characterized in that: include: Monitor the overall resource usage of the cloud platform virtual machines or clusters that provide services. When the overall resource occupancy is continuously higher than the first set threshold for the first set time, the target expansion strategy is executed to expand the overall resources of the virtual machine according to the expansion setting, or to expand the overall resources of the cluster nodes according to the expansion setting and / or to increase the number of cluster nodes according to the expansion setting. When the overall resource occupancy is lower than the second set threshold value for a second set time, the target shrinking strategy is executed to shrink the overall resources of the virtual machine according to the shrinking setting, or to shrink the overall resources of the cluster nodes according to the shrinking setting and / or to reduce the number of cluster nodes according to the shrinking setting; Wherein, executing the target expansion strategy to expand the overall resources of the virtual machine according to the expansion setting includes: obtaining the total amount of the overall resources of the virtual machine through the virtual machine configuration, monitoring the current used resources during the operation of the virtual machine, calculating the overall resource increment of the virtual machine, adding the total amount of the overall resources of the virtual machine to the overall resource increment of the virtual machine to obtain the updated total amount of the overall resources of the virtual machine, and the ratio of the total amount of the currently used resources to the updated total resources is greater than the second set threshold and less than the first set threshold; Executing the target expansion strategy to expand the overall resources of the cluster nodes according to the expansion settings and or increase the number of cluster nodes according to the expansion settings includes: obtaining the total amount of node resources through the configuration of the cluster node virtual machine, monitoring the current node resources occupied during the operation of the cluster node, calculating the node resource increment, the total amount of node resources plus the node resource increment to obtain the updated total amount of node resources, and the ratio of the total amount of current node resources occupied to the updated node resources is greater than the second set threshold and less than the first set threshold; and or, obtaining the total amount of cluster resources through the configuration of the cluster node virtual machine and the number of cluster nodes, monitoring the current cluster resources occupied during the operation of the cluster, calculating the number of cluster nodes increased, the node resources provided by the increased cluster nodes plus the total amount of cluster resources to obtain the updated total amount of cluster resources, the ratio of the total amount of current cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold, creating a virtual machine according to the number of cluster nodes increased, and modifying the cluster configuration to allow the created virtual machine to join the cluster; Executing the target shrinking strategy to shrink the overall resources of the virtual machine according to the shrinking setting includes: obtaining the total amount of the overall resources of the virtual machine through the virtual machine configuration, monitoring the current used resources during the operation of the virtual machine, calculating the reduction of the overall resources of the virtual machine, subtracting the total amount of the overall resources of the virtual machine from the reduction of the overall resources of the virtual machine to obtain the updated total amount of the overall resources of the virtual machine, and the ratio of the total amount of the currently used resources to the updated total amount of the overall resources is greater than the second set threshold and less than the first set threshold; Executing the target scaling-down strategy to scale down the overall resources of the cluster nodes according to the scaling-down settings and / or reducing the number of cluster nodes according to the scaling-down settings includes: obtaining the total amount of node resources through the configuration of the cluster node virtual machines, monitoring the current node resources occupied during the operation of the cluster nodes, calculating the node resource reduction, subtracting the node resource reduction from the total amount of node resources to obtain the updated total amount of node resources, and the ratio of the total amount of current node resources occupied to the updated total amount of node resources is greater than the second set threshold and less than the first set threshold; and / or, obtaining the total amount of cluster resources through the configuration of the cluster node virtual machines and the number of cluster nodes, monitoring the current cluster resources occupied during the operation of the cluster, calculating the number of reduced cluster nodes, subtracting the node resources lost by reducing the cluster nodes to obtain the updated total amount of cluster resources, and the ratio of the current cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold, specifying the virtual machine to be deleted according to the number of reduced cluster nodes, migrating the business of the virtual machine to be deleted to other nodes in the cluster, modifying the cluster configuration to move the virtual machine to be deleted out of the cluster, and deregistering the virtual machine to be deleted; Monitor the target resource occupancy of the target service, and when the target resource occupancy continues to be higher than the third set threshold for a third set time, modify the target service configuration to increase the target service performance and increase the target service resources that can be occupied by the target service, and when the target occupancy continues to be lower than the fourth set threshold for a fourth set time, modify the target service configuration to reduce the target service performance and reduce the target service resources that can be occupied by the target service, including: monitoring the target service resources occupied during the operation of the target service; calculating the change amount of the target service configuration of the target service, and modifying the target service configuration of the target service according to the change amount so that the target service resources that can be occupied by the target service are changed to obtain updated occupiable target service resources, and the ratio of the occupied target service resources to the updated occupiable target service resources is greater than the fourth set threshold and less than the third set threshold; modifying the target service configuration of the target service according to the change amount so that the target service performance meets business needs.
2. The method for dynamically adjusting service personalized configuration according to claim 1, characterized in that: Resources include CPU resources, memory resources, storage IO resources, and storage resources.
3. The method for dynamically adjusting service personalized configuration according to claim 1, characterized in that: The monitoring of the overall resource usage of the cloud platform virtual machine or cluster providing services includes: Get the total amount of virtual machine or cluster resources through virtual machine configuration or cluster configuration. Monitor the current resources used during the operation of a virtual machine or cluster. The current resource usage is divided into the total amount of resources to obtain the overall resource usage.
4. A device for dynamically allocating resources required by monitoring equipment, realizing the method for dynamically adjusting the personalized service configuration as claimed in any one of claims 1 to 3, characterized in that: include: A first configuration module, the first configuration module is used to configure and create a virtual machine; A second configuration module, the second configuration module is used to configure the cluster; A third configuration module, the third configuration module is used to set service configuration; A fourth configuration module, the fourth configuration module is used to configure the first set time, the second set time, the third set time, the fourth set time, the first set threshold, the second set threshold, the third set threshold, and the fourth set threshold; A first monitoring module, the first monitoring module is used to monitor the overall resource occupancy of the cloud platform virtual machine or cluster providing services; A second monitoring module, the second monitoring module is used to monitor the target resource occupancy of the target service; An execution module, the execution module determines whether the triggering conditions of the target expansion strategy and the target reduction strategy are met according to the data of the first monitoring module and the configuration of the fourth configuration module, and executes if the triggering conditions are met, including: executing the target expansion strategy when the overall resource occupancy is higher than the first set threshold for a first set time, so as to expand the overall resources of the virtual machine according to the expansion setting, or to expand the overall resources of the cluster nodes according to the expansion setting and / or increase the number of cluster nodes according to the expansion setting, When the overall resource occupancy is lower than the second set threshold value for a second set time, the target shrinking strategy is executed to shrink the overall resources of the virtual machine according to the shrinking setting, or to shrink the overall resources of the cluster nodes according to the shrinking setting and / or to reduce the number of cluster nodes according to the shrinking setting; Wherein, executing the target expansion strategy to expand the overall resources of the virtual machine according to the expansion setting includes: obtaining the total amount of the overall resources of the virtual machine through the virtual machine configuration, monitoring the current used resources during the operation of the virtual machine, calculating the overall resource increment of the virtual machine, adding the total amount of the overall resources of the virtual machine to the overall resource increment of the virtual machine to obtain the updated total amount of the overall resources of the virtual machine, and the ratio of the total amount of the currently used resources to the updated total resources is greater than the second set threshold and less than the first set threshold; Executing the target expansion strategy to expand the overall resources of the cluster nodes according to the expansion settings and or increase the number of cluster nodes according to the expansion settings includes: obtaining the total amount of node resources through the configuration of the cluster node virtual machine, monitoring the current node resources occupied during the operation of the cluster node, calculating the node resource increment, the total amount of node resources plus the node resource increment to obtain the updated total amount of node resources, and the ratio of the total amount of current node resources occupied to the updated node resources is greater than the second set threshold and less than the first set threshold; and or, obtaining the total amount of cluster resources through the configuration of the cluster node virtual machine and the number of cluster nodes, monitoring the current cluster resources occupied during the operation of the cluster, calculating the number of cluster nodes increased, the node resources provided by the increased cluster nodes plus the total amount of cluster resources to obtain the updated total amount of cluster resources, the ratio of the total amount of current cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold, creating a virtual machine according to the number of cluster nodes increased, and modifying the cluster configuration to allow the created virtual machine to join the cluster; Executing the target shrinking strategy to shrink the overall resources of the virtual machine according to the shrinking setting includes: obtaining the total amount of the overall resources of the virtual machine through the virtual machine configuration, monitoring the current used resources during the operation of the virtual machine, calculating the reduction of the overall resources of the virtual machine, subtracting the total amount of the overall resources of the virtual machine from the reduction of the overall resources of the virtual machine to obtain the updated total amount of the overall resources of the virtual machine, and the ratio of the total amount of the currently used resources to the updated total amount of the overall resources is greater than the second set threshold and less than the first set threshold; Executing the target scaling-down strategy to scale down the overall resources of the cluster nodes according to the scaling-down settings and / or reducing the number of cluster nodes according to the scaling-down settings includes: obtaining the total amount of node resources through the configuration of the cluster node virtual machines, monitoring the current node resources occupied during the operation of the cluster nodes, calculating the node resource reduction, subtracting the node resource reduction from the total amount of node resources to obtain the updated total amount of node resources, and the ratio of the total amount of current node resources occupied to the updated total amount of node resources is greater than the second set threshold and less than the first set threshold; and / or, obtaining the total amount of cluster resources through the configuration of the cluster node virtual machines and the number of cluster nodes, monitoring the current cluster resources occupied during the operation of the cluster, calculating the number of reduced cluster nodes, subtracting the node resources lost by reducing the cluster nodes to obtain the updated total amount of cluster resources, and the ratio of the current cluster resources to the updated total amount of cluster resources is greater than the second set threshold and less than the first set threshold, specifying the virtual machine to be deleted according to the number of reduced cluster nodes, migrating the business of the virtual machine to be deleted to other nodes in the cluster, modifying the cluster configuration to move the virtual machine to be deleted out of the cluster, and deregistering the virtual machine to be deleted; The execution module determines whether the triggering condition for modifying the target service configuration is met based on the data of the second monitoring module and the configuration of the fourth configuration module. If so, the target service configuration is modified. When the target resource occupancy continues to be higher than the third set threshold for a third set time, the target service configuration is modified to increase the target service performance and increase the target service resources that can be occupied by the target service. When the target occupancy continues to be lower than the fourth set threshold for a fourth set time, the target service configuration is modified to reduce the target service performance and reduce the target service resources that can be occupied by the target service, including: monitoring the target service resources occupied during the operation of the target service; calculating the change amount of the target service configuration of the target service, modifying the target service configuration of the target service according to the change amount so that the target service resources that can be occupied by the target service are changed to obtain updated occupiable target service resources, and the ratio of the occupied target service resources to the updated occupiable target service resources is greater than the fourth set threshold and less than the third set threshold; modifying the target service configuration of the target service according to the change amount so that the target service performance meets business needs.
5. A storage medium for implementing a method for dynamically adjusting service personalized configuration, characterized in that: The storage medium for implementing the dynamic adjustment method for personalized service configuration stores at least one instruction, and executing the instruction implements the dynamic adjustment method for personalized service configuration as described in any one of claims 1-3.
