Container cloud overload protection method and device, computer device and storage medium

By establishing a dynamic backup resource pool in the container and calculating the resources of the backup Pod using the dynamic allocation algorithm, the waste and low utilization rate caused by inaccurate resource allocation in the existing technology is solved, and the stability and security guarantee of the container cloud is achieved. .

CN114385342BActive Publication Date: 2024-12-24CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011111525.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-16
Publication Date
2024-12-24
Estimated Expiration
2040-10-16

AI Technical Summary

Technical Problem

The prior art is difficult to accurately divide dynamically in container resource allocation, resulting in the problem of waste of resources or low utilization.

Method used

By establishing a dynamic backup resource pool in the container, setting a dynamic allocation algorithm using the relevant data of the current Pod and the service, quantitatively calculating the resources of the backup Pod, including obtaining relevant data of the logical host and service, judging resource usage, creating and allocating The resource space of the alternate logical host.

Benefits of technology

It effectively solves the problems of container paralysis and request invalidity when resources are insufficient, improves resource utilization, and ensures the stability and security of container cloud.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114385342B_ABST
    Figure CN114385342B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a container cloud overload protection method and device, a computer device and a storage medium. The container cloud overload protection method includes: obtaining relevant data of the current logical host and the current business in the container cloud; judging whether the resource usage of the current logical host reaches the overload condition; creating a backup logical host when the resource usage of the current logical host reaches the overload condition; determining the resource space of the backup logical host according to the relevant data of the current logical host and the current business; allocating resources to the backup logical host according to the resource space of the backup logical host. The present disclosure establishes a dynamic backup resource pool in the container, and can use the relevant data of the current Pod and the business to set a dynamic allocation algorithm and quantitatively calculate the resources of the backup Pod.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of security, and in particular to a container cloud overload protection method and device, a computer device, and a storage medium. Background Art

[0002] MEC (Multi-access Edge Computing) provides services for enterprises and customers at the edge of the network, sinking computing power and storage capabilities to edge nodes, which is conducive to reducing latency and increasing transmission rate. It can improve user experience, provide third-party application integration, enhance network value, and bring great economic benefits to telecom operators.

[0003] Each business in MEC runs based on containers, and the running computing efficiency is closely related to the size of resource space. The MEC system uses K8S (Kubernetes cluster) to uniformly manage and orchestrate containers, and allocates resources in units of Pod (the smallest resource management component in Kubernetes, a logical host). Summary of the invention

[0004] The inventors discovered through research and development that the allocation of container resources in related technologies is mainly based on qualitative analysis and automatic activation, and it is impossible to accurately and dynamically allocate reasonable resources for Pods, which will cause resource waste or low utilization.

[0005] In view of at least one of the above technical problems, the present disclosure provides a container cloud overload protection method and device, a computer device and a storage medium, which establish a dynamic backup resource pool in the container, and can use the relevant data of the current Pod and the business to set a dynamic allocation algorithm and quantitatively calculate the resources of the backup Pod.

[0006] According to one aspect of the present disclosure, a container cloud overload protection method is provided, comprising:

[0007] Obtain relevant data about the current logical host and current business in the container cloud;

[0008] Determine whether the resource usage of the current logical host reaches an overload condition;

[0009] When the resource usage of the current logical host reaches an overload condition, a backup logical host is created;

[0010] Determine the resource space of the backup logical host based on the relevant data of the current logical host and the current business;

[0011] Allocate resources to the standby logical host according to the resource space of the standby logical host.

[0012] In some embodiments of the present disclosure, the data related to the current logical host and the current business include: a five-tuple parameter of the business volume, business weight, actual occupied resources of the business, the current number of logical hosts and the current logical host resource space.

[0013] In some embodiments of the present disclosure, determining the resource space of the standby logical host according to the relevant data of the current logical host and the current service includes:

[0014] Determine the business resource usage based on the business volume in the system, the business weight of each business and the actual occupied resources;

[0015] Determine the total resource space of all current logical hosts according to the number of current logical hosts and the resource space of each current logical host;

[0016] The resource space of the standby logical host is determined according to the business resource usage and the total resource space of all current logical hosts.

[0017] In some embodiments of the present disclosure, determining the service resource occupancy amount according to the service volume in the system, the service weight of each service and the actual occupied resources includes:

[0018] The product of the service weight and the actual occupied resources of each service is summed up as the service resource occupancy.

[0019] In some embodiments of the present disclosure, determining the resource space of the standby logical host according to the service resource occupancy and the total resource space of all current logical hosts includes:

[0020] The maximum value of the service resource occupancy amount and the total resource space of all current logical hosts is divided by the service volume in the system to obtain the resource space of the standby logical host.

[0021] In some embodiments of the present disclosure, obtaining data related to the current logical host and the current service in the container cloud includes:

[0022] Start the logical host to provide services. When a business enters the system, set the business weight of the business according to the user input;

[0023] Distribute different businesses to different logical hosts for execution;

[0024] Initialize the number of logical hosts and the current logical host resource space;

[0025] Statistics on the resources actually occupied by each business in the system.

[0026] In some embodiments of the present disclosure, when the resource usage of the current logical host reaches an overload condition, the container cloud overload protection method further includes:

[0027] The business request newly entering the system is stored in the buffer area, and then the step of creating a standby logical host is executed;

[0028] After allocating resources to the standby logical host, it is determined whether to start the standby logical host and include the buffer zone request in the standby logical host.

[0029] In some embodiments of the present disclosure, the container cloud overload protection method further includes:

[0030] When the standby logical host is started and the buffer zone request is included in the standby logical host, each logical host operates normally, and the relevant data of the current logical host and the current service are updated.

[0031] According to another aspect of the present disclosure, a container cloud overload protection device is provided, comprising:

[0032] The data acquisition module is used to obtain relevant data of the current logical host and current business in the container cloud;

[0033] An overload judgment module is used to judge whether the resource usage of the current logical host reaches an overload condition;

[0034] A standby host creation module is used to create a standby logical host when the resource usage of the current logical host reaches an overload condition;

[0035] A resource space determination module, used to determine the resource space of the backup logical host according to the relevant data of the current logical host and the current business;

[0036] The resource allocation module is used to allocate resources to the standby logical host according to the resource space of the standby logical host.

[0037] In some embodiments of the present disclosure, the container cloud overload protection device is used to perform operations to implement the container cloud overload protection method as described in any of the above embodiments.

[0038] According to another aspect of the present disclosure, there is provided a computer device, comprising:

[0039] A memory for storing instructions;

[0040] The processor is used to execute the instructions so that the computer device performs operations to implement the container cloud overload protection method as described in any of the above embodiments.

[0041] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the container cloud overload protection method as described in any of the above embodiments is implemented.

[0042] The present disclosure establishes a dynamic backup resource pool in a container, and can use the current Pod and business-related data to set a dynamic allocation algorithm and quantitatively calculate the resources of the backup Pod. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present disclosure 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 The diagram is a schematic diagram of some embodiments of the container cloud overload protection method disclosed in the present invention.

[0045] Figure 2 Schematic diagram of other embodiments of the container cloud overload protection method disclosed in the present invention.

[0046] Figure 3 Schematic diagram of some embodiments of the container cloud overload protection device disclosed in the present invention.

[0047] Figure 4 Schematic diagrams of some embodiments of the computer device disclosed herein. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0049] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0050] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0051] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0052] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0053] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0054] Figure 1 The diagram is a schematic diagram of some embodiments of the container cloud overload protection method disclosed in the present invention. Preferably, this embodiment can be executed by the container cloud overload protection device disclosed in the present invention, the computer device disclosed in the present invention, or the container management Manager node disclosed in the present invention. The method may include steps 11 to 15, wherein:

[0055] Step 11: Obtain relevant data of the current logical host Pod and the current business in the container cloud.

[0056] In some embodiments of the present disclosure, the data related to the current logical host and the current service may include: the service volume ω in the system, the service weight γ e , the actual resources occupied by the business β e , the current number of logical hosts τ and the current logical host resource space μ i The five-tuple parameter {ω,τ,μ i ,β e ,γ e}.

[0057] In some embodiments of the present disclosure, step 11 may include steps 111 to 114, wherein:

[0058] Step 111, K8S starts the logical host Pod to provide services. When the business enters the system, the business weight of the business is set according to the user input. e .

[0059] In some embodiments of the present disclosure, step 111 may include: when a service enters the system, a user defines a weight γ for the service. e , where γ e ∈(0,1), this value can be customized by the user according to the priority and importance of the business. The larger the weight, the higher the priority.

[0060] Step 112, distribute different services to different logical hosts for execution.

[0061] Step 113: Initialize the number of logical hosts τ and the current logical host resource space μ i .

[0062] In some embodiments of the present disclosure, step 113 may include: initializing the number of Pods τ and the number of Pod resources μ according to a YAML file (a type of configuration file) that defines the Pod resources. i .

[0063] Step 114: Count the resources actually occupied by each service in the system e .

[0064] In some embodiments of the present disclosure, the resource β e This may include CPU usage, memory usage, disk I / O usage, and network bandwidth usage.

[0065] In some embodiments of the present disclosure, step 114 may include: the node in the container includes a monitoring program, which continuously monitors the resource usage of the Pod and reports it to the Manager node for analysis. The resource usage of the Pod involves different services, so the resources occupied by each service are e The Manager node is also used for analysis and statistics. The resource usage here includes CPU usage, memory usage, disk I / O usage, and network bandwidth usage.

[0066] Step 12: determine whether the resource usage of the current logical host reaches an overload condition.

[0067] Step 13: When the resource usage of the current logical host reaches an overload condition, create a backup logical host.

[0068] Step 14: Determine the resource space of the backup logical host according to the relevant data of the current logical host and the current service.

[0069] In some embodiments of the present disclosure, step 14 may include steps 141 to 143, wherein:

[0070] Step 141, determining the service resource occupancy amount A according to the service volume in the system, the service weight of each service and the actual occupied resources.

[0071] In some embodiments of the present disclosure, step 141 may include: summing the product of the service weight and the actual occupied resources of each service as the service resource occupancy amount A.

[0072] In some embodiments of the present disclosure, step 141 may include: determining the service resource occupancy amount A according to formula (1).

[0073]

[0074] Step 142: determine the total resource space B of all current logical hosts according to the current number of logical hosts and the resource space of each current logical host.

[0075] In some embodiments of the present disclosure, step 142 may include: determining the total resource space B of all current logical hosts according to formula (2).

[0076]

[0077] Step 143: Determine the resource space k of the standby logical host according to the service resource occupancy A and the total resource space B of all current logical hosts. pod .

[0078] In some embodiments of the present disclosure, step 143 may include: dividing the maximum value of the service resource occupancy A and the total resource space B of all current logical hosts by the service volume in the system, and taking the resource space k of the standby logical host as the resource space k of the standby logical host. pod .

[0079] In some embodiments of the present disclosure, step 143 may include: determining the resource space k of the standby logical host according to formula (3): pod .

[0080]

[0081] The above embodiments of the present disclosure take into account that the space of the standby Pod should be able to realize partial or full processing of the cache area request, so the maximum value of the two calculation results should be selected as the reference value of the standby Pod resource pool.

[0082] Step 15: Allocate resources to the standby logical host according to the resource space of the standby logical host.

[0083] In some embodiments of the present disclosure, the created standby Pod may be included in the cache area request.

[0084] Based on the container cloud overload protection method provided by the above embodiment of the present disclosure, an improved idea for dynamic resource allocation of container cloud due to overload is provided. The above embodiment of the present disclosure establishes a dynamic backup resource pool in the container, uses the relevant data of the existing Pod and business to set the dynamic allocation algorithm, and quantitatively calculates the resources of the backup Pod, thereby solving the problems of container paralysis and invalid requests when resources are insufficient, and the problem of resource waste or shortage in the case of automatic allocation, and providing guarantee for the stability and security of the container cloud.

[0085] The above embodiment of the present disclosure provides a container cloud overload protection method for dynamically allocating resources. In view of the problem of insufficient container cloud resources and the defects of fixed resource allocation, a dynamic allocation algorithm for quantitative computing resources is proposed. The above embodiment of the present disclosure uses a five-tuple {ω,τ,μ} consisting of five elements, namely, the number of services, priority, amount of resources occupied, number of Pods and Pod resources in the container cloud. i ,β e ,γ e}, construct a dynamic and quantitative standby Pod resource pool to achieve flexible allocation and rational use of resources.

[0086] Figure 2 Schematic diagrams of other embodiments of the container cloud overload protection method disclosed in the present invention. Preferably, this embodiment can be executed by the container cloud overload protection device disclosed in the present invention, or the computer device disclosed in the present invention, or the container manager node disclosed in the present invention. Figure 2 Step 21 and step 22 of the embodiment are respectively Figure 1 Step 11 and step 12 of the embodiment are the same or similar. Figure 2 The method of the embodiment may include steps 21 to 24, wherein:

[0087] Step 21, obtain relevant data of the current logical host Pod and the current business in the container cloud.

[0088] In some embodiments of the present disclosure, the data related to the current logical host and the current service include: the service volume ω in the system, the service weight γ e , the actual resources occupied by the business β e , the current number of logical hosts τ and the current logical host resource space μ i The five-tuple parameter {ω,τ,μ i ,β e ,γ e}.

[0089] Step 22: determine whether the resource usage of the current logical host reaches an overload condition.

[0090] Step 23: When the resource usage of the current logical host reaches an overload condition, overload protection is performed on the container.

[0091] In some embodiments of the present disclosure, step 23 may include: if the analysis result of the Manager shows that the resource usage of the Pod has reached an overload condition, the Manager issues an instruction to perform overload protection on the container.

[0092] In some embodiments of the present disclosure, when the resource usage of the current logical host reaches an overload condition, the container cloud overload protection method further includes:

[0093] In some embodiments of the present disclosure, in step 23, the step of overload protection for the container may include steps 231 to 233, wherein:

[0094] Step 231, storing the new service request entering the system in the buffer area.

[0095] Step 232, creating a standby logical host; determining the resource space of the standby logical host according to the relevant data of the current logical host and the current service; and allocating resources to the standby logical host according to the resource space of the standby logical host.

[0096] In some embodiments of the present disclosure, step 232 may include Figure 1 Step 13-Step 15 of the embodiment.

[0097] In some embodiments of the present disclosure, step 232 may include: the overload protection enters the determination module, the Manager node uses a dynamic allocation algorithm and adopts formula (3) according to the five-tuple parameters {ω, τ, μ i ,β e ,γ e Dynamically allocate resources to backup Pods in a quantitative manner.

[0098] Step 233: after allocating resources to the standby logical host, determine whether to enable the standby logical host and include the buffer zone request in the standby logical host.

[0099] In some embodiments of the present disclosure, step 233 may include: after the Manager node allocates resources to the standby Pod, deciding whether to start the standby Pod at this time and include the cache area request in the Pod.

[0100] Step 24, when the overload protection mechanism is completed (the standby logical host is started and the buffer area request is included in the standby logical host), each logical host operates normally, and the relevant data of the current logical host and the current service are updated.

[0101] In some embodiments of the present disclosure, step 24 may include: after the dynamic resource allocation of the standby Pod, the overload protection mechanism is completed, and each Pod operates normally. i ,β e ,γ e}, providing parameter support for the next expansion of Pod resources.

[0102] In some embodiments of the present disclosure, step 24 may include: updating the five-tuple parameters {ω, τ, μ i ,β e ,γ e}, where ω, β e, γ e It should be determined and updated according to the business and business resources entering the system, τ=τ+1, μ i The resources k that should be counted towards this standby Pod pod Since each parameter is related to the services and Pods in the system, the above embodiments of the present disclosure can realize a dynamic and calculable spare Pod resource capacity.

[0103] The above-mentioned embodiments of the present disclosure improve the dynamic resource allocation method of the container cloud, and use the dynamic allocation algorithm to quantitatively calculate the resources of the standby Pod, which is reasonable and scientific. In view of the defects of qualitative analysis or fixed resource allocation in the dynamic resource allocation scheme of the container cloud, this scheme uses the number of services, service weights, service resources, number of Pods and Pod resources to form a five-tuple {ω,τ,μ i ,β e ,γ e Based on this quintuple, a dynamic allocation algorithm is proposed to calculate the resource capacity for the backup Pod, which solves the problem of insufficient resources or waste of resources caused by fixed resource allocation in the current solution, and solves the problem of insufficient scientific qualitative analysis of overload protection in other solutions.

[0104] The above embodiment of the present disclosure proposes a dynamic allocation algorithm in the determination module of the overload protection mechanism, which involves five elements: the service volume ω in the system, the service weight γ e , the actual resources occupied by the business β e , as well as the existing number of Pods τ and Pod resources μ i The above embodiments of the present disclosure use existing data to calculate the resources that should be allocated to the standby Pod, which is reasonable.

[0105] The above-mentioned embodiment of the present disclosure allocates resources to the standby Pod based on the result of quantitative calculation, which is conducive to the rational use of system resources and improves the resource utilization rate within the Pod.

[0106] The decision module of the above-mentioned embodiment of the present disclosure is an enabling "switch" of the standby Pod, which controls whether the Pod with allocated resources is turned on, and further processes the cache request as the Pod is enabled.

[0107] Figure 3 Schematic diagram of some embodiments of the container cloud overload protection device disclosed in the present invention. Figure 3 As shown, the container cloud overload protection device disclosed in the present invention may include a data acquisition module 31, an overload judgment module 32, a backup host creation module 33, a resource space determination module 34 and a resource allocation module 35, wherein:

[0108] The data acquisition module 31 is used to obtain data related to the current logical host and current business in the container cloud.

[0109] In some embodiments of the present disclosure, the data related to the current logical host and the current service may include: the service volume ω in the system, the service weight γ e , the actual resources occupied by the business β e , the current number of logical hosts τ and the current logical host resource space μ i The five-tuple parameter {ω,τ,μ i ,β e ,γ e}.

[0110] In some embodiments of the present disclosure, the service weight γ e ∈(0,1), this value can be customized by the user according to the priority and importance of the business. The larger the weight, the higher the priority.

[0111] In some embodiments of the present disclosure, the data acquisition module 31 can be used to start the logical host to provide services. When a business enters the system, the business weight of the business is set according to user input; different businesses are distributed to different logical hosts for execution; the number of logical hosts and the current logical host resource space are initialized; and the resources actually occupied by each business in the system are counted.

[0112] In some embodiments of the present disclosure, the data acquisition module 31 may be used to initialize the number of Pods τ and the number of Pod resources μ according to a Yaml file (a type of configuration file) that defines the Pod resources. i .

[0113] In some embodiments of the present disclosure, the node node in the container includes a monitoring program, which continuously monitors the resource usage of the Pod and reports it to the Manager node for analysis. The resource usage of the Pod involves different services, so the resources occupied by each service are e The Manager node is also used for analysis and statistics. The resource usage here includes CPU usage, memory usage, disk I / O usage, and network bandwidth usage.

[0114] The overload determination module 32 is used to determine whether the resource usage of the current logical host has reached an overload condition.

[0115] The standby host creation module 33 is used to create a standby logical host when the resource usage of the current logical host reaches an overload condition.

[0116] The resource space determination module 34 is used to determine the resource space of the backup logical host according to the relevant data of the current logical host and the current service.

[0117] In some embodiments of the present disclosure, the resource space determination module 34 can be used to determine the business resource occupancy based on the business volume in the system, the business weight of each business and the actual occupied resources; determine the total resource space of all current logical hosts based on the current number of logical hosts and the resource space of each current logical host; determine the resource space of the backup logical host based on the business resource occupancy and the total resource space of all current logical hosts.

[0118] In some embodiments of the present disclosure, the resource space determination module 34 may be configured to sum the product of the service weight and the actual occupied resources of each service as the service resource occupancy amount A.

[0119] In some embodiments of the present disclosure, the resource space determination module 34 may be used to determine the service resource occupancy amount A according to formula (1).

[0120] In some embodiments of the present disclosure, the resource space determination module 34 may be used to determine the total resource space B of all current logical hosts according to formula (2).

[0121] In some embodiments of the present disclosure, the resource space determination module 34 may be configured to divide the maximum value of the service resource occupancy and the total resource space of all current logical hosts by the service volume in the system as the resource space of the standby logical host.

[0122] In some embodiments of the present disclosure, the resource space determination module 34 may be used to determine the resource space k of the standby logical host according to formula (3): pod .

[0123] The resource allocation module 35 is used to allocate resources to the standby logical host according to the resource space of the standby logical host.

[0124] In some embodiments of the present disclosure, the container cloud overload protection device can also be used to store new business requests entering the system in a cache area when the resource usage of the current logical host reaches an overload condition, and then execute the operation of creating a backup logical host; after allocating resources to the backup logical host, determine whether to turn on the backup logical host and include the cache area request in the backup logical host.

[0125] In some embodiments of the present disclosure, the container cloud overload protection device can also be used to enable each logical host to operate normally and update relevant data of the current logical host and the current business when the backup logical host is turned on and the cache area request is included in the backup logical host.

[0126] In some embodiments of the present disclosure, the container cloud overload protection device can also be used to complete the overload protection mechanism after the dynamic resource allocation of the standby Pod, and each Pod can operate normally.i ,β e ,γ e}, providing parameter support for the next expansion of Pod resources.

[0127] In some embodiments of the present disclosure, the container cloud overload protection device can also be used to update the five-tuple parameter {ω, τ, μ i ,β e ,γ e}, where ω, β e , γ e It should be determined and updated according to the business and business resources entering the system, τ=τ+1, μ i The resources k that should be counted towards this standby Pod pod Since each parameter is related to the services and Pods in the system, the above embodiments of the present disclosure can realize a dynamic and calculable spare Pod resource capacity.

[0128] In some embodiments of the present disclosure, the container cloud overload protection device can be used to implement any of the above embodiments (for example Figure 1 or Figure 2 Operation of the container cloud overload protection method described in Example).

[0129] In some embodiments of the present disclosure, the container cloud overload protection device can be implemented as a container management Manager node of the present disclosure.

[0130] Based on the container cloud overload protection device provided by the above embodiment of the present disclosure, an improved idea for dynamic resource allocation of the container cloud due to overload is provided. The above embodiment of the present disclosure establishes a dynamic backup resource pool in the container, uses the relevant data of the existing Pod and business to set the dynamic allocation algorithm, and quantitatively calculates the resources of the backup Pod, thereby solving the problems of container paralysis and invalid requests when resources are insufficient, and the problem of resource waste or shortage in the case of automatic allocation, and providing guarantee for the stability and security of the container cloud.

[0131] The above embodiment of the present disclosure proposes a dynamic allocation algorithm in the determination module of the overload protection mechanism, which involves five elements: the service volume ω in the system, the service weight γ e , the actual resources occupied by the business β e , as well as the existing number of Pods τ and Pod resources μ i The above embodiments of the present disclosure use existing data to calculate the resources that should be allocated to the standby Pod, which is reasonable.

[0132] The above-mentioned embodiment of the present disclosure allocates resources to the standby Pod based on the result of quantitative calculation, which is conducive to the rational use of system resources and improves the resource utilization rate within the Pod.

[0133] The decision module of the above-mentioned embodiment of the present disclosure is an enabling "switch" of the standby Pod, which controls whether the Pod with allocated resources is turned on, and further processes the cache request as the Pod is enabled.

[0134] Figure 4 Schematic diagram of some embodiments of the computer device disclosed in the present invention. Figure 4 As shown, the computer device of the present disclosure may include a memory 41 and a processor 42, wherein:

[0135] The memory 41 is used for storing instructions.

[0136] The processor 42 is used to execute the instructions so that the computer device performs any of the above embodiments (for example Figure 1 or Figure 2 Operation of the container cloud overload protection method described in Example).

[0137] In some embodiments of the present disclosure, the computer device may be implemented as a container management Manager node of the present disclosure.

[0138] The above embodiment of the present disclosure provides a container cloud overload protection solution for dynamically allocating resources. In view of the problem of insufficient container cloud resources and the defects of fixed resource allocation, a dynamic allocation method for quantitative computing resources is proposed. The above embodiment of the present disclosure uses a five-tuple {ω,τ,μ} consisting of five elements, namely, the number of services, priority, amount of resources occupied, number of Pods and Pod resources in the container cloud. i ,β e ,γ e}, construct a dynamic and quantitative standby Pod resource pool to achieve flexible allocation and rational use of resources.

[0139] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, any of the above embodiments (for example Figure 1 or Figure 2 Container cloud overload protection method described in Example).

[0140] Based on the computer-readable storage medium provided by the above embodiment of the present disclosure, the dynamic allocation algorithm is used to quantitatively calculate the resources of the standby Pod, which is reasonable and scientific. In view of the defects of qualitative analysis or fixed allocation of resources in the dynamic resource allocation scheme of container cloud, this scheme uses the number of services, service weights, service resources, number of Pods and Pod resources to form a five-tuple {ω,τ,μ i ,β e ,γ eBased on this quintuple, a dynamic allocation algorithm is proposed to calculate the resource capacity for the backup Pod, which solves the problem of insufficient resources or waste of resources caused by fixed resource allocation in the current solution, and solves the problem of insufficient scientific qualitative analysis of overload protection in other solutions.

[0141] The container cloud overload protection device described above can be implemented as a general-purpose processor, a programmable logic controller (PLC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component or any appropriate combination thereof for performing the functions described in this application.

[0142] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0143] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0144] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A container cloud overload protection method, characterized in that: include: Obtain relevant data about the current logical host and current business in the container cloud; Determine whether the resource usage of the current logical host reaches an overload condition; When the resource usage of the current logical host reaches an overload condition, a backup logical host is created; Determine the resource space of the backup logical host based on the relevant data of the current logical host and the current business; Allocate resources to the standby logical host according to the resource space of the standby logical host; The step of determining the resource space of the standby logical host according to the relevant data of the current logical host and the current service includes: Determine the business resource usage based on the business volume in the system, the business weight of each business and the actual occupied resources; Determine the total resource space of all current logical hosts according to the number of current logical hosts and the resource space of each current logical host; The resource space of the standby logical host is determined based on the business resource occupancy and the total resource space of all current logical hosts, wherein the method of determining the resource space of the standby logical host based on the business resource occupancy and the total resource space of all current logical hosts includes: dividing the maximum value of the business resource occupancy and the total resource space of all current logical hosts by the business volume in the system, and taking the maximum value as the resource space of the standby logical host.

2. The container cloud overload protection method according to claim 1, characterized in that: The data related to the current logical host and the current service include: a five-tuple parameter of service volume, service weight, actual resources occupied by the service, the number of current logical hosts and the resource space of the current logical host in the system.

3. The container cloud overload protection method according to claim 1, characterized in that: Determining the service resource occupancy amount according to the service volume in the system, the service weight of each service and the actual occupied resources includes: The product of the service weight and the actual occupied resources of each service is summed up as the service resource occupancy.

4. The container cloud overload protection method according to any one of claims 1 to 3, characterized in that: The acquisition of data related to the current logical host and the current service in the container cloud includes: Start the logical host to provide services. When a business enters the system, the business weight of the business is set according to the user input; Distribute different businesses to different logical hosts for execution; Initialize the number of logical hosts and the current logical host resource space; Statistics on the resources actually occupied by each business in the system.

5. The container cloud overload protection method according to any one of claims 1 to 3, characterized in that: When the resource usage of the current logical host reaches an overload condition, it also includes: The business requests newly entering the system are stored in the buffer area, and then the step of creating a standby logical host is executed; After allocating resources to the standby logical host, it is determined whether to start the standby logical host and include the buffer zone request in the standby logical host.

6. The container cloud overload protection method according to claim 5, characterized in that: Also includes: When the standby logical host is started and the buffer zone request is included in the standby logical host, each logical host operates normally, and the relevant data of the current logical host and the current service are updated.

7. A container cloud overload protection device, characterized in that: include: The data acquisition module is used to obtain the relevant data of the current logical host and current business in the container cloud; An overload judgment module is used to judge whether the resource usage of the current logical host reaches an overload condition; A standby host creation module is used to create a standby logical host when the resource usage of the current logical host reaches an overload condition; A resource space determination module, used to determine the resource space of the backup logical host according to the relevant data of the current logical host and the current business; A resource allocation module, used to allocate resources to the standby logical host according to the resource space of the standby logical host; Among them, the resource space determination module is used to determine the business resource occupation amount according to the business volume in the system, the business weight of each business and the actual occupied resources; determine the total resource space of all current logical hosts according to the current number of logical hosts and the resource space of each current logical host; determine the resource space of the standby logical host according to the business resource occupation amount and the total resource space of all current logical hosts; Among them, the resource space determination module is used to determine the resource space of the backup logical host based on the business resource occupancy and the total resource space of all current logical hosts, and divide the maximum value of the business resource occupancy and the total resource space of all current logical hosts by the business volume in the system as the resource space of the backup logical host.

8. The container cloud overload protection device according to claim 7, characterized in that: The container cloud overload protection device is used to perform operations to implement the container cloud overload protection method as described in any one of claims 2-6.

9. A computer device, characterized in that: include: A memory for storing instructions; A processor is used to execute the instructions so that the computer device performs operations to implement the container cloud overload protection method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the instructions are executed by the processor, the container cloud overload protection method according to any one of claims 1 to 6 is implemented.