Pod cold start dynamic scaling method based on link analysis

By using link tracing technology to collect interface call data in Kubernetes environment, building a microservice relationship model and realizing Pod cold start scaling, the problem that traditional automatic scaling mechanism cannot manage the long-term access of microservices, and achieving intelligent scaling and resource optimization.

CN120029713APending Publication Date: 2025-05-23TELEFEN (SHANGHAI) DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311555195.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In Kubernetes environment, traditional automatic scaling mechanisms cannot effectively manage microservices that have not been accessed for a long time, resulting in wasted computing resources.

Method used

Through link tracking technology, the full-link interface call data is collected, and the relationship model between microservices is constructed and updated in real time, the pods that have not been accessed for a long time are identified, and cold-start scaling is achieved.

Benefits of technology

It realizes intelligent scaling and optimization management of Pods in Kubernetes environment, avoids waste of computing resources and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
Patent Text Reader

Abstract

The invention provides a Pod cold start dynamic scaling method based on link analysis. According to the method, a relation model between an interface and a micro-service and a recent micro-service access model are constructed and updated in real time by collecting full-link interface calling data. The state of the Pod module is set to be a dormant state by identifying the Pod module which is not accessed by people for a long time. When a new request arrives at an interface link in charge of the dormant Pod, whether the Pod needs to be awakened or not is judged by analyzing performance data of an interface, and the state of the Pod is changed from dormancy to normal operation. Finally, exception handling and log recording are also important links in the whole process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a microservice architecture and a Kubernetes management system, and provides a method for performing cold start scaling of a Pod by utilizing interface link tracking in a Kubernetes environment. Background Art

[0002] As enterprise applications continue to grow in complexity and size, microservices architecture is widely adopted. In a microservices architecture, an application is split into multiple independent services, each of which runs in its own process and communicates over the network. However, as the business of an enterprise grows and time accumulates, the number of microservices in the environment continues to increase, and management and resource allocation issues gradually become prominent. Especially in an internal test environment, some services may not be accessed for a long time, resulting in a waste of device resources.

[0003] As a commonly used container orchestration platform, Kubernetes can efficiently manage and schedule Pods (the basic unit of work in Kubernetes). However, although traditional Kubernetes has an automatic scaling mechanism based on service load, this mechanism mainly monitors the number of services rather than the specific call status of the services, and the number of services must be greater than 0, and it does not have cold start capabilities. Therefore, when some services are called very sparsely or even not called for a long time, these services will still occupy a certain amount of computing resources, causing unnecessary waste. Summary of the invention

[0004] The present invention constructs a Pod cold start dynamic scaling method based on link tracking. The method collects full-link interface call data, builds and updates the relationship model between microservices in real time, thereby realizing intelligent scaling and optimized management of Pod in Kubernetes environment. The specific steps are as follows: 1. Collect full-link interface call data: Use link tracking technology to monitor and count the interface links in the system in real time. The relevant information of each interface link includes the globally unique trace identifier (trace ID), the locally unique identifier (span ID), the service name, the response time, the request success rate, the error rate, etc., so as to obtain all the related microservices of an interface call design and the status data of each interface. At the same time, record the relationship between the microservices involved in each interface link to obtain the interaction data of the microservices.

[0005] 2. Build a relationship model between interfaces and microservices: Clean the collected full-link data, filter out abnormal data in the middle, and finally build an interface to all related microservice relationship models based on the entry interface as a unique ID. The specific model is as follows: Entry service name Associated service Associated service Associated service / api / call OrderService UserService + UpdateTimeCardService + UpdateTime... Create a model: For each cleaned link call service information, if the data does not exist in the model, create a new model record.

[0006] Update model: If the model already exists, update the associated services and the last update time Deletion model: If some associated services have not been used for a long time, delete the related associated service information.

[0007] 3. Build the most recent microservice access model: For each microservice call cleaned from the full-link data, update the latest call time of each microservice and save this data in the database (which can be MySQL / Redis, etc.). The saved access model is as follows: Service name last updated OrderService 2023 / 09 / 12 12:32:33 4. Identify Pod modules that have not been accessed for a long time: By regularly scanning the data of the access model, find out the Pods that have not been accessed for a long time and set their status to dormant. Specifically, you can identify Pods that have not been accessed for a long time by following the steps below: (1) Monitor the access frequency of Pods: By monitoring the last access time of Pods, we can understand the usage of Pods. If a Pod has not been accessed for a period of time, we can mark it as a potential dormant Pod. Specifically, we can set a time threshold. If a Pod has not been accessed for a period of time, we can mark it as a potential dormant Pod.

[0008] (2) Setting the sleep time threshold: Set the sleep time threshold of the Pod according to the system load requirements and resource conditions. If the Pod is still not accessed within the set time, its state is set to sleep. Specifically, the size of the sleep time threshold can be set according to the system load and resource allocation.

[0009] 5. Pod cold start trigger module: While monitoring the operating status of the Pod that has been cold started and the operating data of the interface link in real time, adjust and optimize the cold start strategy based on the monitoring results. When a new request arrives at the interface link that the dormant Pod is responsible for, determine whether the Pod needs to be awakened by analyzing the performance data of the interface. If the performance frequency that needs to be awakened is reached, the state of the Pod is changed from dormant to normal operation. Specifically, the cold start of the Pod can be triggered by the following steps.

[0010] (1) Collect abnormal interface call logs of nginx or gateway (2) Analyze the abnormal interface and obtain the related service list for each abnormal interface call (3) Query the startup status of Kubernetes-related services. If they are not started, use the Kubernetes interface to start them remotely.

[0011] Exception handling and logging: During the entire process, possible exceptions are handled and detailed log information is recorded for subsequent problem analysis and performance optimization. BRIEF DESCRIPTION OF THE DRAWINGS Attached Figure 1 This is a diagram of the dynamic scaling structure of the Pod cold start for link analysis.

Claims

1. Use link tracking technology to monitor and count the interface links in the system in real time, and obtain the status information of each interface link, including response time, request success rate, etc.

2. Through data processing and model algorithms, a directed graph is constructed to represent the relationship between microservices, so as to intuitively understand the calling relationship between the entry point and the microservices.

3. By detecting the last access time of the microservice, we can identify the Pods that have not been accessed for a long time, set their status to the standby state, and then use intelligent sleep calculation to ensure that the system enters the standby state after no access, so as to ensure the safe operation of the system and avoid waste of resources and smoothness of the system.

4. When a new request arrives at the interface link that the dormant Pod is responsible for, determine whether the Pod needs to be woken up by analyzing the performance data of the interface, and change the state of the Pod from dormant to normal operation to improve the availability and stability of the system and optimize the system's resource configuration.