CN114490086A - Method, device, electronic equipment, medium and program product for dynamically adjusting resources - Google Patents

Method, device, electronic equipment, medium and program product for dynamically adjusting resources Download PDF

Info

Publication number
CN114490086A
CN114490086A CN202210143644.0A CN202210143644A CN114490086A CN 114490086 A CN114490086 A CN 114490086A CN 202210143644 A CN202210143644 A CN 202210143644A CN 114490086 A CN114490086 A CN 114490086A
Authority
CN
China
Prior art keywords
cluster
container
deployment
resource
clusters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210143644.0A
Other languages
Chinese (zh)
Inventor
闫明阳
周晓庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210143644.0A priority Critical patent/CN114490086A/en
Publication of CN114490086A publication Critical patent/CN114490086A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Abstract

The present disclosure provides a method, apparatus, electronic device, medium, and program product for dynamic adjustment of resources for a multi-cluster architecture. The method and the device can be used in the technical fields of cloud computing and finance. The method comprises the following steps: acquiring a deployment request of an application for container resources, wherein the container resources requested to be deployed comprise n containers, each container has container characteristics, and n is an integer greater than or equal to 1; counting resource use information of s clusters, wherein s is an integer greater than or equal to 2, and each cluster has cluster characteristics; comparing the container resource requested to be deployed with the resource use information of the s clusters to select at least one cluster from the s clusters, and taking the at least one cluster as an actual deployment cluster; determining a physical deployment area of a host machine corresponding to the actual deployment cluster according to the actual deployment cluster; and dynamically adjusting the physical resources according to the physical deployment area.

Description

Method, device, electronic equipment, medium and program product for dynamically adjusting resources
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for dynamically adjusting resources for a multi-cluster architecture, an electronic device, a computer-readable storage medium, and a computer program product.
Background
With the transformation of the IT architecture, more and more services are deployed in the cloud cluster, and each company organization constructs private clouds and completes the pooling design of physical resources, so that the pooling design greatly improves the resource utilization rate, but causes difficulty in resource management. In addition, due to the limitation of various network types, gray scale of cluster versions and the like or the expansion of the business scale of a company, the private cloud architecture of a single cluster no longer meets the requirement. Considering the difference of the use conditions of all cluster resources and the diversity of cluster attributes, considering that the private cloud architecture has no concept of tenants, the use conditions of the whole private cloud resources are comprehensively considered for the application of all user container resources, so as to achieve the purpose of providing a reasonable deployment range for the user containers.
Disclosure of Invention
In view of the above, the present disclosure provides a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for managing resources of a multi-cluster architecture orderly and facilitating dynamic capacity expansion.
One aspect of the present disclosure provides a method for dynamically adjusting resources for a multi-cluster architecture, including: acquiring a deployment request of an application for container resources, wherein the container resources requested to be deployed comprise n containers, each container has a container characteristic, and n is an integer greater than or equal to 1; counting resource use information of s clusters, wherein s is an integer greater than or equal to 2, and each cluster has cluster characteristics; comparing the container resource requested to be deployed with the resource use information of the s clusters to select at least one cluster from the s clusters, and taking the at least one cluster as an actual deployment cluster; determining a physical deployment area of a host machine corresponding to the actual deployment cluster according to the actual deployment cluster; and dynamically adjusting the physical resources according to the physical deployment area.
Wherein the comparing the container resource requested to be deployed with the resource usage information of the s clusters to select at least one cluster from the s clusters, and the taking the at least one cluster as an actual deployment cluster specifically includes: matching container characteristics of each container in the container resources requested to be deployed with cluster characteristics of the s clusters; taking t clusters which are successfully matched as pre-deployment clusters, wherein t is an integer which is greater than or equal to 1 and less than or equal to s; and selecting at least one cluster from the pre-deployment clusters according to the container resource requiring deployment and the resource use information of the pre-deployment clusters, and taking the at least one cluster as an actual deployment cluster.
According to the resource dynamic adjustment method for the multi-cluster architecture, based on the multi-cluster architecture, application details of application for container resources are monitored in real time, the cluster range where the container resources applied for deployment should be deployed is analyzed in real time according to resource use information of s current clusters, and under the condition that resources are not satisfied, physical resources of a physical resource pool are dynamically called to carry out host application and admission, so that the purpose of automatic dynamic capacity expansion is achieved. In addition, the method can orderly manage and allocate the cluster resources and the physical deployment areas, and can solve the problems that the cluster resources are disordered and management and application are not in a rule in the prior art.
In some embodiments, the resource usage information of each cluster includes used resources and unused resources, the used resources include historical container deployment of the application, and the counting resource usage information of s clusters includes: counting affinity scores of the applications to each cluster in the s clusters according to the historical container deployment conditions of the applications; and scoring each cluster according to the unused resources of each cluster in the s clusters to obtain a resource score.
In some embodiments, selecting at least one cluster from the pre-deployment clusters according to the container resource requested to be deployed and the resource usage information of the pre-deployment clusters, and using the at least one cluster as an actual deployment cluster specifically includes: calculating the weighted scores of the t pre-deployment clusters according to the affinity scores and the resource scores; and selecting at least one cluster from the t pre-deployment clusters according to the weighted scores, and taking the at least one cluster as an actual deployment cluster.
In some embodiments, the determining, according to the actual deployment cluster, a physical deployment area of a host corresponding to the actual deployment cluster includes: generating host machine characteristics according to the container resources requested to be deployed; acquiring physical resource characteristics of a physical resource pool, wherein the physical resource pool comprises k building areas, each building area has the physical resource characteristics, and k is an integer greater than or equal to 1; carrying out feature matching on the host machine features and the physical resource features of the k building areas; g building areas with successfully matched features are used as pre-building areas, wherein g is an integer which is greater than or equal to 1 and smaller than k; and determining a physical deployment area of the host machine corresponding to the actual deployment cluster according to the pre-built area.
In some embodiments, the determining, according to the pre-built region, a physical deployment region of a host corresponding to the actual deployment cluster includes: acquiring regional characteristic information of each pre-built region; scoring each pre-built region according to the region characteristic information to obtain a region score; and according to the regional scores, selecting at least one physical deployment region from the g pre-built regions as a host corresponding to the actual deployment cluster.
In some embodiments, the regional characteristic information includes at least one of a selectable IP number, a central processor resource usage rate, a memory resource usage rate, and a physical storage resource usage rate.
In some embodiments, the scoring each pre-built region according to the region feature information, and obtaining a region score includes: respectively scoring the selectable IP number, the CPU resource utilization rate, the memory resource utilization rate and the physical storage resource utilization rate to obtain a plurality of regional characteristic scores; and weighting and summing the plurality of regional feature scores to obtain regional scores.
In some embodiments, the host computer characteristics include at least one of a corresponding network region, central processor architecture, cloud type, central processing machine size, memory size, and physical storage size; and/or the physical resource characteristics include at least one of a corresponding network region, a central processor architecture, a cloud type, a central processing machine size, a memory size, and a physical storage size.
In some embodiments, the container characteristics include at least one of a network area, a network characteristic, a central processor architecture of the deployment cluster, and a platform version corresponding to the container; and/or the cluster characteristics include at least one of a network area, network characteristics, central processor architecture, and platform version corresponding to the cluster.
In some embodiments, the obtaining a deployment request of an application for a container resource comprises: classifying the container resources requested to be deployed according to the container characteristics; said matching container characteristics of each container in the container resources requested for deployment with cluster characteristics of the s clusters comprises: matching the container characteristics of each container in the classified container resources with the characteristics of the s clusters.
In some embodiments, the obtaining the deployment request of the application for the container resource further comprises: unifying the specifications of the n containers.
Another aspect of the present disclosure provides a resource dynamic adjustment apparatus for a multi-cluster architecture, including: the system comprises an acquisition module, a deployment module and a management module, wherein the acquisition module is used for executing a deployment request of an acquisition application for container resources, the container resources requested to be deployed comprise n containers, each container has a container characteristic, and n is an integer greater than or equal to 1; the statistical module is used for performing statistics on resource use information of s clusters, wherein s is an integer greater than or equal to 2, and each cluster has cluster characteristics; a comparison module, configured to perform a comparison between the container resource requested to be deployed and the resource usage information of the s clusters, so as to select at least one cluster from the s clusters, and use the at least one cluster as an actual deployment cluster; a determining module, configured to determine, according to the actual deployment cluster, a physical deployment area of a host corresponding to the actual deployment cluster; and the adjusting module is used for executing dynamic adjustment on the physical resources according to the physical deployment area.
Wherein, the comparison module specifically comprises: a matching unit, configured to perform matching of container characteristics of each container in the container resources requested to be deployed with cluster characteristics of the s clusters; the command unit is used for executing t clusters which are successfully matched as pre-deployment clusters, wherein t is an integer which is greater than or equal to 1 and less than or equal to s; and the selection unit is used for selecting at least one cluster from the pre-deployment clusters according to the container resource requested to be deployed and the resource use information of the pre-deployment clusters, and taking the at least one cluster as an actual deployment cluster.
Another aspect of the present disclosure provides an electronic device comprising one or more processors and one or more memories, wherein the memories are configured to store executable instructions that, when executed by the processors, implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program product comprising a computer program comprising computer executable instructions for implementing the method as described above when executed.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an exemplary system architecture to which the methods, apparatus, and methods may be applied, in accordance with an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a method for dynamic adjustment of resources for a multi-cluster architecture, in accordance with an embodiment of the present disclosure;
FIG. 3 schematically shows a flow chart of statistics of resource usage information for s clusters according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flowchart for comparing resource usage information of a container resource requested for deployment with s clusters to select at least one cluster from the s clusters as an actual deployment cluster, according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a flow diagram for selecting at least one cluster from the pre-deployment clusters as an actual deployment cluster according to resource usage information of the container resources requested to be deployed and the pre-deployment clusters, according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow diagram for determining a physical deployment area of a host corresponding to an actual deployment cluster from the actual deployment cluster, according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a flow chart for determining a physical deployment region of a host corresponding to an actual deployment cluster from a pre-built region according to an embodiment of the present disclosure;
FIG. 8 schematically shows a flowchart of scoring each pre-built region according to regional characteristic information to obtain a regional score according to an embodiment of the present disclosure;
FIG. 9 schematically illustrates a flow diagram for obtaining a deployment request for a container resource by an application according to an embodiment of the disclosure;
FIG. 10 schematically illustrates a flow diagram for matching container characteristics of each container in a container resource requesting deployment with cluster characteristics of s clusters, according to an embodiment of the disclosure;
fig. 11 schematically shows a block diagram of a dynamic resource adjustment apparatus for a multi-cluster architecture according to an embodiment of the present disclosure;
FIG. 12 schematically shows a block diagram of a comparison module according to an embodiment of the disclosure;
fig. 13 schematically shows a structure diagram of a resource dynamic adjustment apparatus according to an embodiment of the present disclosure;
fig. 14 is a view schematically showing an internal structure of an application detail counting apparatus according to an embodiment of the present disclosure;
FIG. 15 is a diagram schematically illustrating an internal structure of a cluster resource statistics apparatus according to an embodiment of the present disclosure;
fig. 16 schematically shows an internal structural view of an application resource analysis apparatus according to an embodiment of the present disclosure;
fig. 17 is a schematic diagram illustrating an internal structure of an apparatus application expansion device according to an embodiment of the present disclosure;
FIG. 18 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, necessary security measures are taken, and the customs of the public order is not violated. In the technical scheme of the disclosure, the data acquisition, collection, storage, use, processing, transmission, provision, disclosure, application and other processing are all in accordance with the regulations of relevant laws and regulations, necessary security measures are taken, and the public order and good custom are not violated.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features.
With the transformation of the IT architecture, more and more services are deployed in the cloud cluster, and each company organization constructs private clouds and completes the pooling design of physical resources, so that the pooling design greatly improves the resource utilization rate, but causes difficulty in resource management. For example, the fast elastic scaling capability provided by the cloud platform provides a powerful support for coping with a sudden traffic increase scenario, but as traffic is reduced or the application scale is reduced, statistics and reuse of the scaled idle resources are difficult to manage.
In addition, due to the limitation of various network types, gray scale of cluster versions and the like or the expansion of the business scale of a company, the private cloud architecture of a single cluster no longer meets the requirement. Considering the difference of the use conditions of all cluster resources and the diversity of cluster attributes, considering that the private cloud architecture has no concept of tenants, the use condition of the whole private cloud resource is comprehensively considered for the application of all user container resources, so as to achieve the purpose of providing a reasonable deployment range for the user containers, and statistical analysis across multiple clusters is another big problem in resource management.
Embodiments of the present disclosure provide a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for dynamic adjustment of resources for a multi-cluster architecture. The resource dynamic adjustment method for the multi-cluster architecture comprises the following steps: acquiring a deployment request of an application for container resources, wherein the container resources requested to be deployed comprise n containers, each container has container characteristics, and n is an integer greater than or equal to 1; counting resource use information of s clusters, wherein s is an integer greater than or equal to 2, and each cluster has cluster characteristics; comparing the container resource requested to be deployed with the resource use information of the s clusters to select at least one cluster from the s clusters, and taking the at least one cluster as an actual deployment cluster; determining a physical deployment area of a host machine corresponding to the actual deployment cluster according to the actual deployment cluster; and dynamically adjusting the physical resources according to the physical deployment area.
The comparing the container resource requested to be deployed with the resource usage information of the s clusters to select at least one cluster from the s clusters, and using the at least one cluster as an actual deployment cluster specifically includes: matching the container characteristics of each container in the container resources requested to be deployed with the cluster characteristics of the s clusters; taking t clusters which are successfully matched as pre-deployment clusters, wherein t is an integer which is greater than or equal to 1 and less than or equal to s; and selecting at least one cluster from the pre-deployment clusters according to the container resources requested to be deployed and the resource use information of the pre-deployment clusters, and taking the at least one cluster as an actual deployment cluster.
It should be noted that the resource dynamic adjustment method, apparatus, electronic device, computer-readable storage medium, and computer program product for multi-cluster architecture of the present disclosure may be used in the cloud computing technology field, and may also be used in any field other than the cloud computing technology field, such as the financial field, and the field of the present disclosure is not limited herein.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the resource dynamic adjustment method, apparatus, electronic device, computer-readable storage medium, and computer program product for a multi-cluster architecture may be applied, according to embodiments of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the resource dynamic adjustment method for the multi-cluster architecture provided by the embodiment of the present disclosure may be generally performed by the server 105. Accordingly, the dynamic resource adjustment apparatus for multi-cluster architecture provided by the embodiments of the present disclosure may be generally disposed in the server 105. The resource dynamic adjustment method for the multi-cluster architecture provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Correspondingly, the resource dynamic adjustment apparatus for a multi-cluster architecture provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The resource dynamic adjustment method for a multi-cluster architecture according to the embodiment of the present disclosure will be described in detail below with reference to fig. 2 to 11 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a method for dynamic adjustment of resources for a multi-cluster architecture according to an embodiment of the present disclosure.
As shown in fig. 2, the method for dynamically adjusting resources for a multi-cluster architecture of this embodiment includes operations S210 to S250.
In operation S210, a deployment request of an application for a container resource is obtained, where the container resource requested to be deployed includes n containers, each container has a container characteristic, and n is an integer greater than or equal to 1.
In operation S220, resource usage information of S clusters is counted, where S is an integer greater than or equal to 2, and each cluster has a cluster characteristic.
As a possible implementation manner, the resource usage information of each cluster includes used resources and unused resources, the used resources include historical container deployment situations of the applications, it is understood that, before a deployment request of the applications is received, containers may have been deployed on s clusters, the deployed containers may be understood as the above-mentioned historical containers, and the historical containers may be deployed by the applications that make the requests or may be deployed by other applications besides the applications that make the requests, and are not specifically limited herein.
As shown in fig. 3, the operation S220 of counting resource usage information of the S clusters may include operations S221 and S222.
In operation S221, affinity scores of the application to each of the S clusters are counted according to the historical container deployment of the application. The counting of the affinity score of the application to each cluster in the s clusters according to the deployment condition of the historical container of the application can be understood as counting the affinity score of the application to each cluster according to the deployment number of the historical container in each cluster. In other words, the number of deployed historical containers of an application in a certain cluster can be counted, and the greater the number of deployed historical containers, the higher the affinity of the application to the certain cluster, and the higher the affinity score. For example, application 1 has deployed 3 history containers on cluster a, and application 1 has deployed 1 history container on cluster b, so it is determined that application 1 has a higher affinity with cluster a, and the affinity score of application 1 for cluster a is greater than the affinity score of application 1 for cluster b.
In operation S222, each cluster is scored according to unused resources of each cluster of the S clusters to obtain a resource score. The unused resources can be understood as the situation that the history container is not deployed on the cluster, and the more resources of the history container are not deployed, that is, the more unused resources are, the higher the resource score is.
Through the operations S221 and S222, statistics of resource usage information of the S clusters can be conveniently implemented, and affinity scores and resource scores are obtained.
In operation S230, the container resource requested to be deployed is compared with the resource usage information of the S clusters to select at least one cluster from the S clusters, and the at least one cluster is taken as an actual deployment cluster.
As a possible implementation manner, the container characteristics may include at least one of a network area corresponding to the container, network characteristics, a central processor architecture of the deployment cluster, and a platform version; and/or, the cluster characteristics may include at least one of a network area, a network characteristic, a central processor architecture, and a platform version corresponding to the cluster. Wherein, the network area may be an internal network or an external network, but is not limited thereto; the network may be characterized as a local area network or a wide area network, but is not so limited; the platform version may be the k8s version, etc., but is not limited thereto.
As a possible implementation manner, as shown in fig. 4, operation S230 compares the container resource requested to be deployed with the resource usage information of the S clusters to select at least one cluster from the S clusters, and the step of using the at least one cluster as an actual deployment cluster specifically includes operations S231 to S233.
In operation S231, container characteristics of each container in the container resource requested to be deployed are matched with cluster characteristics of the S clusters.
In operation S232, t clusters that are successfully matched are taken as pre-deployment clusters, where t is an integer greater than or equal to 1 and less than or equal to S.
In operation S233, at least one cluster is selected from the pre-deployment clusters according to the container resource requested to be deployed and the resource usage information of the pre-deployment clusters, and the at least one cluster is taken as an actual deployment cluster.
It is understood that the container feature and the cluster feature may each include one or more elements, the container feature elements and the cluster feature elements are in one-to-one correspondence, and each element may be matched one by one.
For example, each container feature may include four elements, namely, a network area corresponding to the container, a network characteristic, a central processor architecture of the deployment cluster, and a platform version. Correspondingly, each cluster feature may include four elements, which are a network area corresponding to the cluster, a network characteristic, a central processor architecture for deploying the cluster, and a platform version.
For further example, the network area of the container 1 is an internal network, the network is characterized by a local area network, the architecture of the central processing unit of the deployment cluster is X86, and the platform version is k8 s. The network area of the cluster a is an external network, the network is characterized by being a wide area network, the architecture of a central processing unit for deploying the cluster is X86, and the version of a platform is k8 s; the network area of the cluster b is an internal network, the network is characterized by a local area network, the architecture of a central processing unit for deploying the cluster is X86, and the platform version is k8 s; the network area of the cluster c is an internal network, the network is characterized by a local area network, the architecture of a central processing unit for deploying the cluster is X86, and the platform version is k8 s.
By matching the four elements of the container 1 with the four elements of the cluster a, matching the four elements of the container 1 with the four elements of the cluster b, and matching the four elements of the container 1 with the four elements of the cluster c, the cluster b and the cluster c that have successfully matched the features of the container 1 can be used as the pre-deployment cluster of the container 1.
As a possible implementation manner, as shown in fig. 5, operation S233 selects at least one cluster from the pre-deployment clusters according to the container resource requested to be deployed and the resource usage information of the pre-deployment clusters, and uses the at least one cluster as an actual deployment cluster, which specifically includes operation S2331 and operation S2332.
In operation S2331, weighted scores for the t pre-deployment clusters are calculated based on the affinity scores and the resource scores. It is to be understood that the affinity score of the application for each cluster has been calculated in operation S221, where if the application does not deploy a history container on a certain cluster, the affinity score of the application for that cluster may be noted as 0. Therefore, an affinity score of the application to each pre-deployment cluster can be obtained, a resource score of each pre-deployment cluster can be obtained through operation S222, and then a weighted score of each pre-deployment cluster can be calculated according to the affinity score and the resource score, where the weighted score can be understood as that the affinity score and the resource score are weighted respectively to obtain an affinity weighted score and a resource weighted score, and then the sum of the affinity weighted score and the resource weighted score is obtained.
In operation S2332, at least one cluster is selected from the t pre-deployment clusters according to the weighted scores as an actual deployment cluster. Wherein at least one cluster is selected from the t pre-deployment clusters according to the weighted scores, and taking the at least one cluster as an actual deployment cluster may be understood as determining one or more actual deployment clusters according to the ordering of the weighted scores. In other words, after the weighted score of each pre-deployment cluster is obtained, the plurality of pre-deployment clusters can be sorted, where the sorting may be ascending or descending, r pre-deployment clusters with scores from high to low are selected as actual deployment clusters according to the sorting order, and r is an integer greater than or equal to 1 and less than or equal to t, so that a cluster which can actually deploy a container can be obtained.
The selection of at least one cluster from the pre-deployment clusters as an actual deployment cluster according to the container resource requested to be deployed and the resource usage information of the pre-deployment clusters can be facilitated through operations S2331 and S2332.
In operation S240, a physical deployment area of a host corresponding to the actual deployment cluster is determined according to the actual deployment cluster.
As an implementable manner, as shown in fig. 6, the operation S240 determining, according to the actual deployment cluster, the physical deployment area of the host corresponding to the actual deployment cluster includes operations S241 to S245.
In operation S241, a host feature is generated according to the container resource requested to be deployed.
In operation S242, physical resource characteristics of a physical resource pool are obtained, where the physical resource pool includes k building areas, each building area has the physical resource characteristics, and k is an integer greater than or equal to 1.
In operation S243, the host computer characteristics and the physical resource characteristics of the k building areas are subjected to characteristic matching.
As some specific examples, the host characteristics may include at least one of a corresponding network region, central processor architecture, cloud type, central processing machine size, memory size, and physical storage size; and/or the physical resource characteristics may include at least one of a corresponding network region, central processor architecture, cloud type, central processing machine size, memory size, and physical storage size.
In operation S244, g building regions with successfully matched features are used as pre-building regions, where g is an integer greater than or equal to 1 and less than k.
It is understood that each host characteristic and each physical resource characteristic may include one or more elements, the host characteristic elements and the physical resource characteristic elements are in one-to-one correspondence, and each element may be matched one by one.
For example, each host feature may include six elements, respectively network area, central processor architecture, cloud type, central processing machine size, memory size, and physical storage size. Correspondingly, each physical resource feature may include six elements, which are a network area, a central processor architecture, a cloud type, a central processing machine size, a memory size, and a physical storage size. After each element of each host machine characteristic is matched with each element of each physical resource characteristic one by one, g building areas successfully matched with the application host machine characteristic can be obtained, and then the g building areas can be used as the pre-building areas of the application host machine.
In operation S245, a physical deployment area of the host corresponding to the actual deployment cluster is determined according to the pre-built area.
As a possible implementation manner, as shown in fig. 7, the operation S245 determines, according to the pre-built area, a physical deployment area of the host corresponding to the actual deployment cluster, including operations S2451 to S2453.
In operation S2451, region feature information of each of the pre-built regions is acquired. In some specific examples, the regional characteristic information may include at least one of a selectable IP number, a central processor resource usage, a memory resource usage, and a physical storage resource usage.
In operation S2452, each pre-built region is scored according to the region feature information to obtain a region score.
In some specific examples, as shown in fig. 8, operation S2452 scores each of the pre-built regions according to the regional characteristic information, and obtaining the regional score includes operation S245721 and operation S24522.
In operation S245721, the selectable IP number, the cpu resource usage rate, the memory resource usage rate, and the physical storage resource usage rate are respectively scored to obtain a plurality of regional characteristic scores.
In operation S24522, the plurality of regional feature scores are weighted and summed to obtain a regional score.
It should be noted that, the larger the number of selectable IPs is, the higher the score is; the lower the resource utilization rate of the central processing unit is, the higher the score is; the lower the utilization rate of the memory resources is, the higher the score is; the lower the physical storage resource usage, the higher the score. After scoring, the scoring scores (namely regional characteristic scores) of the selectable IP numbers can be weighted, the scoring scores (namely regional characteristic scores) of the resource utilization rate of the central processing unit are weighted, the scoring scores (namely regional characteristic scores) of the memory resource utilization rate are weighted, the scoring scores (namely regional characteristic scores) of the physical storage resource utilization rate are weighted, and the scoring values (namely regional characteristic scores) of the built regions corresponding to the regional characteristic information are obtained through summation after weighting.
Scoring each pre-built region according to the region feature information to obtain a region score can be conveniently achieved through operation S245721 and operation S24522.
In operation S2453, according to the region score, at least one physical deployment region serving as a host corresponding to the actual deployment cluster is selected from the g pre-built regions. According to the regional scores, selecting at least one physical deployment region from the g pre-built regions as a host corresponding to the actual deployment cluster can be understood as selecting at least one physical deployment region from the g pre-built regions as a host corresponding to the actual deployment cluster according to the sorting of the regional scores. It should be noted that the sorting may be ascending or descending, and according to the sorting order, f pre-built regions with a high to low regional score may be selected as the physical deployment regions, where f is an integer greater than or equal to 1 and less than or equal to g.
Therefore, the determination of the physical deployment area inclusion of the host machine corresponding to the actual deployment cluster according to the pre-built area can be more accurately and efficiently realized through the operations S2451 to S2453.
In operation S250, the physical resources are dynamically adjusted according to the physical deployment area.
According to the resource dynamic adjustment method for the multi-cluster architecture, based on the multi-cluster architecture, application details of application for container resources are monitored in real time, the cluster range where the container resources applied for deployment should be deployed is analyzed in real time according to resource use information of s current clusters, and under the condition that resources are not satisfied, physical resources of a physical resource pool are dynamically called to carry out host application and admission, so that the purpose of automatic dynamic capacity expansion is achieved. In addition, cluster resources and physical deployment areas can be orderly managed and allocated through operations S210 to S250, and the problems of cluster resource confusion and no rule for management and application in the prior art can be solved.
According to some embodiments of the present disclosure, as shown in fig. 9, the operation S210 of obtaining a deployment request of an application for a container resource includes operation S211 of: and classifying the container resources requested to be deployed according to the container characteristics. For example, each container feature may include four elements, respectively, network area, network characteristics, central processor architecture and platform version of the deployment cluster. Two containers are classified as one when the four elements of the two containers are identical.
For further example, assume that there are 5 containers applying for deployment, the network area of the container 1 is an internal network, the network is characterized as a local area network, the architecture of the central processing unit of the deployment cluster is X86, and the platform version is k8 s; the network area of the container 2 is an internal network, the network is characterized by a wide area network, the architecture of a central processing unit for deploying the cluster is X86, and the version of a platform is k8 s; the network area of the container 3 is an internal network, the network is characterized by being a local area network, the architecture of a central processing unit for deploying the cluster is X86, and the platform version is k8 s; the network area of the container 4 is an external network, the network is characterized by a local area network, the architecture of a central processing unit for deploying the cluster is X86, and the platform version is k8 s; the network area of the container 5 is an external network, the network is characterized by a local area network, the architecture of a central processing unit for deploying the cluster is X86, and the platform version is K8 s.
Comparing the network area, the network characteristics, the central processor architecture for deploying the cluster and the platform version of the 5 containers respectively to obtain that the network area, the network characteristics, the central processor architecture for deploying the cluster and the platform version of the container 1 and the container 3 are the same, so that the container 1 and the container 3 are classified into one class; the network areas, network characteristics, and central processor architectures and platform versions of the deployment clusters of the containers 4 and 5 can be obtained to be the same, so that the containers 4 and 5 are classified into one class; the container 2 is of one type.
As shown in fig. 10, the operation S231 of matching the container characteristics of each container in the container resource requested to be deployed with the cluster characteristics of the S clusters includes an operation S2311 of: and matching the container characteristics of each container in the classified container resources with the characteristics of the s clusters. In particular, each container feature of the same class of container may be feature matched with the features of the s clusters. It can be understood that four elements of the container of the same type may be respectively matched with the corresponding element of each cluster feature, and when matching is successful, the cluster corresponding to the cluster feature may be used as the pre-deployment cluster of the container of the same type. The deployment efficiency and accuracy of the containers can be improved by classifying the n containers.
In some examples, the container characteristics may also include a container type and a container role. The container types may include a general container, a system container, and a secure container, and the container roles may include a provider and a consumer. Therefore, the types of container characteristics can be enriched, and the classification of the containers is more accurate.
According to some embodiments of the present disclosure, as shown in fig. 9, the operation S210 of obtaining a deployment request of an application for a container resource further includes an operation S212 of: unifying the specifications of the n containers. The deployment efficiency and accuracy of the containers can also be improved by unifying the specifications of the n containers.
Based on the above dynamic resource adjustment method for a multi-cluster architecture, the present disclosure also provides a dynamic resource adjustment apparatus 10 for a multi-cluster architecture. The resource dynamic adjustment apparatus 10 for a multi-cluster architecture will be described in detail below with reference to fig. 11.
Fig. 11 schematically shows a block diagram of a resource dynamic adjustment apparatus 10 for a multi-cluster architecture according to an embodiment of the present disclosure.
The resource dynamic adjusting device 10 for the multi-cluster architecture comprises an obtaining module 1, a counting module 2, a comparing module 3, a determining module 4 and an adjusting module 5.
An obtaining module 1, where the obtaining module 1 is configured to perform operation S210: the method comprises the steps of obtaining a deployment request of an application for container resources, wherein the container resources requested to be deployed comprise n containers, each container has a container characteristic, and n is an integer greater than or equal to 1.
The statistic module 2, the statistic module 2 is configured to perform operation S220: and counting resource use information of s clusters, wherein s is an integer greater than or equal to 2, and each cluster has a cluster characteristic.
A comparing module 3, wherein the comparing module 3 is configured to perform operation S230: and comparing the container resource requested to be deployed with the resource use information of the s clusters to select at least one cluster from the s clusters, and taking the at least one cluster as an actual deployment cluster.
A determination module 4, the determination module 4 being configured to perform operation S240: and determining a physical deployment area of the host machine corresponding to the actual deployment cluster according to the actual deployment cluster.
An adjusting module 5, the adjusting module 5 being configured to perform operation S250: and dynamically adjusting the physical resources according to the physical deployment area.
As shown in fig. 12, the comparing module 3 specifically includes a matching unit 301, a command unit 302, and a selecting unit 303.
A matching unit 301, the matching unit 301 being configured to perform operation S231: container characteristics of each container in the container resource requesting deployment are matched with cluster characteristics of the s clusters.
A command unit 302, the command unit 302 being configured to perform operation S232: and taking t clusters which are successfully matched as pre-deployment clusters, wherein t is an integer which is greater than or equal to 1 and less than or equal to s.
A selecting unit 303, the selecting unit 303 being configured to perform operation S233: and selecting at least one cluster from the pre-deployment clusters according to the container resource requesting to be deployed and the resource use information of the pre-deployment clusters, and taking the at least one cluster as an actual deployment cluster.
Since the dynamic resource adjustment apparatus 10 for a multi-cluster architecture is configured based on a dynamic resource adjustment method for a multi-cluster architecture, the beneficial effects of the dynamic resource adjustment apparatus 10 for a multi-cluster architecture are the same as those of the dynamic resource adjustment method for a multi-cluster architecture, and are not described herein again.
In addition, according to the embodiment of the present disclosure, any multiple modules of the obtaining module 1, the counting module 2, the comparing module 3, the determining module 4, and the adjusting module 5 may be combined and implemented in one module, or any one module thereof may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module.
According to the embodiment of the present disclosure, at least one of the obtaining module 1, the statistical module 2, the comparing module 3, the determining module 4 and the adjusting module 5 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware and firmware, or implemented by a suitable combination of any several of them.
Alternatively, at least one of the obtaining module 1, the statistics module 2, the comparison module 3, the determination module 4 and the adjustment module 5 may be at least partly implemented as a computer program module, which when executed may perform a corresponding function.
The dynamic resource adjustment apparatus according to an embodiment of the present disclosure is described in detail below with reference to fig. 13 to 17. It is to be understood that the following description is illustrative only and is not intended to be in any way limiting of the present disclosure.
The utility model provides a resource dynamic adjustment device which analyzes the application condition of a user container and plans the deployment range of the user container under the multi-cluster private cloud architecture, which mainly comprises the following devices.
Step 1): and the application detail counting device integrates and standardizes the container resources applied by all users and triggers the cluster resource counting device.
Step 2): and the cluster resource counting device is used for inquiring Prometous monitoring to obtain the total resource use details of each cluster and each node and inquiring the database to obtain the cluster characteristics, finally integrating to obtain a private cloud cluster resource view, and then triggering the application resource analysis device.
Step 3): and the application resource analysis device calculates clusters which should be deployed by the user container and the number of nodes which should be expanded by each cluster according to the private cloud cluster view, and then triggers the equipment to apply for the expansion device.
Step 4): and the equipment application expansion device applies for virtual machine or physical machine equipment and calls a corresponding infrastructure operation and maintenance operation expansion related cluster to the infrastructure cloud according to the calculation result of the application resource analysis device in the step 3).
As shown in fig. 13, the resource dynamic adjustment apparatus according to the present disclosure includes: an application detail statistic device a, a cluster resource statistic device b, an application resource analysis device c and an equipment application capacity expansion device d. The application detail counting device a is in communication connection with the cluster resource counting device b, the cluster resource counting device b is in communication connection with the application resource analyzing device c, and the application resource analyzing device c is in communication connection with the equipment application expansion device d.
Application detail statistics device a: classifying and integrating container resources applied by all users according to characteristic values (including network areas, cluster host central processor architectures, K8S versions, cluster characteristics and cloud types), uniformly standardizing the application container specifications by taking fixed specifications as units, finally forming a resource application view of the whole user group, and then triggering a cluster resource statistical device b.
Cluster resource statistics apparatus b: the monitoring component collects the details of the use of the cluster system resources, and in order to achieve the purpose of simplifying calculation, the used resources and redundant resource data of the cluster are calculated by taking the specification of a fixed container as a unit in the following calculation mode.
Figure BDA0003506485310000181
Figure BDA0003506485310000182
And forming a view of the utilization rate of the whole private cloud resource by combining a cluster network area, a cluster host central processor architecture, the K8S version, cluster characteristics and cloud type characteristic values. In addition, according to the number of containers deployed in each cluster by the user, the affinity of the user to each cluster is counted, the more containers are deployed in the cluster by the user, the higher the affinity is, and conversely, the lower the affinity is. And then triggers the application resource converting device c.
The application resource converting device c: comparing the resource application view with the private cloud resource utilization view, firstly, carrying out preselection, and comparing the characteristic value of the user application container with the characteristic value of the cluster to screen out a user selectable deployment range; preferably, the clusters are scored according to the affinity of the user to each cluster counted by the cluster resource counting device b, wherein the higher the affinity is, the higher the score is, and otherwise, the score is lower; the cluster is scored according to the cluster redundant resource rate in the private cloud resource utilization rate view, the higher the redundant rate is, the higher the score is, otherwise, the score is lower; the scores are weighted and summed and sorted. And the application resource conversion device c sequentially selects and deploys the clusters according to the sequencing result under the limitation that the clusters meet the fixed redundancy rate and the maximum number of the cluster nodes until the user applies for the resources. And the application resource converting device c finally calculates the actual deployment cluster of the user and the required application physical machine number through pre-selection and optimization.
Equipment applies for a capacity expansion device d: obtaining a physical resource utilization rate view through statistical analysis, firstly preselecting, and comparing characteristic values (namely network areas, central processor architectures, cloud types, central processing machine sizes, memory sizes and physical storage sizes) of physical machines applied by users with characteristic values (namely network areas, central processor architectures, cloud types, central processing machine sizes, memory sizes and physical storage sizes) of physical resources to screen out physical machine construction areas applied by users selectively; and then, preferably, scoring each physical resource logic area (different logic area divisions according to different schemes) according to the selectable IP number, the utilization rate of the central processor resources, the utilization rate of the memory resources, the utilization rate of the physical storage resources and the like, and weighting, summing and sequencing the scores. And obtaining a physical resource logic area where the host machine is located through two steps of preselection and optimization, and finally calling an infrastructure cloud to build the physical machine and install the cluster nodes.
Fig. 14 is an internal configuration diagram of the application detail counting apparatus a, and includes a container application specification unit 11 and a container application classification unit 12.
Wherein, the container applies for the specification unit 11: the specification of the application container is unified and regulated by taking the fixed specification as a unit.
Container application classification unit 12: and classifying the container resources applied by all users according to characteristic values (including network areas, network characteristics, cluster host central processor architecture, K8S version, cluster characteristics and cloud types).
Fig. 15 is an internal structural diagram of the cluster resource counting device b, and includes a cluster resource detail acquiring unit 21 and a cluster resource integrating and classifying unit 22.
Wherein, the cluster resource detail acquiring unit 21: and acquiring the resource utilization rate of each cluster, the central processing unit and the memory resource utilization rate by calling a Prometous interface.
Cluster resource integration classification unit 22: and calculating the data of the available resources, the used resources and the redundant resources of the cluster by taking the specification of the fixed container as a unit, and forming a view of the utilization rate of the whole private cloud resource by combining the cluster network area, the network characteristics, the cluster host central processor architecture, the K8S version, the cluster characteristics and the cloud type characteristic value.
Fig. 16 is an internal configuration diagram of the application resource analysis device c, and includes a user deployment range analysis unit 31 and a physical resource integration analysis unit 32.
Wherein, the user deployment range analysis unit 31: and comparing the resource application view with the private cloud resource utilization view, grading and sequencing the clusters, and obtaining the user selectable deployment range through two steps of preselection and optimization.
Physical resource integration analysis unit 32: and calculating the actual deployment cluster of the user and the required physical machine number according to the cluster redundancy rate and the maximum limit number of the cluster nodes, and then generating a corresponding application task.
Fig. 17 is an internal structure diagram of the device application expansion apparatus d, and includes a device application unit 41 and a node storage unit 42.
Wherein, the device application unit 41: and counting to obtain a physical resource utilization rate view, carrying out scoring sequencing on each physical resource logic area, obtaining a host machine physical deployment area through two steps of preselection and optimization, and constructing a physical machine according to the physical deployment area.
Node admission unit 42: and (4) using the infrastructure operation and maintenance operation to manage the physical machine built by the equipment application unit 41 to a corresponding cluster and deliver the cluster for use.
Fig. 18 schematically shows a block diagram of an electronic device adapted to implement the above method according to an embodiment of the present disclosure.
As shown in fig. 18, an electronic apparatus 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 900 may also include input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The driver 910 is also connected to an input/output (I/O) interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. The program code is for causing a computer system to perform the methods of the embodiments of the disclosure when the computer program product is run on the computer system.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 901. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, and the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, and downloaded and installed through the communication section 909 and/or installed from the removable medium 911. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments of the present disclosure and/or the claims may be made without departing from the spirit and teachings of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the disclosure, and these alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (15)

1. A method for dynamically adjusting resources in a multi-cluster architecture, comprising:
acquiring a deployment request of an application for container resources, wherein the container resources requested to be deployed comprise n containers, each container has a container characteristic, and n is an integer greater than or equal to 1;
counting resource use information of s clusters, wherein s is an integer greater than or equal to 2, and each cluster has cluster characteristics;
comparing the container resource requested to be deployed with the resource use information of the s clusters to select at least one cluster from the s clusters, and taking the at least one cluster as an actual deployment cluster;
determining a physical deployment area of a host machine corresponding to the actual deployment cluster according to the actual deployment cluster; and
dynamically adjusting physical resources according to the physical deployment region,
wherein the comparing the container resource requested to be deployed with the resource usage information of the s clusters to select at least one cluster from the s clusters, and the taking the at least one cluster as an actual deployment cluster specifically includes:
matching container characteristics of each container in the container resources requested to be deployed with cluster characteristics of the s clusters;
taking t clusters which are successfully matched as pre-deployment clusters, wherein t is an integer which is greater than or equal to 1 and less than or equal to s; and
and selecting at least one cluster from the pre-deployment clusters according to the container resource requested to be deployed and the resource use information of the pre-deployment clusters, and taking the at least one cluster as an actual deployment cluster.
2. The method of claim 1, wherein the resource usage information of each cluster comprises used resources and unused resources, wherein the used resources comprise historical container deployment of the application, and wherein the counting resource usage information of the s clusters comprises:
counting affinity scores of the applications to each cluster in the s clusters according to the historical container deployment conditions of the applications; and
and scoring each cluster according to the unused resources of each cluster in the s clusters to obtain a resource score.
3. The method according to claim 2, wherein selecting at least one cluster from the pre-deployment clusters according to the container resource requested to be deployed and the resource usage information of the pre-deployment clusters, and taking the at least one cluster as an actual deployment cluster specifically includes:
calculating the weighted scores of the t pre-deployment clusters according to the affinity scores and the resource scores; and
and selecting at least one cluster from the t pre-deployment clusters according to the weighted scores, and taking the at least one cluster as an actual deployment cluster.
4. The method of claim 1, wherein determining, from the actual deployment cluster, a physical deployment area of a host corresponding to the actual deployment cluster comprises:
generating host machine characteristics according to the container resources requested to be deployed;
acquiring physical resource characteristics of a physical resource pool, wherein the physical resource pool comprises k building areas, each building area has the physical resource characteristics, and k is an integer greater than or equal to 1;
carrying out feature matching on the host machine features and the physical resource features of the k building areas;
g building areas with successfully matched features are used as pre-building areas, wherein g is an integer which is greater than or equal to 1 and smaller than k; and
and determining a physical deployment area of the host machine corresponding to the actual deployment cluster according to the pre-built area.
5. The method according to claim 4, wherein the determining a physical deployment area of a host corresponding to the actual deployment cluster according to the pre-built area comprises:
acquiring regional characteristic information of each pre-built region;
scoring each pre-built region according to the region characteristic information to obtain a region score; and
and selecting at least one physical deployment area from the g pre-built areas as a host machine corresponding to the actual deployment cluster according to the area score.
6. The method of claim 5, wherein the regional characteristic information comprises at least one of a selectable IP number, a central processor resource usage, a memory resource usage, and a physical storage resource usage.
7. The method according to claim 6, wherein the scoring each pre-built region according to the region feature information, and obtaining a region score comprises:
respectively scoring the selectable IP number, the CPU resource utilization rate, the memory resource utilization rate and the physical storage resource utilization rate to obtain a plurality of regional characteristic scores; and
and weighting and summing the plurality of regional feature scores to obtain regional scores.
8. The method of claim 4, wherein the host characteristics include at least one of a corresponding network region, central processor architecture, cloud type, central processing machine size, memory size, and physical storage size; and/or the presence of a gas in the gas,
the physical resource characteristics include at least one of a corresponding network region, a central processor architecture, a cloud type, a central processing machine size, a memory size, and a physical storage size.
9. The method of claim 1, wherein the container characteristics include at least one of a network area, network characteristics, a central processor architecture and a platform version of a deployment cluster to which the container corresponds; and/or the presence of a gas in the gas,
the cluster characteristics include at least one of a network area, network characteristics, a central processor architecture, and a platform version corresponding to the cluster.
10. The method of claim 1, wherein obtaining the deployment request of the application for the container resource comprises: classifying the container resources requested to be deployed according to the container characteristics;
the matching container characteristics of each container in the container resources requested to be deployed with the cluster characteristics of the s clusters comprises: matching the container characteristics of each container in the classified container resources with the characteristics of the s clusters.
11. The method of claim 10, wherein obtaining the deployment request of the application for the container resource further comprises: unifying the specifications of the n containers.
12. A dynamic resource adjustment apparatus for a multi-cluster architecture, comprising:
the system comprises an acquisition module, a management module and a management module, wherein the acquisition module is used for executing a deployment request of an acquisition application for container resources, the container resources requested to be deployed comprise n containers, each container has a container characteristic, and n is an integer greater than or equal to 1;
the statistical module is used for performing statistics on resource use information of s clusters, wherein s is an integer greater than or equal to 2, and each cluster has cluster characteristics;
a comparison module, configured to perform a comparison between the container resource requested to be deployed and the resource usage information of the s clusters, so as to select at least one cluster from the s clusters, and use the at least one cluster as an actual deployment cluster;
a determining module, configured to determine, according to the actual deployment cluster, a physical deployment area of a host corresponding to the actual deployment cluster; and
an adjustment module to perform dynamic adjustment of physical resources according to the physical deployment area,
wherein, the comparison module specifically comprises:
a matching unit, configured to perform matching of container characteristics of each container in the container resources requested to be deployed with cluster characteristics of the s clusters;
the command unit is used for executing t clusters which are successfully matched as pre-deployment clusters, wherein t is an integer which is greater than or equal to 1 and less than or equal to s; and
and the selecting unit is used for selecting at least one cluster from the pre-deployment clusters according to the container resource requested to be deployed and the resource use information of the pre-deployment clusters, and taking the at least one cluster as an actual deployment cluster.
13. An electronic device, comprising:
one or more processors;
one or more memories for storing executable instructions that, when executed by the processor, implement the method of any of claims 1-11.
14. A computer-readable storage medium having stored thereon executable instructions that when executed by a processor implement a method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program comprising one or more executable instructions which, when executed by a processor, implement a method according to any one of claims 1 to 11.
CN202210143644.0A 2022-02-16 2022-02-16 Method, device, electronic equipment, medium and program product for dynamically adjusting resources Pending CN114490086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210143644.0A CN114490086A (en) 2022-02-16 2022-02-16 Method, device, electronic equipment, medium and program product for dynamically adjusting resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210143644.0A CN114490086A (en) 2022-02-16 2022-02-16 Method, device, electronic equipment, medium and program product for dynamically adjusting resources

Publications (1)

Publication Number Publication Date
CN114490086A true CN114490086A (en) 2022-05-13

Family

ID=81481575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210143644.0A Pending CN114490086A (en) 2022-02-16 2022-02-16 Method, device, electronic equipment, medium and program product for dynamically adjusting resources

Country Status (1)

Country Link
CN (1) CN114490086A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115361281A (en) * 2022-08-19 2022-11-18 浙江极氪智能科技有限公司 Processing method, device, equipment and medium for capacity expansion of multiple cloud cluster nodes
CN117135050A (en) * 2023-10-26 2023-11-28 建信金融科技有限责任公司 Application deployment method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115361281A (en) * 2022-08-19 2022-11-18 浙江极氪智能科技有限公司 Processing method, device, equipment and medium for capacity expansion of multiple cloud cluster nodes
CN115361281B (en) * 2022-08-19 2023-09-22 浙江极氪智能科技有限公司 Processing method, device, equipment and medium for expanding capacity of multiple cloud cluster nodes
CN117135050A (en) * 2023-10-26 2023-11-28 建信金融科技有限责任公司 Application deployment method and device
CN117135050B (en) * 2023-10-26 2024-02-09 建信金融科技有限责任公司 Application deployment method and device

Similar Documents

Publication Publication Date Title
CN1956457B (en) Method and apparatus for arranging mesh work in mesh computing system
US20200241930A1 (en) Dependent system optimization for serverless frameworks
US20220004480A1 (en) Log data collection method, log data collection device, storage medium, and log data collection system
JP3989443B2 (en) Method for controlling a web farm and web farm
CN114490086A (en) Method, device, electronic equipment, medium and program product for dynamically adjusting resources
US20180288143A1 (en) Managing idle and active servers in cloud data centers
Jafarnejad Ghomi et al. Applying queue theory for modeling of cloud computing: A systematic review
US20200104179A1 (en) Time frame bounded execution of computational algorithms
US20200175853A1 (en) Detecting influential factors for traffic congestion
US20230222004A1 (en) Data locality for big data on kubernetes
CN114035895A (en) Global load balancing method and device based on virtual service computing capacity
CN111405072B (en) Hybrid cloud optimization method based on cloud manufacturer cost scheduling
CN114844791B (en) Cloud service automatic management and distribution method and system based on big data and storage medium
CN116647560A (en) Method, device, equipment and medium for coordinated optimization control of Internet of things computer clusters
US20230196182A1 (en) Database resource management using predictive models
CN116089367A (en) Dynamic barrel dividing method, device, electronic equipment and medium
CN113138772B (en) Construction method and device of data processing platform, electronic equipment and storage medium
Menouer et al. Containers scheduling consolidation approach for cloud computing
US20220004759A1 (en) Dataset driven custom learning for multi-scale object detection
Son et al. Stochastic distributed data stream partitioning using task locality: design, implementation, and optimization
CN112732451A (en) Load balancing system in cloud environment
CN111625436A (en) Insurance business capacity management method and device, electronic equipment and storage medium
Komalavalli et al. An Optimal Server Selection Model for Dynamic Task Allocation in Cloud
CN110457122B (en) Task processing method, task processing device and computer system
US11886928B2 (en) Automated service tiering between edge computing sites and a core data center

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination