Container capacity adjusting method and device and processor
By determining the current and historical data of the target microservices in the microservice management platform, predicting its future change trends, and dynamically adjusting container capacity, the problem of low accuracy of container capacity adjustment is solved, and more efficient and intelligent resource management is achieved.
Patent Information
- Application Number
- CN202411843224.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In a containerized environment, it is difficult for the prior art to accurately adjust the capacity of the container, resulting in waste of resources or degradation of service performance, and it is impossible to make accurate resource adjustment decisions.
By determining the target microservices in the microservice management platform, obtaining their current and historical performance and resource usage, predicting their future trends, determining adjustment strategies based on this information and thresholds, and dynamically adjusting the capacity of the container.
It improves the accuracy and response speed of container capacity adjustment, reduces resource waste and manual intervention, and achieves more efficient and intelligent resource management.
Smart Images

Figure CN119766656A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microservice capacity management, and in particular to a method, device and processor for adjusting the capacity of a container. Background Art
[0002] In a containerized environment, dynamic resource adjustment is a key capability to improve resource utilization and cope with traffic fluctuations. Container capacity adjustment requires accurate prediction of future demand for microservices while taking into account the dynamic changes of resources in the container and potential performance bottlenecks.
[0003] In the related art, the capacity adjustment method of the container is often based on static resource allocation or manual intervention adjustment. This method is easy to cause waste of resources in the container or degradation of service performance under dynamically changing workloads, resulting in an inability to make accurate decisions on resource adjustment in the container. Therefore, there is still a technical problem of low accuracy in container capacity adjustment.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] Embodiments of the present invention provide a method, device and processor for adjusting the capacity of a container, so as to at least solve the technical problem of low accuracy in adjusting the capacity of a container.
[0006] According to one aspect of an embodiment of the present invention, a method for adjusting the capacity of a container is provided, and the method may include: determining a target microservice in a container to be adjusted of a microservice management platform; determining current microservice information of the target microservice in a current time period, wherein the current microservice information is at least used to represent the performance and / or resource usage of the target microservice during its operation in the container to be adjusted; determining change trend information of the target microservice based on the current microservice information and historical microservice information of the target microservice in a historical time period, wherein the change trend information is used to represent the change trend of future microservice information of the target microservice in a future time period; determining an adjustment strategy for the container to be adjusted based on the change trend information and a microservice information threshold, and adjusting the capacity of the container to be adjusted according to the adjustment strategy, wherein the adjustment strategy is used to represent a rule for adjusting the capacity.
[0007] Optionally, the method is applied to a capacity adjustment system of a container, the capacity adjustment system includes a rule management component and a data information collection component, wherein the method further includes: controlling the rule management component to obtain the microservice information collection rule entered by the target object, wherein the microservice information collection rule includes at least the identification information of the target microservice in the container to be adjusted, and the identification information of the container to be adjusted; determining the target microservice in the container to be adjusted of the microservice management platform, including: based on the identification information of the container to be adjusted in the microservice information collection rule, controlling the data information collection component to determine the container to be adjusted of the capacity to be adjusted from the microservice management platform, and based on the identification information of the target microservice in the microservice information collection rule, controlling the data information collection component to determine the target microservice from the container to be adjusted; determining the current microservice information of the target microservice in the current time period, including: controlling the data information collection component to obtain the current microservice information of the target microservice.
[0008] Optionally, the capacity adjustment system includes a data integration and storage component, wherein, based on the identification information of the container to be adjusted in the microservice information collection rule, the data information collection component is controlled to determine the container to be adjusted of the capacity to be adjusted from the microservice management platform, and based on the identification information of the target microservice in the microservice information collection rule, the data information collection component is controlled to determine the target microservice from the container to be adjusted. The method also includes: controlling the data integration and storage component to integrate the current microservice information and convert the integrated current microservice information into a target format; controlling the data integration and storage component to store the current microservice information in the target format.
[0009] Optionally, the method further includes: the control rule management component obtains the capacity calculation indicator rule entered by the target object, wherein the calculation indicator rule at least includes the central processing unit and memory usage of the container to be adjusted corresponding to the target microservice.
[0010] Optionally, the capacity adjustment system includes a capacity analysis component, wherein based on current microservice information and historical microservice information of the target microservice within a historical period, change trend information of the target microservice is determined, including: controlling the capacity analysis component, calling historical microservice information of the target microservice, and determining the change trend information based on the historical microservice information and the current microservice information.
[0011] Optionally, after determining the change trend information of the target microservice based on the current microservice information and the historical microservice information of the target microservice in the historical period, the method further includes: controlling the capacity analysis component to at least associate the change trend information with the CPU and memory usage in the calculation indicator rule.
[0012] Optionally, the capacity adjustment system includes an indicator warning display component, wherein the method further includes: controlling the indicator warning display component to render the change trend information and the microservice information threshold, and displaying the rendered change trend information and the microservice information threshold.
[0013] Optionally, based on the change trend information and the microservice information threshold, determining an adjustment strategy for the container to be adjusted, including: in response to the change trend information exceeding the microservice information threshold, sending adjustment prompt information to the target object, wherein the prompt information is used to prompt the target object whether to agree to start adjusting the capacity; in response to detecting that the target object has issued an adjustment instruction in response to the prompt information, determining an adjustment strategy for adjusting the container to be adjusted; and adjusting the capacity of the container to be adjusted according to the adjustment strategy, including: expanding or reducing the capacity according to the adjustment instruction corresponding to the adjustment strategy.
[0014] According to another aspect of an embodiment of the present invention, a container capacity adjustment device is also provided, including: a first determination unit, used to determine a target microservice in a container to be adjusted of a microservice management platform; a second determination unit, used to determine current microservice information of the target microservice in a current time period, wherein the current microservice information is at least used to represent the performance and / or resource usage of the target microservice during its operation in the container to be adjusted; a third determination unit, used to determine change trend information of the target microservice based on the current microservice information and historical microservice information of the target microservice in a historical time period, wherein the change trend information is used to represent the change trend of future microservice information of the target microservice in a future time period; an adjustment unit, used to determine an adjustment strategy of the container to be adjusted based on the change trend information and a microservice information threshold, and adjust the capacity of the container to be adjusted according to the adjustment strategy, wherein the adjustment strategy is used to represent a rule for adjusting the capacity.
[0015] According to another aspect of an embodiment of the present invention, a processor is further provided, for running a program, wherein the program executes any one of the above-mentioned methods for adjusting the capacity of a container when run by the processor.
[0016] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the above-mentioned methods for adjusting the capacity of a container.
[0017] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned methods for adjusting the capacity of a container.
[0018] According to another aspect of the embodiment of the present application, a computer program product is also provided. The computer program product includes a computer program, and when the computer program is executed by a processor, the method for adjusting the capacity of a container according to the embodiment of the present application is implemented.
[0019] In an embodiment of the present invention, if the capacity of the container to be adjusted is to be adjusted, the target microservice in the container to be adjusted of the microservice management platform can be determined, the current microservice information of the target microservice in the current period can be determined, the change trend information of the target microservice can be determined based on the current microservice information and the historical microservice information of the target microservice in the historical period, and the adjustment strategy of the container to be adjusted can be determined based on the change trend information and the microservice information threshold, and the capacity of the container to be adjusted can be adjusted according to the adjustment strategy. In this embodiment, the capacity of the container is adjusted based on the specific operation of the microservice and the change trend of the future microservice information of the microservice in the future period, which avoids over-estimation and resource waste, improves the accuracy and response speed of the capacity adjustment of the container, and reduces resource waste and manual intervention, so as to achieve the purpose of providing a more efficient and intelligent resource management method for microservices in a containerized environment. The future change trend of the microservice is estimated through historical and current microservice information, and it is determined whether the capacity of the container needs to be expanded or reduced, thereby achieving the technical effect of improving the accuracy of the capacity adjustment of the container and solving the technical problem of low accuracy of the capacity adjustment of the container. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0021] Figure 1 is a flow chart of a method for adjusting the capacity of a container according to an embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of a microservice capacity management system based on statistical process control for microservice applications according to an embodiment of the present invention;
[0023] Figure 3 is a flow chart of a microservice capacity management method based on statistical process control according to an embodiment of the present invention;
[0024] Figure 4 is a structural schematic diagram of a capacity adjustment device for a container according to an embodiment of the present invention;
[0025] Figure 5 is a schematic diagram of an electronic device used in a method for adjusting the capacity of a container according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Example 1
[0029] According to an embodiment of the present invention, an embodiment of a method for adjusting the capacity of a container is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a flow chart of a method for adjusting the capacity of a container according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0031] Step S102: determine the target microservice in the container to be adjusted of the microservice management platform.
[0032] In the technical solution provided in the above step S102 of the embodiment of the present invention, the microservice management platform is a software platform for managing and coordinating the operation of multiple independent services under the microservice architecture in a distributed system, and provides a series of tools and services to help developers and operation and maintenance personnel to implement the deployment, monitoring, adjustment and management of microservices to ensure the efficiency, reliability and scalability of the microservice architecture, which can be a cloud platform. The container to be adjusted can be a container that carries the target microservice, a container with tight or underutilized resources, or a container related to changes in microservice demand. In a cloud platform environment, containers are the basic units of resource isolation and scheduling. By analyzing the resource usage in the container, it can be determined whether the microservices in the container need more or less resources.
[0033] In this embodiment, the target microservice in the container to be adjusted of the microservice management platform is determined, and a specific microservice that needs to be capacity adjusted can be identified from a large number of microservices, that is, the target microservice. The target microservice can be a microservice that runs in a specific container of the microservice management platform (such as a cloud platform) and has resources adjusted according to current and historical performance and resource usage.
[0034] For example, operation and maintenance personnel can select the target microservice to be analyzed according to their own needs on the interactive interface of the microservice management platform. The target microservice can also be automatically determined based on the resource usage of the central processing unit (CPU), memory, disk, and network bandwidth of the container where the microservice is located. For example, if the resource usage of a microservice continues to approach or exceed the preset upper limit (such as CPU usage exceeding 80%), the microservice may need more resource support and can be determined as a target microservice.
[0035] Step S104, determining the current microservice information of the target microservice in the current period.
[0036] In the technical solution provided in the above step S104 of the embodiment of the present invention, after determining the target microservice in the container to be adjusted of the microservice management platform, the current microservice information of the target microservice in the current period can be determined. Among them, the microservice information can at least be used to indicate the performance and / or resource usage of the target microservice during the operation of the container to be adjusted, and can include microservice data information, service traffic, operation status, resource consumption and database usage and other multi-dimensional data.
[0037] In this embodiment, by determining the current microservice information of the target microservice in the current period, performance bottlenecks or resource waste can be discovered in a timely manner, providing data support for subsequent capacity analysis and adjustment strategy formulation.
[0038] Optionally, to determine the current microservice information of the target microservice in the current period, the current microservice information of the target microservice can be monitored through the monitoring system of the cloud platform, log analysis or a special performance monitoring tool, for example, monitoring the number of requests per second (TPS), response time, request success rate, etc. The current microservice information can also be determined by monitoring the resource indicators of the container where the microservice is located, such as CPU usage, memory usage, disk input / output (I / O), network bandwidth usage, etc.
[0039] It should be noted that the above-mentioned method for determining the current microservice information is only an example and is not specifically limited here. As long as it is a method that can be used to determine the current microservice information of the target microservice in the current period, it is within the protection scope of the embodiment of the present invention.
[0040] Step S106, based on the current microservice information and the historical microservice information of the target microservice in the historical period, determine the change trend information of the target microservice.
[0041] In the technical solution provided in the above step S106 of the embodiment of the present invention, after determining the current microservice information of the target microservice in the current period, the change trend information of the target microservice can be determined based on the current microservice information and the historical microservice information of the target microservice in the historical period. The change trend information can be used to indicate the change trend of the future microservice information of the target microservice in the future period.
[0042] In this embodiment, the historical microservice information in the historical period may include the performance and resource usage of the microservice in different periods in the past. The historical microservice information may be business traffic data, reflecting the business processing capability and stability of the service. It may be resource usage data, reflecting the consumption of hardware resources by the service. It may be database usage data, reflecting the demand and usage of database resources by the service.
[0043] In the embodiment of the present invention, the usage pattern and periodic changes of microservices can be identified through historical microservice information, which has reference value for predicting the changing trend of future microservice information. The microservice information of the current period can provide the real-time status of the microservice, which may include key indicators such as business load and resource consumption. Combining the historical microservice information in the historical period with the microservice information in the current period can improve the accuracy of predicting the changing trend of future microservice information, thereby realizing intelligent capacity management of microservices and ensuring the stable operation of microservices under different business requirements and efficient use of resources.
[0044] Optionally, the current microservice information of the target microservice in the current period is compared and analyzed with the historical microservice information in the historical period. The change trend of the future microservice information of the target microservice in the future period can be determined by calculating the mean, median, standard deviation, maximum and minimum statistics of the key indicators of the microservice (such as TPS, response time, CPU and memory usage, etc.). The historical microservice information of the target microservice can be modeled using time series analysis methods, such as autoregression, moving average, autoregression integral sliding average, etc., to predict the microservice information and resource usage in the future period. This is only for example and is not specifically limited here.
[0045] For example, if historical microservice information shows that TPS increases significantly between 12:00 and 14:00 every day, then combined with current microservice information, the growth trend of TPS during this period in the future can be predicted, so that resources can be prepared in advance.
[0046] Step S108: determining an adjustment strategy for the container to be adjusted based on the change trend information and the microservice information threshold, and adjusting the capacity of the container to be adjusted according to the adjustment strategy.
[0047] In the technical solution provided in the above step S108 of the embodiment of the present invention, after determining the change trend information of the target microservice based on the current microservice information and the historical microservice information of the target microservice in the historical period, the adjustment strategy of the container to be adjusted can be determined based on the change trend information and the microservice information threshold, and the capacity of the container to be adjusted can be adjusted according to the adjustment strategy, such as expansion or reduction. Among them, the adjustment strategy is used to represent the rules for adjusting the capacity. The microservice information threshold plays a key role in microservice capacity management. It is a series of preset standard values or limit values that can be used to measure and evaluate whether the running status of the microservice is healthy and whether the resource usage is reasonable, and can trigger corresponding alarms or automatic adjustment mechanisms.
[0048] In this embodiment, the change trend information of the target microservice, such as the prediction of future business traffic and resource consumption, can be compared with the microservice information threshold to identify whether the capacity of the container needs to be adjusted. For example, when the predicted business indicators or resource usage of the microservice are close to or exceed the preset microservice information threshold, an adjustment strategy can be formulated, such as capacity expansion (increasing container instances or resource allocation), capacity reduction (reducing container instances or resource allocation), etc., to achieve the rational use of resources and the stable operation of the microservice. The business indicators of microservices are quantitative indicators that evaluate the performance and health of microservices when processing business requests. They can provide the operating status of microservices and provide important data support for capacity management and performance optimization. The business indicators of microservices may include TPS, response time, request success rate, throughput, number of concurrency, number of user connections, table space utilization, and resource utilization.
[0049] In this embodiment, after determining the adjustment strategy, the corresponding operation can be performed to adjust the capacity of the container to be adjusted. For example, if it is predicted that the TPS will increase significantly in the next few hours, the number of container instances carrying the microservice can be automatically increased to cope with the increased business demand. On the contrary, if it is predicted that the business demand will decrease and the resource utilization rate will be low, it can be considered to reduce the container instance to save costs.
[0050] Optionally, the setting of the microservice information threshold may comprehensively consider multiple factors such as the functional characteristics of the microservice, business requirements, resource limitations, and historical microservice information, so as to ensure that the microservice can run stably under resource configuration while avoiding resource waste.
[0051] In step S102 to step S108 of the embodiment of the present invention, if the capacity of the container to be adjusted is to be adjusted, the target microservice in the container to be adjusted of the microservice management platform can be determined, the current microservice information of the target microservice in the current period can be determined, the change trend information of the target microservice can be determined based on the current microservice information and the historical microservice information of the target microservice in the historical period, and the adjustment strategy of the container to be adjusted can be determined based on the change trend information and the microservice information threshold, and the capacity of the container to be adjusted is adjusted according to the adjustment strategy. In this embodiment, the capacity of the container is adjusted based on the specific operation of the microservice and the change trend of the future microservice information of the microservice in the future period, which avoids over-estimation and waste of resources, improves the accuracy and response speed of the capacity adjustment of the container, and reduces resource waste and manual intervention, so as to achieve the purpose of providing a more efficient and intelligent resource management method for microservices in a containerized environment. The future change trend of the microservice is estimated through historical and current microservice information, and it is determined whether the capacity of the container needs to be expanded or reduced, thereby achieving the technical effect of improving the accuracy of the capacity adjustment of the container and solving the technical problem of low accuracy of the capacity adjustment of the container.
[0052] The embodiment of the present invention is described in detail below in combination with the above steps.
[0053] As an optional embodiment, the method is applied to a capacity adjustment system of a container, the capacity adjustment system includes a rule management component and a data information collection component, wherein the method further includes: controlling the rule management component to obtain the microservice information collection rule entered by the target object, wherein the microservice information collection rule at least includes the identification information of the target microservice in the container to be adjusted, and the identification information of the container to be adjusted; step S102, determining the target microservice in the container to be adjusted of the microservice management platform, including: based on the identification information of the container to be adjusted in the microservice information collection rule, controlling the data information collection component to determine the container to be adjusted of the capacity to be adjusted from the microservice management platform, and based on the identification information of the target microservice in the microservice information collection rule, controlling the data information collection component to determine the target microservice from the container to be adjusted; step S104, determining the current microservice information of the target microservice in the current time period, including: controlling the data information collection component to obtain the current microservice information of the target microservice.
[0054] In this embodiment, in the capacity adjustment system of the container, the capacity adjustment system may include a rule management component and a data information collection component. The rule management component may be controlled to obtain the microservice information collection rules entered by the target object. If the target microservice in the container to be adjusted of the microservice management platform is to be determined, the data information collection component may be controlled to determine the container to be adjusted of the capacity to be adjusted from the microservice management platform according to the identification information of the container to be adjusted in the microservice information collection rules, such as the microservice name, microservice cluster identification information, etc., and based on the identification information of the target microservice in the microservice information collection rules, the data information collection component may be controlled to determine the target microservice from the container to be adjusted. If the current microservice information of the target microservice in the current period is to be determined, the data information collection component may be controlled to obtain the current microservice information of the target microservice. Among them, the microservice information collection rules may at least include the identification information of the target microservice in the container to be adjusted, and the identification information of the container to be adjusted. The target object may be a device user.
[0055] Optionally, the rule management component can provide an entry for device users to enter microservice data collection rules, capacity calculation indicator rules, and microservice database indicator rules. Microservice data collection rules can include the name of the service to be collected, the name of the application to which the service belongs, the cluster, group, business indicator threshold, and the maximum service capacity of a single machine. Capacity calculation indicator rules can include CPU and memory usage thresholds of service-related containers. Microservice database indicator rules can include tablespace and user connection number thresholds.
[0056] Optionally, the data information collection component can collect microservice data information set in the rule management component from multiple dimensions through the microservice data interface. Microservice data information can include business indicator data (such as TPS, response time), application module information where the microservice is located, hardware resource data consumed by the container carrying the service (such as CPU, memory, etc.), and database resource data used by the service (such as table space, number of user connections).
[0057] As an optional embodiment, the capacity adjustment system includes a data integration and storage component, wherein, based on the identification information of the container to be adjusted in the microservice information collection rule, the data information collection component is controlled to determine the container to be adjusted of the capacity to be adjusted from the microservice management platform, and based on the identification information of the target microservice in the microservice information collection rule, the data information collection component is controlled to determine the target microservice from the container to be adjusted. The method also includes: controlling the data integration and storage component to integrate the current microservice information and convert the integrated current microservice information into a target format; controlling the data integration and storage component to store the current microservice information in the target format.
[0058] In this embodiment, the capacity adjustment system may include a data integration and storage component. Based on the identification information of the container to be adjusted in the microservice information collection rule, the data information collection component is controlled to determine the container to be adjusted of the capacity to be adjusted from the microservice management platform, and based on the identification information of the target microservice in the microservice information collection rule, the data information collection component is controlled to determine the target microservice from the container to be adjusted. Then, the data integration and storage component can be controlled to integrate the current microservice information and convert the integrated current microservice information into a target format. The target format is a standardized data structure that is convenient for subsequent processing and analysis. For example, it can be a data table format with predefined fields and data types. By converting the data into the target format, the consistency and readability of the data during storage and processing can be ensured, which is convenient for the subsequent capacity analysis component and indicator warning display component to use. The data integration and storage component can be controlled to store the current microservice information in the target format.
[0059] Optionally, the data integration and storage component can integrate the current microservice information obtained from the microservice management platform, including data cleaning, formatting and standardization of the current microservice information to eliminate noise and outliers in the data of the current microservice information, ensure the consistency and accuracy of the data of the current microservice information, and facilitate subsequent analysis and storage.
[0060] Optionally, the data integration and storage component can perform secondary normalization processing on the current microservice information collected by the data information collection component, convert it into a unified format (target format) and store it in the database for use by other components. For example, other components in the capacity adjustment system require the data of the current microservice information to be input in a specific time series format, then the data integration and storage component needs to reorganize and store the current microservice information in the time series format to unify the format.
[0061] As an optional embodiment, the method further includes: the control rule management component obtains the capacity calculation indicator rule entered by the target object, wherein the calculation indicator rule includes at least the central processing unit and memory usage of the container to be adjusted corresponding to the target microservice.
[0062] In this embodiment, the target object (usually an operation and maintenance personnel or a system administrator) can enter the capacity calculation indicator rules through the interface of the rule management component. The calculation indicator rules may include the identification information of the target microservice and the CPU and memory usage of the container to be adjusted.
[0063] As an optional embodiment, the capacity adjustment system includes a capacity analysis component, wherein step S106, based on the current microservice information and the historical microservice information of the target microservice in the historical period, determines the change trend information of the target microservice, including: controlling the capacity analysis component, calling the historical microservice information of the target microservice, and determining the change trend information based on the historical microservice information and the current microservice information.
[0064] In this embodiment, the capacity adjustment system may include a capacity analysis component. If the change trend information of the target microservice is to be determined based on the current microservice information and the historical microservice information of the target microservice in the historical period, the capacity analysis component may be controlled to call the historical microservice information of the target microservice, and determine the change trend information based on the historical microservice information and the current microservice information.
[0065] Optionally, the capacity analysis component can extract current microservice information and combine it with historically collected microservice information to estimate the change trend of microservice business indicators in the future, providing a scientific basis for advance planning and dynamic adjustment of resources, thereby ensuring that microservices run stably and efficiently in various business scenarios.
[0066] As an optional embodiment, after determining the change trend information of the target microservice based on the current microservice information and the historical microservice information of the target microservice in the historical period, the method also includes: controlling the capacity analysis component to at least associate the change trend information with the CPU and memory usage in the calculation indicator rules.
[0067] In this embodiment, after determining the change trend information of the target microservice based on the current microservice information and the historical microservice information of the target microservice in the historical period, the capacity analysis component can be controlled to at least associate the change trend information with the CPU and memory usage in the calculation indicator rule.
[0068] Optionally, when the rule management component receives the capacity calculation indicator rules entered by the target object, it can trigger the data information collection component to start collecting relevant data from the microservice management platform, including the business indicators of the target microservice, the CPU and memory usage of the container, etc. The collected data can be sent to the data integration and storage component for data cleaning, formatting, and storage. The capacity analysis component can estimate the change trend of the business indicators of the microservice in the future by extracting the current microservice information and combining it with the historically collected microservice information. At the same time, it can associate the CPU and memory usage trend charts of the container to which the service belongs, as well as the resource usage of the database, to generate resource expansion and contraction recommendations, and provide decision-making basis for operation and maintenance personnel.
[0069] As an optional embodiment, the capacity adjustment system includes an indicator warning display component, wherein the method further includes: controlling the indicator warning display component, rendering the change trend information and microservice information thresholds, and displaying the rendered change trend information and microservice information thresholds.
[0070] In this embodiment, the capacity adjustment system may include an indicator warning display component and a control indicator warning display component, which can visualize the change trend information and microservice information thresholds.
[0071] Optionally, the indicator warning display component can integrate and display the trend charts of various service business indicators and resource utilization indicator trend charts contained in the software on a software basis, and can also mark the preset microservice information threshold (indicator threshold) limits.
[0072] As an optional embodiment, step S108, based on the change trend information and the microservice information threshold, determines the adjustment strategy of the container to be adjusted, including: in response to the change trend information exceeding the microservice information threshold, sending a prompt message to the target object, wherein the prompt message is used to prompt the target object whether to agree to start adjusting the capacity; in response to detecting that the target object agrees to the adjustment instruction issued by the prompt message, determines the adjustment strategy for adjusting the container to be adjusted; step S108, according to the adjustment strategy, adjusts the capacity of the container to be adjusted, including: according to the adjustment instruction corresponding to the adjustment strategy, expands or reduces the capacity.
[0073] In this embodiment, in the process of determining the adjustment strategy of the container to be adjusted based on the change trend information and the microservice information threshold, a prompt message can be sent to the target object when the change trend information exceeds the microservice information threshold; when the target object detects the consent instruction issued by the prompt message, the adjustment strategy for adjusting the container can be determined. In the process of adjusting the capacity of the container to be adjusted according to the adjustment strategy, the capacity can be expanded or reduced according to the adjustment instruction corresponding to the adjustment strategy. Among them, the prompt information can be used to prompt the target object whether it agrees to start adjusting the capacity, and can explain in detail the current change trend, potential risks and recommended adjustment measures, such as proposing to increase the number of container instances to cope with the expected business peak, or reduce the number of instances to avoid resource waste.
[0074] Optionally, the capacity adjustment system may issue adjustment instructions to the container management platform according to the determined adjustment strategy, and the adjustment instructions may include expansion instructions and reduction instructions. Expansion instructions may instruct the container platform to increase the number of container instances of the target microservice and / or increase the resource quota (such as CPU, memory) of a single container to cope with the predicted business growth. Reduction instructions may instruct the container platform to reduce the number of container instances or reduce the resource quota of a single container when the predicted business demand decreases or the resource utilization rate is below a certain threshold, so as to save costs and improve resource utilization efficiency.
[0075] Optionally, when the change trend information exceeds the microservice information threshold, an alarm can be generated to remind operation and maintenance personnel to expand resources in a timely manner.
[0076] In an embodiment of the present invention, if the capacity of the container to be adjusted is to be adjusted, the target microservice in the container to be adjusted of the microservice management platform can be determined, the current microservice information of the target microservice in the current period can be determined, the change trend information of the target microservice can be determined based on the current microservice information and the historical microservice information of the target microservice in the historical period, and the adjustment strategy of the container to be adjusted can be determined based on the change trend information and the microservice information threshold, and the capacity of the container to be adjusted can be adjusted according to the adjustment strategy. In this embodiment, the capacity of the container is adjusted based on the specific operation of the microservice and the change trend of the future microservice information of the microservice in the future period, which avoids over-estimation and resource waste, improves the accuracy and response speed of the capacity adjustment of the container, and reduces resource waste and manual intervention, so as to achieve the purpose of providing a more efficient and intelligent resource management method for microservices in a containerized environment. The future change trend of the microservice is estimated through historical and current microservice information, and it is determined whether the capacity of the container needs to be expanded or reduced, thereby achieving the technical effect of improving the accuracy of the capacity adjustment of the container and solving the technical problem of low accuracy of the capacity adjustment of the container.
[0077] Example 2
[0078] Another optional specific implementation is described in detail below.
[0079] At present, with the rapid development and popularization of cloud services, major cloud platform businesses are emerging in an endless stream, and the number of microservices on cloud platforms is also growing rapidly. In order to support the maintenance and management of numerous microservices on the cloud, it is necessary to collect relevant data and uniformly manage the capacity of cloud platform microservices. Microservices evolved based on the idea of divide and conquer. It is a large and comprehensive system. With the development of the Internet, it is difficult to meet the market's demand for technology. For many microservices, the processing and monitoring of massive data information such as the operating status and resource consumption of each service requires a unified device method to integrate and manage, so as to save resource expenses for the maintenance and management of microservices.
[0080] The present invention proposes a microservice capacity management method based on statistical process control. The method is based on the functions provided by the existing microservice application management system, and uniformly collects and integrates multi-dimensional data such as business flow monitoring indicators, service operation status, service resource consumption, and database usage of microservices. Guided by the statistical process control method, the data is analyzed and evaluated, thereby realizing a decision-making process based on multi-dimensional data of microservices, and better completing the maintenance and management of cloud platform microservices. The present invention overcomes the existing situation that it is impossible to uniformly collect, integrate, analyze, and conveniently provide expansion and contraction suggestions for many microservice operation data manually, thereby achieving the technical effect of improving the accuracy of container capacity adjustment and solving the technical problem of low accuracy of container capacity adjustment.
[0081] The method is further described below.
[0082] Figure 2 is a schematic diagram of a microservice capacity management system based on statistical process control for microservice applications according to an embodiment of the present invention, such as Figure 2 As shown, the microservice capacity management system 200 includes: a data information collection component 202 , a data integration and storage component 204 , a rule management component 206 , a capacity analysis component 208 , and an indicator warning display component 210 .
[0083] The data information collection component 202 can collect the microservice data information set in the rule management component from multiple dimensions through various data interfaces provided by the service management system, including business indicator data (e.g., number of requests per second, response time), application module information where the microservice is located, hardware resource data consumed by the container carrying the service (e.g., CPU, memory, etc.), and database resource data used by the service (e.g., table space, number of user connections).
[0084] The data integration and storage component 204 can perform secondary normalization processing on the data collected by the data information collection component, convert it into a unified format and store it in a database for use by other components.
[0085] The rule management component 206 can provide an entry for device users to enter microservice data collection rules (including the service name to be collected, the application name, cluster, group, business indicator threshold, maximum service capacity of a single machine, etc.), capacity calculation indicator rules (including CPU and memory usage thresholds of service-related containers, etc.), and microservice database indicator rules (for example, table space, user connection number threshold, etc.).
[0086] The capacity analysis component 208 can extract the specified microservice data, combine the historically collected data and the set indicator threshold, estimate the change trend of the microservice's business indicators in the future period, and associate the CPU and memory usage trend charts of the container to which the service belongs, as well as the resource usage of the database, to generate resource expansion and contraction suggestions, providing decision-making basis for service maintenance personnel.
[0087] The indicator warning display component 210 can integrate and display the trend charts of various service business indicators and resource utilization indicator trend charts contained in the software on a software basis, and mark the preset indicator threshold limits. When the indicator exceeds the threshold limit, an alarm is generated to remind maintenance personnel to expand resources in time.
[0088] In the embodiment of the present invention, by integrating the functions of multiple components, refined and automated capacity management of cloud platform microservices is achieved, the accuracy of resource adjustment is improved, the automation of early warning and decision-making is achieved, data collation and storage are optimized, flexible rule configuration is provided, service quality and user experience are improved, and operation and maintenance costs are reduced, providing strong support for the efficient and accurate operation of microservices in a cloud platform environment.
[0089] The present invention proposes a microservice capacity management method based on statistical process control. It can collect indicator data of various dimensions generated by actual microservices according to preset rules, and standardize the multi-dimensional indicator data into the database through data cleaning. It can generate resource expansion and contraction suggestions based on historical data and preset indicator thresholds and the correlation between data to provide a decision-making basis for service maintenance personnel. At the same time, it provides daily service business indicator monitoring and early warning functions. This design method emphasizes the implementation of control throughout the process, relies on collected data for analysis and decision-making, and emphasizes the decision-making process based on data. Figure 3 is a flow chart of a microservice capacity management method based on statistical process control according to an embodiment of the present invention. Figure 3 As shown, the following steps are included:
[0090] Step S301, setting microservice items and associated resource indicator items.
[0091] In the technical solution provided in the above step S301 of the embodiment of the present invention, the data information collection component A can collect the microservice data information set in the rule management component from multiple dimensions through various data interfaces provided by the service management system. Basic information configuration can be performed on the microservices to be included in the capacity management system, and microservice items and associated resource index items can be set. For example, service name, application, grouping, database information, maximum service capacity of a single instance, etc. The above basic information can be used to confirm what information the capacity management system needs to collect, and according to what standards the target service capacity is calculated. Resource index items may include computing resources (such as CPU, memory), storage resources (such as disk I / O, file system), network resources (such as bandwidth, number of connections) and database resources (such as database type, table space, number of connections).
[0092] Step S302: Setting a microservice indicator threshold.
[0093] In the technical solution provided in the above step S302 of the embodiment of the present invention, threshold configuration may be performed for the microservices to be included in the capacity management system.
[0094] In this embodiment, the microservice indicator threshold can be a resource usage water level control threshold. By setting the control water level of resource usage, the resource usage during the microservice runtime can be monitored. For example, when the CPU usage rate exceeds 80%, it is set as a high water level, at which time the system should consider capacity expansion; when the memory usage rate exceeds 90%, it is set as a critical water level, and immediate action is required to avoid service crashes.
[0095] Step S303, obtaining collection item information.
[0096] In the technical solution provided in the above step S303 of the embodiment of the present invention, the data information collection component B can determine the collection items according to the pre-configured service information.
[0097] Step S304, collecting indicator data.
[0098] In the technical solution provided in the above step S304 of the embodiment of the present invention, relevant indicator item data can be collected through numerous interfaces provided by the microservice management platform, including the number of business requests per second, maximum response time, CPU and memory usage, number of database connections, table space usage, etc.
[0099] Step S305: clean and format the indicator data.
[0100] In the technical solution provided in the above step S305 of the embodiment of the present invention, the data integration and storage component C can clean the collected original business indicators, resource usage and other data to complete unified formatting preprocessing.
[0101] Step S306: The threshold value and indicator data are stored in the database.
[0102] In the technical solution provided in the above step S306 of the embodiment of the present invention, the indicator data can be stored in the database for standby after being cleaned and formatted, and also includes configuring the corresponding service capacity threshold, water level control upper limit, resource cost threshold, etc.
[0103] Step S307, extracting the extracted data and estimating the indicator change trend according to the rules.
[0104] In the technical solution provided in the above step S307 of the embodiment of the present invention, the capacity analysis component D can extract the selected service indicator data according to the pre-set capacity indicator calculation rules, form an estimated indicator change trend chart, combine the changes in resource costs and the real data collected historically, analyze and calculate the water level values that the indicators and resource costs may reach in a period of time in the future, and find the changing relationship between the business indicators and resource costs of the selected service.
[0105] Step S308: Generate resource expansion and contraction suggestions to provide a basis for decision-making.
[0106] In the technical solution provided in the above step S308 of the embodiment of the present invention, the accuracy of the preset capacity index can be continuously optimized through repeated measurements based on real data, thereby improving the reliability of capacity analysis and prediction.
[0107] Step S309, displaying a service indicator trend chart and related resource indicator costs.
[0108] In the technical solution provided in the above step S309 of the embodiment of the present invention, the indicator warning display component E can display the service indicator data in the form of a trend chart, and at the same time provide resource cost information and water level threshold for reference, which can intuitively reflect the current service capacity status.
[0109] Step S310: abnormal indicator alarm notification.
[0110] In the technical solution provided in the above step S310 of the embodiment of the present invention, when any indicator of business flow or resource usage exceeds a preset water level threshold, the indicator warning display component E may issue an alarm notification.
[0111] In this embodiment, the capacity of the container is adjusted based on the specific operation status of the microservice and the change trend of the future microservice information of the microservice in the future period, which avoids over-estimation and resource waste, improves the accuracy and response speed of the container capacity adjustment, and reduces resource waste and manual intervention, thereby achieving the purpose of providing a more efficient and intelligent resource management method for microservices in a containerized environment. The future change trend of microservices is estimated through historical and current microservice information, and it is determined whether the capacity of the container needs to be expanded or reduced, thereby achieving the technical effect of improving the accuracy of the container capacity adjustment and solving the technical problem of low accuracy of the container capacity adjustment.
[0112] Taking the cloud platform microservice capacity query as an example, the one-stop information retrieval method provided by the present invention is described below, including configuring cloud platform microservice data retrieval rules, collecting microservice indicator data, integrating data into the database, and querying and displaying service indicators.
[0113] In the process of configuring the cloud platform microservice data retrieval rules, the rule management component provides three parts of rule data management classification, one is service indicator management, the second is computing indicator management, and the third is database indicator management. Service rules configure the basic information of the service, including the relationship between the service and its application, the service single instance processing capacity, the ideal load of the service, etc. Through the above settings, the microservice capacity assessment data that needs to be supervised can be obtained from the cloud platform, so as to calculate the assessment indicators.
[0114] In the process of collecting microservice indicator data, after having the configured basic service information, you can obtain the service version, number of online instances, service load, CPU and memory usage, associated database information, number of user connections, and table space usage through the cloud platform based on the information collection component.
[0115] In the process of integrating data into the database, the threshold, water level control upper limit, health status and other extended data can be calculated by integrating the cleaned microservice actual indicator data and then stored in a unified format for backup.
[0116] In the process of querying and displaying service indicators, in order to display the service load more intuitively, the query interface uses each software as a set and displays the service load under it in categories. The changes in the service water level on the time axis, as well as the upper water level threshold, the highest historical corresponding water level, response time, and standard response time are displayed in the form of a statistical process control (SPC) control chart. At the same time, the CPU memory and other resource usage of each instance of the service are auxiliary displayed. Each data indicator on the graph has more specific content for reference. You can click on the indicator to jump to the corresponding detailed information page for viewing.
[0117] On the cloud platform, the expansion capability of cloud services is much stronger than that of previous physical machines, and it is very convenient. Real-time adjustment of service load capacity has become a common demand. So, whether to adjust and how much to adjust is a question that requires maintenance personnel to understand the capacity status of system services to be able to answer. In order to decide whether to expand and how much to expand, estimates can be made in a variety of ways. Taking the capacity prediction of cloud platform microservices as an example, the present invention describes the use of historical maximum value evaluation and proportional measurement to achieve capacity prediction, including historical data extraction, service capacity measurement and measurement result output.
[0118] Based on the data collection and storage components, data collection and storage for specified services can be completed. After a long period of data accumulation, a capacity history library can be formed. When the user explicitly proposes that the current service needs to increase the business traffic demand by several units, it is necessary to conduct a capacity expansion assessment in order to expand the service performance and capacity to meet user needs. The number of instances and resource quantity records configured when the service had the highest business traffic in history, as well as the resource usage ratio at that time, can be retrieved for reference and measurement of capacity assessment. When encountering periodic holidays or activities, when the system service needs to conduct a preventive capacity assessment, the service history data for the same period can be extracted for reference and measurement.
[0119] When calculating the demand for increasing a specific number of unit business traffic, you can compare the single-instance service capabilities, the number of deployed instances, the difference in computing resources and database resource utilization between the service version during the historical highest business traffic period and the current service version, and the current service water level control rules to comprehensively calculate the capacity configuration. When calculating the preventive capacity assessment needs for periodic holidays or activities, you can use historical database data to calculate the growth ratio of business traffic for several historical services in the same period. You can calculate the proportion addition based on the current maximum traffic value. Based on the traffic value after the proportion addition, you can comprehensively calculate the capacity configuration according to the resource allocation in the historical period and the current actual number of resources configured, as well as the current service water level control rules.
[0120] After completing the capacity calculation, each capacity indicator will have a capacity adjustment suggestion. For example, a document report is generated based on the current configuration value, adjustment value, adjustment suggestion, etc., and provided to maintenance personnel to assist in capacity adjustment decision-making.
[0121] In the embodiment of the present invention, the statistical process control method is used as a guide to integrate multi-dimensional data, and the capacity analysis of the overall situation of service applications is performed through the association between the data. This design can integrate data from multiple platforms and realize one-stop access and query. The data indicator rules can be modified at any time, the measurement is convenient, and special configuration can be performed for specific applications, which improves flexibility.
[0122] Example 3
[0123] The embodiment of the present invention provides a container capacity adjustment device. It should be noted that the container capacity adjustment device of the embodiment of the present invention can be used to perform Figure 1 The capacity adjustment method for a container provided in an embodiment of the present invention is described below. The capacity adjustment device for a container provided in an embodiment of the present invention is described below.
[0124] Figure 4 is a schematic diagram of a capacity adjustment device for a container according to an embodiment of the present invention. Figure 4 As shown, the container capacity adjustment device 400 may include: a first determination unit 402 , a second determination unit 404 , a third determination unit 406 and an adjustment unit 408 .
[0125] The first determining unit 402 is used to determine a target microservice in a container to be adjusted of the microservice management platform.
[0126] The second determining unit 404 is used to determine current microservice information of the target microservice in the current period, wherein the current microservice information is at least used to represent the performance and / or resource usage of the target microservice during the operation in the container to be adjusted.
[0127] The third determining unit 406 is used to determine the change trend information of the target microservice based on the current microservice information and the historical microservice information of the target microservice in the historical period, wherein the change trend information is used to represent the change trend of the future microservice information of the target microservice in the future period.
[0128] The adjustment unit 408 is used to determine an adjustment strategy for the container to be adjusted based on the change trend information and the microservice information threshold, and adjust the capacity of the container to be adjusted according to the adjustment strategy, wherein the adjustment strategy is used to represent a rule for adjusting the capacity.
[0129] The container capacity adjustment device provided by the embodiment of the present invention determines the target microservice in the container to be adjusted of the microservice management platform through the first determination unit 402; determines the current microservice information of the target microservice in the current time period through the second determination unit 404, wherein the current microservice information is at least used to represent the performance and / or resource usage of the target microservice during the operation in the container to be adjusted; determines the change trend information of the target microservice based on the current microservice information and the historical microservice information of the target microservice in the historical time period through the third determination unit 406, wherein the change trend information is used to represent the change trend of the future microservice information of the target microservice in the future time period; determines the adjustment strategy of the container to be adjusted based on the change trend information and the microservice information threshold through the adjustment unit 408, and adjusts the capacity of the container to be adjusted according to the adjustment strategy, wherein the adjustment strategy is used to represent the rule for adjusting the capacity, thereby achieving the technical effect of improving the accuracy of the capacity adjustment of the container and solving the technical problem of low accuracy of the capacity adjustment of the container.
[0130] The capacity adjustment device of the above-mentioned container may also include a processor and a memory, and the above-mentioned units are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0131] The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be set to control the same device type of devices to be shut down to perform graceful shutdown by adjusting kernel parameters.
[0132] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (fl ash RAM), and the memory includes at least one storage chip.
[0133] The processor contains a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the work efficiency of traders can be improved by adjusting the kernel parameters.
[0134] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0135] Example 4
[0136] According to an embodiment of the present invention, a computer-readable storage medium is further provided, on which a program is stored. When the program is executed by a processor, the method for adjusting the capacity of a container is implemented.
[0137] Example 5
[0138] According to an embodiment of the present invention, a processor is further provided. The processor is used to run a program, wherein the method for adjusting the capacity of a container is executed when the program is running.
[0139] Example 6
[0140] Figure 5 is a schematic diagram of an electronic device for a method for adjusting the capacity of a container according to an embodiment of the present invention, such as Figure 5 As shown, an embodiment of the present invention further provides an electronic device 500, which includes a processor 501, a memory 502, and a program stored in the memory and executable on the processor 501, and the processor 501 executes the above steps of the embodiment of the present invention.
[0141] Example 7
[0142] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and when the computer program is executed by a processor, the method for adjusting the capacity of a container in the embodiment of the present application is implemented.
[0143] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0144] The present invention also provides a computer program product, which, when executed on a data processing device, is suitable for the program of the above steps in the embodiment of the present invention.
[0145] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0146] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0147] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0149] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0150] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0151] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.
[0152] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0153] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0154] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for adjusting the capacity of a container, characterized in that: include: Determine the target microservice in the container to be adjusted on the microservice management platform; Determine current microservice information of the target microservice in a current period, wherein the current microservice information is at least used to indicate performance and / or resource usage of the target microservice during operation in the container to be adjusted; Based on the current microservice information and the historical microservice information of the target microservice in a historical period, determining the change trend information of the target microservice, wherein the change trend information is used to represent the change trend of the future microservice information of the target microservice in a future period; Based on the change trend information and the microservice information threshold, an adjustment strategy for the container to be adjusted is determined, and the capacity of the container to be adjusted is adjusted according to the adjustment strategy, wherein the adjustment strategy is used to represent a rule for adjusting the capacity.
2. The capacity adjustment method according to claim 1, characterized in that: The method is applied to a capacity adjustment system of a container, wherein the capacity adjustment system includes a rule management component and a data information collection component, wherein the method further includes: Controlling the rule management component to obtain the microservice information collection rule entered by the target object, wherein the microservice information collection rule at least includes the identification information of the target microservice in the container to be adjusted and the identification information of the container to be adjusted; Determine the target microservice in the container to be adjusted on the microservice management platform, including: Based on the identification information of the container to be adjusted in the microservice information collection rule, control the data information collection component to determine the container to be adjusted whose capacity is to be adjusted from the microservice management platform, and based on the identification information of the target microservice in the microservice information collection rule, control the data information collection component to determine the target microservice from the container to be adjusted; Determining the current microservice information of the target microservice in the current time period includes: controlling the data information collection component to obtain the current microservice information of the target microservice.
3. The capacity adjustment method according to claim 2, characterized in that: The capacity adjustment system includes a data integration and storage component, wherein, based on the identification information of the container to be adjusted in the microservice information collection rule, the data information collection component is controlled to determine the container to be adjusted whose capacity is to be adjusted from the microservice management platform, and based on the identification information of the target microservice in the microservice information collection rule, the data information collection component is controlled to determine the target microservice from the container to be adjusted, the method further includes: Control the data integration and storage component to integrate the current microservice information and convert the integrated current microservice information into a target format; Control the data integration and storage component to store the current microservice information in the target format.
4. The capacity adjustment method according to claim 2, characterized in that: The method further comprises: The rule management component is controlled to obtain the capacity calculation indicator rule entered by the target object, wherein the calculation indicator rule at least includes the central processing unit and memory usage of the container to be adjusted corresponding to the target microservice.
5. The capacity adjustment method according to claim 4, characterized in that: The capacity adjustment system includes a capacity analysis component, wherein based on the current microservice information and the historical microservice information of the target microservice in a historical period, the change trend information of the target microservice is determined, including: The capacity analysis component is controlled to call the historical microservice information of the target microservice, and the change trend information is determined based on the historical microservice information and the current microservice information.
6. The capacity adjustment method according to claim 5, characterized in that: After determining the change trend information of the target microservice based on the current microservice information and the historical microservice information of the target microservice in a historical period, the method further includes: The capacity analysis component is controlled to at least associate the change trend information with the central processing unit and the memory usage rate in the calculation indicator rule.
7. The capacity adjustment method according to claim 6, characterized in that: The capacity adjustment system includes an indicator early warning display component, wherein the method further includes: The indicator warning display component is controlled to render the change trend information and the microservice information threshold, and the rendered change trend information and the microservice information threshold are displayed.
8. The capacity adjustment method according to claim 2, characterized in that: Determining an adjustment strategy for the container to be adjusted based on the change trend information and the microservice information threshold includes: In response to the change trend information exceeding the microservice information threshold, sending adjustment prompt information to the target object, wherein the adjustment prompt information is used to prompt the target object whether to agree to start adjusting the capacity; In response to detecting that the target object has issued an instruction to agree to the adjustment prompt information, determining the adjustment strategy for adjusting the container to be adjusted; According to the adjustment strategy, the capacity of the container to be adjusted is adjusted, including: The capacity is expanded or reduced according to the adjustment instruction corresponding to the adjustment strategy.
9. A container capacity adjustment device, characterized in that: include: A first determination unit is used to determine a target microservice in a container to be adjusted of a microservice management platform; A second determining unit is used to determine current microservice information of the target microservice in a current period, wherein the current microservice information is at least used to represent the performance and / or resource usage of the target microservice during the operation of the target microservice in the container to be adjusted; a third determining unit, configured to determine, based on the current microservice information and the historical microservice information of the target microservice in a historical period, change trend information of the target microservice, wherein the change trend information is used to indicate a change trend of future microservice information of the target microservice in a future period; An adjustment unit is used to determine an adjustment strategy for the container to be adjusted based on the change trend information and the microservice information threshold, and adjust the capacity of the container to be adjusted according to the adjustment strategy, wherein the adjustment strategy is used to represent a rule for adjusting the capacity.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when run by the processor, executes the method for adjusting the capacity of a container according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for adjusting number of micro-service instances
CN114911627A
Intelligent capacity expansion and contraction method and system based on capacity early warning
CN115756853A
Internet of vehicles platform capacity expansion and contraction method and system, and storage medium
CN117221125A
Early warning method and device for service capacity of application system
CN117932438A
Capacity reduction and capacity expansion method and system for cluster, capacity reduction and capacity expansion control terminal, and medium
US20230236866A1