Java probe version control method, system, electronic device, storage medium and program product
Patent Information
- Application Number
- CN202510181693.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2026-08-18
AI Technical Summary
如果新版本的Java探针与应用程序的服务逻辑不兼容,这种全量升级方式会导致所有实例受到影响,进而严重影响应用程序的稳定性和可靠性
[0010]In this embodiment, during application deployment scenarios such as application creation or upgrades, the master node in the container orchestration platform updates the download address of the target version Java probe package corresponding to the instance to the instance's resource configuration information via the interface server. This ensures that the correct Java probe version is loaded based on the Java probe package download address when creating each instance. The admission controller in the worker node cluster dynamically determines the download address of the target version Java probe package required for the instance to be created based on the canary release ratio of the new version Java probe. The target version can be either a new or old version. This controls a subset of application instances to load the new version Java probe, rather than loading the new version Java probe all at once for all application instances. Therefore, this provides precise instance-level Java probe version control, enabling a subset of user instances to upgrade the Java probe version, verifying the performance of the new version Java probe on a small scale, reducing the risk of full deployment, improving the stability of the Java probe during version upgrades, ensuring the stability and reliability of the application, and enhancing the user experience.
Smart Images

Figure CN122593835A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a Java probe version control method, system, electronic device, storage medium, and program product. Background Technology
[0002] A Java Agent is a powerful tool for monitoring, managing, and diagnosing applications. It utilizes the Instrumentation API (Inspection Agent Interface) provided by the Java Virtual Machine (JVM) to allow developers to dynamically modify the bytecode of class files at runtime, thereby enabling the monitoring, management, and diagnosis of application behavior.
[0003] In practical applications, to ensure high availability and load balancing, multiple instances of the application are typically required, each mounting a Java probe. When a new version of the Java probe is released, all instances need to update the version of their mounted Java probes. If the new version of the Java probe is incompatible with the application's service logic, this full upgrade approach will affect all instances, severely impacting the stability and reliability of the application. Summary of the Invention
[0004] This application provides a Java probe version control method, system, electronic device, storage medium, and program product for controlling the stability and reliability of Java probe version upgrades.
[0005] This application provides a Java probe version control method, characterized in that it is applied to the master node in a container orchestration platform. The method includes: receiving a first number of instance creation requests triggered by a user's application deployment instruction through an interface server, wherein the application deployment instruction is used to instruct the creation of a first number of instances of a target application in a worker node cluster based on the resource configuration information of each of the first number of instances; forwarding the first number of instance creation requests sequentially to the admission controller in the worker node cluster through the interface server, so that each time the admission controller receives an instance creation request, it determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe and returns it to the interface server, wherein the target version is a new version or an old version; updating the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of each of the first number of instances through the interface server, so that the worker node cluster creates the first number of instances according to the updated resource configuration information of the first number of instances; wherein, during the creation of each instance, the target version of the Java probe package is downloaded according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and loaded into the instance.
[0006] This application also provides a Java probe version control method, applied to a worker node cluster in a container orchestration platform. The method includes: receiving a first number of instance creation requests sequentially forwarded by the master node through an interface server via an admission controller; in response to each instance creation request received, determining the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe through the admission controller and returning it to the interface server, so that the interface server updates the download address of the target version of the Java probe package corresponding to the first number of instances into the resource configuration information of the first number of instances, wherein the target version is a new version or an old version; creating the first number of instances according to the updated resource configuration information of the first number of instances; wherein, during the creation process of each instance, the target version of the Java probe package is downloaded according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and loaded into the instance.
[0007] This application embodiment also provides a Java probe version control system, including: a container orchestration platform, a local storage system, and a remote storage system; the container orchestration platform includes a master node and a worker node cluster, the master node includes an interface server, and the worker node cluster includes an admission controller; the local storage system or the remote storage system is used to store the Java probe package of the target version, the target version being a new version or an old version; the master node is used to receive, through the interface server, a first number of instance creation requests triggered by a user's application deployment instruction, wherein the application deployment instruction is used to instruct the creation of a first number of instances of the target application in the worker node cluster according to the resource configuration information of each of the first number of instances; the first number of instances are forwarded sequentially to the admission controller in the worker node cluster through the interface server. Example: Create a request; update the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of the first number of instances through the interface server; worker node cluster, used to respond to each instance creation request received, determine the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe through the admission controller and return it to the interface server; create the first number of instances according to the updated resource configuration information of the first number of instances; wherein, during the creation process of each instance, download the target version of the Java probe package from the local storage system or remote storage system according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and load it into the instance.
[0008] This application also provides an electronic device, including: a memory and a processor; the memory for storing a computer program; and the processor coupled to the memory for executing the computer program to perform steps in a Java probe version control method.
[0009] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the Java probe version control method.
[0010] In this embodiment, during application deployment scenarios such as application creation or upgrades, the master node in the container orchestration platform updates the download address of the target version Java probe package corresponding to the instance to the instance's resource configuration information via the interface server. This ensures that the correct Java probe version is loaded based on the Java probe package download address when creating each instance. The admission controller in the worker node cluster dynamically determines the download address of the target version Java probe package required for the instance to be created based on the canary release ratio of the new version Java probe. The target version can be either a new or old version. This controls a subset of application instances to load the new version Java probe, rather than loading the new version Java probe all at once for all application instances. Therefore, this provides precise instance-level Java probe version control, enabling a subset of user instances to upgrade the Java probe version, verifying the performance of the new version Java probe on a small scale, reducing the risk of full deployment, improving the stability of the Java probe during version upgrades, ensuring the stability and reliability of the application, and enhancing the user experience. Attached Figure Description
[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0012] Figure 1 A schematic diagram illustrating the structure of an exemplary Java probe version control system provided in this application embodiment;
[0013] Figure 2 A signaling interaction diagram of a Java probe version control method provided in an embodiment of this application;
[0014] Figure 3 This is an example of a load balancing principle diagram;
[0015] Figure 4 Here is an example state machine schematic diagram;
[0016] Figure 5 Here is an example state machine schematic diagram;
[0017] Figure 6 This is an example of a rule matching principle diagram;
[0018] Figure 7 A flowchart illustrating a Java probe version control method provided in this application embodiment;
[0019] Figure 8 A flowchart illustrating another Java probe version control method provided in this application embodiment;
[0020] Figure 9 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the access relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following associated objects have an "or" relationship. Furthermore, in the embodiments of this application, "first," "second," "third," etc., are only used to distinguish the content of different objects and have no other special meaning.
[0023] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.
[0024] The following is a description of some terms used in the embodiments of this application:
[0025] An instance can be understood as an independently running copy of an application. Each instance typically runs in a separate process or container, has its own resources (such as memory, file handles, etc.), and can independently handle requests or execute tasks. For example, in the Kubernetes (k8s) platform, an instance can refer to a Pod (container group). A Pod (container group) is a lightweight group of containers consisting of one or more containers. Pods can be used to run containerized applications, such as cloud gaming applications.
[0026] A state machine is a mathematical model used to describe the transition behavior of a system between different states. It simulates and controls the system's operational logic by defining a finite set of states, initial states, possible events or inputs, and rules governing state transitions. State machines can be classified into the following types: Finite State Machines (FSMs), Extended State Machines (ESMs), and Hierarchical State Machines (HSMs).
[0027] A state machine can typically be represented by the following quintuple: (S, s_0, E, T, F).
[0028] 1. (S): The set of all possible states that the system can be in. For example: {starting, running, paused, stopped}.
[0029] 2. (s_0): The initial state is the default state when the system starts up.
[0030] 3. (E): An external event or input signal that triggers a state transition. For example: {Start, Pause, Stop, Resume}.
[0031] 4. (T): The state transition function defines the rules for transitioning from the current state to the next state when a specific event is received. For example, if the current state is "Running" and a "Pause" event is received, the state switches to "Pause".
[0032] 5. (F): Set of Termination States (Optional) The final or target state that the system may enter. For example: Stop.
[0033] The general working principle of a state machine is as follows: 1. The system starts from the initial state (s_0). 2. It receives external events or inputs. 3. Based on the state transition function (T), it determines whether a state transition should be triggered. 4. If the condition is met, it transitions from the current state (s) to the next state (s'). 5. The above process is repeated until the terminating state is reached or the system stops running.
[0034] Object storage systems are object-centric storage systems that store data as objects rather than files, offering advantages such as high reliability, high scalability, and high performance. An object can include data, metadata, and a unique identifier. Data is the actual content to be stored and can be any form of unstructured data, such as text files, images, videos, and backup files. Metadata is descriptive information about the data. It contains various attributes about the data, such as creation time, content type, and size. Each object has a globally unique identifier, also known as a key, which is used to locate and access the object.
[0035] In practical applications, to ensure high availability and load balancing, multiple instances of the application are typically required, each mounting a Java probe. When a new version of the Java probe is released, all instances need to update the version of their mounted Java probes. If the new version of the Java probe is incompatible with the application's service logic, this full upgrade approach will affect all instances, severely impacting the stability and reliability of the application.
[0036] In practical applications, Java probe versions can be managed through image versions. Specifically, using CI (Continuous Integration) / CD (Continuous Deployment) pipelines, different versions of the JavaAgent package can be packaged into different version image files of the application, with each image file corresponding to a specific version of the JavaAgent. Different versions are distinguished by adding tags to the image files; for example, adding the tag "app:1.0-agent1.0" indicates that version 1.0 of the application (app) corresponds to version 1.0 of the JavaAgent. Users only need to pull the image file with the specified tag. However, managing Java probe versions through image versions has the following drawbacks:
[0037] 1. High image building cost: Each update to the JavaAgent or application version requires rebuilding the image, increasing the cost of image building and distribution.
[0038] 2. Coarse-grained version control: It only supports upgrades at the application level and cannot achieve finer-grained version management (such as at the instance level).
[0039] In practical applications within a Kubernetes environment, a custom resource (CR) can be used to inform the application which JavaAgent version needs to be mounted. Upon startup, the application dynamically pulls the corresponding JavaAgent package based on the configuration information and mounts it. However, this method only supports application-level upgrades and cannot achieve finer-grained version management (such as instance-level).
[0040] To address this, this application provides a Java probe version control method, system, electronic device, storage medium, and program product. In this embodiment, during application deployment scenarios such as application creation or upgrades, the master node in the container orchestration platform updates the download address of the target version Java probe package corresponding to the instance to the instance's resource configuration information via the interface server. This ensures that the correct Java probe version is loaded based on the Java probe package download address when creating each instance. The admission controller in the worker node cluster dynamically determines the download address of the target version Java probe package required for the instance to be created based on the canary release ratio of the new version Java probe. The target version can be a new or old version. This controls a subset of application instances to load the new version Java probe, rather than loading the new version Java probe all at once for all application instances. Therefore, this provides precise instance-level Java probe version control, enabling a subset of user instances to upgrade the Java probe version, verifying the performance of the new version Java probe on a small scale, reducing the risk of full release, improving the stability of the Java probe during version upgrades, ensuring the stability and reliability of the application, and enhancing the user experience.
[0041] The technical solutions of this application and how they solve the aforementioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The technical solutions provided by each embodiment of this application are described in detail below with reference to the accompanying drawings.
[0042] Figure 1 This is a schematic diagram illustrating the structure of an exemplary Java probe version control system provided in this application embodiment. See also... Figure 1 This Java probe version control system may include a container orchestration platform. A container orchestration platform is a tool or system used to manage and automate the deployment, scaling, and operation of containerized applications. It simplifies the complexity of distributed systems by orchestrating multiple container instances and their dependencies, enabling developers and operations personnel to efficiently manage large-scale container clusters. Container orchestration platforms include, but are not limited to, the Kubernetes (K8s) platform.
[0043] In practical applications, a container orchestration platform can include a master node and a cluster of worker nodes. The worker node cluster includes multiple worker nodes, while the master node acts as the management node, responsible for managing the entire container orchestration platform.
[0044] The master node can include components such as APIServer, Controller, Scheduler, and etcd (a distributed data storage system). APIServer is the core component of the container orchestration platform, serving as the data bus and data center for the entire system, responsible for interaction with other components within the master node and all worker nodes. Controller manages the cluster state. Scheduler is primarily responsible for scheduling cluster resources, allocating instances (e.g., Pods) to suitable worker nodes based on specific scheduling algorithms and strategies, thereby making more rational and efficient use of cluster resources. etcd is a distributed data storage system that stores various cluster state information.
[0045] The worker nodes provide components such as kubelet (node agent), CSIAgent (container storage interface agent), and containerd (container creation component). The kubelet component primarily functions to start and stop containers, manage container resource allocation, and perform container health checks. The CSIAgent component, as the container storage interface agent, is responsible for managing and manipulating storage volumes. The containerd component manages the container lifecycle, including pulling images, creating and starting containers.
[0046] In this embodiment, the worker node cluster also provides an admission controller (Admission WebHook). The admission controller provides a mechanism for extending functionality, allowing users to insert custom logic before or after the API Server processes requests, enabling users to flexibly extend and customize the behavior of the worker node cluster to meet diverse application needs.
[0047] Optionally, the Java probe version control system may also include a local storage system and a remote storage system. Relatively speaking, the container orchestration platform accesses the local storage system faster than it accesses the remote storage system. The local storage system can be understood as the storage system accessed by the container orchestration platform from the nearest location, while the remote storage system can be understood as the storage system accessed by the container orchestration platform via a network. Local storage systems include, but are not limited to, hard disk drives or solid-state drives. Remote storage systems include, but are not limited to, object storage systems, block storage systems, or distributed storage systems, etc.
[0048] In practical applications, Java probe packages can be stored in local or remote storage systems for container orchestration platforms to download. Over time, various versions of the Java probe packages are stored in these systems. Some of these versions are older, while others are newer. Relatively speaking, newer versions are upgrades of older versions, and their version numbers are higher than those of the older versions.
[0049] It is worth noting that downloading the Java probe package from the local storage system can greatly shorten the startup time when dynamically loading the Java probe.
[0050] Optionally, the Java probe version control system may also include a configuration center. The configuration center is used for centralized management of configuration information. See [link to relevant documentation] for practical applications. Figure 1 As shown in ①, configuration personnel can configure the canary release rules for Java probes in the configuration center. Canary releases are an important strategy to reduce the impact of new Java probe versions on the production environment. The canary release rules for Java probes define how to gradually apply the new version of the Java probe to a subset of instances, thereby verifying the functionality and compatibility of the new version while ensuring stability.
[0051] In practical applications, users can configure Java probe canary release rules across multiple dimensions in the configuration center. These dimensions include, but are not limited to, user-level rules, cluster-level rules, namespace-level rules, application-level rules, and instance-level rules. In practice, a user can have multiple worker node clusters, each of which can be divided into multiple namespaces. Each namespace can deploy multiple applications, and each application can include multiple instances. User-level rules can be understood as using the same Java probe canary release rules across multiple worker node clusters. Cluster-level rules can be understood as using the same Java probe canary release rules across multiple namespaces within the same worker node cluster. Namespace-level rules can be understood as using the same Java probe canary release rules across multiple applications within the same namespace. Application-level rules can be understood as using the same Java probe canary release rules across multiple instances of the same application. Instance-level rules can be understood as Java probe canary release rules applied to a subset of instances of an application.
[0052] Optional, see Figure 1As shown in ②, the admission controller can obtain and save the Java probe canary release rules from the configuration center for users to use when deploying applications.
[0053] In practical applications, multiple instances of the application run on worker nodes. When a new version of the Java probe is released, the interface server interacts with the admission controller to control one or more instances on the worker nodes to upgrade to the new version. Taking the Kubernetes platform as an example, applications can be represented through Deployment resource objects, which can manage the number of application replicas. See also... Figure 1 Taking a Pod in a Kubernetes platform as an example, worker nodes can run multiple instances of the old version of the Deployment resource object, such as Pod1, Pod2, and Pod3. After an application upgrade, worker nodes can run multiple instances of the new version of the Deployment resource object, such as Pod1, Pod2, and Pod3. For example, Pod1, Pod2, and Pod3 in the old version of the Deployment resource object all load the old version of the Java probe. The interface server interacts with the admission controller and can control one or more Pods in the new version of the Deployment resource object to load the new version of the Java probe. Optionally, each Pod can contain an InitializationContainer to perform pre-startup tasks. For example, the Initialization Container can download the new or old version of the Java probe package and load it into the created instance.
[0054] For a specific example, when a user deploys an application, see [link to relevant documentation]. Figure 1 As shown in ③, the interface server receives multiple instance creation requests triggered by the user's application deployment instructions; see also Figure 1 As shown in ④, the interface server forwards the instance creation request to the admission controller. The admission controller, based on the Java probe canary release rules, returns the download address of the old or new version of the Java probe package to the interface server. The interface server then updates the resource configuration information of each instance based on the download address. Once the resource configuration information of each instance is scheduled to the worker node cluster, the worker node cluster creates each instance according to the resource configuration information. See also... Figure 1 As shown in ⑤ or ⑥, during instance creation, the initialization container can be called to download the corresponding Java probe package from the local storage system or remote storage system based on the download address of the old or new version of the Java probe package and load it into the instance.
[0055] Optionally, the Java probe version control system may also include: monitoring tools and a visualization platform. The monitoring tools can monitor various data related to the container orchestration platform, such as CPU usage, memory consumption, and network traffic. Furthermore, the monitoring tools can also monitor canary release information, including but not limited to: instance creation progress, the online running effect of instances with the newly loaded Java probe package, etc. The visualization platform is used to visually display various data. For example, the visualization platform can display the data monitored by the monitoring tools for relevant personnel (such as Java probe release administrators) to view, thereby helping them better understand the canary release situation.
[0056] It is worth mentioning that, Figure 1 The Java probe version control system shown is merely an example, and the embodiments of this application do not limit the number of components or the specific composition structure of the Java probe version control system.
[0057] To better understand the technical solution of this application, the following is combined with... Figure 2 The signaling interaction diagram shown is used for explanation. Figure 2 This is a signaling interaction diagram of a Java probe version control method provided in an embodiment of this application. See also... Figure 2 The method may include the following steps:
[0058] 201. The master node receives a first number of instance creation requests triggered by the user's application deployment instructions through the interface server. The application deployment instructions are used to instruct the creation of the first number of instances of the target application in the worker node cluster based on the resource configuration information of the first number of instances.
[0059] In practical applications, users have application deployment needs. For example, a user may need to deploy a target application for the first time on a worker node cluster or upgrade an already deployed target application. The target application can be any application, such as a cloud gaming application, cloud rendering application, or cloud desktop application. When a user has an application deployment need, they can send an application deployment command to the container orchestration platform through the client. The application deployment command requests the initial deployment of the target application on the worker node cluster or the upgrade of the target application. Initial deployment of the target application can be understood as creating the target application, while application upgrade can be understood as deploying a new version of the application on the worker node cluster after the initial deployment. In a Kubernetes environment, initial deployment of the target application will create multiple Pods for that application in the Kubernetes environment; during application upgrades, multiple Pods for upgrading the application will be created in the Kubernetes environment. Typically, after creating a new version of the Pod, the old version of the application instance will be terminated.
[0060] In this embodiment, the application deployment instruction can be used to instruct the creation of a first number of instances of the target application in the worker node cluster based on the resource configuration information of each of the first number of instances. The first number can be flexibly set as needed, for example, 100.
[0061] In practical applications, there are no restrictions on how users trigger application deployment commands. For example, when a user has an application deployment requirement, the user can create a resource configuration file corresponding to the target application (e.g., a resource configuration file for the Deployment resource object corresponding to the target application). The user can submit the resource configuration file corresponding to the target application to the interface server through the client, and the interface server will confirm receipt of the user's application deployment command.
[0062] Specifically, the resource configuration file corresponding to the target application may include, but is not limited to, the following information: the name of the target application, the namespace of the target application, and resource configuration information defining the first number of instances of the target application to be created. Instance resource configuration information includes, but is not limited to, instance attribute information, container list, image name, and resource limit information. Instance attribute information includes, but is not limited to, instance name, instance specifications, and the namespace it belongs to. Resource limit information includes, for example, memory limits and CPU resource limits. In practical applications, the file format of the resource configuration file is, for example, YAML or JSON (JavaScript Object Notation). YAML format is a human-readable data serialization standard widely used for configuration files and data exchange.
[0063] In this embodiment, the application deployment instruction instructs the creation of a first number of instances of the target application. The master node receives the user's application deployment instruction through the interface server and triggers a first number of instance creation requests. Each instance creation request is used to request the creation of an instance, and the instance creation request may include the resource configuration information required to create the instance.
[0064] 202. The master node forwards the first number of instance creation requests to the admission controller in the worker node cluster in sequence through the interface server.
[0065] In practical applications, the interface server can forward all instance creation requests to the same admission controller. For example, the interface server and the admission controller can establish a TCP (Transmission Control Protocol Connection) connection, and the interface server can forward instance creation requests to the admission controller through the TCP connection.
[0066] Further optionally, in order to improve resource utilization, reduce response time, and meet high concurrency requirements, if there are multiple admission controllers, the implementation method of forwarding the first number of instance creation requests to the admission controllers in the worker node cluster in sequence through the interface server is as follows: the interface server uses a load balancing method to forward the first number of instance creation requests to the admission controllers in the worker node cluster in sequence.
[0067] For example, see Figure 3 The user's application deployment command instructs the application to be upgraded, resulting in the upgraded application. The application undergoing upgrade includes multiple pods such as Pod1, Pod2, and Pod3. The upgrade process requires triggering three instance creation requests to upgrade these three pods. Without load balancing, the interface server forwards all three instance creation requests to the same admission controller 1. With load balancing, the interface server uses load balancing to forward two instance creation requests to admission controller 1 and one instance creation request to admission controller 2.
[0068] 203. Upon receiving an instance creation request, the worker node cluster determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe through the admission controller and returns it to the interface server.
[0069] Specifically, each time the admission controller receives an instance creation request, it determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe. The canary release ratio of the new version of the Java probe can be understood as the proportion of the number of instances to be created that load the new version of the Java probe out of the total number of instances to be created. In other words, the admission controller can control the number of download addresses for the old version of the Java probe package and the number of download addresses for the new version of the Java probe package required for the instance to be created, based on the canary release ratio of the new version of the Java probe. For example, if a total of 100 instances need to be created, and the canary release ratio of the new version of the Java probe is set to 12%, then the admission controller can return 12 download addresses for the new version of the Java probe package and 88 download addresses for the old version of the Java probe package to the interface server.
[0070] Optionally, the admission controller can incorporate a state machine to precisely control canary releases, enabling better management of the release process for the new version of the Java probe, reducing risks, and optimizing user experience. To this end, in response to each instance creation request received, the admission controller determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe. This is achieved by the admission controller calling the state machine to determine the download address of the target version of the Java probe package required for the instance to be created, where the state machine controls the canary release ratio of the new version of the Java probe.
[0071] In practical applications, with the goal of enabling the state machine to control the canary release ratio of the new Java probe version, the state machine can be flexibly configured based on the canary release ratio of the new Java probe version and the number of instances required for this application deployment. Specifically, the number of states controlling the state machine, the transition rules between states, and whether each state returns the download address for the new or old version of the Java probe package can be flexibly configured.
[0072] Further optionally, in order to enable the admission controller to better and more precisely control the canary release through the state machine, before the admission controller receives the first number of instance creation requests forwarded sequentially by the master node through the interface server, it can also: in response to the received state machine configuration request sent by the interface server, configure the state machine according to the canary release ratio of the new version of the Java probe, wherein the state machine is used to control the ratio between the second number and the first number as the canary release ratio, the first number is the sum of the second number and the third number, the second number is the number of download addresses of the new version of the Java probe package required for the instance to be created, and the third number is the number of download addresses of the old version of the Java probe package required for the instance to be created.
[0073] Specifically, each time the admission controller receives an instance creation request, it calls the state machine to return either the download address of the new version of the Java probe package or the download address of the old version of the Java probe package for the instance to be created. The proportion of the number of download addresses of the new version of the Java probe package returned by the state machine to the number of instances to be created is the canary release ratio of the new version of the Java probe.
[0074] In practical applications, a state machine can be maintained for each version of the target application. Optionally, the identifier of the target application and the state of its state machine can be maintained in the admission controller in the form of key-value (KV) pairs. Let's assume the identifier of the target application is denoted as ReplicaSet ID, with ReplicaSet ID as the key and the current state of the state machine as the value.
[0075] For example, see Figure 4 Assume the ReplicaSet ID of the application before the upgrade is denoted as RS1, and the ReplicaSet ID of the application after the upgrade is denoted as RS2. Before the upgrade, the three instances of the application (Pod1, Pod2, and Pod3) all loaded the V1 version of the Java probe. When a user needs to upgrade the application, the upgraded application needs to be deployed on the worker node cluster. During the deployment of the upgraded application, a state machine controls the number of Pods loading the V2 version of the Java probe. For example, the latest released version of the Java probe is V2, the old version is V1, and the canary release ratio of the new version is 1 / 3, meaning that only one of the three Pods can load the V2 version of the Java probe, while the other two Pods load the V1 version.
[0076] See also Figure 4 After the upgrade, the state machine corresponding to RS2 can transition between three state values: state 0 (representing the initial state), state 1, and state 2. Different state values represent different states. The transition rules between state values are as follows:
[0077] 1. If the current state of the state machine corresponds to state value 0, the admission controller receives an instance creation request forwarded by the interface server. The current state of the state machine changes from state value 0 to state value 1. The admission controller returns the download address of the V1 version Java probe package to the interface server for subsequent creation of Pod1 that loads the V1 version Java probe.
[0078] 2. If the current state of the state machine corresponds to state value 1, the admission controller receives an instance creation request forwarded by the interface server. The current state of the state machine changes from state value 1 to state value 2. The admission controller returns the download address of the V2 version Java probe package to the interface server for subsequent creation of Pod2 that loads the V2 version Java probe.
[0079] 3. If the current state of the state machine corresponds to state value 2, and the admission controller receives an instance creation request forwarded by the interface server, the current state of the state machine remains at state value 2. The admission controller returns the download address of the V1 version Java probe package to the interface server for subsequent creation of Pod3 that loads the V1 version Java probe.
[0080] In practical applications, state machines can also be restored to their initial state based on timed tasks. For example, see... Figure 4 The current state of the state machine is restored from state value 1 to state value 0, and the current state of the state machine is restored from state value 2 to state value 0.
[0081] As can be seen from the above, by using a state machine according to the canary release ratio of the Java probe, the number of instances of the new version of the Java probe loaded in the new version of the application can be controlled. Figure 4 The state machine shown can control only one instance of an application's Java probe version to be upgraded to the latest version among multiple instances of the application. Of course, through flexible configuration, the state machine can also control the Java probe versions of multiple instances of an application to be upgraded to the latest version, as discussed below. Figure 5 The following explanation is provided. The rules for the transition between state values are as follows:
[0082] 1. If the current state of the state machine corresponds to state value 0, the admission controller receives an instance creation request forwarded by the interface server. The current state of the state machine changes from state value 0 to state value 1. The admission controller returns the download address of the V1 version Java probe package to the interface server for subsequent creation of Pod1 that loads the V1 version Java probe.
[0083] 2. If the current state of the state machine corresponds to state value 1, the admission controller receives an instance creation request forwarded by the interface server. The current state of the state machine changes from state value 1 to state value 2. The admission controller returns the download address of the V2 version Java probe package to the interface server for subsequent creation of Pod2 that loads the V2 version Java probe.
[0084] 3. If the current state of the state machine corresponds to state value 2, and the admission controller receives an instance creation request forwarded by the interface server, the current state of the state machine remains at state value 2. The admission controller returns the download address of the V2 version Java probe package to the interface server for subsequent creation of Pod3 that loads the V2 version Java probe.
[0085] 4. If the current state of the state machine corresponds to state value 2, and the admission controller receives an instance creation request forwarded by the interface server, the current state of the state machine remains at state value 2. The admission controller returns the download address of the V1 version Java probe package to the interface server for subsequent creation of Pod4 that loads the V1 version Java probe.
[0086] In this embodiment, the method by which the admission controller obtains the canary release ratio of the new version of the Java probe is not limited. Further optionally, to improve the flexibility of the canary release of the new version of the Java probe, the configuration personnel can configure the canary release rules for the Java probe version in the configuration center. Based on this, in response to each instance creation request received, before the admission controller determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe, it can also search for the canary release rules of the new version of the Java probe in the configuration center; determine if the instance-level canary release rules of the new version of the Java probe are found, and the instance-level canary release rules include the canary release ratio of the new version of the Java probe. If non-instance-level canary release rules of the new version of the Java probe are found in the configuration center, and the non-instance dimensions include at least one of the following: user dimension, cluster dimension, namespace dimension, and application dimension, then in response to each instance creation request received, the admission controller determines the download address of the new version of the Java probe package required for the instance to be created and returns it to the interface server.
[0087] Understandably, configuration personnel can configure canary release rules for new versions of Java probes at different levels in the configuration center, thereby achieving more granular Java probe version control. These multiple dimensions include, but are not limited to: user-level canary release rules, cluster-level canary release rules, namespace-level canary release rules, application-level canary release rules, and instance-level canary release rules, etc.
[0088] Instance-level canary release rules can be configured to determine the canary release ratio of the new Java probe version, thereby controlling the proportion of instances that load the new Java probe package among all created instances. Non-instance-level canary release rules, on the other hand, do not require configuration of the canary release ratio of the new Java probe version. Non-instance-level canary release rules can instruct all instances of the application to load the new Java probe package, meaning all instances of the application undergo a Java probe version upgrade.
[0089] In practical applications, the canary release rules for Java probes can be configured with the download address of the Java probe package, the version number of the Java probe package, the rollout time, etc., but are not limited to these. Configuring the download address of the Java probe package allows for convenient downloading of the Java probe package. Configuring the version number of the Java probe package clearly defines which instances use the new version of the Java probe and which instances continue to use the old version, thus achieving fine-grained management of canary releases. The rollout time can be understood as the time from receiving the application deployment command to the creation of all instances. Gradually loading the new version of the Java probe within the rollout time avoids the risks that may arise from a one-time full update.
[0090] Alternatively, the implementation of searching for the canary release rules of the new version of the Java probe in the configuration center through the admission controller is as follows: in order of priority from high to low, the admission controller searches for the canary release rules of the new version of the Java probe in the configuration center in turn until canary release rules of any dimension are found. The canary release rules are ordered in order of priority from high to low as follows: canary release rules of instance dimension, canary release rules of application dimension, canary release rules of namespace dimension, canary release rules of cluster dimension, and canary release rules of user dimension.
[0091] It's worth noting that application configuration directives can be parsed to obtain user information, worker node cluster information, namespace information, or application information corresponding to the target application to be created. Rule matching can then be performed based on this information. See also... Figure 6 The system can perform rule searches in the following priority order: instance dimension > application dimension > namespace dimension > cluster dimension > user dimension. This ensures that rule matching expands progressively from the instance dimension to the user dimension. This mechanism prioritizes more granular and specific application needs and avoids conflicts or ambiguities between rules. For example, when the rules at the instance dimension are inconsistent with those at the application dimension, the system will prioritize the rules at the instance dimension.
[0092] 204. The master node updates the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of the first number of instances through the interface server.
[0093] In practical applications, the download address of the target version of the Java probe package for each instance can be updated in the instance's resource configuration information via an interface server. Optionally, initialization container configuration information can be included in the instance's resource configuration information to efficiently load the Java probe into the instance later. Based on this, the implementation method for updating the download address of the target version of the Java probe package for a first number of instances in their respective resource configuration information via an interface server is as follows: the interface server configures the corresponding initialization container configuration information in the resource configuration information of each of the first number of instances, and the initialization container configuration information includes the download address of the corresponding target version of the Java probe package.
[0094] 205. The worker node cluster creates a first number of instances based on the updated resource configuration information of the first number of instances; wherein, during the creation of each instance, the target version of the Java probe package is downloaded according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and loaded into the instance.
[0095] In practical applications, once the interface server saves the updated resource configuration information of the first number of instances, the updated resource configuration information of the subsequent first number of instances can be scheduled to the worker node cluster, and the worker node cluster creates the first number of instances based on the updated resource configuration information of the first number of instances.
[0096] In this embodiment, during the creation of each instance, the target version of the Java probe package is downloaded and loaded into the instance according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance.
[0097] In practical applications, there are no restrictions on the method for downloading the target version of the Java probe package. Optionally, when downloading and loading the target version of the Java probe package into the instance based on the download address of the target version of the Java probe package in the updated resource configuration information of the instance, an initialization container can be created based on the configuration information of the initialization container in the updated resource configuration information of the instance, and the initialization container can be called to download and load the target version of the Java probe package into the instance based on the download address of the target version of the Java probe package.
[0098] In practical applications, there are no restrictions on the storage location of the Java probe package. Optionally, when downloading and loading the target version of the Java probe package into the instance based on the download address of the target version of the Java probe package in the updated resource configuration information of the instance, the target version of the Java probe package may be downloaded from the local storage system or a remote storage system based on the download address of the target version of the Java probe package in the updated resource configuration information of the instance.
[0099] In practical applications, executing steps 201 to 205 completes the canary release of a batch of new versions of Java probes. After completing the canary release of a batch of new versions of Java probes, the canary release ratio of the new version of Java probes can be reset, and steps 201 to 205 can be executed again to carry out the canary release of the next batch of new versions of Java probes.
[0100] For example, in a Kubernetes environment, for each batch of canary releases of a new version of the Java probe, a user triggers an application deployment command once. For instance, if a user triggers the first deployment command, which requires creating 100 instances in the worker node cluster, and the canary release ratio for the first batch of the new Java probe version is 12%, then 12 of the 100 instances will be loaded with the new version of the Java probe package, and 88 will be loaded with the old version. If the user triggers the second deployment command, which also requires creating 100 instances in the worker node cluster, and the canary release ratio for the second batch of the new Java probe version is 80%, then 80 of the 100 instances will be loaded with the new version of the Java probe package, and 20 will be loaded with the old version. If the user triggers the third deployment command, which requires creating 100 instances in the worker node cluster, and the canary release ratio for the third batch of the new Java probe version is 100%, then 100 of the 100 instances will be loaded with the new version of the Java probe package.
[0101] In practical applications, monitoring tools can be used to monitor canary release information, which includes, but is not limited to, instance creation progress, and the online performance of instances of the newly loaded Java probe package. After completing the canary release of each batch of the new version of the Java probe, the canary release ratio is dynamically adjusted based on the online performance of the instances of the newly loaded Java probe package (such as performance metrics, error rate, resource consumption, etc.). For example, if the online performance of the instances of the newly loaded Java probe package is good, the canary release scope can be expanded more quickly (e.g., by significantly increasing the canary release ratio), and the next batch of the new version of the Java probe canary release can proceed. If any abnormal issues are found, the canary release ratio can be reduced or the canary release can be paused. Based on the above, the method also includes: in response to modifying the canary release ratio of the new version of the Java probe based on the online performance of the instances of the newly loaded Java probe package, the step of receiving the first number of instance creation requests triggered by the user's application deployment instructions through the interface server and subsequent steps are executed again. It can be understood that by repeatedly executing steps 201 to 205, multiple batches of canary releases of the new version of the Java probe can be achieved.
[0102] It is worth noting that, when upgrading existing applications, all instances of the application need to update the version of their mounted Java probes, which is an application-level Java probe version distribution method. However, in this embodiment, the essence of achieving instance-level Java probe version upgrades is to write the Java probe package download address into the resource configuration information used to create instances. Thus, when instances are subsequently created based on the updated instance resource configuration information, the created instances load either the new or old version of the Java probe. By controlling some instances of the application to load the new version of the Java probe, an instance-level Java probe version, rather than an application-level Java probe version distribution method, is achieved.
[0103] The Java probe version control method provided in this application embodiment, in application deployment scenarios such as application creation or upgrade, updates the download address of the target version Java probe package corresponding to the instance to the instance's resource configuration information through the master node in the container orchestration platform via the interface server. This ensures that the correct Java probe version is loaded based on the Java probe package download address when creating each instance. The admission controller in the worker node cluster dynamically determines the download address of the target version Java probe package required for the instance to be created based on the canary release ratio of the new version Java probe. The target version can be a new version or an old version. This controls a portion of the application instances to load the new version Java probe, rather than loading the new version Java probe all at once for all application instances. Therefore, this provides precise instance-level Java probe version control, enabling a portion of a user's instances to upgrade the Java probe version, verifying the performance of the new version Java probe on a small scale, reducing the risk of full release, improving the stability of the Java probe during the version upgrade process, ensuring the stability and reliability of the application, and enhancing the user experience.
[0104] Figure 7 A flowchart illustrating a Java probe version control method provided in this application embodiment. This method can be applied to the master node in a container orchestration platform. See [link to relevant documentation]. Figure 7 The method may include the following steps:
[0105] 701. Receive a first number of instance creation requests triggered by the user's application deployment instructions through the interface server, wherein the application deployment instructions are used to instruct the creation of a first number of instances of the target application in the worker node cluster based on the resource configuration information of the first number of instances.
[0106] 702. The interface server forwards the first number of instance creation requests to the admission controller in the worker node cluster in sequence, so that each time the admission controller receives an instance creation request, it determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe and returns it to the interface server. The target version is either the new version or the old version.
[0107] 703. Update the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of the first number of instances through the interface server, so that the worker node cluster can create the first number of instances according to the updated resource configuration information of the first number of instances; wherein, during the creation process of each instance, the target version of the Java probe package is downloaded according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and loaded into the instance.
[0108] Optionally, before forwarding each instance creation request sequentially to the admission controller in the worker node cluster via the interface server, the above method further includes: sending a state machine configuration request to the admission controller via the interface server, so that the admission controller configures the state machine according to the canary release ratio of the new version of the Java probe, wherein the state machine is used to control the ratio between the second quantity and the first quantity as the canary release ratio, the first quantity is the sum of the second quantity and the third quantity, the second quantity is the number of download addresses of the new version of the Java probe package required for the instance to be created, and the third quantity is the number of download addresses of the old version of the Java probe package required for the instance to be created.
[0109] Optionally, the download address of the target version of the Java probe package corresponding to the first number of instances is updated in the resource configuration information of the first number of instances through the interface server, including:
[0110] The interface server configures the configuration information of the corresponding initialization container in the resource configuration information of the first number of instances. The configuration information of the initialization container includes the download address of the corresponding target version of the Java probe package.
[0111] Optionally, if there are multiple admission controllers, the interface server sequentially forwards the first number of instance creation requests to the admission controllers in the worker node cluster, including: the interface server sequentially forwards the first number of instance creation requests to the admission controllers in the worker node cluster using a load balancing method.
[0112] Optionally, the above method further includes: in response to modifying the canary release ratio of the new version of the Java probe based on the online running effect of the instance of the loaded new version of the Java probe package, and re-executing the step of receiving the first number of instance creation requests triggered by the user's application deployment instructions through the interface server and its subsequent steps.
[0113] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.
[0114] Figure 8 A flowchart illustrating another Java probe version control method provided in this application embodiment. This method can be applied to a cluster of worker nodes in a container orchestration platform. See [link to relevant documentation]. Figure 8 The method may include the following steps:
[0115] 801. Receive the first number of instance creation requests forwarded sequentially by the master node through the interface server via the admission controller.
[0116] 802. In response to each instance creation request received, the admission controller determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe and returns it to the interface server, so that the interface server updates the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of the first number of instances, and the target version is either the new version or the old version.
[0117] 803. Create a first number of instances based on the updated resource configuration information of the first number of instances; wherein, during the creation of each instance, download the target version of the Java probe package according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and load it into the instance.
[0118] Optionally, in response to each instance creation request received, the admission controller determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe. This includes: in response to each instance creation request received, the admission controller calls the state machine to determine the download address of the target version of the Java probe package required for the instance to be created, wherein the state machine is used to control the canary release ratio of the new version of the Java probe.
[0119] Optionally, before receiving the first number of instance creation requests forwarded sequentially by the master node through the interface server via the admission controller, the above method further includes: in response to the received state machine configuration request sent by the interface server, configuring the state machine according to the canary release ratio of the new version of the Java probe, wherein the state machine is used to control the ratio between the second number and the first number as the canary release ratio, the first number is the sum of the second number and the third number, the second number is the number of download addresses of the new version of the Java probe package required for the instance to be created, and the third number is the number of download addresses of the old version of the Java probe package required for the instance to be created.
[0120] Optionally, in response to each instance creation request received, before determining the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe through the admission controller, the above method further includes: searching for the canary release rules of the new version of the Java probe in the configuration center through the admission controller; determining the canary release rules at the instance level for which the new version of the Java probe has been found, wherein the canary release rules at the instance level include the canary release ratio of the new version of the Java probe.
[0121] Optionally, the above method also includes: if a canary release rule for the non-instance dimension of the new version of the Java probe is found in the configuration center, and the non-instance dimension includes at least one of the following: user dimension, cluster dimension, namespace dimension, and application dimension, then in response to each instance creation request received, the admission controller determines the download address of the new version of the Java probe package required for the instance to be created and returns it to the interface server.
[0122] Optionally, the admission controller searches for the canary release rules of the new version of the Java probe in the configuration center, including: searching for the canary release rules of the new version of the Java probe in the configuration center in descending order of priority, until a canary release rule of any dimension is found; wherein, the canary release rules in descending order of priority are: canary release rules of instance dimension, canary release rules of application dimension, canary release rules of namespace dimension, canary release rules of cluster dimension, and canary release rules of user dimension.
[0123] Optionally, the Java probe package of the target version can be downloaded and loaded into the instance based on the download address of the target version of the Java probe package in the updated resource configuration information of the instance. This includes: creating an initialization container based on the configuration information of the initialization container in the updated resource configuration information of the instance, and calling the initialization container to download and load the target version of the Java probe package into the instance based on the download address of the target version of the Java probe package; or, downloading the target version of the Java probe package from the local storage system or a remote storage system based on the download address of the target version of the Java probe package in the updated resource configuration information of the instance.
[0124] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.
[0125] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 701 to 703 can be device A; or the execution subject of steps 701 and 702 can be device A, and the execution subject of step 703 can be device B; and so on.
[0126] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 701, 702, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0127] Figure 9 This is a schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this application. For example... Figure 9 As shown, the electronic device includes: a memory 91 and a processor 92;
[0128] Memory 91 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, data structures, contact data, phone book data, messages, pictures, videos, etc.
[0129] Processor 92, coupled to memory 91, is used to execute computer programs in memory 91 for: executing steps in a Java probe version control method.
[0130] Optional, such as Figure 9 As shown, the electronic device also includes other components such as a communication component 93, a display 94, a power supply component 95, and an audio component 96. Figure 9 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 9 The components shown. Additionally... Figure 9 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the electronic device. The electronic device in this embodiment can be a desktop computer, laptop computer, smartphone, or IoT (Internet of Things) device, or a server-side device such as a conventional server, cloud server, or server array. If the electronic device in this embodiment is a desktop computer, laptop computer, or smartphone, it may include... Figure 9 The components within the dashed box; if the electronic device in this embodiment is implemented as a conventional server, cloud server, or server array, etc., it may be omitted. Figure 9 The component within the dashed box.
[0131] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0132] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G (2nd Generation), 3G (3rd Generation), 4G (4th Generation) / LTE (long Term Evolution), 5G (5th Generation), or combinations thereof. In an exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0133] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0134] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0135] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0136] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium may be volatile, non-volatile, or a combination thereof, and may be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access 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), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, digital video disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium.
[0137] Accordingly, this application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is able to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. In addition, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, so that the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device can be implemented as a means to implement the corresponding functions in the above method embodiments.
[0138] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0139] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A Java probe version control method, characterized in that, The method, applied to a master node in a container orchestration platform, includes: The interface server receives a first number of instance creation requests triggered by the user's application deployment instructions, wherein the application deployment instructions are used to instruct the creation of a first number of instances of the target application in the worker node cluster according to the resource configuration information of each of the first number of instances. The interface server sequentially forwards a first number of instance creation requests to the admission controller in the worker node cluster, so that each time the admission controller receives an instance creation request, it determines the download address of the target version of the Java probe package required for the instance to be created based on the gray-scale release ratio of the new version of the Java probe and returns it to the interface server. The target version is either the new version or the old version. The interface server updates the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of each of the first number of instances, so that the worker node cluster creates the first number of instances according to the updated resource configuration information of the first number of instances; wherein, during the creation process of each instance, the target version of the Java probe package is downloaded according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and loaded into the instance.
2. The method according to claim 1, characterized in that, Before the interface server forwards each instance creation request to the admission controller in the worker node cluster in sequence, the process also includes: The interface server sends a state machine configuration request to the admission controller, so that the admission controller configures the state machine according to the canary release ratio of the new version of the Java probe. The state machine is used to control the ratio between the second quantity and the first quantity as the canary release ratio. The first quantity is the sum of the second quantity and the third quantity. The second quantity is the number of download addresses of the new version of the Java probe package required for the instance to be created, and the third quantity is the number of download addresses of the old version of the Java probe package required for the instance to be created.
3. The method according to claim 2, characterized in that, The interface server updates the download addresses of the target versions of the Java probe packages corresponding to the first number of instances to the resource configuration information of each of the first number of instances, including: The interface server configures the configuration information of the corresponding initialization container in the resource configuration information of each of the first number of instances. The configuration information of the initialization container includes the download address of the corresponding target version of the Java probe package.
4. The method according to claim 1, characterized in that, If there are multiple admission controllers, the interface server sequentially forwards a first number of instance creation requests to the admission controllers in the worker node cluster, including: The interface server uses a load balancing method to forward the first number of instance creation requests to the admission controller in the worker node cluster in sequence.
5. The method according to any one of claims 1 to 4, characterized in that, Also includes: In response to modifying the canary release ratio of the new version of the Java probe based on the online running effect of the instance of the loaded new version of the Java probe package, the step of receiving the first number of instance creation requests triggered by the user's application deployment instructions through the interface server and subsequent steps are executed again.
6. A Java probe version control method, characterized in that, The method, applied to a cluster of worker nodes in a container orchestration platform, includes: The admission controller receives the first number of instance creation requests forwarded sequentially by the master node through the interface server. In response to each instance creation request received, the admission controller determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe and returns it to the interface server, so that the interface server updates the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of the first number of instances, wherein the target version is a new version or an old version. The first number of instances are created based on the updated resource configuration information of the first number of instances; wherein, during the creation of each instance, the target version of the Java probe package is downloaded according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and loaded into the instance.
7. The method according to claim 6, characterized in that, In response to each instance creation request received, the admission controller determines the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe, including: In response to each instance creation request received, the admission controller calls the state machine to determine the download address of the target version of the Java probe package required for the instance to be created, wherein the state machine is used to control the canary release ratio of the new version of the Java probe.
8. The method according to claim 7, characterized in that, Before the admission controller receives the first number of instance creation requests forwarded sequentially by the master node through the interface server, it also includes: In response to the state machine configuration request sent by the interface server, the state machine is configured according to the canary release ratio of the new version of the Java probe. The state machine is used to control the ratio between the second quantity and the first quantity as the canary release ratio. The first quantity is the sum of the second quantity and the third quantity. The second quantity is the number of download addresses of the new version of the Java probe package required for the instance to be created, and the third quantity is the number of download addresses of the old version of the Java probe package required for the instance to be created.
9. The method according to claim 6, characterized in that, In response to each instance creation request received, before determining the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe by the admission controller, the following steps are also included: The admission controller searches for the canary release rules for the new version of the Java probe in the configuration center. Determine the canary release rules for the instance dimension of the new version of the Java probe, wherein the canary release rules for the instance dimension include the canary release ratio of the new version of the Java probe.
10. The method according to claim 9, characterized in that, Also includes: If a canary release rule for the non-instance dimension of the new version of the Java probe is found in the configuration center, and the non-instance dimension includes at least one of the following: user dimension, cluster dimension, namespace dimension, and application dimension, then in response to each instance creation request received, the admission controller determines the download address of the new version of the Java probe package required for the instance to be created and returns it to the interface server.
11. The method according to claim 9, characterized in that, The admission controller searches the configuration center for the canary release rules of the new version of the Java probe, including: Following the order of priority from high to low, the admission controller sequentially searches for the canary release rules of the new version of the Java probe in the configuration center until a canary release rule of any dimension is found. The rules, ordered from highest to lowest priority, are as follows: instance-level canary release rules, application-level canary release rules, namespace-level canary release rules, cluster-level canary release rules, and user-level canary release rules.
12. The method according to claim 6, characterized in that, Download the target version of the Java probe package according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance, and load it into the instance, including: The initialization container is created according to the configuration information of the initialization container in the updated resource configuration information of the instance, and the initialization container is invoked to download the target version of the Java probe package according to the download address of the target version of the Java probe package and load it into the instance; or, Download the target version of the Java probe package from the local storage system or the remote storage system according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance.
13. A Java probe version control system, characterized in that, include: Container orchestration platforms, local storage systems, and remote storage systems; The container orchestration platform includes a master node and a cluster of worker nodes. The master node includes an interface server, and the cluster of worker nodes includes an admission controller. The local storage system or the remote storage system is used to store the target version of the Java probe package, wherein the target version is a new version or an old version; The master node is configured to receive, via an interface server, a first number of instance creation requests triggered by a user's application deployment instruction, wherein the application deployment instruction instructs the creation of a first number of instances of the target application in the worker node cluster based on the resource configuration information of each of the first number of instances; forward the first number of instance creation requests sequentially to the admission controller in the worker node cluster via the interface server; and update the download address of the target version of the Java probe package corresponding to the first number of instances to the resource configuration information of each of the first number of instances via the interface server. The worker node cluster is configured to, in response to each instance creation request received, determine the download address of the target version of the Java probe package required for the instance to be created based on the canary release ratio of the new version of the Java probe through the admission controller and return it to the interface server; create the first number of instances according to the updated resource configuration information of the first number of instances; wherein, during the creation process of each instance, the target version of the Java probe package is downloaded from the local storage system or the remote storage system according to the download address of the target version of the Java probe package in the updated resource configuration information of the instance and loaded into the instance.
14. The system according to claim 13, characterized in that, Also includes: Configuration Center; The configuration center is used to configure the canary release rules for the new version of the Java probe; The worker node cluster is also used to search for the canary release rules of the new version of the Java probe in the configuration center through the admission controller; determine the canary release rules of the instance dimension of the new version of the Java probe, wherein the canary release rules of the instance dimension include the canary release ratio of the new version of the Java probe.
15. The system according to claim 13, characterized in that, Also includes: Monitoring tools and visualization platforms; The monitoring tool is used to monitor the canary release information of the container orchestration platform. The canary release information includes at least one of the following: instance creation progress, and the online running effect of instances with the newly loaded Java probe package. The visualization platform is used to display the grayscale release information.
16. An electronic device, characterized in that, include: Memory and processor; The memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program to perform the steps of the method according to any one of claims 1-5 or 6-12.
17. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method according to any one of claims 1-5 or 6-12.
18. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, causes the processor to perform the steps of the method described in any one of claims 1-5 or 6-12.