CN-122018927-A - Automatic deployment and elastic telescoping method for containerized application
Abstract
The invention discloses a containerized application automatic deployment and elastic expansion method. And responding to the deployment request to acquire and analyze the engineering construction file and/or the engineering configuration file, extracting engineering characteristics, automatically generating mirror image construction description information and deployment arrangement configuration facing the target environment, constructing an application mirror image and creating an operation instance on the container arrangement platform. The method comprises the steps of collecting platform side resource indexes and application side runtime indexes during running, aligning the platform side resource indexes with time stamps according to instance identifications to form a correlation time sequence, calculating cross-domain index cross-correlation peak values, correlation strength and time delay changes in a sliding window, outputting abnormal scores/labels according to correlation attenuation and delay mutation and classifying the abnormal scores/labels as resource saturation or load increase, respectively executing dynamic calibration or copy elastic expansion and contraction of resource specifications, setting minimum interval/hysteresis inhibition oscillation, and adjusting to adopt rolling update, readiness detection failure rollback and stability monitoring rollback after adjustment.
Inventors
- ZHANG ZIXUAN
- Ding Guangce
- LI HAO
- ZHENG XIAOBO
- ZOU MINGSONG
- SUN NAN
- CHEN RUN
- Cheng Xiangtong
Assignees
- 杭州阿启视科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260408
Claims (10)
- 1. The automatic deployment and elastic telescoping method for the containerized application is characterized by comprising the following steps of: Responding to a deployment request issued for a target application, and acquiring at least one engineering file, wherein the engineering file comprises at least one of an engineering construction file and an engineering configuration file; analyzing the engineering file to extract engineering characteristics, and generating construction description information and deployment arrangement configuration for constructing a container mirror image based on the engineering characteristics; The deployment arrangement configuration is issued to a container arrangement platform so as to create a running instance of the target application in the container arrangement platform; Collecting operation index data during the operation of the operation instance, wherein the operation index data at least comprises a platform side resource index and an application side operation time index; Performing identification alignment on the platform side resource index and the application side runtime index based on the running instance identification, and generating an associated running index time sequence by time stamp alignment; determining to execute an adjustment operation on the running instance based on the associated running index time sequence, wherein the adjustment operation at least comprises one of dynamic calibration of resource specifications and elastic expansion and contraction of the number of instances; and executing the adjustment operation on the running instance through the container arrangement platform, and outputting an execution result.
- 2. The method of claim 1, wherein generating the deployment orchestration configuration comprises: The method comprises the steps of obtaining an environment identifier of a target deployment environment, generating basic configuration information based on the engineering characteristics, loading environment differentiated configuration parameters corresponding to the environment identifier, and combining the basic configuration information and the environment differentiated configuration parameters to generate the deployment arrangement configuration suitable for the target deployment environment.
- 3. The method of claim 1, wherein the identifying the alignment comprises: attaching the running instance identifier or a mapped association label with the running instance identifier to the application side running time index; and performing time sequence mapping on the application side runtime index and the platform side resource index based on the running instance identifier or the association tag.
- 4. The method of claim 1, wherein performing cross-domain correlation modeling based on the correlated time series of operation indicators comprises: Within the sliding time window, a cross-correlation function is calculated and a peak value and its corresponding time lag are determined for at least the following two classes of cross-domain index pairs, respectively: (1) Processor utilization rate and/or memory working set usage in the platform side resource index and request response time delay in the application side runtime index; (2) Processor utilization rate and/or memory working set usage in the platform side resource index and request error rate in the application side runtime index; and calculating the correlation strength corresponding to the peak value of the cross-correlation function and the variation of the time delay between adjacent sliding time windows.
- 5. The method of claim 4, wherein performing anomaly detection comprises: Outputting a correlated anomaly score and/or a correlated anomaly tag when the correlation strength decreases between adjacent sliding time windows beyond a first threshold and the time-lag variation exceeds a second threshold; the correlation anomaly score is weighted by the correlation strength decrease amplitude and the time delay change quantity, and the correlation anomaly score and/or the correlation anomaly label are/is used as one of conditions for triggering the adjustment operation.
- 6. The method of claim 5, wherein determining the adjustment operation comprises: Classifying exception types based on the associated exception tags and the direction and/or amplitude of the time delay variation, wherein the exception types at least comprise a resource saturation type exception and a load growth type exception; When the classification result is that the resource saturation type is abnormal, the dynamic calibration of the resource specification is preferentially selected to be executed; When the classification result is load-increasing type abnormality, the number of the execution examples is preferably selected to be elastically telescopic; And setting a minimum interval time or hysteresis interval for the selection to inhibit frequent switching of the adjustment operation between dynamic calibration of the resource specification and elastic expansion and contraction of the number of instances.
- 7. The method of claim 1, wherein the dynamic calibration of the resource specification comprises: Calculating the statistical characteristic value of the resource usage in the related operation index time sequence in a preset time window, calculating the deviation rate between the statistical characteristic value and at least one of the currently configured resource request value and the resource limit value, generating a new resource specification parameter according to the statistical characteristic value when the deviation rate exceeds a preset adjustment threshold value, and updating the resource configuration of the operation instance.
- 8. The method of claim 1, wherein the number of instances elastically scaling comprises: The method comprises the steps of monitoring the change rate of an index in the operation of an application side, calculating a load estimated value at the next moment based on the change rate when the change rate exceeds a preset burst threshold value, and increasing the number of copies of the operation instance in advance before the resource index of the platform side does not reach a capacity expansion threshold value.
- 9. The method of claim 1, wherein the operation instance is gradually replaced, rebuilt, and/or added using a rolling update strategy when the adjustment operation is performed, and monitoring a ready state of the newly started operation instance, and automatically rolling back to a pre-adjustment state if no ready signal is detected within a preset time.
- 10. The method of claim 1, wherein the operating state is continuously monitored for a predetermined period of time after the adjusting operation is performed; When the application side running index and/or the platform side resource index are/is monitored to no longer meet the preset stability condition, executing rollback operation to cancel the adjustment operation and/or restore to the resource allocation and copy state before adjustment; wherein the stability condition includes at least one of an error rate threshold condition, a response delay threshold condition, an availability threshold condition, and a restart number threshold condition.
Description
Automatic deployment and elastic telescoping method for containerized application Technical Field The invention relates to the technical field of cloud computing and containers, in particular to an automatic deployment and elastic expansion method for containerized applications. Background With the development of cloud computing, application deployment has undergone an evolution from physical servers/virtual machines to containerization. Traditional single application deployment usually depends on a physical server or a virtual machine, and has the problems of complex environment configuration, redundancy of resource allocation, poor expansibility and the like. Container technologies (e.g., docker) promote portability and delivery efficiency of applications through lightweight virtualization, but still face challenges in deploying link engineering, cross-environment consistency, and runtime elasticity and operation-dimension collaboration in large-scale distributed and micro-service scenarios. In the prior art, a container arrangement platform such as Kubernetes provides basic capabilities such as application arrangement, service discovery, rolling update and the like, but general capabilities of the container arrangement platform are not deeply fused with engineering characteristics of a micro-service framework (for example SpringBoot), so that development and operation and maintenance processes are easily broken. In the actual landing process, the micro-service application often needs to manually construct a container mirror image, write or maintain deployment arrangement configuration (such as YAML files) one by one, and configure resource objects such as networks and storages, so that the time consumption and repeatability of the deployment link are insufficient, and meanwhile, differences of configuration items, dependent versions, resource parameters and the like are easy to scatter and manage in an unstructured mode among multiple environments such as development, test and production, so that inconsistent configuration, environment drift and operation difference are caused, and online risks and regression cost are increased. In addition, the existing resource allocation and elastic expansion strategy still depends on manual experience and post-adjustment under a plurality of scenes. On the one hand, the container resource request and the limiting parameter are usually set statically before deployment, and lack of a unified mechanism for continuous dynamic calibration in combination with the running state easily causes low resource utilization rate, idle resource waste or insufficient resources when load changes to cause performance jitter. On the other hand, the existing automatic expansion scheme is mostly triggered based on the resource index threshold values of platforms such as a CPU (Central processing Unit), a memory and the like or triggered based on a single service index, expansion and contraction decision delay possibly occurs when the sudden flow or the complex workload is faced, and the conduction relation of 'resource change-application performance change' is difficult to be described only by depending on the single index threshold value, and different abnormal mechanisms such as resource saturation, load increase and the like are difficult to be distinguished, so that expansion and contraction actions are not accurate enough, and even false triggering, excessive expansion or invalid adjustment occur. Meanwhile, the problems of decentralization and cutting of the platform side resource indexes and the application side runtime indexes (such as request response delay, error rate, JVM performance indexes and the like) are often collected and displayed by different systems, a unified identification association and time alignment mechanism taking an operation example as granularity is lacked, so that a unified view which can be used for decision making is difficult to form by the cross-domain indexes, the problem positioning and root cause analysis time consumption is increased, and under the conditions of container abnormality or performance degradation, the multi-dimensional indexes still need to be manually compared and a disposal strategy is selected, and the degree of automation closed loop is insufficient. Therefore, it is necessary to provide an automatic deployment and elastic expansion method for containerized application, which improves the automation degree of mirror image construction and arrangement deployment, ensures consistency of multi-environment configuration, simultaneously can perform instance-level association and time alignment on platform-side resource indexes and application-side runtime indexes in the running period, and performs more timely and interpretable detection and classification on anomalies based on cross-domain association characteristics, thereby guiding selection and execution of dynamic calibration of resource specifications and elastic expansion of the