A service quality control system and method
By introducing control nodes and workload nodes in Kubernetes, listening and updating resource configuration rules, and using cgroup v2 functions to achieve IO resource limitations, it solves the problem of lack of service quality control for local block storage in Kubernetes, ensuring stable application performance.
Patent Information
- Application Number
- CN202210305236.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-03-25
AI Technical Summary
The lack of service quality control function of local block storage in Kubernetes, resulting in unstable performance of high-priority applications due to low-priority applications occupying too much IO resources.
By introducing control nodes and workload nodes into the container cloud platform, we listen to the updates of target objects in the external service process, update the corresponding resource configuration rules, and use the cgroup v2 function of the Linux operating system to achieve IO resource limitations.
The service quality control of the local block storage of the container cloud platform is realized, and performance instability caused by low-priority applications is avoided.
Smart Images

Figure CN114661419B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing technology, and in particular to a service quality control system and method. Background Art
[0002] Cloud native is a method of building and running applications in a cloud environment. In actual applications, cloud native technologies such as containers, container orchestration, and microservices can be used to build fault-tolerant, easy-to-manage, and easy-to-observe cloud native applications. Different cloud native applications have different requirements for the IO Quality of Service (QoS) of block storage volumes.
[0003] Currently, cloud-native applications are mainly run on Kubernetes in a containerized manner. When cloud-native applications perform read and write operations, they will occupy the CPU, memory, IO and other resources on the node. However, Kubernetes currently only supports limiting the CPU and memory resources of containers, and support for block storage volume QoS needs to rely on storage QoS support provided by external storage vendors.
[0004] However, in addition to using external storage systems, Kubernetes also requires the use of local block storage in a large number of scenarios. In the scenario of local block storage on the container cloud platform, Kubernetes does not implement the function of local block storage QoS guarantee. When multiple cloud native applications running in Kubernetes run on the same node at the same time and share the same local storage pool, a low-priority application may occupy too many IO resources, causing high-priority applications to be affected by low-priority applications and have performance problems that are not as expected or unstable. Summary of the invention
[0005] The present invention provides a service quality control system and method to solve the problem that local storage in a container cloud platform does not support service quality control.
[0006] In a first aspect, this embodiment provides a service quality control system, including: a control node and a workload node; wherein:
[0007] The control node is used to monitor the created external service process, and when it is monitored that a first target object is updated in the external service process, update the corresponding second target object according to the first target object;
[0008] The workload node is used to access and monitor the external service process, and when it is monitored that the second target object is updated in the external service process, the resource configuration of the container associated with the second target object is updated according to the second target object.
[0009] In a second aspect, this embodiment provides a service quality control method, including:
[0010] Monitor the created external service process, and when it is monitored that a first target object is updated in the external service process, update a corresponding second target object according to the first target object;
[0011] The external service process is accessed and monitored, and when it is monitored that a second target object is updated in the external service process, a resource configuration of a container associated with the second target object is updated according to the second target object.
[0012] An embodiment of the present invention provides a service quality control system and method, the system includes: a control node and a workload node; wherein the control node is used to monitor the created external service process, and when it is monitored that the first target object is updated in the external service process, the corresponding second target object is updated according to the first target object; the workload node is used to access the external service process and monitor, and when it is monitored that the second target object is updated in the external service process, the resource configuration of the container associated with the second target object is updated according to the second target object. The system updates the resource configuration rules based on monitoring the resource configuration policy or container update; then determines the IO resource limit based on the update of the resource configuration rule, and uses the IO limit function of the cgroup of the Linux operating system itself to achieve the purpose of service quality control for the local block storage of the container cloud platform. It solves the problem that the container cloud platform can only rely on external storage to provide service quality control.
[0013] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 A schematic diagram of the structure of a service quality control system provided in Embodiment 1 of the present invention;
[0016] Figure 2 A schematic diagram of the structure of another service quality control system provided in Embodiment 2 of the present invention;
[0017] Figure 3A schematic diagram of the structure of another service quality control system provided in the second embodiment of the present invention;
[0018] Figure 4 This is a structural diagram of the service quality control system based on the Kubernetes cloud platform;
[0019] Figure 5 This is a diagram of the workflow of the main components of the service quality control system based on the Kubernetes cloud platform;
[0020] Figure 6 A flowchart of a service quality control method provided in Example 3 of the present application. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] It should be noted that currently, cloud-native applications are mainly run on Kubernetes in a containerized manner. Kubernetes is an open source application for managing containerized applications on container cluster hosts. It provides a mechanism for deploying, planning, updating, and maintaining containerized applications. The goal is to make the deployment of containerized applications simple and efficient. Persistent storage in Kubernetes relies on storage provisioning plug-ins to provide storage volumes to containers. Storage resources provided by storage provisioning plug-ins can be divided into external storage and local storage according to the source. External storage relies on storage systems outside the cluster for storage provision. Local storage relies on local disk storage resources on nodes within the cluster for provision. When applications perform read and write operations, they occupy resources such as the CPU, memory, and read / write (Input / Output, IO) on the node. Different cloud-native applications have different requirements for IO service quality assurance of block storage volumes. The current support for block storage volume QoS in the Kubernetes community relies on storage QoS support provided by external storage vendors.
[0024] Considering that in addition to using external storage systems in Kubernetes, there are also a large number of scenarios that require the use of local block storage to provide storage volumes for applications. For example: in big data scenarios, local storage is usually used to provide storage volumes for containers. However, Kubernetes currently only supports limiting the central processing unit and memory resources of containers. In the scenario of local block storage on the container cloud platform, when multiple cloud-native data applications running in Kubernetes run on the same node at the same time and share the same local storage pool, a low-priority application may occupy too many IO resources, causing high-priority applications to be affected by low priorities and have performance problems that are not as expected or unstable. Therefore, there is a need for a system that supports local block storage QoS guarantees based on the Kubernetes platform.
[0025] Embodiment 1
[0026] Figure 1 This is a schematic diagram of the structure of a service quality control system provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where service quality control is provided based on local block storage of a container cloud platform. The system can be implemented by hardware and / or software and is generally integrated in the cloud platform. Figure 1 As shown, the device includes: a control node 10 and a workload node 20. Among them:
[0027] The control node 10 is used to monitor the created external service process 11, and when it is monitored that the first target object is updated in the external service process 11, update the corresponding second target object according to the first target object.
[0028] The first target object includes a resource configuration policy or a container, and the second target object includes a resource configuration rule.
[0029] It should be noted that this embodiment provides a service quality priority hierarchical guarantee mechanism to ensure the occupation of IO resources by workloads of different priorities. The system can provide an interactive interface for users, which can include service quality categories, containers, resource configuration policies and other contents. Among them, the service quality category represents the level of service quality priority guarantee. The system administrator can pre-define the service quality category and divide the service quality levels of different priorities. Different service quality categories correspond to different storage IO bandwidths, the number of read and write operations per second (Input / Output Operations Per Second, IOPS) limits, IO weight ratios, etc. Each service quality category can be represented in the form of a data structure. Exemplary: IOMax: used to limit the maximum IO value of the container, which includes the following sub-limitation parameters: ReadBPS represents the maximum read bandwidth limit, WriteBPS represents the maximum write bandwidth limit, ReadIOPS represents the maximum read IOPS limit, and WriteIOPS represents the maximum write IOPS limit; IOWeight: used to specify the IO weight ratio of the container.
[0030] Among them, the resource configuration policy represents what kind of service quality category is assigned to what kind of container in the cluster. The data structure of the resource configuration policy needs to at least be associated with the name or label of the container, and at the same time be associated with the selected service quality category name. Users can select the corresponding service quality category to match the container's IO service quality needs on the interface provided by the system, and the system can configure the IO resource limit of the workload based on the user's matching results. When the IO resource limit configuration of the workload is completed, the IO resources will be reasonably arranged according to the configuration during actual work to ensure the normal operation of high-priority loads.
[0031] When a user makes an operation request on the interactive interface provided by the system, the control node 10 will respond to the user's operation request. The operation request may be to create or delete a container, or to create, delete or update a resource configuration policy, which is not specifically limited here. The control node 10 will update the external service process 11 corresponding to the operation request according to the operation request. When the container or resource configuration policy changes are monitored through the external service process 11, the resource configuration rules are updated according to the changes.
[0032] For example, for Kubernetes, the component Etcd stores cluster data information, and Kube-apiserver serves as the unified entry point for external service processes 11. Any operation on data must go through Kube-apiserver. The control node 10 monitors the creation, update, and deletion events of resources (such as container pods, etc.) in Kube-apiserver through the list-watch mechanism, and calls the corresponding event processing function for the event type.
[0033] It can be known that the events monitored by the control node 10 may be operations such as container or resource configuration policy creation, deletion, etc., and different update events correspond to different situations of updating resource configuration rules. Exemplarily, if the update event monitored is the addition of a resource configuration policy, the control node will create a custom resource with an associated resource configuration rule for all existing containers matched by the resource configuration policy. If the update event monitored is the deletion of a container, the resource configuration rule associated with the container will be deleted.
[0034] It should be noted that the control node 10 continuously monitors the external service process 11, which can also be understood as being set in advance and working continuously. Whenever the resource configuration strategy or container in the external service process 11 changes, the control node can monitor the change and then perform subsequent operations.
[0035] The workload node 20 is used to access and monitor the external service process 11. When it is monitored that the second target object is updated in the external service process 11, the resource configuration of the container associated with the second target object is updated according to the second target object.
[0036] The resource configuration rule is used to define the resource configuration rule for a specific container. The spatial naming and name of the resource configuration rule are the same as the container name information it acts on. Exemplarily, the data structure of the resource configuration rule can be represented as follows: StorageQosPolicy Name: used to specify the resource configuration policy name corresponding to the resource configuration rule, StorageQosClass Name: used to specify the service quality class name corresponding to the resource configuration rule.
[0037] It should be noted that the workload node 20 continuously monitors the external service process 11, which can also be understood as being set in advance and working continuously. Whenever the resource configuration rules in the external service process 11 change, the control node can monitor the changes and then perform subsequent operations. Since the workload node 20 has been monitoring the external service process 11, when the control node 10 updates the resource configuration rules, the workload node 20 can monitor the changes in the resource configuration rules and can update the resource configuration corresponding to the associated container according to the resource configuration rules.
[0038] It is clear that Pod is the smallest / simplest basic unit deployed or managed by Kubernetes. A Pod represents a container group running on the cluster. The storage volume (PersistentVolume, PV) of the persistent storage type in Kubernetes is mounted in the Pod for business load to read and write. Since local storage has no service quality control, the IO limitation capability based on the control group (cgroup) v2 of the Linux operating system kernel is introduced here to implement the IO limitation of container block storage volumes in Kubernetes. Of course, other data path (Data Path) technologies can also be used to limit the IO of storage volumes. Among them, cgroup v2 is the v2 version of the control group in the Linux kernel, which provides resource limitation capabilities.
[0039] It can be known that the events monitored by the control node 10 may be operations such as creation and deletion of resource configuration rules, and different update events correspond to different resource configurations of updated associated containers. When the workload node 20 monitors changes in resource configuration rules, the workload node 20 directly interacts with the cgroup (v2) module of the Linux kernel through the engine on it, and converts the IO bandwidth, IOPS limit and IO weight limit configuration in the resource configuration rules into the IO limit configuration in the cgroup (v2), sets it to the cgroup (v2), and finally realizes the IO limit of the container application on one or more block storage volumes by using the function of cgroup v2. This method only relies on the cgroup v2 function provided by the Linux operating system.
[0040] An embodiment of the present invention provides a service quality control system, which includes: a control node and a workload node; wherein the control node is used to monitor the created external service process, and when it is monitored that the first target object is updated in the external service process, the corresponding second target object is updated according to the first target object; the workload node is used to access the external service process and monitor, and when it is monitored that the second target object is updated in the external service process, the resource configuration of the container associated with the second target object is updated according to the second target object. The system updates the resource configuration rules based on monitoring the resource configuration policy or container update; then determines the IO resource limit based on the update of the resource configuration rule, and uses the IO limit function of the cgroup of the Linux operating system itself to achieve the purpose of service quality control of the local block storage of the container cloud platform. It solves the problem that the container cloud platform can only rely on external storage to provide service quality control.
[0041] Embodiment 2
[0042] Figure 2 This is a structural diagram of another service quality control system provided in Example 2 of the present invention. This embodiment is optimized based on the above-mentioned Example 1. In this embodiment, the control node 10 can be specifically optimized to include: a control panel 12 and a core controller 13; the workload node 20 can be specifically optimized to include: a rule controller 21 and a setting engine 22.
[0043] The control panel 12 is used to provide a visualization interface to the user and receive a resource update request from the user in the visualization interface; the core controller 13 is used to update the first target object based on the resource update request and update the second target object according to the first target object.
[0044] Among them, the control panel 12 can provide users with a visual interface for interaction between users and the system. The visual interface contains at least three parts, including containers, service quality categories and resource configuration policies. The container information may include container names, container labels, etc.; the service quality category may include the service quality level and the corresponding IO bandwidth, IOPS limit and IO weight limit; the resource configuration policy includes the configuration of the container and the service quality category. Users can set the service quality category and resource configuration policy in the visual interface to configure the IO restrictions for one or more containers, thereby forming a resource configuration policy. It can be known that the user's operation in the visual interface can be to create or delete a container, or to create, delete or update a resource configuration policy. The user's operation in the visual interface will generate a resource update request.
[0045] When the control panel 12 receives a resource update request, the core controller 13 responds to the resource update request, parses the resource update request, and updates the resource configuration rules according to the resource configuration policy or container update when it detects that the resource configuration policy or container in the external service process 11 is updated.
[0046] The resource configuration policy is used to define what kind of service quality category is assigned to what kind of container in the cluster. Exemplarily, the data structure of the resource configuration policy can be represented as follows: StorageQosClass Name: used to specify the name of the service quality category used by the resource configuration policy, Label selector: used to match one or more Pod Labels, Pod Name selector: used to match Pods with corresponding names, and other methods such as regular expressions can be used.
[0047] The rule controller 21 is used to determine a corresponding target restriction rule based on an update event of the second target object when receiving a second target object update notification sent by the external service process 11 .
[0048] Among them, the target restriction rule is used to define the Cgroup (v2) IO restriction configuration for a storage volume of the container. The configuration engine sets the cgroup (v2) IO restriction of the container according to this configuration. Exemplarily, the data structure of the target restriction rule is as follows: PodUID: represents the user identification (UID) of the container in Kubernetes; LinuxDeviceNumber: represents the device number in Linux, which consists of the primary and secondary device numbers and uniquely identifies a Linux device; CSIDriver: represents the CSI driver identifier of the Pod PV; Name: represents the name of the Pod PV. IOMax: used to limit the maximum IO value of the container, which includes the following sub-restriction parameters: ReadBPS: represents the maximum read bandwidth limit; WriteBPS: represents the maximum write bandwidth limit; ReadIOPS: represents the maximum read IOPS limit; WriteIOPS: represents the maximum write IOPS limit. IOWeight: used to specify the IO weight ratio of the container.
[0049] When a resource configuration rule update notification sent by an external service process is received, the corresponding target restriction rule can be determined based on the update event of the resource configuration rule. Among them, the update of the resource configuration rule may be the creation of a new resource configuration rule, or it may be the update of the content in the resource configuration rule. If it is a newly created resource configuration rule, it is necessary to convert the resource restrictions involving the container in the resource configuration rule into target restriction rules and update them to the configuration file. If the content in the resource configuration rule is updated, it is necessary to convert the resource restrictions involving the container in the updated content into target restriction rules. Specifically, you can first use the category name and associated container recorded in the resource configuration rule; then determine the IO restriction information corresponding to the category name and determine the storage volume mounted on the associated container; finally, update each storage volume and the IO restriction information to the target restriction rule.
[0050] The setting engine 22 is used to convert the target restriction rules into target control parameters and write the target control parameters into a configuration file to implement the quality of service control of each storage volume by the container.
[0051] Specifically, the setting engine is built into the node agent and runs on each workload node in the cluster. When a target restriction rule is received, the target restriction rule needs to be converted into a corresponding identifiable target control parameter, which is the container's IO resource restriction for each storage volume. Based on the container's keywords in the target restriction rule, such as the container's identification number, the configuration file corresponding to the container can be determined; the target restriction rule is converted into a target control parameter that can be recorded in the configuration file; and the corresponding control parameters are written into the corresponding configuration file. Based on the IO resource restrictions recorded in the configuration file, the IO resources of each load can be reasonably allocated to achieve the container's service quality control for each storage volume.
[0052] Figure 3 A structural diagram of another service quality control system provided for Embodiment 2 of the present invention, as an optional embodiment of the above embodiment, this embodiment, on the basis of the above embodiment, concretizes the core controller 13, which may include: a manager 131, for parsing the resource update request fed back by the control panel 12, and updating the first target object in the external service process 11 based on the parsing result; a policy controller 132, for updating the second target object on the external service process 11 based on the update event of the first target object when receiving the first target object update notification sent by the external service process 11.
[0053] Among them, the manager 131 provides a REST application programming interface (Application Programming Interface, API) as an external service process to respond to the user's resource update request on the control panel 12 to trigger the working logic of the policy controller. Specifically, the resource update request may be a request to add / delete / update resource configuration policy or add / delete container. The manager 131 will parse the received request and update the first target object according to the parsed result. When the first target object is updated, the policy controller 132 will be notified of the update of the first target object through the inform mechanism. When the policy controller 132 receives the update notification of the first target object, it updates the second target object according to the update event of the first target object.
[0054] It is understandable that the update event of the first target object may include adding / deleting / updating resource configuration policies or adding / deleting containers. The specific content of the update event of the first target object is determined by the resource update request. Similarly, the update content of the second target object is determined by the update status of the first target object. Exemplarily, if the user deletes a container on the control panel 12, the control panel 12 will generate a request to delete a container and feedback, the manager 131 responds to the request and deletes the custom resources of the container based on the request; when the policy controller 132 monitors the deletion of the custom resources of the container, it will delete the resource configuration rules associated with the container.
[0055] Furthermore, the policy controller 132 is specifically configured to:
[0056] a1) If the update event is a new resource configuration policy, then the new resource configuration policy is associated with each container, and resource configuration rules associated with each container are created respectively.
[0057] Specifically, if there is a newly added resource configuration policy, all created containers associated with the newly added policy can be obtained according to the newly added resource configuration policy, and an associated resource configuration rule is created for each associated container.
[0058] Preferably, when performing container matching, the container name may be directly matched first, and the specific container name in the same namespace as the resource configuration policy may be filtered and matched; then the tag field may be matched, and the cached container resources may be filtered by the tag.
[0059] b1) If the update event is a newly added container, determine whether the container matches the resource configuration policy. If so, create a resource configuration rule associated with the container.
[0060] Specifically, whenever a new container is created, it is determined whether the container matches the selection criteria, and if so, an associated resource configuration rule is created for the container.
[0061] c1) If the update event is to delete a resource configuration policy or a container, then the resource configuration rules associated with the resource configuration policy or the resource configuration rules associated with the container are deleted.
[0062] Specifically, if a resource configuration policy or container is deleted, the associated resource configuration rules will be deleted.
[0063] d1) If the update event is a change in the content of the service resource configuration policy, the corresponding content in the resource configuration rules associated with the resource configuration policy is modified according to the changed content.
[0064] Specifically, when the content of the resource configuration policy is updated, for example, the resource configuration category name (StorageQoSClassName) in the resource configuration policy is modified, the resource configuration category name (StorageQoSClassName) in all associated resource configuration rules will also be updated.
[0065] As an optional embodiment of the above embodiment, this embodiment is based on the above embodiment, and the rule controller 21 is specifically used for: when receiving a second target object update notification sent by the external service process 11, if the update status of the second target object is to create a resource configuration rule or update the resource configuration rule content, then based on the configuration information recorded in the resource configuration rule, determine the target restriction rule.
[0066] In this embodiment, when a resource configuration rule update notification is received from the external service process 11, the resource configuration rule update may be to delete the resource configuration rules related to the container or resource configuration policy, or to create a new resource configuration rule or change the content in the resource configuration rule. Among them, for deleting the resource configuration rule, the resource configuration can be deleted directly. For creating or updating the resource configuration rule, it involves the need to update the IO restriction information of the container. Therefore, it is necessary to determine the correspondence between the updated IO restriction information and the storage volume mounted on the associated container based on the configuration information recorded in the resource configuration rule, and add the corresponding content to the restriction rule to form the target restriction rule.
[0067] Further, the step of the rule controller 21 determining the target restriction rule based on the configuration information recorded in the second target object includes:
[0068] a2) Determine the category name and associated container recorded in the resource configuration rule.
[0069] Specifically, the category name is recorded in the resource configuration rule, and the namespace and name of the resource configuration rule are the same as the container name it acts on, so the category name and the associated container can be determined.
[0070] b2) Based on the category name and in combination with a preset category information table, determine the IO restriction information corresponding to the category name.
[0071] The category information table records the category name and the IO restriction information corresponding to the category name. Specifically, according to the category name determined in the above steps, the IO restriction information corresponding to the category name can be determined. The determined IO restriction information is the IO restriction information that needs to be set for the resource configuration rule associated container.
[0072] c2) Based on the attribute information of the associated container, determine the storage volume mounted by the associated container.
[0073] Specifically, the determined IO restriction information needs to be set to the storage volume mounted by the associated container, so the storage volume mounted by the associated container needs to be determined. The attribute information of the associated container may be a namespace and a name. All storage volumes mounted by the container can be searched according to the namespace and name of the container.
[0074] d2) Traverse each storage volume and update each storage volume and IO restriction information into the target restriction rule.
[0075] Specifically, all storage volumes mounted on this container are traversed, and the information of each storage volume and the IO restriction information are filled into the target restriction rule.
[0076] Preferably, the setting engine 22 is specifically used for:
[0077] a3) According to the identification number of the container in the target restriction rule, traverse the container configuration file directory to determine the target configuration file of the container.
[0078] It is understandable that the setting engine 22 needs to set the IO limit of the container for the mounted storage volume according to the determined target restriction rules, that is, update the IO restriction information to the storage file corresponding to the replicated volume. Therefore, it is necessary to determine the storage file of the container first. Exemplarily, in the / sys / fs / cgroup (default cgroupfs mount point) directory of the node where the WarpStor Agent is located, the PodUID field in the data structure of the resource configuration rule is used as the keyword to traverse the directory names of all podcgroups to find the cgroup path of this pod on the host. Among them, the IO bandwidth file can be named io.max file, and the IO weight file can be named io.weight file.
[0079] b3) Convert the target restriction rules into target control parameters.
[0080] Exemplarily, the IOMax and IOWeight fields in the target restriction rule are converted into IO restriction control parameters of cgroup (v2).
[0081] c3) Write the target control parameters into the target configuration file.
[0082] Exemplarily, it is written into the io.max and io.weight files under this pod cgroup to implement the setting of IO restriction rules.
[0083] In order to more clearly illustrate the embodiment of the present invention, a service quality control system is constructed based on the Kubernetes cloud platform. Figure 4The system is a service quality control system based on the Kubernetes cloud platform, wherein the system includes a Master 10' (master control node) and a Node 20' (workload node). The Master 10' includes: a WarpStor UI 12' (control panel) and a WarpStor Controller 13' (core controller); the WarpStor Controller 13' includes: a WarpStorManager 131' (manager) and a StorageQosPolicyController 132' (policy controller). The Node 20' includes a WarpStor Agent 21' (node agent); a PodStorageQosRule Controller 211' (rule controller) and a StorageQosRuleEngine 212' (setting engine) are built into the WarpStor Agent 21' and run on the Node 20'. Figure 4 As can be seen, administrators can create resource configuration categories in advance, and all changes to containers, resource configuration policies, and resource configuration rules are monitored through Kube-apiserver'11. The service quality control system based on the Kubernetes cloud platform can achieve the service quality control function of local block storage.
[0084] Figure 5 The following is a workflow diagram of the main components of the service quality control system based on the Kubernetes cloud platform. Figure 5As shown in the figure, StorageQosPolicyController is the resource controller of the resource configuration policy. When the user operates the resource configuration policy or container, it monitors the changes of the resource configuration policy or container such as creation, update, and deletion through the Kube-apiserver in the List / Watch cluster, and dynamically updates (creates, updates, and deletes) the PodStorageQosRule corresponding to the resource configuration policy in real time; PodStorageQosRule Controller is the resource controller of the resource configuration rule. It monitors the changes of the resource configuration rule such as creation, update, and deletion through the Kube-apiserver in the List / Watch cluster, and dynamically calls StorageQosRule Engine in real time to update (creates, updates, and deletes) the IO restrictions in the cgroup (v2) of the container to which the resource configuration rule belongs; StorageQosRuleEngine is the setting engine of the resource configuration rule on the node, which directly interacts with the cgroup (v2) module of the Linux kernel, converts the IOMax (IO bandwidth, IOPS) restriction and IOWeight restriction configuration in the resource configuration rule into the IO restriction configuration in the cgroup (v2), sets it in the cgroup (v2), and uses the cgroup The v2 function ultimately implements the IO restrictions of container applications on one or more block storage devices. This method only relies on the cgroup v2 function provided by the Linux operating system.
[0085] The embodiment of the present invention mainly targets the local block storage scenario of the container cloud platform, and limits the IO of the Pod to the block storage volume based on the IO limitation capability provided by the Linux kernel Cgroup v2. On the basis of realizing the container IO limitation, the Kubernetes custom resource mechanism is used to manage and save the storage QoS configuration, providing users with the ability to divide the storage QoS priority according to their needs, and the storage QoS priority is provided to users in the form of custom resources for setting and access.
[0086] Embodiment 3
[0087] Figure 6 This is a flow chart of a service quality control method provided in Example 3 of the present application. The method is applicable to the case where service quality control is provided based on local block storage of a container cloud platform. The method can be executed by the service quality control system provided in the above embodiment, which can be implemented by hardware and / or software and is generally integrated in the cloud platform. Figure 6 As shown, a service quality control method provided in this embodiment 3 specifically includes the following steps:
[0088] S301: Monitor the created external service process, and when it is monitored that a first target object is updated in the external service process, update the corresponding second target object according to the first target object.
[0089] Among them, the first target object includes a resource configuration policy or a container, and the second target object includes a resource configuration rule. When a user makes an operation request on the interactive interface provided by the system, the control node 10 will respond to the user's operation request. The operation request may be to create or delete a container, or to create, delete or update a resource configuration policy. There is no specific limitation here. The control node 10 will update the external service process corresponding to the operation request according to the operation request. When the container or resource configuration policy changes are monitored through the external service process, the resource configuration rules are updated according to the changes.
[0090] S302: Access the external service process and monitor it. When it is monitored that the second target object is updated in the external service process, update the resource configuration of the container associated with the second target object according to the second target object.
[0091] The monitoring of external service processes is continuous, which can also be understood as being set in advance and working continuously. Whenever the resource configuration rules in the external service process change, you can monitor the changes and then perform subsequent operations. Since the external service process is always monitored, when the resource configuration rules are updated, the changes in the resource configuration rules can be monitored, and the resource configuration corresponding to the associated container can be updated according to the resource configuration rules.
[0092] The service quality control method provided in the embodiment of the present invention can be executed by the service quality control system provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0093] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0094] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A service quality control system, characterized in that: include: control nodes and workload nodes; where, The control node is used to monitor the created external service process, and when it is monitored that a first target object is updated in the external service process, update the corresponding second target object according to the first target object; The workload node is used to access and monitor the external service process, and when monitoring that a second target object is updated in the external service process, update the resource configuration of the container associated with the second target object according to the second target object; the first target object includes a resource configuration policy or container, and the second target object includes a resource configuration rule; The resource configuration strategy represents the service quality category specified for the container in the cluster; the resource configuration rule is used to define the resource configuration rule for a specific container; the service quality priority classification guarantee mechanism is used to ensure the occupation of IO resources by workloads of different priorities; The workload node includes: A rule controller, configured to determine a corresponding target restriction rule based on an update event of the second target object when receiving a second target object update notification sent by the external service process; The setting engine is used to convert the target restriction rules into target control parameters, and write the target control parameters into a configuration file to implement the service quality control of each storage volume by the container.
2. The system according to claim 1, characterized in that The control node comprises: A control panel, used to provide a visual interface to the user and receive a resource update request from the user in the visual interface; The core controller is used to update the first target object based on the resource update request, and update the second target object according to the first target object.
3. The system according to claim 2, characterized in that The core controller comprises: A manager, configured to parse the resource update request fed back by the control panel, and update the first target object in the external service process based on the parsing result; The policy controller is configured to update the second target object on the external service process based on an update event of the first target object when receiving a first target object update notification sent by the external service process.
4. The system according to claim 3, characterized in that The policy controller is specifically used for: If the update event is a newly added resource configuration policy, then the newly added resource configuration policy is associated with each container, and resource configuration rules associated with each container are created respectively; If the update event is a newly added container, determine whether the container matches the resource configuration policy, and if so, create a resource configuration rule associated with the container; If the update event is to delete a resource configuration policy or a container, then deleting the resource configuration rules associated with the resource configuration policy or the resource configuration rules associated with the container; If the update event is a change in the content of a resource configuration policy, the corresponding content in the resource configuration rule associated with the resource configuration policy is modified according to the changed content.
5. The system according to claim 1, characterized in that The rule controller is specifically used for: When receiving the second target object update notification sent by the external service process, if the update status of the second target object is to create a resource configuration rule or update the content of the resource configuration rule, the target restriction rule is determined based on the configuration information recorded in the resource configuration rule.
6. The system according to claim 5, characterized in that The step of the rule controller determining the target restriction rule based on the configuration information recorded in the second target object includes: Determine the category name and associated container recorded in the resource configuration rule; Based on the category name, in combination with a preset category information table, determining IO restriction information corresponding to the category name; Determining a storage volume mounted on the associated container based on the attribute information of the associated container; Each of the storage volumes is traversed, and each of the storage volumes and the IO restriction information is updated into the target restriction rule.
7. The system according to claim 1, characterized in that The setting engine is specifically used for: According to the identification number of the container in the target restriction rule, traverse the container configuration file directory to determine the target configuration file of the container; converting the target restriction rules into target control parameters; The target control parameters are written into the target configuration file.
8. A method for controlling service quality, characterized in that: include: Monitor the created external service process, and when it is monitored that a first target object is updated in the external service process, update the corresponding second target object according to the first target object; Accessing the external service process and monitoring it, and when monitoring that a second target object is updated in the external service process, updating the resource configuration of the container associated with the second target object according to the second target object; The first target object includes a resource configuration policy or a container, and the second target object includes a resource configuration rule; The resource configuration strategy represents the service quality category specified for the container in the cluster; the resource configuration rule is used to define the resource configuration rule of a specific container; the service quality priority classification guarantee mechanism is used to ensure the occupation of IO resources by workloads of different priorities; The service quality control method comprises: When receiving a second target object update notification sent by the external service process, determining a corresponding target restriction rule based on an update event of the second target object; The target restriction rules are converted into target control parameters, and the target control parameters are written into a configuration file to implement quality of service control of each storage volume by the container.
Citation Information
Patent Citations
Computing resource configuration scheduling method, device and system
CN113037794A
Information processing method and device and storage medium
CN113268308A
Network QoS (Quality of Service) configuration method, equipment and a medium
CN113709810A