Capacity value calculation method and device and related equipment
By obtaining relevant information of cluster nodes and containers, calculating capacity values and determining resource information, the problem of low capacity calculation accuracy is solved and the accuracy of resource management is improved.
Patent Information
- Application Number
- CN202411785762.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-12-06
AI Technical Summary
When calculating the capacity of the cluster node to which the distributed service node belongs, the restricted conditions in the use scenario are often ignored, resulting in low accuracy of the calculation results of the capacity value.
By obtaining the cluster parameter information of the cluster node and the product specification information of the container, the capacity value is calculated, and the capacity expansion or capacity reduction resource information is determined based on the capacity value.
The accuracy of capacity value calculation results is improved, and the accuracy of capacity expansion or capacity reduction resource information determination results are enhanced.
Smart Images

Figure CN119583350A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of capacity management technology, and in particular, to a capacity value calculation method, device and related equipment. Background Art
[0002] With the continuous development of communication technology, capacity management has played an increasingly important role in people's lives. Currently, when calculating the capacity of cluster nodes to which distributed service nodes belong, the constraints in the usage scenarios of cluster nodes are often ignored, resulting in large errors in the calculation results of capacity values, which in turn leads to low accuracy of the calculation results of capacity values. Summary of the invention
[0003] The embodiments of the present application provide a capacity value calculation method, apparatus and related equipment to solve the problem of low accuracy of the calculation result of the capacity value.
[0004] To solve the above problems, this application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for determining a capacity value, including:
[0006] Acquire cluster parameter information of the cluster node and product specification information of the container corresponding to the cluster node, wherein the cluster parameter information is used to represent relevant information of the computing resources of the cluster node, and the product specification information is used to represent business-related information of the container;
[0007] Calculate the capacity value according to the cluster parameter information and the product specification information;
[0008] The capacity expansion resource information or the capacity reduction resource information is determined according to the capacity value.
[0009] In a second aspect, an embodiment of the present application provides a capacity value determination device, including:
[0010] An acquisition module, used to acquire 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 relevant information of computing resources of the cluster node, and the product specification information is used to represent business-related information of the container;
[0011] A calculation module, used for calculating a capacity value according to the cluster parameter information and the product specification information;
[0012] A determination module is used to determine capacity expansion resource information or capacity reduction resource information according to the capacity value.
[0013] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the method described in the first aspect above.
[0014] In a fourth aspect, an embodiment of the present application further provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the method described in the first aspect above.
[0015] In a fifth aspect, an embodiment of the present application further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps in the method described in the first aspect above.
[0016] In an embodiment of the present application, the capacity value is calculated based on cluster parameter information and product specification information, and the cluster parameter information is used to represent relevant information of the computing resources of the cluster nodes, and the product specification information is used to represent business-related information of the container. In this way, the accuracy of the calculation result of the capacity value can be improved. At the same time, when determining the expansion resource information or the reduction resource information based on the capacity value, the accuracy of the determination result of the expansion resource information or the reduction resource information can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1A This is one of the flow charts of the method for determining the capacity value provided in the embodiment of the present application;
[0019] Figure 1B It is a schematic diagram of the structure of the server provided in the embodiment of the present application;
[0020] Figure 2 This is the second flow chart of the method for determining the capacity value provided in the embodiment of the present application;
[0021] Figure 3 This is the third flow chart of the capacity value determination method provided in the embodiment of the present application;
[0022] Figure 4 This is the fourth flow chart of the capacity value determination method provided in the embodiment of the present application;
[0023] Figure 5 This is the fifth flow chart of the capacity value determination method provided in the embodiment of the present application;
[0024] Figure 6 This is the sixth flow chart of the method for determining the capacity value provided in the embodiment of the present application;
[0025] Figure 7 This is the seventh flow chart of the capacity value determination method provided in the embodiment of the present application;
[0026] Figure 8 is a schematic diagram of the structure of a capacity value determination device provided in an embodiment of the present application;
[0027] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The terms "first", "second" etc. in the embodiments of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of connected objects, such as A and / or B and / or C, representing the inclusion of separate A, separate B, separate C, and A and B all exist, B and C all exist, A and C all exist, and 7 situations in which A, B and C all exist.
[0030] See also Figure 1A , Figure 1A It is a flow chart of the capacity value determination method provided in the embodiment of the present application.
[0031] like Figure 1A As shown, the capacity value determination method may include the following steps:
[0032] Step 101: Obtain 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 relevant information of computing resources of the cluster node, and the product specification information is used to represent business-related information of the container.
[0033] The embodiment of the present application can be applied to an electronic device, and the electronic device can be a server, and the server can be a k8s server, then the cluster node can be called a k8s cluster node. The server in the embodiment of the present application can include a data processing module, a capacity data storage module, a capacity calculation module, a data acquisition storage module, and a cluster basic resource prediction and expansion module. Each step in the embodiment of the present application can be completed by the collaboration of the above modules. For details, please refer to Figure 1B shown.
[0034] It should be noted that the step of acquiring the cluster parameter information of the cluster nodes and the product specification information of the containers corresponding to the cluster nodes may be executed by the data acquisition and storage module.
[0035] Among them, the specific type of cluster parameter information is not limited here. As an optional implementation, the cluster parameter information may include at least one of the following: status information, label information, taint information, total resources, and used resources. Among them, the status information may indicate whether the cluster node is schedulable and whether a pod can be generated, and the total resources may refer to the computing resources corresponding to the central processing unit (CPU) and memory (Memory) of the cluster node. The taint information refers to the information of sensitive operations that are prone to security risks. The label information may refer to various labels of the cluster nodes.
[0036] 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 copies of the components, and affinity information.
[0037] In the server, the container may exist in the form of a component, and the product specification information may also be referred to as the restriction condition information of the container.
[0038] In the implementation manner of the present application, the diversity and flexibility of cluster parameter information and product specification information are increased, so that the capacity value calculated according to the cluster parameter information and product specification information is also more accurate.
[0039] It should be noted that cluster parameter information and product specification information can be obtained at preset intervals, that is, cluster parameter information can be obtained by cluster monitoring timing, and product specification information can be obtained by product monitoring timing. The specific value of the preset period is not limited here.
[0040] As an optional implementation manner, the calculating the capacity value according to the cluster parameter information and the product specification information includes:
[0041] Filter the corresponding node information in the cluster parameter information according to part of the information in the product specification information to obtain available node information that meets the product specification information;
[0042] Creating a preset model according to the remaining information in the product specification information;
[0043] Simulate and create an instance in the available node information according to the preset model;
[0044] The capacity value is determined based on the instance.
[0045] Among them, the nodes that are not compatible in the cluster parameter information can be filtered out according to part of the information in the product specification information to obtain the available node information that meets the product specification information, and then the remaining part of the information in the product specification information is used to create a preset model, and the preset model is used to simulate the creation of an instance in the available node information; when the instance reaches the maximum utilization rate of the resources in the available node information, the corresponding capacity value is output, and the capacity value can be the capacity value of the server. For a specific flowchart, see Figure 4 shown.
[0046] In the implementation manner of the present application, when the resources of the available node information of the instance reach the maximum utilization rate, the capacity value output is determined as the capacity value of the server. In this way, the capacity value of the server can be more consistent with the actual usage, that is, the determination result of the capacity value is more accurate.
[0047] It should be noted that the implementation scheme of the present application can be executed by a capacity calculation module.
[0048] It should be noted that, in the embodiment of the present application, if the business (also referred to as service) corresponding to the container is different, the product specification information of the container is different, and thus the calculated capacity value is also different.
[0049] It should be noted that the specific process of simulating the creation of an instance can be found in Figure 5The process shown, that is, in the simulation creation process, various product specification information will be compared to solve the problem that the capacity of distributed services cannot be controlled due to the restrictions in the product specification information (that is, the implementation method of the present application takes into account the influence of cluster parameter information and product specification information, so that the capacity value can be accurately calculated, rather than simply determining the capacity value based on the rated capacity value, because in actual use, there are many restrictions in the usage scenario, which leads to the actual usable value of the capacity value not being able to reach the rated capacity value). At the same time, a single simulation creation can allow the resource amounts of multiple components to be combined and calculated, and the problem of uncertain resource usage caused by the non-fixed number of replicas can be solved (that is, calculations can be combined through a single simulation creation to improve computing efficiency), and through cyclic simulation creation, the inaccuracy of dividing the remaining resources by the specification resource usage can be solved, and the problem of cluster resource uncertainty and concurrent creation caused by the nonlinear reduction of the remaining resources can be solved.
[0050] It should be noted that, optionally, before creating an instance, you can calculate the capacity value of each instance's specifications in advance and make a numerical judgment on whether the product can be created as equivalent to the capacity value as possible. Before initiating order creation, pre-check the capacity value. When the capacity value is greater than 0, it indicates that the current instance's specifications can be created, which effectively improves the success rate of instance creation.
[0051] Step 102: Calculate a capacity value according to the cluster parameter information and the product specification information.
[0052] It should be noted that the step of calculating the capacity value according to the cluster parameter information and the product specification information can be performed by a capacity calculation module.
[0053] The specific method of calculating the capacity value according to the cluster parameter information and the product specification information is not limited here. Optionally, a weighted sum of the cluster parameter information and the product specification information may be calculated, and the weighted sum may be determined as the capacity value.
[0054] As another optional implementation manner, the calculating the capacity value according to the cluster parameter information and the product specification information includes:
[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] The capacity value is calculated according to the cluster node standard information and the product specification standard information.
[0057] Among them, the steps 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 executed by the data processing module, and the step of calculating the capacity value based on the cluster node standard information and the product specification standard information can be executed by the capacity calculation module.
[0058] In the implementation manner of the present application, cluster parameter information is standardized to obtain cluster node standard information, and product specification information is standardized to obtain product specification standard information. In this way, the cluster node standard information and the product specification standard information are more in line with the standardization conditions. When the capacity value is calculated based on the cluster node standard information and the product specification standard information, the calculation efficiency of the capacity value can be higher and the calculation result can be more accurate.
[0059] It should be noted that the specific method of the standardization process is not limited here, and optionally, the standardization process may include at least one of the following: screening process, verification process, conversion process, etc. In this way, the diversity and flexibility of the standardization process are increased.
[0060] The cluster parameter information may include: cluster node status information, label information, stain information, total resource amount and used resource amount, and the process of standardizing the cluster parameter information to obtain the cluster node standard information may be as follows:
[0061] First, determine whether the cluster node is available based on the status information of the cluster node in the cluster parameter information; after determining that the cluster node is available, calculate the remaining resources based on the total resources and used resources of the cluster node; then organize the label information and taint information of the cluster node into the information structure of the cluster node. The specific flow chart is as follows: Figure 2 As shown, Figure 2 The cluster data information in 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 format of the above cluster parameter information can be seen in Table 1.
[0063] Table 1
[0064]
[0065] The specific calculation process of finally obtaining the cluster node standard information can be seen in 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 components, the number of copies of the components and affinity information, and the product specification information is standardized to obtain product specification standard information, which can be described as follows:
[0069] The server in the embodiment of the present application can be a cloud database NewSQL, and 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 the number of components, component resource usage, number of component copies, affinity information, tolerance information and other restrictive conditions (i.e. product specification information). For example, a 1C2GB tidb with 2 copies and a 1C2GB tidb with 3 copies are the same specifications for users, but the underlying calculation will subdivide them into two specifications. For a specific flow chart, see Figure 3 As shown, Figure 3 The specification information may refer to product specification information, that is, the product specification information of the container may also be referred to as specification information, and the specification standard information may refer to product specification standard information.
[0070] In this way, by standardizing the specification information corresponding to the user side, the product specification standard information can be obtained, and the product specification standard information can be a data form that can be recognized by the server bottom layer calculation, and the specification information corresponding to different distributed servers can be Figure 3 The transformation was performed according to the process shown.
[0071] It should be noted that the specific data format of the above specification information can be seen in Table 3.
[0072] Table 3
[0073]
[0074] The specific calculation process of the specification standard information can be seen in Table 4.
[0075] Table 4
[0076]
[0077] As an optional implementation manner, 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, wherein the target request is used to query whether the capacity value is greater than a preset capacity value;
[0079] When it is determined that the capacity value is greater than the preset capacity value and the update interval duration of the capacity value is greater than the preset duration, the capacity value is updated.
[0080] In the implementation manner of the present 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, the capacity value is updated. In this way, the capacity value can be updated in time, thereby ensuring the accuracy of the capacity value result.
[0081] It should be noted that the implementation scheme of the present application can be executed by a capacity data storage module.
[0082] For example: When the external system (i.e., the first electronic device) conducts a query (i.e., a query request corresponding to the target request), it will determine whether there is a capacity value of the specification corresponding to the target request. If there is no capacity value of the corresponding specification, the data processing module specifically used for data processing can be called to process the business corresponding to the target request, and the capacity calculation is performed after storing the relevant information (which can be executed by the data processing module). If there is a capacity value of the corresponding specification, determine whether the current capacity value update time meets the demand (i.e., whether the update interval duration is greater than the preset duration). If it does not meet the demand, the capacity calculation needs to be recalculated (i.e., the capacity value needs to be updated when the update interval duration is greater than the preset duration, which can be executed by the capacity calculation module). At the same time, according to the number of specification capacity value queries within a fixed time, active capacity calculation tasks can be dynamically added and deleted, and the capacity value can be updated regularly to improve query efficiency. For the specific process, please refer to Figure 6 Steps shown.
[0083] Step 103: Determine capacity expansion resource information or capacity reduction resource information according to the capacity value.
[0084] Among them, the specific method of determining the expansion resource information or the reduction 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 capacity expansion is required, and the expansion resource information is 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 capacity reduction is required, and the reduction resource information is determined according to the business request received by the server.
[0085] It should be noted that determining the expansion resource information or the reduction resource information according to the capacity value can be mainly performed by the cluster basic resource prediction and expansion module in the server, and the cluster basic resource prediction and expansion module is mainly used to predict the cluster resource usage and dynamically expand and shrink the cluster basic resources.
[0086] The cluster basic resource prediction and expansion module mainly determines the resources required for cluster expansion through two aspects. On the one hand, it makes the capacity value of the product specification information maintain a certain redundancy before the cluster node expansion reaches the upper limit to calculate the corresponding information to be expanded (i.e., expansion resource information); on the other hand, it predicts the cluster resources required after a period of time based on the usage of the current cluster's existing services to calculate the information to be expanded (i.e., expansion resource information).
[0087] Capacity basic resource prediction: First, filter out the product specification capacity values that have reached the sold-out threshold, then cyclically calculate the resource information required for expansion based on the stored product specification resources, label information, and expansion coefficient, and compare it with the existing expansion resource information to see if it needs to be updated, and finally output the expansion resource information (i.e., expansion resource information).
[0088] Capacity basic resource prediction: N△t is calculated through Nh and Nnow, and then B△t is calculated through N△t, Bh and Bnow. It is judged whether B△t reaches the threshold. If it reaches the threshold, the expansion resource information is calculated through the expansion coefficient, and the corresponding B2 value is finally output.
[0089] B△t is the reference data of basic resources required at the expected time, N△t is the estimated business indicators at the expected time, Nh is the historical business usage resources, Nnow is the current business usage resources, Bh is the historical basic resource data, Bnow is the current basic resource data, B1 is the capacity basic resource expansion information, B2 is the basic resource expansion information, and B is the expansion resource information. For the specific flow chart, please refer to Figure 7 shown.
[0090] As another optional implementation manner, the capacity value includes multiple sub-capacity values, and determining the capacity expansion resource information according to the capacity value includes:
[0091] Determining whether there is a target sub-capacity value among the multiple sub-capacity values, and a difference between the target sub-capacity value and a preset capacity value is less than a preset threshold;
[0092] When it is determined that the target sub-capacity value exists among the multiple sub-capacity values, capacity expansion resource information is determined according to the product specification information.
[0093] In an implementation manner of the present application, when the difference between the target sub-capacity value and the preset capacity value is less than a preset threshold, it indicates that the utilization rate of the target sub-capacity value is high at this time, and capacity expansion is required at this time. Therefore, the capacity expansion resource information can be determined based on the product specification information, thereby enhancing the accuracy of the determination result of the capacity expansion resource information.
[0094] It should be noted that the implementation method of the present application can be understood as the above-mentioned capacity basic resource prediction process, so that the accuracy of the determination result of the expansion resource information can be improved.
[0095] In an embodiment of the present application, through steps 101 to 103, the capacity value is calculated according to the cluster parameter information and the product specification information, and the cluster parameter information is used to represent the relevant information of the computing resources of the cluster nodes, and the product specification information is used to represent the business-related information of the container. In this way, the accuracy of the calculation result of the capacity value can be improved. At the same time, when determining the expansion resource information or the reduction resource information according to the capacity value, the accuracy of the determination result of the expansion resource information or the reduction 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 multiple components and multiple copies of containerized distributed services; at the same time, the combination of basic resource capacity management and container service capacity management can solve the business tidal phenomenon and dynamically expand the basic resources when basic resources are insufficient.
[0097] See also Figure 8 , Figure 8 800 is a structural diagram of a capacity value determination device provided in an embodiment of the present application. The capacity value determination device 800 includes:
[0098] An acquisition module 801 is used to acquire 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 relevant information of computing resources of the cluster node, and the product specification information is used to represent business-related information of the container;
[0099] A calculation module 802, configured to calculate a capacity value according to the cluster parameter information and the product specification information;
[0100] The determination module 803 is used to determine the capacity expansion resource information or the capacity reduction resource information according to the capacity value.
[0101] As an optional implementation, the calculation module 802 includes:
[0102] A standardization processing submodule, used to perform standardization processing on the cluster parameter information to obtain cluster node standard information, and to perform standardization processing on the product specification information to obtain product specification standard information;
[0103] The calculation submodule is used 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 determining device 800 further includes:
[0105] A receiving module, configured to receive a target request from a first electronic device, wherein the target request is used to query whether the capacity value is greater than a preset capacity value;
[0106] The updating module is used to update the capacity value when it is determined that the capacity value is greater than the preset capacity value and the updating interval of the capacity value is greater than the preset interval.
[0107] As an optional implementation manner, the capacity value includes multiple sub-capacity values, and the determination module 803 includes:
[0108] A first determination submodule, configured to determine whether there is a target subcapacity value among the multiple subcapacity values, and a difference between the target subcapacity value and a preset capacity value is less than a preset threshold;
[0109] The second determining submodule is configured to determine the capacity expansion resource information according to the product specification information when it is determined that the target sub-capacity value exists among the multiple sub-capacity values.
[0110] As an optional implementation manner, the cluster parameter information includes at least one of the following: status information, label information, stain 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: the number of components corresponding to the container, the resource usage of the components, the number of copies of the components, and affinity information.
[0112] As an optional implementation, the calculation module 802 includes:
[0113] A screening submodule, configured to screen corresponding node information in the cluster parameter information according to part of the information in the product specification information, and obtain available node information that meets the product specification information;
[0114] A first creation submodule, used to create a preset model according to the remaining information in the product specification information;
[0115] A second creation submodule, used for simulating creation of an instance in the available node information according to the preset model;
[0116] The third determining submodule is used to determine the capacity value according to the instance.
[0117] The capacity value determination device 800 can realize the embodiment of the present application Figure 1A The various processes of the method embodiment and the same beneficial effects are achieved, and will not be described again here to avoid repetition.
[0118] The present application also provides an electronic device. Fig. 9, the electronic device may include a processor 901, a memory 902, and a program 9021 stored in the memory 902 and executable on the processor 901. When the electronic device is a server, the program 9021 may be executed by the processor 901 to achieve Figure 1A Any steps in the corresponding method embodiments and achieving the same beneficial effects will not be repeated here.
[0119] A person skilled in the art can understand that all or part of the steps of implementing the above-mentioned embodiment method can be completed by hardware related to program instructions, and the program can be stored in a readable medium. The present application also provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1A Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.
[0120] The storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0121] The present application also provides a computer program product, including computer instructions, which can achieve the above-mentioned Figure 1A Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.
[0122] The above is a preferred implementation of the embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining a capacity value, characterized in that: include: Acquire cluster parameter information of the cluster node and product specification information of the container corresponding to the cluster node, wherein the cluster parameter information is used to represent relevant information of the computing resources of the cluster node, and the product specification information is used to represent business-related information of the container; Calculate the capacity value according to the cluster parameter information and the product specification information; The capacity expansion resource information or the capacity reduction resource information is determined according to the capacity value.
2. The method according to claim 1, characterized in that The calculating the capacity value according to the cluster parameter information and the product specification information includes: Standardizing the cluster parameter information to obtain cluster node standard information, and standardizing the product specification information to obtain product specification standard information; The capacity value is calculated according to the cluster node standard information and the product specification standard information.
3. The method according to claim 1, characterized in that After the capacity value is calculated according to the cluster parameter information and the product specification information, the method further includes: receiving a target request of a first electronic device, wherein the target request is used to query whether the capacity value is greater than a preset capacity value; When it is determined that the capacity value is greater than the preset capacity value and the update interval duration 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 a plurality of sub-capacity values, and determining the capacity expansion resource information according to the capacity value includes: Determining whether there is a target sub-capacity value among the multiple sub-capacity values, and a difference between the target sub-capacity value and a preset capacity value is less than a preset threshold; When it is determined that the target sub-capacity value exists among the multiple sub-capacity values, capacity expansion resource information is determined according to the product specification information.
5. The method according to any one of claims 1 to 4, characterized in that The cluster parameter information includes at least one of the following: status information, label information, stain information, total resource amount and used resource amount of the cluster node; 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 copies of the components, and affinity information.
6. The method according to claim 5, characterized in that The calculating the capacity value according to the cluster parameter information and the product specification information includes: Filter the corresponding node information in the cluster parameter information according to part of the information in the product specification information to obtain available node information that meets the product specification information; Creating a preset model according to the remaining information in the product specification information; Simulate and create an instance in the available node information according to the preset model; The capacity value is determined based on the instance.
7. A capacity value determination device, characterized in that: include: An acquisition module, used to acquire 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 relevant information of computing resources of the cluster node, and the product specification information is used to represent business-related information of the container; A calculation module, used for calculating a capacity value according to the cluster parameter information and the product specification information; A determination module is used to determine capacity expansion resource information or capacity reduction resource information according to the capacity value.
8. An electronic device comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the capacity value determination method as described in any one of claims 1 to 6.
9. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the capacity value determination method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps in the capacity value determination method according to any one of claims 1 to 6.
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
Resource allocation method, device and equipment and computer storage medium
CN116820754A
Method for automatically expanding and shrinking volume of transverse container group and container group capable of automatically expanding and shrinking volume
CN117573270A
Cluster capacity expansion and contraction method and device, equipment and storage medium
CN118796421A