Capacity value calculation method and device and related equipment

By obtaining relevant information about cluster nodes and containers to calculate capacity values, the problem of large calculation errors in capacity values ​​in existing technologies is solved, and more accurate capacity values ​​and resource information are determined.

CN119583350BActive Publication Date: 2025-11-28CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411785762.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-11-28
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

Existing technologies, when calculating the cluster node capacity of distributed service nodes, ignore the constraints of the usage scenario, resulting in large errors and low accuracy in the capacity calculation results.

Method used

By obtaining cluster parameter information of cluster nodes and product specification information of containers, the capacity value is calculated, and the resource information for expansion or reduction is determined based on the capacity value, taking into account the computing resources of cluster nodes and business-related information of containers.

Benefits of technology

It improves the accuracy of capacity calculation results and enhances the accuracy of determining resource expansion or contraction information, thus solving the problem of large capacity calculation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583350B_ABST
    Figure CN119583350B_ABST
Patent Text Reader

Abstract

The application provides a capacity value calculation method and device and related equipment, and a capacity value determination method, which comprises the following steps: obtaining cluster parameter information of a cluster node and product specification information of a container corresponding to the cluster node, wherein the cluster parameter information is used to represent related information of a computing resource of the cluster node, and the product specification information is used to represent service related information of the container; calculating a capacity value according to the cluster parameter information and the product specification information; and determining expansion resource information or contraction resource information according to the capacity value. In this way, the accuracy of the calculation result of the capacity value can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of capacity management, and in particular, to a capacity value calculation method and device and related equipment. BACKGROUND

[0002] With the continuous development of communication technology, capacity management occupies an increasingly important position in people's lives. Currently, when calculating the capacity of a cluster node to which a distributed service node belongs, the limited conditions in the use scenario of the cluster node are often ignored, resulting in a large error in the calculation result of the capacity value, and thus the accuracy of the calculation result of the capacity value is low. SUMMARY

[0003] Embodiments of the present application provide a capacity value calculation method, device and related equipment to solve the problem of low accuracy of the calculation result of the capacity value.

[0004] To solve the above problem, the present application is implemented as follows:

[0005] In a first aspect, the embodiments of the present application provide a capacity value determination method, comprising:

[0006] obtaining cluster parameter information of a cluster node and product specification information of a container corresponding to the cluster node, the cluster parameter information being used to represent related information of computing resources of the cluster node, and the product specification information being used to represent business related information of the container;

[0007] calculating a capacity value according to the cluster parameter information and the product specification information;

[0008] determining expansion resource information or contraction resource information according to the capacity value.

[0009] In a second aspect, the embodiments of the present application provide a capacity value determination device, comprising:

[0010] an obtaining module configured to obtain cluster parameter information of a cluster node and product specification information of a container corresponding to the cluster node, the cluster parameter information being used to represent related information of computing resources of the cluster node, and the product specification information being used to represent business related information of the container;

[0011] a calculating module configured to calculate a capacity value according to the cluster parameter information and the product specification information;

[0012] a determining module configured to determine expansion resource information or contraction resource information according to the capacity value.

[0013] In a third aspect, the embodiments of the present application further provide an electronic device, comprising a memory, a processor, and a program stored in the memory and capable of running on the processor; the processor is configured to read the program in the memory to implement the steps in the method according to the first aspect.

[0014] In a fourth aspect, the embodiments of the present application further provide a readable storage medium for storing a program, which is executed by a processor to implement the steps in the method according to the first aspect.

[0015] In a fifth aspect, the embodiments of the present application further provide a computer program product comprising computer instructions, which are executed by a processor to implement the steps in the method according to the first aspect.

[0016] In the embodiments of the present application, the capacity value is calculated according to the cluster parameter information and the product specification information, the cluster parameter information is used to represent the related information of the computing resources of the cluster nodes, and the product specification information is used to represent the service related information of the containers, so that the accuracy of the calculation result of the capacity value can be improved, and meanwhile, when the expansion resource information or the shrink resource information is determined according to the capacity value, the accuracy of the determination result of the expansion resource information or the shrink resource information can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained according to these drawings without creative labor.

[0018] Figure 1A is one of the flowcharts of the capacity value determination method provided by the embodiments of the present application;

[0019] Figure 1A is a structural schematic diagram of a server provided by the embodiments of the present application;

[0020] Figure 2 is the second flowchart of the capacity value determination method provided by the embodiments of the present application;

[0021] Figure 3 is the third flowchart of the capacity value determination method provided by the embodiments of the present application;

[0022] Figure 4 is the fourth flowchart of the capacity value determination method provided by the embodiments of the present application;

[0023] Figure 5 is the fifth flowchart of the capacity value determination method provided by the embodiments of the present application;

[0024] Figure 6 FIG. 6 is a flowchart of a method for determining a capacity value according to an embodiment of the present application;

[0025] Figure 7 FIG. 7 is a flowchart of a method for determining a capacity value according to an embodiment of the present application;

[0026] Figure 8 FIG. 8 is a schematic structural diagram of a device for determining a capacity value according to an embodiment of the present application;

[0027] Figure 9 FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0029] The terms "first", "second", and the like in the embodiments of the present application are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device. In addition, "and / or" is used in the present application to represent at least one of the connected objects, for example, A and / or B and / or C represents 7 cases including A alone, B alone, C alone, A and B both exist, B and C both exist, A and C both exist, and A, B and C all exist.

[0030] Please refer to Figure 1A , Figure 1A FIG. 1 is a flowchart of a method for determining a capacity value according to an embodiment of the present application.

[0031] As shown in Figure 1A , the method for determining a capacity value can include the following steps:

[0032] Step 101, obtaining cluster parameter information of a cluster node and product specification information of a container corresponding to the cluster node, the cluster parameter information being used to represent related information of a computing resource of the cluster node, and the product specification information being used to represent service related information of the container.

[0033] Wherein, the embodiment of the application can be applied to an electronic device, the electronic device can be a server, the server can be a k8s server, and the cluster node can be referred to as a k8s cluster node. The server in the embodiment of the application can include a data processing module, a capacity data storage module, a capacity calculation module, a data collection and storage module, and a cluster basic resource prediction expansion module. Each step in the embodiment of the application can be completed by the above-mentioned modules in cooperation. For details, please refer to Figure 1B

[0034] It should be noted that the steps of obtaining the cluster parameter information of the cluster node and the product specification information of the container corresponding to the cluster node can be performed by the data collection and storage module.

[0035] Wherein, the specific type of cluster parameter information is not limited here. As an optional implementation, the cluster parameter information can include at least one of the following: state information, label information, taint information, total resource amount, and used resource amount. The state information can indicate whether the cluster node is schedulable and whether a pod can be generated. The total resource amount can refer to the computing resources corresponding to the Central Processing Unit (CPU) and the Memory of the cluster node. The taint information refers to information about sensitive operations that are prone to security risks. The label information can refer to various labels of the cluster node.

[0036] Wherein, the product specification information includes at least one of the following: the number of components corresponding to the container, the resource usage of the component, the number of replicas of the component, and affinity information.

[0037] Wherein, in the server, the container can exist in the form of a component, and the product specification information can also be referred to as the limitation condition information of the container.

[0038] In the embodiment of the application, the diversity and flexibility of the cluster parameter information and the product specification information are increased, so that the capacity value calculated according to the cluster parameter information and the product specification information is also more accurate.

[0039] It should be noted that the cluster parameter information and the product specification information can be obtained every preset period, i.e., the cluster parameter information can be obtained by cluster monitoring at regular intervals, and the product specification information can be obtained by product monitoring at regular intervals. The specific value of the preset period is not limited here.

[0040] As an optional implementation, the calculation of the capacity value according to the cluster parameter information and the product specification information includes:

[0041] ​According to part of the product specification information, corresponding node information in the cluster parameter information is filtered to obtain available node information conforming to the product specification information;

[0042] According to the remaining part of the product specification information, a preset model is created;

[0043] According to the preset model, an instance is simulated and created in the available node information;

[0044] According to the instance, the capacity value is determined.

[0045] According to the product specification information, the cluster parameter information is filtered to obtain available node information conforming to the product specification information, and then the remaining part of the product specification information is used to create a preset model, and the preset model is used to simulate and create an instance in the available node information; when the resources of the instance in the available node information reach the maximum usage rate, the corresponding capacity value at this time is output, and the capacity value can be the capacity value of the server. The specific flowchart can be seen from Figure 4

[0046] In the embodiment of the application, the capacity value output when the resources of the instance in the available node information reach the maximum usage rate is determined as the capacity value of the server, so that the capacity value of the server can be more consistent with the actual use, that is, the determination result of the capacity value is more accurate.

[0047] It should be noted that the embodiment of the application can be executed by a capacity calculation module.

[0048] It should be noted that in the embodiment of the application, the product specification information of the container is different when the corresponding business (which can also be referred to as service) is different, and the capacity value calculated is also different.

[0049] It should be noted that the specific process of simulating and creating an instance can be seen from Figure 5 ​The process shown, i.e. in the simulation creation process, can solve the problem that the limitation conditions in the product specification information cause the capacity control of the distributed service to be unable to be performed through various product specification information comparison (i.e. the embodiment of the application considers the influence of the cluster parameter information and the product specification information, so that the capacity value can be accurately calculated, instead of simply determining the capacity value according to the rated capacity value, because in the actual use process, there are many limitation conditions in the use scenario, which causes the actual available value of the capacity value to be unable to reach the rated capacity value), at the same time, single simulation creation can solve the problem of uncertain resource usage caused by the combination calculation of multiple component resource quantities and the non-fixed number of replicas (i.e. through single simulation creation, the calculation efficiency can be improved), and through cyclic simulation creation, the inaccuracy of the residual resource quantity divided by the specification resource usage can be solved, the problem of uncertain cluster resources caused by the non-linear reduction of the residual resource quantity and the concurrent creation can be solved.

[0050] It should be noted that, optionally, before creating an instance, the capacity value of the specification of each instance can be calculated in advance, and whether the product can be created is determined as much as possible to the numerical value of the capacity value, and the capacity value is pre-verified before the order creation is initiated. When the capacity value is greater than 0, it indicates that the specification of the current instance can be created, which effectively improves the success rate of instance creation.

[0051] Step 102, calculating a capacity value according to the cluster parameter information and the product specification information.

[0052] It should be noted that the step of calculating a capacity value according to the cluster parameter information and the product specification information can be performed by a capacity calculation module.

[0053] Wherein, the specific way of calculating a capacity value according to the cluster parameter information and the product specification information is not limited here, optionally, the weighted sum of the cluster parameter information and the product specification information can be calculated, and the above weighted sum is determined as the capacity value.

[0054] As another optional embodiment, the calculating a capacity value according to the cluster parameter information and the product specification information comprises:

[0055] standardizing the cluster parameter information to obtain cluster node standard information, and standardizing the product specification information to obtain product specification standard information;

[0056] calculating the capacity value according to the cluster node standard information and the product specification standard information.

[0057] The step of standardizing the cluster parameter information to obtain cluster node standard information and standardizing the product specification information to obtain product specification standard information can be performed by a data processing module, and the step of calculating the capacity value according to the cluster node standard information and the product specification standard information can be performed by a capacity calculation module.

[0058] In the embodiments of the present application, the cluster parameter information is standardized to obtain cluster node standard information, and the product specification information is standardized to obtain product specification standard information, so that the cluster node standard information and the product specification standard information are more in line with the standardization conditions, and when the capacity value is calculated according to the cluster node standard information and the product specification standard information, the calculation efficiency of the capacity value is higher, and the calculation result is more accurate.

[0059] It should be noted that the specific manner of standardization processing is not limited here, and the standardization processing can include at least one of the following: screening processing, verification processing, conversion processing, etc. In this way, the diversity and flexibility of standardization processing are increased.

[0060] The cluster parameter information can include state information, tag information, taint information, total resource amount and used resource amount of the cluster node, and the process of standardizing the cluster parameter information to obtain the cluster node standard information can be seen from the following:

[0061] First, it is determined whether the cluster node is available according to the state information of the cluster node in the cluster parameter information; when it is determined that the cluster node is in an available state, the remaining resource amount is calculated according to the total resource amount and the used resource amount of the cluster node; then the tag information and the taint information of the cluster node are sorted into the information structure body of the cluster node, and the specific flow chart is shown in Figure 2 Figure 2 The cluster data information refers to the cluster parameter information, and the node standard information refers to the cluster node standard information.

[0062] It should be noted that the specific data form of the cluster parameter information can be seen from Table 1.

[0063] Table 1

[0064]

[0065] The specific calculation process of finally obtaining the cluster node standard information can be seen from Table 2:

[0066] Table 2

[0067]

[0068] ​The product specification information includes the number of components corresponding to the container, the resource usage of the component, the number of copies of the component, and affinity information. The product specification information is standardized to obtain product specification standard information, which can be seen from the following table:

[0069] The server in the embodiment of the application can be a cloud database NewSQL, and the NewSQL includes components tidb, tikv, pd, and monitor. These components exist in the form of containers in the k8s cluster. The product specification information is refined according to different component numbers, component resource usage, component copy numbers, and affinity information, tolerance information, and other limiting conditions (i.e., product specification information). For example, 2 copies of 1C2GB tidb and 3 copies of 1C2GB tidb are the same specification for users, but the underlying calculation will subdivide them into two specifications. The specific flowchart can be seen from Figure 3 Figure 3 The middle specification information can refer to the product specification information, that is, the product specification information of the container can also be referred to as specification information, and the specification standard information can refer to the product specification standard information.

[0070] In this way, the corresponding specification information on the user side is standardized to obtain product specification standard information. The product specification standard information can be in a data form recognizable by the server underlying calculation, and the specification information corresponding to different distributed servers can be converted according to the process shown in Figure 3

[0071] It should be noted that the specific data form of the above specification information can be seen from Table 3.

[0072] Table 3

[0073]

[0074] The specific calculation process of the specification standard information can be seen from Table 4.

[0075] Table 4

[0076]

[0077] As an optional implementation, after the capacity value is calculated according to the cluster parameter information and the product specification information, the method further includes:

[0078] Receiving a target request of a first electronic device, the target request being used to query whether the capacity value is greater than a preset capacity value;

[0079] In a case where it is determined that the capacity value is greater than the preset capacity value, and the update interval length of the capacity value is greater than a preset length, updating the capacity value.​​

[0080] In the embodiment of the application, when it is determined that the capacity value is greater than the preset capacity value and the update interval of the capacity value is greater than the preset time length, the capacity value is updated. In this way, the capacity value can be updated in a timely manner, thereby ensuring the accuracy of the result of the capacity value.

[0081] It should be noted that the embodiment of the application can be executed by the capacity data storage module.

[0082] For example, when the external system (i.e., the first electronic device) performs a query (i.e., a query request corresponding to the target request), it is determined whether there is a capacity value of the specification corresponding to the target request. If there is no capacity value of the corresponding specification, a data processing module dedicated to data processing can be called to perform data processing on the business corresponding to the target request, and after storing the relevant information, capacity calculation (which can be executed by the data processing module) is performed. If there is a capacity value of the corresponding specification, it is determined whether the update time of the current capacity value meets the needs (i.e., whether the update interval time length is greater than the preset time length). If it does not meet the needs, capacity calculation needs to be performed again (i.e., the capacity value needs to be updated when the update interval time length is greater than the preset time length, which can be executed by the capacity calculation module). At the same time, the number of specification capacity value queries within a fixed time can be used to dynamically add or delete active capacity calculation tasks, and the capacity value can be updated at regular intervals to improve the query efficiency. The specific process can be seen in the steps shown in Figure 6 .

[0083] Step 103, determining the expansion resource information or the contraction resource information according to the capacity value.

[0084] The specific way of determining the expansion resource information or the contraction resource information according to the capacity value is not limited here. Optionally, when the capacity value is greater than the preset capacity threshold, it can be determined that expansion is needed, and the expansion resource information can be determined according to the business request received by the server; when the capacity value is less than or equal to the preset capacity threshold, it can be determined that contraction is needed, and the contraction resource information can be determined according to the business request received by the server.

[0085] It should be noted that determining the expansion resource information or the contraction resource information according to the capacity value can mainly be executed by the cluster basic resource prediction expansion module in the server, and the cluster basic resource prediction expansion module is mainly used for predicting the cluster resource usage and dynamically expanding or contracting the cluster basic resources.

[0086] The cluster basis resource prediction expansion module mainly determines the resources required for cluster expansion through two aspects. On the one hand, the capacity value of the product specification information is maintained at a certain redundancy before the cluster node expansion reaches the upper limit to calculate the corresponding to-be-expanded information (i.e., expansion resource information). On the other hand, the required cluster resources after a period of time are predicted according to the current cluster existing business usage to calculate the to-be-expanded information (i.e., expansion resource information).

[0087] The capacity basis resource prediction: the product specification capacity values reaching the sell-out threshold are first screened out, and then the expansion required resource information is calculated according to the stored product specification resources, label information, and expansion coefficient. Whether the expansion resource information needs to be updated is compared, and finally the expansion resource information (i.e., expansion resource information) is output.

[0088] The capacity basis resource prediction: N△t is calculated through Nh and Nnow, and B△t is calculated through N△t, Bh, and Bnow. Whether B△t reaches the threshold is judged. If the threshold is reached, the expansion resource information is calculated through the expansion coefficient, and finally the corresponding B2 value is output.

[0089] B△t is the required basis resource reference data in the expected time, N△t is the estimated business index in the expected time, Nh is the historical business usage resource, Nnow is the current business usage resource, Bh is the historical basis resource data, Bnow is the current basis resource data, B1 is the capacity basis resource expansion information, B2 is the basis resource expansion information, B is the expansion resource information. The specific flowchart can be seen from Figure 7 .

[0090] As another optional implementation, the capacity value includes a plurality of sub-capacity values, and the determining the expansion resource information according to the capacity value includes:

[0091] determining whether there is a target sub-capacity value in the plurality of sub-capacity values, the target sub-capacity value having a difference from a preset capacity value less than a preset threshold;

[0092] In a case where it is determined that there is the target sub-capacity value in the plurality of sub-capacity values, determining the expansion resource information according to the product specification information.

[0093] In the implementation of the present application, when the difference between the target sub-capacity value and the preset capacity value is less than the preset threshold, it indicates that the usage rate of the target sub-capacity value is high at this time, and expansion is needed at this time, and therefore the expansion resource information can be determined according to the product specification information, thereby enhancing the accuracy of the determination result of the expansion resource information.

[0094] It should be noted that the implementation of the present application can be understood as the process of the capacity basis resource prediction described above, so that the accuracy of the determination result of the expansion resource information can be improved.

[0095] In the embodiment of the present application, the capacity value is calculated according to the cluster parameter information and the product specification information, the cluster parameter information is used to represent the related information of the computing resources of the cluster node, and the product specification information is used to represent the business related information of the container, so that the accuracy of the calculation result of the capacity value can be improved, and meanwhile, when the expansion resource information or the contraction resource information is determined according to the capacity value, the accuracy of the determination result of the expansion resource information or the contraction resource information can be improved.

[0096] It should be noted that the server provided by the embodiment of the present application can solve the problems of uncertain resource usage, affinity or other rule restrictions introduced by multi-component and multi-replica of containerized distributed services; meanwhile, the combination of basic resource capacity management and container service capacity management can solve the business tide phenomenon and dynamically expand the basic resources when the basic resources are insufficient.

[0097] Referring to Figure 8 , Figure 8 is a structural diagram of the capacity value determination apparatus provided by the embodiment of the present application, the capacity value determination apparatus 800 comprises:

[0098] The acquisition module 801 is configured to acquire cluster parameter information of a cluster node and product specification information of a container corresponding to the cluster node, the cluster parameter information is used to represent related information of computing resources of the cluster node, and the product specification information is used to represent business related information of the container.

[0099] The calculation module 802 is configured to calculate a capacity value according to the cluster parameter information and the product specification information.

[0100] The determination module 803 is configured to determine expansion resource information or contraction resource information according to the capacity value.

[0101] As an optional implementation manner, the calculation module 802 comprises:

[0102] The standardization processing submodule is configured to perform standardization processing on the cluster parameter information to obtain cluster node standard information, and perform standardization processing on the product specification information to obtain product specification standard information.

[0103] The calculation submodule is configured to calculate the capacity value according to the cluster node standard information and the product specification standard information.

[0104] As an optional implementation manner, the capacity value determination apparatus 800 further comprises:

[0105] The receiving module is configured to receive a target request of a first electronic device, the target request being used to query whether the capacity value is greater than a preset capacity value.

[0106] an updating module, configured to update the capacity value in a case where it is determined that the capacity value is greater than the preset capacity value and an update interval length of the capacity value is greater than a preset length.

[0107] As an optional implementation, the capacity value includes a plurality of sub-capacity values, and the determining module 803 includes:

[0108] a first determining sub-module, configured to determine whether there is a target sub-capacity value in the plurality of sub-capacity values, the target sub-capacity value having a difference from a preset capacity value less than a preset threshold;

[0109] a second determining sub-module, configured to determine expansion resource information according to the product specification information in a case where it is determined that there is the target sub-capacity value in the plurality of sub-capacity values.

[0110] As an optional implementation, the cluster parameter information includes at least one of the following: state information, label information, taint information, total resource amount and used resource amount of the cluster node; and / or,

[0111] The product specification information includes at least one of the following: number of components corresponding to the container, resource usage amount of the component, replica number and affinity information of the component.

[0112] As an optional implementation, the calculating module 802 includes:

[0113] a screening sub-module, configured to screen corresponding node information in the cluster parameter information according to part of the product specification information to obtain available node information meeting the product specification information;

[0114] a first creating sub-module, configured to create a preset model according to the remaining part of the product specification information;

[0115] a second creating sub-module, configured to simulate and create an instance in the available node information according to the preset model;

[0116] a third determining sub-module, configured to determine the capacity value according to the instance.

[0117] The capacity value determining apparatus 800 can realize various processes of the method embodiments of the present application Figure 1A and achieve the same beneficial effects. To avoid repetition, details are not described herein.

[0118] The present application also provides an electronic device. Please refer to Figure 9The electronic device can include a processor 901, a memory 902, and a program 9021 stored on the memory 902 and executable on the processor 901. When the electronic device is a server, the program 9021, when executed by the processor 901, can implement the method of the server Figure 1A Any step in the corresponding method embodiments and achieve the same beneficial effects, hereinafter will not be repeated.

[0119] Those skilled in the art can understand that all or part of the steps of the method of the above embodiments can be completed by relevant hardware instructed by programs. The programs can be stored in a readable medium. The embodiments of the present application also provide a readable storage medium, and the readable storage medium stores computer programs. When the computer programs are executed by a processor, the above-mentioned Figure 1A Any step in the corresponding method embodiments and achieve the same beneficial effects, hereinafter will not be repeated.

[0120] The storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0121] The embodiments of the present application also provide a computer program product, including computer instructions, which, when executed by a processor, can implement the above-mentioned Figure 1A Any step in the corresponding method embodiments and achieve the same beneficial effects, hereinafter will not be repeated.

[0122] The above is the preferred embodiment of the present application, it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, can make a number of improvements and refinements, these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A method for determining capacity value, characterized in that, include: Obtain cluster parameter information of cluster nodes and product specification information of containers corresponding to cluster nodes. The cluster parameter information is used to represent the relevant information of computing resources of the cluster nodes, and the product specification information is used to represent the relevant information of business of the containers. The capacity value is calculated based on the cluster parameter information and the product specification information; Determine whether to expand or shrink resource information based on the capacity value; The cluster parameter information includes at least one of the following: the status information, tag information, taint information, total resource quantity, and used resource quantity of the cluster nodes; and / or, The product specification information includes at least one of the following: the number of components corresponding to the container, the resource usage of the components, the number of replicas of the components, and affinity information; The process of calculating the capacity value based on the cluster parameter information and the product specification information includes: Based on partial information in the product specification information, the corresponding node information in the cluster parameter information is filtered to obtain available node information that conforms to the product specification information; Create a preset model based on the remaining information in the product specifications; An instance is simulated and created from the available node information according to the preset model; The capacity value is determined based on the instance, wherein when the instance reaches the maximum utilization rate of the available node information resources, the corresponding capacity value is output, and the capacity value is the server capacity value.

2. The method according to claim 1, characterized in that, The process of calculating the capacity value based on the cluster parameter information and the product specification information includes: The cluster parameter information is standardized to obtain cluster node standard information, and the product specification information is standardized to obtain product specification standard information. The capacity value is calculated based on the cluster node standard information and the product specification standard information.

3. The method according to claim 1, characterized in that, After calculating the capacity value based on the cluster parameter information and the product specification information, the method further includes: Receive a target request from a first electronic device, the target request being used to query whether the capacity value is greater than a preset capacity value; If it is determined that the capacity value is greater than the preset capacity value and the update interval of the capacity value is greater than the preset duration, the capacity value is updated.

4. The method according to claim 1, characterized in that, The capacity value includes multiple sub-capacity values, and the step of determining expansion resource information based on the capacity value includes: Determine whether a target sub-capacity value exists among the plurality of sub-capacity values, wherein the difference between the target sub-capacity value and a preset capacity value is less than a preset threshold; If the target sub-capacity value is found among the plurality of sub-capacity values, expansion resource information is determined based on the product specification information.

5. A capacity value determination device, characterized in that, include: The acquisition module is used to acquire cluster parameter information of cluster nodes and product specification information of containers corresponding to cluster nodes. The cluster parameter information is used to represent the relevant information of computing resources of the cluster nodes, and the product specification information is used to represent the relevant information of business of the containers. The calculation module is used to calculate the capacity value based on the cluster parameter information and the product specification information; The determination module is used to determine expansion or reduction resource information based on the capacity value; The cluster parameter information includes at least one of the following: the status information, tag information, taint information, total resource quantity, and used resource quantity of the cluster nodes; and / or, The product specification information includes at least one of the following: the number of components corresponding to the container, the resource usage of the components, the number of replicas of the components, and affinity information; The computing module includes: The filtering submodule is used to filter the node information corresponding to the cluster parameter information based on some information in the product specification information to obtain available node information that meets the product specification information. The first creation submodule is used to create a preset model based on the remaining information in the product specification information; The second creation submodule is used to simulate the creation of instances in the available node information according to the preset model; The third determining submodule is used to determine the capacity value based on the instance, wherein when the instance reaches the maximum utilization rate of the resources of the available node information, it outputs the corresponding capacity value at this time, and the capacity value is the capacity value of the server.

6. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program from the memory to implement the steps in the capacity value determination method as described in any one of claims 1 to 4.

7. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the capacity value determination method as described in any one of claims 1 to 4.

8. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps in the capacity value determination method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Telescopic capacity control method and device for Kubernetes container cluster and network equipment

    CN111464355A

  • Container dynamic capacity expansion and contraction method and system applied to cloud service

    CN115309506A