Probe updating method, apparatus, device, and storage medium
By using a probe configuration information update method independent of container application instances, the problem of service interruption caused by probe updates is solved, and flexible and efficient probe configuration information updates are achieved, ensuring the normal operation of container application instances.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-03-10
- Publication Date
- 2026-05-29
Smart Images

Figure CN116775204B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer and Internet technology, and in particular to a probe update method, apparatus, device and storage medium. Background Technology
[0002] Currently, probes can be used to detect the running status of container application instances.
[0003] In related technologies, the configuration information of the probe is contained in the configuration information of the container application instance. The container application instance is created based on the configuration information of the container application instance, as well as the probe corresponding to the container application instance. Then, based on the configuration information of the probe, the probe is used to probe the container application instance to determine the running status of the container application instance.
[0004] However, in the aforementioned technologies, updating the configuration information of the probe requires updating the configuration information of the container application instance simultaneously, which causes the container application instance to be interrupted and affects its normal service provision. Summary of the Invention
[0005] This application provides a probe update method, apparatus, device, and storage medium that ensures the operation of container application instances is unaffected by probe updates. The technical solution is as follows.
[0006] According to one aspect of the embodiments of this application, a probe update method is provided, the method comprising the following steps:
[0007] In response to a probe update command for a container application instance, the probe configuration information of the container application instance is obtained; wherein the probe configuration information is independent of the instance configuration information of the container application instance.
[0008] While the container application instance is running, the probe configuration information is updated to obtain the updated probe configuration information;
[0009] Based on the updated probe configuration information, the probes of the container application instance are updated to obtain the updated probes;
[0010] The updated probe is used to detect the container application instance and obtain corresponding detection data, which is used to indicate the running status of the container application instance.
[0011] According to one aspect of the embodiments of this application, a probe updating apparatus is provided, the apparatus comprising the following modules:
[0012] A configuration acquisition module is used to acquire probe configuration information of a container application instance in response to a probe update command for that container application instance; wherein the probe configuration information is independent of the instance configuration information of the container application instance.
[0013] The configuration update module is used to update the probe configuration information while the container application instance is running, so as to obtain the updated probe configuration information.
[0014] The probe update module is used to update the probes of the container application instance based on the updated probe configuration information to obtain the updated probes.
[0015] The probe detection module is used to detect the container application instance using the updated probe to obtain corresponding detection data, which is used to indicate the running status of the container application instance.
[0016] According to one aspect of the embodiments of this application, the present application provides a computer device, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the above-described probe update method.
[0017] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the above-described probe update method, or to implement the above-described probe update method.
[0018] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the probe update method described above.
[0019] The technical solution provided in this application can bring the following beneficial effects:
[0020] The probe configuration information of the container application instance is updated by means of the probe update command. The probe configuration information is independent of the instance configuration information, that is, the update of the probe configuration information does not depend on the instance configuration information. This makes the update of the probe configuration information more flexible and convenient. The probe configuration information can be updated smoothly even when the container application instance is running. This ensures that the operation of the container application instance is not affected by the probe update and can provide services normally. Moreover, when the probe configuration information is updated, the instance configuration information does not need to be updated, reducing the amount of data that needs to be updated and improving the efficiency of the probe configuration information update. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of a probe association system provided in one embodiment of this application;
[0022] Figure 2 A schematic diagram of a probe management system is shown as an example;
[0023] Figure 3 This is a schematic diagram of a probe update method provided in one embodiment of this application;
[0024] Figure 4 An exemplary schematic diagram of a probe detection process is shown;
[0025] Figure 5 This is a schematic diagram of a probe update method provided in another embodiment of this application;
[0026] Figure 6 An exemplary schematic diagram of a probe update method is shown;
[0027] Figure 7 An exemplary schematic diagram illustrates a process for creating probe configuration information;
[0028] Figure 8 An exemplary schematic diagram illustrates a probe configuration information update process;
[0029] Figure 9 An exemplary schematic diagram illustrates a process for deleting probe configuration information;
[0030] Figure 10 This is a block diagram of a probe update apparatus provided in one embodiment of this application;
[0031] Figure 11 This is a block diagram of a probe updating device provided in another embodiment of this application;
[0032] Figure 12 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0034] Please refer to Figure 1 The diagram illustrates a probe management system provided in one embodiment of this application. The probe management system may include a first device 10 and a second device 20.
[0035] The first device 10 refers to a physical machine or virtual machine running containers. In this embodiment, the first device 10 includes one or more container application instances. Each container application instance runs one or more containers. Optionally, the first device 10 may also be referred to as a node, and multiple first devices 10 constitute a cloud database.
[0036] A database, simply put, can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, capable of being shared by multiple users, with minimal redundancy, and independent of application programs.
[0037] A Database Management System (DBMS) is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup. DBMSs can be classified according to the database model they support, such as relational or XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters or mobile devices; or according to the query language used, such as SQL (Structured Query Language) or XQuery; or according to performance priorities, such as maximum scale or maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, supporting multiple query languages simultaneously.
[0038] Optionally, the aforementioned cloud database is a stateful cloud database, meaning it includes master nodes and slave nodes. Of course, in the exemplary embodiment, the aforementioned cloud database is a stateless cloud database, meaning it includes nodes with equal status.
[0039] The second device 20 is used to provide a server for the first device 10. Optionally, the second device 20 is a server, which can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. In an exemplary embodiment, the second device 20 can provide services to multiple first devices 10.
[0040] The first device 10 and the second device 20 communicate with each other via a network.
[0041] Optionally, in this embodiment of the application, the first device 10 includes a probe configuration module and a probe management module. For example, as shown... Figure 2 As shown, the first device 10 includes a container application instance 11 and probe configuration information 12 corresponding to the container application instance 11. The probe configuration module 13 manages the probe configuration information 12 to create, update, and delete it. The probe management module 14 creates probes based on the configuration parameters of the probes in the probe configuration information 12, and uses the created probes to probe the container application instance 11 according to the probe configuration parameters. It should be noted that in this embodiment, the container application instance 11 corresponds to instance configuration information, and this instance configuration information is independent of the probe configuration information 12.
[0042] One point that needs to be clarified is that the above Figure 2 The description is merely exemplary and explanatory. In exemplary embodiments, the modules included in the first device 10 can be flexibly configured and adjusted, and the embodiments of this application do not limit this. For example, the probe configuration module 13 described above is set in other devices besides the first device 10, so that the probe configuration module can manage the configuration information of the probes on each of the first devices 10.
[0043] The present application will now be described in conjunction with specific embodiments.
[0044] Please refer to Figure 3 The diagram illustrates a flowchart of a probe update method provided in one embodiment of this application. This method can be applied to... Figure 1 The first device 10 of the probe management system shown may be the executing entity for each step (hereinafter referred to as "computer device"). The method may include at least one of the following steps (301-304):
[0045] Step 301: In response to the probe update command for the container application instance, obtain the probe configuration information of the container application instance.
[0046] A container application instance is used to run containers. Optionally, one or more containers may be running in this container application instance. It can be understood that this container application instance is equivalent to a Pod in Kubernetes.
[0047] Optionally, in this embodiment, the container application instance corresponds to probe configuration information and instance configuration information. The probe configuration information and instance configuration information are independent of each other; that is, the probe configuration information is independent of the instance configuration information. Optionally, the instance configuration information includes configuration parameters related to the container application instance. The computer device creates the container application instance based on the configuration parameters in the instance configuration information and then runs the container application instance according to the configuration parameters in the instance configuration information. The probe configuration information includes probe configuration parameters. The computer device creates a probe based on the configuration parameters in the probe configuration information and then uses the probe to probe the container application instance according to the configuration parameters in the probe configuration information.
[0048] A probe update instruction is used to instruct the updating of the content contained in the probe configuration information. Optionally, this probe update instruction is a user-triggered instruction, meaning the user controls the probing method for the container application instance. In this embodiment, upon detecting the aforementioned probe update instruction, the computer device obtains the probe configuration information of the container application instance. This probe configuration information is independent of the instance configuration information of the container application instance.
[0049] It should be noted that, in the embodiments of this application, the above-mentioned probe configuration information includes configuration information for one or more probes. The embodiments of this application do not limit this, and different probes may correspond to different configuration information.
[0050] Step 302: While the container application instance is running, update the probe configuration information to obtain the updated probe configuration information.
[0051] In this embodiment, after obtaining the probe configuration information, the computer device updates the probe configuration information to obtain updated probe configuration information. It should be noted that, in this embodiment, since the probe configuration information and instance configuration information are independent and do not affect each other, the container application instance can be in a running state when updating the probe configuration information. That is, the probe configuration information is updated while the container application instance is running, thereby obtaining the updated probe configuration information.
[0052] Optionally, after obtaining the probe update instruction, the computer device obtains probe modification data based on the probe update instruction, and then updates the probe configuration information according to the probe modification data to obtain the updated probe configuration information.
[0053] In one possible implementation, the probe update instruction includes identification information related to the probe modification data. After obtaining the probe update instruction, the computer device obtains the identification information related to the probe modification data from the probe update instruction, then obtains the probe modification data based on the identification information, and updates the probe configuration information based on the probe modification data.
[0054] In another possible implementation, the probe update instruction includes the probe modification data. After obtaining the probe update instruction, the computer device directly obtains the probe modification data from the probe update instruction and then updates the probe configuration information based on the probe modification data.
[0055] It should be noted that the probe modification data mentioned above can be data that needs to be modified in the probe configuration information, data that needs to be added in the probe configuration information, or data that needs to be deleted in the probe configuration information. This application embodiment does not limit this.
[0056] Optionally, in the embodiments of this application, when updating the probe configuration information, a complete replacement or a partial modification can be used for updating.
[0057] In one possible implementation, the probe configuration information is updated using a complete replacement method. Optionally, after obtaining the probe modification data, the computer device determines the updated probe configuration information based on the probe modification data, and replaces the original probe configuration information with the updated probe configuration information to complete the update of the probe configuration information.
[0058] In another possible implementation, the probe configuration information is updated by partial modification. Optionally, after obtaining the probe modification data, the computer device determines first configuration information and second configuration information based on the probe modification data, and then adds the first configuration information to the original probe configuration information and deletes the second configuration information to complete the update of the probe configuration information.
[0059] Step 303: Based on the updated probe configuration information, update the probes of the container application instance to obtain the updated probes.
[0060] In this embodiment of the application, after the probe configuration information is updated, the computer device updates the probes of the container application instance based on the updated probe configuration information to obtain the updated probes.
[0061] Alternatively, similar to updating the probe configuration information mentioned above, when updating the probe, it can be done by completely replacing it or by partially modifying it.
[0062] In one possible implementation, the probe is updated using a complete replacement method. Alternatively, after the probe configuration information is updated, the computer device creates an updated probe based on the updated probe configuration information, and then replaces the original probe with the updated probe to complete the probe update.
[0063] In another possible implementation, the probes are updated using a partial modification approach. Optionally, after the probe configuration information is updated, the computer device determines the first probe and the second probe based on the updated probe configuration information, and then adds the first probe to the existing probes and deletes the second probe to complete the probe update.
[0064] Step 304: Use the updated probe to detect the container application instance and obtain the corresponding detection data.
[0065] In this embodiment of the application, after obtaining the updated probe, the computer device uses the updated probe to probe the container application instance and obtain corresponding probe data. This probe data is used to indicate the operational status of the container application instance.
[0066] Optionally, in this embodiment, the aforementioned detection data includes, but is not limited to, at least one of the following: the current detection result (status), the time of the latest detection (lastProbeTime), and the time when the previous detection result changed (lastTransitionTime). For example, the current detection result includes one of three: "success," "failure," or "unknown." "Unknown" means the specific result is unknown. Optionally, the detection result being "unknown" occurs because the probe itself malfunctions during execution, such as a probe startup error or a parameter parsing error.
[0067] Optionally, in this embodiment of the application, after obtaining the above-mentioned detection data, a processing decision for the container application instance is determined based on the detection data, and then the container application instance is processed accordingly.
[0068] In summary, the technical solution provided in this application update the probe configuration information of the container application instance through the probe update command. Furthermore, the probe configuration information is independent of the instance configuration information; that is, the update of the probe configuration information does not depend on the instance configuration information. This makes the update of the probe configuration information more flexible and convenient. Even when the container application instance is running, the probe configuration information can be updated smoothly, ensuring that the operation of the container application instance is not affected by probe updates and can provide services normally. Moreover, updating the probe configuration information does not require updating the instance configuration information, reducing the amount of data that needs to be updated and improving the efficiency of probe configuration information updates.
[0069] Optionally, in this embodiment, the probe update instruction is a probe change instruction, which is used to change the content contained in the probe configuration information; or, the probe update instruction is a probe add instruction, which is used to add the content contained in the probe configuration information; or, the probe update instruction is a probe delete instruction, which is used to delete the content contained in the probe configuration information.
[0070] The following section introduces probe configuration information and probe updates based on different probe update commands.
[0071] In one possible implementation, the probe update instruction described above is a probe change instruction.
[0072] In an exemplary embodiment, step 302 above includes at least one of the following steps:
[0073] 1. Obtain probe update data for container application instances.
[0074] In this embodiment, when updating probe configuration information, the computer device obtains probe update data for the container application instance. Optionally, after obtaining the probe update instruction, the computer device obtains probe update data based on the probe update instruction. It should be noted that, in this case, the probe update data refers to the data that needs to be modified in the probe configuration information.
[0075] Optionally, in this embodiment of the application, after obtaining the probe update instruction, the computer device retrieves at least one probe policy indicated by the probe update instruction from a policy information base. The policy information base includes at least one candidate probe policy, and each probe policy includes configuration parameters for at least one probe; moreover, different probe policies contain different content.
[0076] Optionally, in this embodiment, after acquiring the at least one probe strategy, the computer device generates probe update data based on the probe update instruction and the configuration parameters included in the at least one probe strategy. Optionally, for a target probe strategy among the at least one probe strategy, configuration parameters of the target probe are obtained from the target probe strategy based on the configuration information for the target probe strategy in the probe update instruction; further, probe update data is generated based on the configuration parameters of the probes obtained from each probe strategy. Wherein, the configuration information for the target probe strategy includes the identification information of the target probe; the probe update data includes the configuration parameters of the probes obtained from each probe strategy.
[0077] It should be noted that, in this embodiment of the application, the candidate strategy information in the strategy information base is pre-configured strategy information, and users can add new candidate strategy information to the strategy information base according to the actual situation. This embodiment of the application does not limit this.
[0078] 2. Based on the probe update data, perform a change operation on the probe configuration information to obtain the updated probe configuration information.
[0079] In this embodiment of the application, after obtaining the probe update data, the computer device performs a change operation on the probe configuration information based on the probe update data to obtain the updated probe configuration information.
[0080] Optionally, in the embodiments of this application, when changing the probe configuration information, a complete replacement or a partial modification can be used.
[0081] In one possible implementation, the probe configuration information is modified using a complete replacement method. Optionally, after obtaining the probe update data, the computer device determines the updated probe configuration information based on the probe update data, and replaces the original probe configuration information with the updated probe configuration information to complete the modification of the probe configuration information.
[0082] In another possible implementation, the probe configuration information is modified in a partially modified manner. Optionally, after obtaining the probe update data, the computer device determines the first configuration information and the second configuration information based on the probe update data, and then adds the first configuration information to the original probe configuration information and deletes the second configuration information to complete the modification of the probe configuration information.
[0083] In an exemplary embodiment, step 303 above includes at least one of the following steps:
[0084] 1. Generate the first probe based on the updated probe configuration information;
[0085] 2. Delete the second probe and add the first probe to the existing probes in the container application instance;
[0086] In this embodiment, after the probe configuration information is updated, the computer device determines the first probe and the second probe based on the updated probe configuration information. The first probe refers to the probe configured in the updated probe configuration information that is not present in the existing probes of the container application instance; the second probe refers to the probe not configured in the updated probe configuration information.
[0087] In this embodiment of the application, after determining the first probe and the second probe, the computer device deletes the second probe and adds the first probe in the existing probes of the container application instance to achieve probe updates.
[0088] In summary, in the technical solution provided in this application embodiment, at least one probe policy is obtained from the policy information base through the probe update instruction, and then probe update data is generated according to the configuration parameters contained in the probe policy. The probe configuration information is updated based on the probe update data. The policy information base contains at least one candidate probe policy. When the probe configuration information is updated, the probe update instruction specifies the content to be updated in the existing probe policy, without the need to reconfigure the content to be updated, thereby improving the update efficiency of the probe configuration information.
[0089] Furthermore, the probe configuration information includes configuration information for the probe strategy, and the configuration information includes the probe's identification information. Based on the identification information, the configuration parameters of the probe are obtained from the probe strategy to generate probe update data. That is, when updating the probe configuration information, different probe configuration parameters can be selected from different probe strategies to generate probe update data, making the updating of probe configuration information more flexible.
[0090] In another possible implementation, the probe update command described above is a probe increment command.
[0091] In an exemplary embodiment, step 302 above includes at least one of the following steps:
[0092] 1. Obtain probe update data for container application instances.
[0093] In this embodiment, when updating probe configuration information, the computer device obtains probe update data for the container application instance. Optionally, after obtaining the probe update instruction, the computer device obtains probe update data based on the probe update instruction. It should be noted that, in this case, the probe update data refers to the data that needs to be added to the probe configuration information.
[0094] Optionally, in this embodiment of the application, after obtaining the probe update instruction, the computer device retrieves at least one probe policy indicated by the probe update instruction from a policy information base. The policy information base includes at least one candidate probe policy, and each probe policy includes configuration parameters for at least one probe; moreover, different probe policies contain different content.
[0095] Optionally, in this embodiment, after acquiring the at least one probe strategy, the computer device generates probe update data based on the probe update instruction and the configuration parameters included in the at least one probe strategy. Optionally, for a target probe strategy among the at least one probe strategy, configuration parameters of the target probe are obtained from the target probe strategy based on the configuration information for the target probe strategy in the probe update instruction; further, probe update data is generated based on the configuration parameters of the probes obtained from each probe strategy. Wherein, the configuration information for the target probe strategy includes the identification information of the target probe; the probe update data includes the configuration parameters of the probes obtained from each probe strategy.
[0096] It should be noted that, in this embodiment of the application, the candidate strategy information in the strategy information base is pre-configured strategy information, and users can add new candidate strategy information to the strategy information base according to the actual situation. This embodiment of the application does not limit this.
[0097] 2. Based on the probe update data, perform an add operation on the probe configuration information to obtain the updated probe configuration information.
[0098] In this embodiment of the application, after obtaining the probe update data, the computer device performs an add operation on the probe configuration information based on the probe update data to obtain the updated probe configuration information.
[0099] Optionally, after obtaining the probe update data, the computer device determines the first configuration information based on the probe update data, and then adds the first configuration information to the original probe configuration information.
[0100] In an exemplary embodiment, step 303 above includes at least one of the following steps:
[0101] 1. Generate the first probe based on the updated probe configuration information;
[0102] 2. Add the first probe to the existing probes of the container application instance.
[0103] In this embodiment, after the probe configuration information is updated, the computer device determines a first probe based on the updated probe configuration information. The first probe refers to a probe configured in the updated probe configuration information that is not present in the existing probes of the container application instance. In this embodiment, after determining the first probe, the computer device adds the first probe to the existing probes of the container application instance to update the probe.
[0104] In another possible implementation, the probe update command is a probe deletion command.
[0105] In an exemplary embodiment, step 302 above includes at least one of the following steps:
[0106] 1. Determine the probe deletion data of the container application instance based on the probe deletion command;
[0107] 2. Delete the probe configuration information based on the probe deletion data to obtain the updated probe configuration information.
[0108] In this embodiment of the application, when updating the probe configuration information, the computer device determines the probe deletion data of the container application instance based on the aforementioned probe deletion instruction; then, based on the probe deletion data, it performs a deletion operation on the probe configuration information to obtain the updated probe configuration information.
[0109] Optionally, the probe deletion instruction includes the identification information of the probe to be deleted. After obtaining the probe deletion instruction, the computer device retrieves the probe to be deleted from the instruction and generates probe deletion data. This probe deletion data includes the probe to be deleted. Then, based on the probe to be deleted contained in the probe deletion data, the computer device deletes the configuration parameters of the probe to be deleted from the probe configuration information, thereby deleting the probe configuration information.
[0110] In an exemplary embodiment, step 303 above includes the following steps:
[0111] 1. Based on the updated probe configuration information, delete the second probe from the existing probes of the container application instance.
[0112] In this embodiment, after the probe configuration information is updated, the computer device determines a second probe based on the updated probe configuration information and deletes the second probe from the existing probes of the container application instance. The second probe refers to a probe that is not configured in the updated probe configuration information.
[0113] The following section introduces the methods for detecting container application instances.
[0114] In an exemplary embodiment, step 304 above includes at least one of the following steps:
[0115] 1. Obtain the updated probe configuration parameters from the updated probe configuration information;
[0116] 2. Based on the updated probe configuration parameters, use the updated probe to probe the container application instance and obtain the corresponding probe data.
[0117] In this embodiment of the application, after obtaining the updated probe, the computer device obtains the configuration parameters of the updated probe from the updated probe configuration information, and uses the updated probe to detect the container application instance to obtain the corresponding detection data according to the updated probe configuration parameters.
[0118] Optionally, the configuration parameters of the updated probe include at least one of the following: detection interval (PeriodSeconds), detection delay (InitialDelaySeconds), decision duration (TimeoutSeconds), first decision count (SuccessThreshold), second decision count (FailureThreshold), and processing duration (TerminationGracePeriodSeconds). The detection interval duration indicates the time interval between two adjacent detections. A reasonable setting of the detection interval can, on the one hand, avoid small differences in detection data due to adjacent detection times being too close, reducing the number of invalid detections; on the other hand, it can avoid untimely detection data updates due to adjacent detection times being too far apart, improving the timeliness of detection data updates. The detection delay duration indicates the time from the creation time of the container application instance to the start time of the first detection. Detecting after the container application instance has been running for a period of time improves the accuracy of the detection results. The judgment duration indicates the longest unresponsive time of the container application instance from the start of the detection until the detection is judged to have failed. The first judgment count indicates the number of consecutive successful detections from the start of the detection until the container application instance is judged to be running normally, avoiding the influence of random detection data on processing decisions. The second judgment count indicates the number of consecutive failed detections from the start of the detection until the container application instance is judged to be running abnormally, avoiding the influence of random detection data on processing decisions. The processing duration indicates the waiting time from obtaining the processing decision for the container application instance to processing the container application instance. Optionally, in this embodiment, the processing time is the time allotted for the container application instance to perform some cleanup (or cleanup) work to gracefully shut down, such as stopping internally running processes, when the processing decision is to shut down or restart the container application instance.
[0119] For example, such as Figure 4 As shown, taking the target probe as an example, the overall detection process is introduced, and the specific steps are as follows:
[0120] Step 401: Obtain the target probe.
[0121] Step 402: Determine whether the container application instance is a newly created container application instance. If the container application instance is a newly created container application instance, proceed to step 403; otherwise, proceed to step 404.
[0122] Step 403: Determine whether the time between the creation time of the container application instance and the current time is greater than or equal to the probe delay time. If the time between the creation time of the container application instance and the current time is greater than or equal to the probe delay time, proceed to step 404; if the time between the creation time of the container application instance and the current time is less than the probe delay time, continue to proceed to step 403.
[0123] Step 404: Use a target probe to detect the container application instance and obtain the corresponding detection data.
[0124] Step 405: If the current detection result in the detection data is successful, obtain the number of consecutive successful detections of the target probe against the container application instance.
[0125] Step 406: Determine whether the number of consecutive successful detections is greater than or equal to the first determination number. If the number of consecutive successful detections is greater than or equal to the first determination number, proceed to step 407; if the number of consecutive successful detections is less than the first determination number, proceed to step 408.
[0126] Step 407: Confirm that the target container application instance is running normally and record the probe data.
[0127] Step 408: Confirm that the target probe has successfully detected the target and record the detection data.
[0128] Step 409: If the current detection result in the detection data is a failure, obtain the number of consecutive detection failures of the target probe against the container application instance.
[0129] Step 410: Determine whether the number of consecutive failed probes is greater than or equal to the second determination number. If the number of consecutive successful probes is greater than or equal to the second determination number, proceed to step 411; if the number of consecutive successful probes is less than the second determination number, proceed to step 412.
[0130] Step 411: Determine if the target container application instance is running abnormally and record the probe data.
[0131] Step 412: Determine that the target probe failed to detect the target this time, and record the detection data.
[0132] Step 413: Obtain the processing decision based on the probe data.
[0133] Step 414: If the processing decision is to perform the target operation on the container application instance, and the time between the time when the processing decision is obtained and the current time is equal to the processing time, then the container application instance is processed based on the processing decision. For example, the target operation is to shut down or restart the container application instance.
[0134] Step 415: If the processing decision is to not perform the target operation, continue probing the container application instance. For example, the above "not performing the target operation" can also be called "not performing any operation".
[0135] In addition, the above process also includes:
[0136] Step 416: Determine whether the duration between the last detection time and the current time is greater than or equal to the detection interval duration. If the duration between the last detection time and the current time is greater than or equal to the detection interval duration, then restart from step 404 above; if the duration between the last detection time and the current time is less than the detection interval duration, then continue executing step 416.
[0137] It should be noted that the above describes the configuration parameters of the updated probe. In the exemplary embodiment, the configuration parameters of the probes included in the above probe strategy are similar to those described above. For example, the configuration parameters of the probes included in the probe strategy (foo-v1.0.0) are as follows:
[0138]
[0139] Optionally, reference the probe policy (foo-v1.0.0) in a pod named foo-pod (within the container application instance), as follows:
[0140]
[0141] The Probefoo-pod (probe configuration information) corresponding to the created pod (container application instance), and the records of probe data, are shown in the following example:
[0142]
[0143]
[0144] Optionally, the updated configuration includes configuration information for different types of probes, meaning the updated probes include different types of probes.
[0145] In one possible implementation, the updated probe includes a first type of probe. Optionally, when the computer device probes a container application instance, it sends detection data to the container application instance using the first type of probe based on the configuration parameters corresponding to the first type of probe, and then obtains the response data of the container application instance to the detection data. Subsequently, if the amount of the response data is within the target range, the probe is determined to be successful, and detection data of the first type of probe for the container application instance is generated. The target range can be any range, and this embodiment does not limit it; for example, the target range is greater than or equal to 200 and less than 400.
[0146] In another possible implementation, the updated probe includes a second type of probe. Optionally, when the computer device probes a container application instance, it sends a port detection command to the container application instance using the second type of probe based on the configuration parameters corresponding to the second type of probe, and then obtains the port detection result returned by the container application instance. Subsequently, if the port detection result indicates that the port is open, the probe is determined to be successful, and probe data for the container application instance using the second type of probe is generated.
[0147] In another possible implementation, if the updated probe includes a third type of probe, optionally, when the computer device probes the container application instance, it sends a naming instruction to the container application instance using the third type of probe based on the configuration parameters corresponding to the third type of probe, and then obtains the naming result returned by the container application instance. Subsequently, if the naming result indicates successful naming, the probe is determined to be successful, and probe data for the container application instance using the third type of probe is generated. The aforementioned naming instruction is used to instruct the execution of a specified naming within the container application instance.
[0148] It should be noted that the above description of different types of probes is merely exemplary and illustrative. In exemplary embodiments, one or more types of probes of any kind can be used simultaneously to probe container application instances. Of course, new types of probes can also be configured in exemplary embodiments, and this application embodiment does not limit this.
[0149] Please refer to Figure 5 This illustrates a flowchart of a probe update method provided in another embodiment of this application. This method can be applied to... Figure 1 The first device 10 of the probe management system shown may be the executing entity for each step (hereinafter referred to as "computer device"). The method may include at least one of the following steps (501-506):
[0150] Step 501: In response to the probe update command for the container application instance, obtain the probe configuration information of the container application instance.
[0151] Step 502: While the container application instance is running, update the probe configuration information to obtain the updated probe configuration information.
[0152] Step 503: Based on the updated probe configuration information, update the probes of the container application instance to obtain the updated probes.
[0153] Step 504: Use the updated probe to detect the container application instance and obtain the corresponding detection data.
[0154] Steps 501-504 above and the above Figure 3 Steps 301-304 are the same in the embodiment; see details below. Figure 3 Examples are not described in detail here.
[0155] Step 505: Obtain the processing decision for the container application instance determined based on the probe data.
[0156] In this embodiment of the application, after obtaining the above-mentioned detection data, a processing decision for the container application instance is determined based on the detection data, and then the container application instance is processed accordingly.
[0157] In one possible implementation, after acquiring the aforementioned probe data, the computer device sends the probe data to a background service. The background server then determines a processing decision for the container application instance based on the probe data. Further, the computer device acquires the processing decision from the background service. For example, the aforementioned background server is... Figure 1 The second device 20, or the aforementioned backend server, is set up... Figure 1 The second device 20 in the series.
[0158] In another possible implementation, after acquiring the aforementioned probe data, the computer device determines a processing decision for the container application instance based on the probe data.
[0159] Optionally, one detection data point corresponds to one processing decision; or, multiple detection data points correspond to one processing decision.
[0160] In one possible implementation, to improve the accuracy of processing container application instances, one probing data point corresponds to one processing decision. Optionally, after acquiring the probing data, a processing decision is determined for each probing data point. In this case, there is a special case where the processing decision is "do not process the container application instance".
[0161] In another possible implementation, to reduce the amount of data computation, multiple probe data points correspond to one processing decision. Optionally, after acquiring probe data, the number of probe data points with undetermined processing decisions is obtained. If this number equals a threshold, a processing decision is determined based on the multiple probe data points corresponding to this number. Optionally, the threshold is determined based on the first number of determinations and the second number of determinations; for example, the threshold is the smaller of the first number of determinations and the second number of determinations.
[0162] Step 506: Process the container application instance based on the processing decision.
[0163] In this embodiment of the application, after obtaining the above-mentioned processing decision, the computer device processes the container application instance based on the processing decision.
[0164] In one possible implementation, after obtaining the above-mentioned processing decision, the computer device directly processes the container application instance based on the processing method indicated by the processing decision.
[0165] In another possible implementation, after obtaining the aforementioned processing decision, the computer device processes the container application instance based on the updated probe configuration parameters and the processing decision. For example, if the processing decision is to perform a target operation on the container application instance, the computer device processes the container application instance based on the aforementioned processing duration and the processing decision. Optionally, the target operation is to shut down or restart the container application instance.
[0166] In summary, the technical solution provided in this application determines processing decisions by probing data, and then processes container application instances based on the processing decisions. There is no correlation between the processing decisions and the probes. The processing decisions are determined based on observable probing data, which improves the accuracy of the processing decisions and enhances the accuracy and flexibility of processing container application instances.
[0167] In addition, in conjunction with references Figure 6 The complete process of the probe update method is described below, with specific steps as follows:
[0168] Step 601: Determine whether the cluster of container application instances has started running. If the cluster of container application instances has started running, proceed to step 602; if the cluster of container application instances has not started running, proceed to step 603.
[0169] Step 602: Update the relevant information of the cluster and establish a connection between the cluster and the policy information base. The policy information includes at least one candidate probe policy.
[0170] Step 603: Configure the policy information base in the relevant information of the cluster and establish the connection between the cluster and the policy information base.
[0171] Step 604: Deploy the cluster to the runtime environment.
[0172] Step 605: If a probe update command for a container application instance is detected, retrieve the probe update data of the container application instance from the policy information base.
[0173] Step 606: Update the probe configuration information of the container application instance based on the probe update data to obtain the updated probe configuration information.
[0174] Step 607: Update the probes of the container application instance based on the updated probe configuration information to obtain the updated probes.
[0175] Step 608: Based on the updated probe configuration information, use the updated probe to probe the container application instance and obtain the corresponding probe data.
[0176] Step 609: Obtain the processing decision for the container application instance determined based on the probe data.
[0177] Step 610: Process the container application instance based on the processing decision.
[0178] One point that needs to be made is that, Figure 6 The embodiments are merely exemplary and illustrative. In the exemplary embodiments, the execution subject of each of the above steps can be flexibly set and adjusted, and the embodiments of this application do not limit this. For example, the above steps 601-604 are executed by important devices in the cluster (such as the master node), and steps 605-610 are executed by any device in the cluster.
[0179] It should be noted that the above describes the updating of probe configuration information for container application instances. In the exemplary embodiment, probe configuration information can be created and deleted. Optionally, the creation of probe configuration information is caused by the creation of a container application instance, and the deletion of probe configuration information is caused by the deletion of a container application instance.
[0180] For example, the process of creating probe configuration information is as follows: Figure 7 As shown:
[0181] Step 701: The second device (ApiServer) sends an instance creation instruction for the container application instance to the cluster of the first device. The cluster of the first device includes at least one first device.
[0182] Step 702: The control node (Kube-Scheduler) in the cluster of the first device creates a container application instance according to the instance creation instructions.
[0183] Step 703: The control node (Kube-Scheduler) assigns the container application instance to the first device.
[0184] Step 704: The probe configuration module (ProbeManager) of the first device retrieves the probe policy indicated by the instance creation instruction from the policy information base.
[0185] Step 705: The ProbeManager module creates probe configuration information for the container application instance based on the probe policy.
[0186] Step 706: The probe management module (Guardian) of the first device creates a probe based on the probe configuration information.
[0187] Step 707: The probe management module (Guardian) uses the created probes to probe the container application instance according to the probe configuration information and obtains the corresponding probe results.
[0188] Step 708: The first device sends the probe results to the second device (ApiServer).
[0189] Step 709: The second device (ApiServer) determines a processing decision for the container application instance based on the probe results and sends the processing decision to the first device. Of course, in the exemplary embodiment, the above processing decision can also be issued by other devices; for example, since the external high-availability system has a higher perspective and can see more comprehensive information, the above processing decision is generated by the external high-availability system based on the probe results sent by the second device (ApiServer).
[0190] Step 710: The first device processes the container application instance based on the processing decision.
[0191] For example, the process of updating probe configuration information is as follows: Figure 8 As shown:
[0192] Step 801: The second device sends a probe update command to the first device.
[0193] Step 802: The probe configuration module of the first device retrieves the probe policy indicated by the probe update instruction from the policy information database according to the probe update instruction.
[0194] Step 803: The probe configuration module generates probe update data according to the probe strategy.
[0195] Step 804: The probe configuration module updates the probe configuration information of the container application instance based on the probe update data to obtain the updated probe configuration information.
[0196] Step 805: The probe management module of the first device updates the probes of the container application instance according to the updated probe configuration information to obtain the updated probes.
[0197] Step 806: The probe management module uses the updated probes to probe the container application instance based on the updated probe configuration information to obtain the corresponding probe results.
[0198] Step 807: The first device sends the detection results to the second device.
[0199] Step 808: The second device determines the processing decision for the container application instance based on the detection results and sends the processing decision to the first device.
[0200] Step 809: The first device processes the container application instance based on the processing decision.
[0201] For example, the process of deleting probe configuration information is as follows: Figure 9 As shown:
[0202] Step 901: The second device sends an instance deletion command for the container application instance to the first device.
[0203] Step 902: The probe configuration module in the first device deletes the corresponding probe configuration information based on the instance deletion command.
[0204] Step 903: The probe management module in the first device stops probing and deletes the corresponding probe based on the instance deletion command.
[0205] Step 904: The first device deletes the corresponding container application instance based on the instance deletion command.
[0206] It should be noted that the above description of this application through embodiments is merely exemplary and illustrative. New embodiments formed by arbitrarily combining the steps in the above embodiments are also within the protection scope of this application.
[0207] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0208] Please refer to Figure 10This diagram illustrates a block diagram of a probe update apparatus according to an embodiment of this application. The apparatus has the function of implementing the probe update method described above; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus can be a computer device or can be installed within a computer device. The apparatus 1000 may include: a configuration acquisition module 1010, a configuration update module 1020, a probe update module 1030, and a probe detection module 1040.
[0209] The configuration acquisition module 1010 is used to acquire the probe configuration information of the container application instance in response to the probe update command for the container application instance; wherein the probe configuration information is independent of the instance configuration information of the container application instance.
[0210] The configuration update module 1020 is used to update the probe configuration information while the container application instance is running, so as to obtain the updated probe configuration information.
[0211] The probe update module 1030 is used to update the probes of the container application instance based on the updated probe configuration information to obtain the updated probes.
[0212] The probe detection module 1040 is used to detect the container application instance using the updated probe to obtain corresponding detection data, which is used to indicate the running status of the container application instance.
[0213] In an exemplary embodiment, such as Figure 11 As shown, the probe update instruction is a probe change instruction, which is used to change the content contained in the probe configuration information; the configuration update module 1020 includes: a data acquisition unit 1021 and a configuration update unit 1022.
[0214] The data acquisition unit 1021 is used to acquire the probe update data of the container application instance.
[0215] The configuration update unit 1022 is used to perform a change operation on the probe configuration information based on the probe update data to obtain the updated probe configuration information.
[0216] In an exemplary embodiment, the probe update instruction is a probe add instruction, which is used to add content included in the probe configuration information.
[0217] The data acquisition unit 1021 is also used to acquire probe update data of the container application instance.
[0218] The configuration update unit 1022 is further configured to perform an add operation on the probe configuration information based on the probe update data to obtain the updated probe configuration information.
[0219] In an exemplary embodiment, the data acquisition unit 1021 is configured to acquire at least one probe strategy indicated by the probe update instruction from a strategy information base, the strategy information base including at least one candidate probe strategy; and generate the probe update data based on the configuration parameters contained in the probe update instruction and the at least one probe strategy.
[0220] In an exemplary embodiment, the data acquisition unit 1021 is further configured to, for a target probe strategy in the at least one probe strategy, acquire configuration parameters of a target probe from the target probe strategy based on configuration information for the target probe strategy in the probe update instruction; wherein the configuration information for the target probe strategy includes identification information of the target probe; and generate probe update data based on the configuration parameters of the probes acquired from each of the probe strategies.
[0221] In an exemplary embodiment, the probe update instruction is a probe deletion instruction, which is used to delete the content contained in the probe configuration information; the configuration update module 1020 is further used to determine the probe deletion data of the container application instance based on the probe deletion instruction; and to perform a deletion operation on the probe configuration information based on the probe deletion data to obtain the updated probe configuration information.
[0222] In an exemplary embodiment, the probe update instruction is a probe change instruction, which is used to change the content contained in the probe configuration information; the probe update module 1030 is used to generate a first probe based on the updated probe configuration information; wherein, the first probe refers to a probe configured in the updated probe configuration information that does not exist in the existing probes of the container application instance; a second probe is deleted from the existing probes of the container application instance and the first probe is added; wherein, the second probe refers to a probe not configured in the updated probe configuration information.
[0223] In an exemplary embodiment, the probe update instruction is a probe add instruction, which is used to add content included in the probe configuration information; the probe update module 1030 is used to generate a first probe based on the updated probe configuration information; wherein, the first probe refers to the probe configured by the updated probe configuration information and not existing in the existing probes of the container application instance; the first probe is added to the existing probes of the container application instance.
[0224] In an exemplary embodiment, the probe update instruction is a probe deletion instruction, which is used to delete the content contained in the probe configuration information; the probe update module 1030 is used to delete a second probe from the existing probes of the container application instance based on the updated probe configuration information; wherein, the second probe refers to a probe that is not configured in the updated probe configuration information.
[0225] In an exemplary embodiment, such as Figure 11 As shown, the probe detection module 1040 includes: a parameter acquisition unit 1041 and a probe detection unit 1042.
[0226] The parameter acquisition unit 1041 is used to acquire the configuration parameters of the updated probe from the updated probe configuration information.
[0227] The probe detection unit 1042 is used to detect the container application instance using the updated probe according to the updated probe configuration parameters to obtain corresponding detection data.
[0228] In an exemplary embodiment, the configuration parameters of the updated probe include at least one of the following: probe interval duration, probe delay duration, determination duration, first determination count, second determination count, and processing duration; wherein, the probe interval duration is used to indicate the interval duration between two adjacent probes; the probe delay duration is used to indicate the duration from the creation time of the container application instance to the start time of the first probe; the determination duration is used to indicate the longest unresponsive duration of the container application instance from the start of the probe until the probe is determined to have failed; the first determination count is used to indicate the number of consecutive successful probes from the start of the probe until the container application instance is determined to be running normally; the second determination count is used to indicate the number of consecutive failed probes from the start of the probe until the container application instance is determined to be running abnormally; and the processing duration is used to indicate the waiting time from obtaining the processing decision for the container application instance to processing the container application instance.
[0229] In an exemplary embodiment, the probe detection unit 1042 is configured to, if the updated probe includes a probe of the first type, send detection data to the container application instance using the probe of the first type based on the configuration parameters corresponding to the probe of the first type; obtain response data of the container application instance to the detection data; determine that the detection is successful if the amount of the response data is within the target range; and generate detection data of the probe of the first type for the container application instance.
[0230] In an exemplary embodiment, the probe detection unit 1042 is configured to, if the updated probe includes a second type of probe, send a port detection command to the container application instance using the second type of probe based on the configuration parameters corresponding to the second type of probe; obtain the port detection result fed back by the container application instance; determine that the detection was successful if the port detection result indicates that the port is open; and generate detection data of the second type of probe for the container application instance.
[0231] In an exemplary embodiment, the probe detection unit 1042 is configured to, if the updated probe includes a third type of probe, send a naming instruction to the container application instance using the third type of probe based on the configuration parameters corresponding to the third type of probe, wherein the naming instruction is used to instruct the execution of a specified naming within the container application instance; obtain the naming result fed back by the container application instance; determine that the current detection is successful if the naming result is successful; and generate detection data of the third type of probe for the container application instance.
[0232] In an exemplary embodiment, such as Figure 11 As shown, the device 1100 further includes a decision determination module 1050 and an instance processing module 1060.
[0233] The decision determination module 1050 is used to obtain a processing decision for the container application instance determined based on the probe data.
[0234] The instance processing module 1060 is used to process the container application instance based on the updated probe configuration parameters and the processing decision.
[0235] In summary, the technical solution provided in this application update the probe configuration information of the container application instance through the probe update command. Furthermore, the probe configuration information is independent of the instance configuration information; that is, the update of the probe configuration information does not depend on the instance configuration information. This makes the update of the probe configuration information more flexible and convenient. Even when the container application instance is running, the probe configuration information can be updated smoothly, ensuring that the operation of the container application instance is not affected by probe updates and can provide services normally. Moreover, updating the probe configuration information does not require updating the instance configuration information, reducing the amount of data that needs to be updated and improving the efficiency of probe configuration information updates.
[0236] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0237] Please refer to Figure 12 This diagram illustrates a structural block diagram of a computer device provided in an embodiment of this application. This computer device can be used to implement the probe update method provided in the above embodiments. For example, the computer device may be... Figure 1 The first device 10 in the embodiment. Specifically:
[0238] The computer device 1200 includes a processing unit (such as a CPU, GPU, and FPGA) 1201, a system memory 1204 including RAM (Random Access Memory) 1202 and ROM (Read Only Memory) 1203, and a system bus 1205 connecting the system memory 1204 and the CPU 1201. The computer device 1200 also includes a basic I / O system (Input / Output) 1206 to facilitate information transfer between various devices within the computer device, and a large-capacity storage device 1207 for storing the operating system 1213, application programs 1214, and other program modules 1212.
[0239] The basic input / output system 1206 includes a display 1208 for displaying information and an input device 1209 for user input, such as a mouse or keyboard. Both the display 1208 and the input device 1209 are connected to the central processing unit 1201 via an input / output controller 1210 connected to the system bus 1205. The basic input / output system 1206 may also include the input / output controller 1210 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1210 also provides output to a display screen, printer, or other types of output devices.
[0240] The mass storage device 1207 is connected to the central processing unit 1201 via a mass storage controller (not shown) connected to the system bus 1205. The mass storage device 1207 and its associated computer-readable media provide non-volatile storage for the computer device 1200. That is, the mass storage device 1207 may include computer-readable media (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0241] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage devices, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the above-mentioned types. The system memory 1204 and mass storage device 1207 described above can be collectively referred to as memory.
[0242] According to an embodiment of this application, the computer device 1200 can also be connected to a remote computer on a network, such as the Internet. That is, the computer device 1200 can be connected to the network 1212 via the network interface unit 1211 connected to the system bus 1205, or the network interface unit 1211 can be used to connect to other types of networks or remote computer systems (not shown).
[0243] The memory also includes at least one instruction, at least one program, code set, or instruction set, which is stored in the memory and configured to be executed by one or more processors to implement the probe update method described above.
[0244] In an exemplary embodiment, a computer-readable storage medium is also provided, the storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set, when executed by a processor, implements the probe update method described above.
[0245] Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0246] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the probe update method described above.
[0247] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0248] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A probe update method, characterized in that, The method further includes: In response to a probe update command for a container application instance, the probe configuration information of the container application instance is obtained; wherein the probe configuration information is independent of the instance configuration information of the container application instance. While the container application instance is running, the probe configuration information is updated to obtain the updated probe configuration information; Based on the updated probe configuration information, the probes of the container application instance are updated to obtain the updated probes; The updated probe is used to detect the container application instance and obtain corresponding detection data, which is used to indicate the running status of the container application instance.
2. The method according to claim 1, characterized in that, The probe update command is a probe change command, which is used to change the contents of the probe configuration information. The step of updating the probe configuration information to obtain the updated probe configuration information includes: Obtain the probe update data of the container application instance; Based on the probe update data, a change operation is performed on the probe configuration information to obtain the updated probe configuration information.
3. The method according to claim 1, characterized in that, The probe update command is a probe add command, which is used to add content to the probe configuration information. The step of updating the probe configuration information to obtain the updated probe configuration information includes: Obtain the probe update data of the container application instance; Based on the probe update data, an addition operation is performed on the probe configuration information to obtain the updated probe configuration information.
4. The method according to claim 2 or 3, characterized in that, The step of obtaining the probe update data of the container application instance includes: Retrieve at least one probe policy indicated by the probe update instruction from a policy information base, wherein the policy information base includes at least one candidate probe policy; The probe update data is generated based on the probe update command and the configuration parameters contained in the at least one probe strategy.
5. The method according to claim 4, characterized in that, The step of generating the probe update data based on the probe update instruction and the at least one probe strategy includes: For a target probe strategy in the at least one probe strategy, configuration parameters of the target probe are obtained from the target probe strategy based on the configuration information for the target probe strategy in the probe update instruction; wherein, the configuration information for the target probe strategy includes the identification information of the target probe; The probe update data is generated based on the probe configuration parameters obtained from each of the probe strategies.
6. The method according to claim 1, characterized in that, The probe update command is a probe deletion command, which is used to delete the content contained in the probe configuration information; The step of updating the probe configuration information to obtain the updated probe configuration information includes: Based on the probe deletion instruction, the probe deletion data of the container application instance is determined; Based on the probe deletion data, a deletion operation is performed on the probe configuration information to obtain the updated probe configuration information.
7. The method according to claim 1, characterized in that, The probe update command is a probe change command, which is used to change the contents of the probe configuration information. The step of updating the probes of the container application instance based on the updated probe configuration information to obtain the updated probes includes: Based on the updated probe configuration information, a first probe is generated; wherein, the first probe refers to the probe configured by the updated probe configuration information and does not exist in the existing probes of the container application instance. Delete the second probe and add the first probe to the existing probes of the container application instance; wherein, the second probe refers to the probe that is not configured in the updated probe configuration information.
8. The method according to claim 1, characterized in that, The probe update command is a probe add command, which is used to add content to the probe configuration information. The step of updating the probes of the container application instance based on the updated probe configuration information to obtain the updated probes includes: Based on the updated probe configuration information, a first probe is generated; wherein, the first probe refers to the probe configured by the updated probe configuration information and does not exist in the existing probes of the container application instance. Add the first probe to the existing probes of the container application instance.
9. The method according to claim 1, characterized in that, The probe update command is a probe deletion command, which is used to delete the content contained in the probe configuration information; The step of updating the probes of the container application instance based on the updated probe configuration information to obtain the updated probes includes: Based on the updated probe configuration information, the second probe is deleted from the existing probes of the container application instance; wherein, the second probe refers to the probe that is not configured in the updated probe configuration information.
10. The method according to claim 1, characterized in that, The step of using the updated probe to probe the container application instance and obtain corresponding probe data includes: Obtain the updated probe configuration parameters from the updated probe configuration information; Based on the updated probe configuration parameters, the updated probe is used to probe the container application instance to obtain corresponding probe data.
11. The method according to claim 10, characterized in that, The updated probe configuration parameters include at least one of the following: detection interval duration, detection delay duration, decision duration, first decision count, second decision count, and processing duration; wherein, The detection interval duration is used to indicate the interval duration between two adjacent detections; The detection delay duration is used to indicate the duration from the creation time of the container application instance to the start time of the first detection; The determination duration is used to indicate the longest unresponsive time of the container application instance from the start of the probe until the probe is determined to have failed. The first determination count is used to indicate the number of consecutive successful probes from the start of the probe until the container application instance is determined to be running normally; The second determination count is used to indicate the number of consecutive probe failures from the start of the probe until the container application instance is determined to be running abnormally; The processing time is used to indicate the waiting time from obtaining a processing decision for the container application instance to processing the container application instance.
12. The method according to claim 10, characterized in that, The step of using the updated probe to probe the container application instance and obtain corresponding probe data based on the updated probe configuration parameters includes at least one of the following: If the updated probe includes a probe of the first type, based on the configuration parameters corresponding to the probe of the first type, the first type of probe is used to send detection data to the container application instance; the response data of the container application instance to the detection data is obtained; if the amount of the response data is within the target range, the detection is determined to be successful. Generate probe data of the first type of probe for the container application instance; If the updated probe includes a second type of probe, based on the configuration parameters corresponding to the second type of probe, a port detection command is sent to the container application instance using the second type of probe; the port detection result fed back by the container application instance is obtained; if the port detection result indicates that the port is open, the detection is determined to be successful. Generate probe data of the second type of probe for the container application instance; If the updated probe includes a third type of probe, a naming instruction is sent to the container application instance using the third type of probe based on the configuration parameters corresponding to the third type of probe. The naming instruction is used to instruct the execution of a specified naming within the container application instance. The naming result returned by the container application instance is obtained. If the naming result indicates that the naming was successful, the probe is determined to be successful. The probe data of the third type of probe for the container application instance is generated.
13. The method according to claim 1, characterized in that, The detection data includes at least one of the following: the result of this detection, the time of the latest detection, and the time when the previous detection result changed.
14. The method according to claim 1, characterized in that, After obtaining the corresponding probe data by using the updated probe to detect the container application instance, the process further includes: Obtain a processing decision for the container application instance based on the probe data; Based on the updated probe configuration parameters and the processing decision, the container application instance is processed.
15. A probe updating device, characterized in that, The device includes: A configuration acquisition module is used to acquire probe configuration information of a container application instance in response to a probe update command for that container application instance; wherein the probe configuration information is independent of the instance configuration information of the container application instance. The configuration update module is used to update the probe configuration information while the container application instance is running, so as to obtain the updated probe configuration information. The probe update module is used to update the probes of the container application instance based on the updated probe configuration information to obtain the updated probes. The probe detection module is used to detect the container application instance using the updated probe to obtain corresponding detection data, which is used to indicate the running status of the container application instance.
16. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the probe update method as described in any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to implement the probe update method as described in any one of claims 1 to 14.
18. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, and a processor reads from and executes the computer instructions to implement the probe update method as described in any one of claims 1 to 14.