Cluster container network evaluation method and device, electronic equipment and program product
By setting up SLA modules and detection modules in the cluster, and conducting on-demand detection based on service pod detection information, the problems of high operating costs and large resource overhead of traditional container network SLA evaluation methods are solved, and more efficient and accurate evaluation is achieved.
Patent Information
- Application Number
- CN202510238623.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The traditional container network SLA evaluation method has high operating costs and high resource overhead, which increases the additional burden on the complexity of the container network.
By setting up SLA modules and detection modules in the cluster, conduct on-demand detection based on the detection information of the service pod, select cluster objects closely related to the service pod as the detection target, and reduce redundant detection.
This method can optimize the process of SLA evaluation of container networks, reduce the network burden generated during the evaluation process, and improve the evaluation efficiency and accuracy.
Smart Images

Figure CN119996235A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of container technology, and in particular to a cluster container network evaluation method, device, electronic device, and program product. Background Art
[0002] With the development of cloud computing technology, cluster containers have become an important way to deploy modern applications. This method achieves efficient resource utilization and flexible scaling by packaging applications and their dependencies into containers and deploying them to clusters.
[0003] In the cluster container architecture, the communication mechanism of the container network is relatively complex and is easily disturbed by factors such as network congestion and node failure, which causes frequent performance fluctuations and affects the stable operation of applications. Therefore, it is particularly important to accurately evaluate the container network. The service level agreement (SLA) can accurately define the performance indicators and service standards of the container network with its perfect quantitative system, and is widely used in the service evaluation of the container network.
[0004] Currently, traditional SLA evaluation methods have high operating costs and large resource overhead, adding additional burden to the already complex container network. Summary of the invention
[0005] The present application provides a cluster container network evaluation method, device, electronic device and program product. The method can perform on-demand detection based on the detection information of the business pod, which can reduce the network burden caused by the container network evaluation process.
[0006] In the first aspect, the present application provides a cluster container network evaluation method, which is applied to a management node in a cluster, wherein a service level agreement SLA module is provided in the management node, and the cluster also includes a business node, wherein a detection module is provided in the business node, and the SLA module is communicatively connected to the detection module. The method includes: obtaining detection information of a business pod to be detected. The detection information includes a first business level and / or access target information of the business pod to be detected, wherein the first business level is used to indicate the business level of an object to be detected in the cluster, and the access target information is used to indicate an object to be accessed during the operation of the business pod to be detected. Based on the detection information, all or part of all objects in the cluster are selected as target detection objects. The communication link between the business pod to be detected and the target detection object is detected by the detection module to obtain a detection result. Based on the detection result, the SLA evaluation parameters of the business pod to be detected are determined.
[0007] The cluster container network evaluation method provided by the present application selects the target detection object from the cluster through the detection information of the business pod to be detected. Compared with the prior art that adopts a broad and non-targeted detection method, the present application can select cluster objects closely related to the business pod based on the cluster object business level and the access target of the business pod to be detected, thereby reducing invalid detection and alleviating the network burden caused by container network detection. At the same time, by setting a detection module on the business node to detect the target detection object, the detection results can be quickly obtained by relying on the business node's perception of the local network, shortening the detection cycle. In summary, the method provided by the present application can optimize the process of container network SLA evaluation and reduce the network burden generated during the evaluation process.
[0008] In a possible implementation, objects in the cluster include: pods, physical nodes, or services.
[0009] In another possible implementation, the detection information includes the first business level, and based on the detection information, all or part of the target detection objects are selected from the cluster, including: according to the first business level, selecting objects of the first business level from all objects in the cluster as target detection objects.
[0010] In another possible implementation, the detection information includes access target information of the service pod to be detected, and based on the detection information, all or part of the target detection objects are selected from the cluster, including: according to the access target information, selecting the object to be accessed during the operation of the service pod to be detected from all objects in the cluster as the target detection object.
[0011] In another possible implementation, the detection information includes the first business level and access target information of the business pod to be detected, and based on the detection information, all or part of the target detection objects are selected from the cluster, including: according to the access target information and the first business level, selecting the business level of the first business level from all objects in the cluster, and the objects to be accessed during the operation of the business pod to be detected as the target detection objects.
[0012] In another possible implementation, the method further includes: obtaining creation information of a newly created object, the newly created object including a pod or a service. If the creation information includes access target information of the newly created object, creating the newly created object. If the creation information does not include access target information of the newly created object, refusing to create the newly created object.
[0013] In another possible implementation, the method further includes: creating the new object if the creation information includes the service level of the new object; and assigning a default service level to the new object and creating the new object if the creation information does not include the service level of the new object.
[0014] In another possible implementation manner, the method further includes: obtaining a second service level and selecting a pod of the second service level from all service pods in the cluster as the service pod to be detected.
[0015] Another possible implementation manner is to determine the SLA evaluation parameter of the service pod to be detected based on the detection result, including: determining a first value and a second value based on the detection result, wherein the first value is the number of normal communication links, and the normal communication link is a communication link between the service pod to be detected and the target detection object, and the detection result of the communication link is normal. The second value is the total number of communication links between the service pod to be detected and the target detection object. Based on the quotient of the first value and the second value, the SLA evaluation parameter of the service pod to be detected is determined.
[0016] In a second aspect, the present application provides a cluster container network evaluation device, which includes various functional modules used in the method described in the first aspect.
[0017] In a third aspect, the present application provides a computer program product, including: computer instructions; when the computer instructions are executed on an electronic device, the electronic device implements the method described in the first aspect above.
[0018] In a fourth aspect, the present application provides an electronic device, comprising: a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method described in the first aspect above.
[0019] In a fifth aspect, the present application provides a readable storage medium, which includes: software instructions; when the software instructions are executed in an electronic device, the electronic device implements the method described in the first aspect above.
[0020] The beneficial effects of the second to fifth aspects mentioned above can be referred to the first aspect and will not be elaborated on again. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 A schematic diagram of the detection process of an existing container network SLA evaluation method provided in this application;
[0023] Figure 2A schematic diagram of an architecture of an application scenario of a cluster container network evaluation method provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of a process flow of a cluster container network evaluation method provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of a detection process provided in an embodiment of the present application;
[0026] Figure 5 A flow chart of a method for calculating SLA parameters provided in an embodiment of the present application;
[0027] Figure 6 A flowchart of a method for verifying SLA module creation information provided by an embodiment of the present application;
[0028] Figure 7 A flowchart of another SLA module creation information verification method provided in an embodiment of the present application;
[0029] Figure 8 A timing diagram of a method for creating information verification provided in an embodiment of the present application;
[0030] Fig. 9 A flow chart of a method for determining a service pod to be detected provided in an embodiment of the present application;
[0031] Fig.10 A schematic diagram of a cluster container network evaluation device provided in an embodiment of the present application;
[0032] Fig.11 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0034] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0035] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. are not limiting the quantity and execution order.
[0036] As described in the background technology, in order to cover the communication links of the container, the traditional network container SLA evaluation method will select a large range of detection targets for a business pod. These detection targets may not be associated with the business pod, which will generate a lot of redundant detection. These redundant detections will not only affect the evaluation results of the business pod container network, but also consume computing resources and network resources, causing a large network burden on the cluster network.
[0037] For example, Figure 1 A schematic diagram of a detection process of an existing container network SLA evaluation method provided in this application is as follows: Figure 1 As shown, the service node 110 and the service node 120 are included. The service node 110 includes a service pod 112, a service pod 113, a service 114, and a detection container 111, and the service node 120 includes a service pod 122, a service pod 123, a service 124, and a detection container 121.
[0038] Taking the detection container 111 as an example, the detection container 111 first needs to detect the business pod and service on the local business node 110 (detection is indicated by a dotted line), and then needs to detect the business node 120, and the business pod and service on the business node 120. When performing SLA evaluation, the detection container 140 in each business node 110 will detect the business pods and services 130 in all business nodes 110, and report the results for SLA calculation. This method generates a large number of invalid detections and wastes resources.
[0039] In view of this, how to optimize the container network SLA evaluation method and reduce the burden of cluster networks is an urgent problem to be solved in the current field of container technology.
[0040] Based on this, the present application provides a cluster container network evaluation method, which can screen out objects closely related to the business pod from all objects in the cluster as detection targets based on the detection information of the business pod, thereby reducing the number of redundant detections and thus alleviating the cluster network burden.
[0041] The cluster container network evaluation method provided in this application can be applied to the control node of the kubernetes cluster, which is connected to multiple service nodes in the cluster. Figure 2As shown, the cluster includes a control node 210 and multiple service nodes 220, wherein:
[0042] The control node 210 is connected to multiple service nodes 220 for centralized management and coordination of resource allocation and task scheduling of service nodes in the cluster to ensure stable operation of the cluster. At the same time, it integrates data from each node, makes analysis and decisions based on preset rules, and provides direction for cluster development.
[0043] The control node 210 is deployed with an API Server module 230 , a scheduler module 240 , and an SLA module 250 .
[0044] The API Server module 230 is used as an interface for the interaction between the control node 210 and the service node 220, and is responsible for receiving and processing requests from the service node.
[0045] The scheduler module 240 is used to perform resource allocation and task scheduling according to the real-time situation of cluster resources and business requirements.
[0046] The SLA module 250 is used to obtain detection information of the service pod to be detected.
[0047] The SLA module 250 is further configured to select all or part of all objects in the cluster as target detection objects based on the detection information.
[0048] The SLA module 250 is further configured to communicate with the detection module 280, receive the detection result uploaded by the detection module 280, and determine the SLA evaluation parameters of the service pod to be detected based on the detection result.
[0049] The business node 220 is used to carry and run various specific business applications, convert the computing resources of the cluster into actual business services, and directly provide functional support to users or other systems.
[0050] A service 260 , multiple business pods 270 , and a detection module 280 are deployed in each business node 220 .
[0051] Service 260 is used to receive requests from the outside or other modules, process the requests according to established rules and processes, and then return the corresponding results. It is the interface for the business node to interact with the outside and the direct provider of business functions.
[0052] Business pod 270 is used to carry specific business processes and related resources. Multiple business pods 270 can work together in parallel to complete complex business tasks. Through replication and expansion, business can be expanded horizontally to improve business processing capabilities and reliability.
[0053] The detection module 280 is used to detect the communication link between the service pod to be detected and the target detection object, obtain the detection result, and report the detection result to the SLA module.
[0054] In some embodiments, the target detection objects include business pods, services, and business nodes.
[0055] It should be noted that the cluster may also include multiple control nodes 210, and the multiple control nodes are communicatively connected with each other. The multiple control nodes may respectively deploy the above-mentioned API Server module 230, scheduler module 240, and SLA module 250.
[0056] like Figure 3 A flow chart of a cluster container network evaluation method provided in an embodiment of the present application is provided. The method can be applied to the above-mentioned control node, such as Figure 3 As shown, the method includes S301-S304:
[0057] S301. Obtain detection information of the service pod to be detected.
[0058] The detection information includes the first service level and / or access target information of the service pod to be detected. The first service level is used to indicate the service level of the object to be detected in the cluster, and the access target information is used to indicate the object to be accessed during the operation of the service pod to be detected.
[0059] Specifically, the control node can obtain the detection information of the service pod to be detected in the cluster through the API Server module.
[0060] It should be noted that each object in the cluster has its own business level, which is used to indicate the importance of the business operation of the cluster object, and the business pods or services in the cluster have corresponding access target information. The business level and access target information can be configured when the cluster object is created. For the specific process, please refer to the following Figure 6 and Figure 7 , I will not go into details here.
[0061] It should also be noted that the service pods to be detected are all or part of the service pods participating in the container network SLA evaluation selected from all service pods in the cluster. The specific selection process of the service pods to be detected can be found in Fig. 9 , I will not go into details here.
[0062] In some embodiments, the detection information of the service pod to be detected can be stored in the service node. In this case, the service node can update its detection information according to the running status of the service pod to be detected, and the service node can also implement a security protection strategy for the detection information to protect the security of sensitive data in the detection information.
[0063] In other embodiments, the detection information of the service pod to be detected may also be stored in the control node. In this case, the control node can manage the detection information of the service pod in a global and unified manner, which can reduce the communication requests between the service node and the control node, and is also conducive to formulating a unified detection information management method to ensure the maintainability and scalability of the system.
[0064] In some embodiments, objects in the cluster include: pods, physical nodes, or services.
[0065] A pod is the smallest computing unit deployed and managed in a cluster. It can contain one or more closely related containers that share resources such as network namespaces and storage volumes.
[0066] A physical node is an actual physical server in a cluster. It is the infrastructure for running pods. A physical node can be a traditional physical server or a cloud server.
[0067] A service (svc) is a resource object in a cluster that abstracts and exposes the network interface of a pod. It provides a unified access point for a group of pods with the same functions and is responsible for load balancing external requests to the backend pods.
[0068] In some embodiments, the access object indicated by the access target information may include the following: pod, physical machine, service, and nothing.
[0069] Pod refers to other pods other than the service pod to be detected. When some service pods to be detected are started, they may need to access other pods to obtain some initialization information.
[0070] Physical machine: During the operation of the service pod to be detected, it may need to access resources on some fixed physical machines.
[0071] Services: Some services that the business pod to be detected may need to access during operation, such as databases and middleware.
[0072] nothing: The service pod to be detected does not need to access any other resources during its operation.
[0073] In some embodiments, the service level can be divided into: cluster level, important level, general level, and negligible level according to the importance of the operation of the pod or svc in the cluster.
[0074] The cluster level represents the most important business level. These svcs and pods form the foundation of the entire cluster. Their stable operation is the prerequisite for ensuring the normal operation of the cluster. Once a failure occurs, it is very likely to trigger a chain reaction, causing the entire cluster to be paralyzed and all businesses that rely on the cluster to be completely interrupted.
[0075] The critical level mainly covers services and application instances that play a key supporting role in business availability, such as the SVC and Pod responsible for order processing and payment settlement in the e-commerce platform. If these have problems, although the entire cluster will not crash, the corresponding business functions will not be able to provide services normally, seriously affecting user experience and business revenue.
[0076] The general level, as the default service level, is suitable for a large number of svcs and pods that have relatively little impact on the overall operation of the cluster and key business processes, such as common basic services such as log collection and resource monitoring. Even if these services have temporary abnormalities, they will not cause a fatal blow to the stability of the cluster and the main business.
[0077] The ignorable level is for svcs and pods that are only used for testing, demonstration, or have little relevance to actual business, such as temporary test services during the development phase. Since they have almost no substantial impact on business operations, you can choose to ignore objects at this level when performing resource-consuming operations such as network detection to save system resources.
[0078] In other embodiments, the service level may also be divided according to the resource consumption generated by the pod or svc during operation, and the resource consumption may include: computing resource consumption, storage resource consumption, network resource consumption, etc.
[0079] S302: Based on the detection information, select all or part of all objects in the cluster as target detection objects.
[0080] Specifically, the control node may select, through the SLA module, a target detection object corresponding to the service pod to be detected from all objects in the cluster according to one or more information contents in the detection information of the service pod to be detected.
[0081] It should be understood that, from the foregoing, there may be objects in the cluster that are irrelevant to the operation of the business pod to be detected. These irrelevant objects may include objects that do not directly communicate with the business to be detected or objects that the business pod to be detected does not need to access. If such irrelevant objects are included in the detection range of the business pod to be detected, it will not only increase the detection cost, but also interfere with the evaluation results of the network SLA of the container of the business pod to be detected. Therefore, such irrelevant objects are screened out according to the detection information, and objects that are directly related to the business pod to be detected or can affect the business pod to be detected are obtained as target detection objects.
[0082] S303: Detect the communication link between the service pod to be detected and the target detection object through the detection module to obtain a detection result.
[0083] Specifically, the control node sends the target detection object corresponding to the service pod to be detected to the detection module of the service node where the service pod to be detected is located through the SLA module, and then the detection module detects the communication link between the service pod to be detected and the target detection object to obtain the detection result.
[0084] The target detection object also includes its specific access information, and the access information includes the address information, port information, and the network protocol used by the target object.
[0085] In some embodiments, the address information of the target detection object may not exist in the form of an IP address, but in the form of a name or a label. In this case, the detection module can also send a query request to the API Server module to obtain the IP address of the target detection object.
[0086] In some embodiments, when the detection result obtained by the detection module is failure or disconnected, the detection module can query the running status of the target detection object through the API Server module to confirm whether the target detection object exists. If the target detection object does not exist (for example, it has been destroyed), the detection result corresponding to the target detection object will not be reported.
[0087] In some embodiments, the detection module may perform periodic detection on the target detection object, thereby obtaining detection results at multiple different time nodes.
[0088] In a possible implementation, after receiving the target detection object, the detection module constructs a detection identifier (in the format of, for example, ip:port protocol) that can access the target detection object based on the address information, port information, and network protocol of the target detection object. Then, the detection module enters the network namespace of the service pod to be detected, detects the detection identifier, and obtains the detection result.
[0089] For example, taking a service pod to be detected on a local service node as an example, the workflow of the detection module is as follows: Figure 4 As shown, including:
[0090] S10: Obtain the target detection object.
[0091] The detection module receives the target detection object and the detection start instruction sent by the SLA module. After receiving the detection start instruction, the detection module constructs a detection target identifier of the target detection object based on the access information of the target detection object.
[0092] S20: Enter the network namespace of the service node to be detected.
[0093] The detection module enters the network namespace of the service pod to be detected of the local service node and detects the target identifier on the service pod to be detected.
[0094] S30. Detect the service pod on the local service node.
[0095] If the target detection object includes the service pod on the local service node, other service pods on the local service node (such as Figure 4 In the business pod550), the detection result is returned to the detection module.
[0096] S40: Detect other service nodes.
[0097] If the target detection object includes other business nodes (such as Figure 4 , other business nodes 1 and other business nodes 2), and business pods on other business nodes (such as Figure 4 , business pod 520 and business pod 540) and services (such as Figure 4 , service 510 and service 530), then detect the business pods on other business nodes and return the detection results to the detection module.
[0098] S50: Report the detection result.
[0099] The detection module reports the detection results of the above steps S30-S40 to the SLA module.
[0100] It should be understood that by detecting the target detection object of the business node through the detection module on the business node, the drawback of establishing a detection container for detection in the traditional container network SLA evaluation method can be solved. In the traditional way, building a container requires additional resource overhead, and the isolation of the container and the business node will cause deviations in the detection results. The detection module is directly embedded in the business node, which can detect in a way that is closer to the actual operation of the business and has high real-time performance, thereby reducing the error caused by the time difference between the simulation and the actual request.
[0101] S304: Determine the SLA evaluation parameters of the service pod to be detected based on the detection result.
[0102] Specifically, the number of successful detection results and the total number of detection results can be calculated to obtain the container network SLA parameters of the service pod to be detected. The calculation process can be found below. Figure 5 , I will not go into details here.
[0103] The cluster container network evaluation method provided in the embodiment of the present application can screen out objects closely related to the business pod from all objects in the cluster as detection targets based on the detection information of the business pod, and can reduce the number of redundant detections. And by directly embedding the detection module on the business node, it can perform detection in a way that is closer to the actual operation of the business, and reduce the resource consumption of building business containers in traditional methods. In summary, by reducing the number of redundant detections and reducing the resource consumption of building business containers, the container network evaluation method can effectively reduce the burden on the cluster network.
[0104] In some embodiments, when the detection information includes the first service level, based on the detection information, all or part of the target detection objects are selected from the cluster, and step S302 in the method may specifically include:
[0105] S3021. According to the first service level, select an object of the first service level from all objects in the cluster as a target detection object.
[0106] It should be noted that the first service level can be obtained from the network detection information configured by the cluster administrator on the control node, or can be obtained through preset network detection information. The network detection information is used to screen cluster objects participating in the container network evaluation.
[0107] In a possible implementation, the first service level may be a single service level, and the control node selects the target detection object by comparing the first service level with the service levels of all objects in the cluster.
[0108] In another possible implementation, the first service level may be a set of multiple service levels, and the control node selects the target detection object by comparing whether the service levels of all objects in the cluster are within the range of the service level set.
[0109] For example, assuming that the first business level is an important level, the SLA module queries the API Server module for the business level set of all objects in the cluster, and compares the first business level with each business level in the business level set one by one, and selects cluster objects whose business levels are greater than or equal to the first business level as target detection objects.
[0110] For another example, assuming that the first business level is a set of multiple business levels, expressed as [general level, important level], the SLA module queries the API Server module for the business level set of all objects in the cluster, and determines whether the business level of each object is within the set range of the first business level, and selects cluster objects with business levels of general level or important level as target detection objects.
[0111] In some embodiments, when the detection information includes access target information of the service pod to be detected, all or part of the target detection objects are selected from the cluster based on the detection information. Step S302 in the method may specifically include:
[0112] S3022. According to the access target information, select an object to be accessed during the operation of the service pod to be detected from all objects in the cluster as a target detection object.
[0113] Specifically, the access target information of the service pod to be detected may be an access target set, and the address information of each access target in the set is used as an identification identifier. The control node selects a target detection object from objects in the cluster according to the identification identifiers.
[0114] In some embodiments, when the detection information includes the first service level and access target information of the service pod to be detected, all or part of the target detection objects are selected from the cluster based on the detection information. Step S302 in the method may specifically include:
[0115] S3023. According to the access target information and the first service level, select, from all objects in the cluster, an object whose service level is the first service level and is to be accessed during the operation of the service pod to be detected as a target detection object.
[0116] In one possible implementation, the first service level may be compared with the service level of the cluster object to obtain a primary screening result, and then a secondary screening may be performed within the primary screening result with reference to the access target information of the service pod to be detected, and the secondary screening result may be used as the target detection object.
[0117] Another possible way is to first screen the cluster objects with reference to the access target information of the business pod to be detected to obtain a primary screening result, and then compare the first business level with the business level of the object in the primary screening result within the primary screening result to obtain a secondary screening result, and use the obtained secondary screening result as the target detection object.
[0118] In another possible implementation, cluster objects may be screened with reference to both the first service level and the access target confidence, and the obtained screening results are used as target detection objects.
[0119] Exemplarily, assume that in the detection information of a business pod to be detected, the first business level is an important level, the access target information includes access target 1, access target 2, and access target 3, and the business levels of these access targets are: general level, important level, and cluster level. First, the cluster objects are screened according to the access target information of the business pod to be detected to obtain a screening result (i.e., the above-mentioned access target 1, access target 2, and access target 3). Then, in the screening result, objects greater than or equal to the first business level are screened as target detection objects, i.e., access target 2 and access target 3.
[0120] In some embodiments, based on the detection results, a specific method for determining the SLA evaluation parameter of the service pod to be detected may be to calculate the ratio of the normal communication link in the detection results as the SLA evaluation parameter. In this case, Figure 5 As shown, step S304 in the method may specifically include:
[0121] S3041. Determine a first value and a second value based on the detection result.
[0122] The first value is the number of normal communication links, where a normal communication link is a communication link between a service pod to be detected and a target detection object whose detection result is normal. The second value is the total number of communication links between a service pod to be detected and a target detection object.
[0123] S3042: Determine an SLA evaluation parameter of the service pod to be detected based on a quotient of the first value and the second value.
[0124] It should be understood that by calculating the quotient of the first value and the second value in the detection result, the proportion of normal communication links in the detection result is obtained, and the status of the cluster container network can be intuitively understood through the proportion.
[0125] In some embodiments, in steps S3041 and S3042, calculating the quotient of the first value and the second value of the detection result can intuitively represent the status of the container network of the cluster object within the scope of the detection result. Furthermore, the detection results can also be filtered based on the business level and / or type of a specific target detection object to obtain more fine-grained detection results, for example, the detection result of the communication link between the business pod to be detected and a certain type of access target, and for another example, the detection result of the communication link between the business pod to be detected and an access target of a certain business level. By executing steps S3041-S3042 on the detection results, the container network status of the business pod to be detected and the specific target detection object is obtained, and targeted analysis and problem optimization can be performed.
[0126] The following is a detailed introduction to the service level and access target information of the cluster object in the method provided in the embodiment of the present application.
[0127] In some embodiments, the access target information included in the business pod detection information can be configured by the user when the user creates a new cluster object. In this case, in order to ensure that the new object includes the access target information, the creation information of the new object needs to be verified, such as Figure 6 As shown, before step S301 of the method, the following steps may also be included:
[0128] S601: Obtain creation information of a new object.
[0129] The newly created objects include pods or services.
[0130] Specifically, the control node may intercept the user's new object creation request in the API Server module, thereby obtaining the creation information of the new object.
[0131] S602: When the creation information includes access target information of the new object, create a new object.
[0132] S603: When the creation information does not include the access target information of the newly created object, the creation of the newly created object is rejected.
[0133] In some embodiments, the service level included in the service pod detection information may also be configured by the user when the user creates a new object. In this case, in order to ensure that the new object includes the service level of the object, the creation information of the new object needs to be verified, such as Figure 7 As shown, before step S301, the following steps may also be included:
[0134] S701. When the creation information includes the service level of the new object, create a new object.
[0135] S702: When the creation information does not include the service level of the newly created object, assign a default service level to the newly created object and create the newly created object.
[0136] In some embodiments, for objects that already exist when the cluster is created, the control node may configure the service level of the objects.
[0137] For example, Figure 8 A timing diagram of a method for creating information verification provided by an embodiment of the present application, such as Figure 8 As shown, including:
[0138] S1. Request the default pod and service of the cluster.
[0139] The SLA module sends a request to the API Server module to obtain the default pod and default service, which are objects that already exist when the cluster is initialized. The API Server receives the request and returns the default pod and default service to the SLA module.
[0140] S2. Configure pre-set service levels for default pods and services.
[0141] The SLA module configures the preset service level for the default pod and default service and sends it to the APIServer module.
[0142] S3. Get the creation information of the new object.
[0143] When the control node receives a request from a user to create a new object, the SLA module performs an integrity check on the creation information.
[0144] S4. Verify whether the access target information in the creation information exists.
[0145] S5. The access target information does not exist, and the creation of a new object is rejected.
[0146] If the verification result indicates that the access target information does not exist, creation is rejected and a prompt message indicating that the access target information does not exist is returned to the user.
[0147] S6. The access target information exists, and the access target information in the creation information is verified to be legal.
[0148] If the verification result indicates that the access target information exists, then verify whether the content of the access target information is legal, for example, whether the format of the IP address required by the newly created object is correct.
[0149] S7. The access target information is illegal and the creation of the new object is rejected.
[0150] If the verification result indicates that the access target information is illegal, the creation is rejected and a prompt message indicating that the access target information is illegal is returned to the user.
[0151] S8. The target information to be accessed is legal, and the business level in the creation information is verified to be present.
[0152] S9. If the service level does not exist, configure the default service level for the newly created object.
[0153] S10: If the service level exists or the default service level has been configured, the object is created.
[0154] If the access target contains a business level or the SLA module has configured a default level for the access target, the SLA module passes the verification and forwards the creation information to the API Server module to execute the creation of the new object.
[0155] S11. Return the creation success information.
[0156] It should be noted that step S7 or step S5 indicates that the content of the creation information is incomplete, the object creation is rejected, and a prompt message is returned to the user, so after executing step S7 and step S5, the subsequent steps will not be executed.
[0157] The above steps S601-603 and steps S701-702, by standardizing the creation information of the newly created object, can provide accurate detection targets for the subsequent detection process, reduce unnecessary detection, and make the detection more targeted.
[0158] In some embodiments, the method for determining the service pod to be detected in step S301 is as follows: Fig. 9 As shown, before step S301 of the method, the following steps may also be included:
[0159] S901. Obtain a second service level.
[0160] Specifically, the control node may obtain the second service level from the aforementioned network detection information.
[0161] S902 : Select a pod of the second service level from all service pods in the cluster as a service pod to be detected.
[0162] Specifically, the control node may query the service levels of all service pods in the cluster through the API Server module, and select a service pod that meets the second service level as the service pod to be detected.
[0163] In a possible implementation, the second service level may be a single service level, and the control node selects the service pod to be detected by comparing the second service level with the service levels of all service pods in the cluster.
[0164] In another possible implementation, the second service level may be a set of multiple service levels, and the control node selects the service pod to be detected by comparing whether the service levels of all service pods in the cluster are within the range of the service level set.
[0165] For example, assuming that the second service level is an important level, the SLA module queries the API Server module for the service level set of all service pods in the cluster, compares the second service level with each service level in the service level set one by one, and selects all service pods whose service levels are greater than or equal to the second service level as service pods to be detected.
[0166] For another example, assuming that the second service level is a set of multiple service levels, expressed as [general level, important level], the SLA module queries the API Server module for the service level set of all service pods in the cluster, and determines whether the service level of each service pod is within the set range of the second service level, and selects service pods with service levels of general level or important level as the service pods to be detected.
[0167] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed in this article, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0168] In an exemplary embodiment, the present application also provides a cluster container network evaluation device, such as Fig.10 As shown, the cluster container network evaluation device includes: an acquisition module 101 and a processing module 102.
[0169] The acquisition module 101 is used to acquire the detection information of the service pod to be detected. The detection information includes a first service level and / or access target information of the service pod to be detected, wherein the first service level is used to indicate the service level of the object to be detected in the cluster, and the access target information is used to indicate the object to be accessed during the operation of the service pod to be detected.
[0170] The processing module 102 is used to select all or part of all objects in the cluster as target detection objects based on the detection information.
[0171] The processing module 102 is further configured to detect the communication link between the service pod to be detected and the target detection object through the detection module to obtain a detection result.
[0172] The processing module 102 is further configured to determine the SLA evaluation parameters of the service pod to be detected based on the detection result.
[0173] In a possible implementation, objects in the cluster include: pods, physical nodes, or services.
[0174] In another possible implementation, the processing module 102 is specifically used to select all or part of the target detection objects from the cluster based on the detection information when the detection information includes the first business level, including: according to the first business level, selecting objects of the first business level from all objects in the cluster as target detection objects.
[0175] In another possible implementation, the processing module 102 is specifically used to select all or part of the target detection objects from the cluster based on the detection information when the detection information includes the access target information of the service pod to be detected, including: selecting, according to the access target information, the object to be accessed during the operation of the service pod to be detected from all objects in the cluster as the target detection object.
[0176] Another possible implementation method is specifically used to select all or part of the target detection objects from the cluster based on the detection information when the detection information includes the first business level and the access target information of the business pod to be detected, including: according to the access target information and the first business level, selecting the business level of the first business level from all objects in the cluster, and the object to be accessed during the operation of the business pod to be detected as the target detection object.
[0177] In another possible implementation, the acquisition module 101 is further used to: obtain creation information of a newly created object, where the newly created object includes a pod or a service. If the creation information includes access target information of the newly created object, the newly created object is created. If the creation information does not include access target information of the newly created object, the creation of the newly created object is rejected.
[0178] In another possible implementation, the acquisition module 101 is further configured to: create the new object if the creation information includes the service level of the new object; or assign a default service level to the new object and create the new object if the creation information does not include the service level of the new object.
[0179] In another possible implementation manner, the method further includes: obtaining a second service level and selecting a pod of the second service level from all service pods in the cluster as the service pod to be detected.
[0180] In another possible implementation, the processing module 102 is specifically used to determine the SLA evaluation parameter of the service pod to be detected based on the detection result, including: determining a first value and a second value based on the detection result, wherein the first value is the number of normal communication links, and the normal communication link is a communication link between the service pod to be detected and the target detection object, and the detection result of the communication link is normal. The second value is the total number of communication links between the service pod to be detected and the target detection object. Based on the quotient of the first value and the second value, the SLA evaluation parameter of the service pod to be detected is determined.
[0181] It should be noted that Fig.10 The division of modules in the example is schematic and is only a logical function division. There may be other division methods in actual implementation. For example, two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or software function modules.
[0182] In the exemplary embodiment, as described above, the computing device may be a computer or a server or other electronic device having computing and processing functions. In this case, the present application also provides an electronic device, Fig.11 The following is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device includes: a processor 10 , a memory 20 , a communication line 30 , a communication interface 40 , and an input / output interface 50 .
[0183] The processor 10 , the memory 20 , the communication interface 40 and the input / output interface 50 may be connected via a communication line 30 .
[0184] The processor 10 is used to execute the instructions stored in the memory 20 to implement the cluster container network evaluation method provided in the above embodiment of the present application. The processor 10 can be a CPU, a general-purpose processor network processor (network processor, NP), a digital signal processor (digital signal processing, DSP), a microprocessor, a microcontroller (microcontrol unit, MCU) / single-chip microcomputer / single-chip microcomputer, a programmable logic device (programmable logic device, PLD) or any combination thereof. The processor 10 can also be any other device with processing functions, such as a circuit, a device or a software module, which is not limited in the embodiments of the present application. In one example, the processor 10 may include one or more CPUs, such as Fig.11 As an optional implementation, the electronic device may include multiple processors, for example, in addition to the processor 10, it may also include a processor 60 ( Fig.11 The dashed line is used as an example.
[0185] The memory 20 is used to store instructions. For example, the instructions may be computer programs. Optionally, the memory 20 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage devices, etc., and the embodiments of the present application are not limited to this.
[0186] It should be noted that the memory 20 may exist independently of the processor 10, or may be integrated with the processor 10. The memory 20 may be located inside the electronic device, or may be located outside the electronic device, which is not limited in the embodiment of the present application.
[0187] The communication line 30 is used to transmit information between various components included in the electronic device.
[0188] The communication interface 40 is used to communicate with other devices or other communication networks. The other communication networks may be Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The communication interface 40 may be a module, a circuit, a transceiver or any device capable of achieving communication.
[0189] The input / output interface 50 is used to implement human-computer interaction between a user and an electronic device, for example, to implement action interaction or information interaction between a user and an electronic device.
[0190] Exemplarily, the input / output interface 50 may be a mouse, a keyboard, a display screen, or a touch display screen, etc. Action interaction or information interaction between a user and an electronic device may be achieved through a mouse, a keyboard, a display screen, or a touch display screen, etc.
[0191] It should be noted that Fig.11 The structure shown in the figure does not constitute a limitation on the electronic device, except Fig.11 In addition to the components shown, the electronic device may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components.
[0192] In an exemplary embodiment, the embodiment of the present application further provides a computer program product, which includes computer instructions. When the computer instructions are executed in an electronic device, the electronic device implements the method in the aforementioned method embodiment.
[0193] In an exemplary embodiment, the present application also provides a readable storage medium, which includes software instructions. When the software instructions are executed in an electronic device, the electronic device implements the method in the aforementioned method embodiment. The computer-readable storage medium can be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
[0194] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer-executable instructions. When loading and executing computer-executable instructions on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer-executable instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer-executable instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0195] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0196] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0197] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A cluster container network evaluation method, characterized in that: The method is applied to a management node in a cluster, wherein a service level agreement (SLA) module is provided in the management node, and the cluster further comprises a service node, wherein a detection module is provided in the service node, and the SLA module is communicatively connected with the detection module; The method comprises: Acquire detection information of the service pod to be detected; the detection information includes a first service level and / or access target information of the service pod to be detected; the first service level is used to indicate the service level of the object to be detected in the cluster; the access target information is used to indicate the object to be accessed during the operation of the service pod to be detected; Based on the detection information, select all or part of all objects in the cluster as target detection objects; Detecting the communication link between the service pod to be detected and the target detection object by the detection module to obtain a detection result; Based on the detection result, an SLA evaluation parameter of the service pod to be detected is determined.
2. The method according to claim 1, characterized in that The objects in the cluster include: pods, physical nodes, or services.
3. The method according to claim 1, characterized in that The detection information includes the first service level; and selecting all or part of the target detection objects from the cluster based on the detection information includes: According to the first service level, an object of the first service level is selected from all objects in the cluster as the target detection object.
4. The method according to claim 1, characterized in that The detection information includes access target information of the service pod to be detected; and selecting all or part of the target detection objects from the cluster based on the detection information includes: According to the access target information, an object to be accessed during the operation of the service pod to be detected is selected from all objects in the cluster as the target detection object.
5. The method according to claim 1, characterized in that The detection information includes the first service level and access target information of the service pod to be detected; and selecting all or part of the target detection objects from the cluster based on the detection information includes: According to the access target information and the first service level, an object having a service level of the first service level and to be accessed during the operation of the service pod to be detected is selected from all objects in the cluster as the target detection object.
6. The method according to claim 1, characterized in that The method further comprises: Obtain creation information of a newly created object; the newly created object includes a pod or a service; In a case where the creation information includes access target information of the newly created object, creating the newly created object; In a case where the creation information does not include the access target information of the newly created object, creation of the newly created object is rejected.
7. The method according to claim 6, characterized in that The method further comprises: In a case where the creation information includes the service level of the newly created object, creating the newly created object; In a case where the creation information does not include the service level of the newly created object, a default service level is assigned to the newly created object and the newly created object is created.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Obtain the second service level; A pod of the second service level is selected from all service pods in the cluster as the service pod to be detected.
9. The method according to any one of claims 1 to 7, characterized in that: The determining, based on the detection result, the SLA evaluation parameter of the service pod to be detected includes: Based on the detection result, a first value and a second value are determined; the first value is the number of normal communication links; the normal communication link is a communication link whose detection result of the communication link between the service pod to be detected and the target detection object is normal; the second value is the total number of communication links between the service pod to be detected and the target detection object; An SLA evaluation parameter of the service pod to be detected is determined based on a quotient of the first value and the second value.
10. A cluster container network evaluation device, characterized in that: The device comprises: an acquisition module and a processing module; The acquisition module is used to acquire detection information of the service pod to be detected; the detection information includes a first service level and / or access target information of the service pod to be detected; the first service level is used to indicate the service level of the object to be detected in the cluster; the access target information is used to indicate the object to be accessed during the operation of the service pod to be detected; The processing module is used to select all or part of all objects in the cluster as target detection objects based on the detection information; The processing module is further configured to select all or part of all objects in the cluster as target detection objects based on the detection information; The processing module is used to detect the communication link between the service pod to be detected and the target detection object through the detection module to obtain a detection result.
11. An electronic device, characterized in that: include: Processor and memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the electronic device implements the method according to any one of claims 1 to 9.
12. A readable storage medium, characterized in that: include: Software instructions; When the software instructions are executed in an electronic device, the electronic device implements the method according to any one of claims 1 to 9.
13. A computer program product, characterized in that include: Computer instructions; When the computer instructions are executed in an electronic device, the electronic device is enabled to implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Node fault processing method and device, equipment, medium and program product
CN114942859A
Service level target management method and system, electronic equipment and storage medium
CN116668543A
Microservice auto-scaling for achieving service level agreements
US20190102717A1
Systems and methods for intent-based orchestration of a virtualized environment
US20240086253A1
Method for aligning quality of service in mobile network and edge cloud
WO2023057794A1