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 PDFInfo
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本公开提供一种用于多集群架构的资源动态调整方法、装置、电子设备、介质和程序产品。上述方法和装置可用于云计算和金融技术领域。所述方法包括:获取应用针对容器资源的部署请求,其中,请求部署的容器资源包括n个容器,每个容器具有容器特征,n为大于等于1的整数;统计s个集群的资源使用信息,其中,s为大于等于2的整数,每个集群具有集群特征;比较请求部署的容器资源与s个集群的资源使用信息,以从s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群;根据实际部署集群确定与实际部署集群对应的宿主机的物理部署区域;以及根据物理部署区域对物理资源进行动态调整。
The present disclosure provides a resource dynamic adjustment method, apparatus, electronic device, medium and program product for a multi-cluster architecture. The above method and apparatus can be used in the fields of cloud computing and financial technology. The method includes: acquiring a deployment request of an application for a container resource, wherein the container resource requested to be deployed includes n containers, each container has a container feature, and n is an integer greater than or equal to 1; and count the resource usage information of the s clusters, Among them, s is an integer greater than or equal to 2, and each cluster has cluster characteristics; compare the container resources requested for deployment with the resource usage information of the s clusters, to select at least one cluster from the s clusters, and use the at least one cluster as the The cluster is actually deployed; the physical deployment area of the host corresponding to the actual deployment cluster is determined according to the actual deployment cluster; and the physical resources are dynamically adjusted according to the physical deployment area.
Description
技术领域technical field
本公开涉及云计算技术领域,更具体地,涉及一种用于多集群架构的资源动态调整方法、装置、电子设备、计算机可读存储介质和计算机程序产品。The present disclosure relates to the technical field of cloud computing, and more particularly, to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for dynamic resource adjustment in a multi-cluster architecture.
背景技术Background technique
随着IT架构转型,越来越多的业务部署在云上集群,各个公司机构纷纷搭建起私有云以及完成物理资源的池化设计,池化设计大大提高了资源利用率,但也造成了资源管理上的困难。此外,由于网络类型的多样、集群版本的灰度等限制或者公司业务规模的扩张,单集群的私有云架构不再满足需求。考虑到各个集群资源使用状况的不同以及集群属性的多样性,考虑到私有云架构不存在租户的概念,针对各用户容器资源的申请要综合考虑整个私有云资源使用情况,以达到给出用户容器一个合理部署范围的目的。With the transformation of IT architecture, more and more businesses are deployed in cloud clusters, and various companies and institutions have built private clouds and completed the pooling design of physical resources. The pooling design greatly improves resource utilization, but also causes resources management difficulties. In addition, the single-cluster private cloud architecture no longer meets the requirements due to restrictions on the diversity of network types, the grayscale of cluster versions, or the expansion of the company's business scale. Considering the difference in resource usage status of each cluster and the diversity of cluster attributes, and considering that the private cloud architecture does not have the concept of tenants, the application for each user's container resources should comprehensively consider the resource usage of the entire private cloud, so as to provide user containers. A reasonable deployment scope for the purpose.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本公开提供了一种管理有序、便于动态扩容的用于多集群架构的资源动态调整方法、装置、电子设备、计算机可读存储介质和计算机程序产品。In view of this, the present disclosure provides a resource dynamic adjustment method, apparatus, electronic device, computer-readable storage medium and computer program product for a multi-cluster architecture that are managed in an orderly manner and facilitate dynamic expansion.
本公开的一个方面提供了一种用于多集群架构的资源动态调整方法,包括:获取应用针对容器资源的部署请求,其中,请求部署的容器资源包括n个容器,每个所述容器具有容器特征,n为大于等于1的整数;统计s个集群的资源使用信息,其中,s为大于等于2的整数,每个所述集群具有集群特征;比较所述请求部署的容器资源与所述s个集群的资源使用信息,以从所述s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群;根据所述实际部署集群确定与所述实际部署集群对应的宿主机的物理部署区域;以及根据所述物理部署区域对物理资源进行动态调整。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 a container resource, wherein the container resource requested to be deployed includes n containers, each of which has a container feature, n is an integer greater than or equal to 1; count the resource usage information of s clusters, where s is an integer greater than or equal to 2, and each cluster has cluster characteristics; compare the container resources requested to be deployed with the s resource usage information of each cluster, so as to select at least one cluster from the s clusters, and use the at least one cluster as the actual deployment cluster; determine the physical properties of the host corresponding to the actual deployment cluster according to the actual deployment cluster a deployment area; and dynamically adjusting physical resources according to the physical deployment area.
其中,所述比较所述请求部署的容器资源与所述s个集群的资源使用信息,以从所述s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群,具体包括:将请求部署的容器资源中的每个容器的容器特征与所述s个集群的集群特征进行匹配;将匹配成功的t个集群作为预部署集群,其中,t为大于等于1且小于等于s的整数;以及根据所述请求部署的容器资源和所述预部署集群的资源使用信息,从所述预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。The comparing the container resources requested to be deployed and the resource usage information of the s clusters to select at least one cluster from the s clusters, and use the at least one cluster as the actual deployment cluster, specifically includes: Match the container characteristics of each container in the container resources requested to be deployed with the cluster characteristics of the s clusters; take the t clusters that are successfully matched as pre-deployed clusters, where t is greater than or equal to 1 and less than or equal to s and selecting at least one cluster from the pre-deployed clusters according to the requested deployment container resources and resource usage information of the pre-deployed clusters, and using the at least one cluster as an actual deployment cluster.
根据本公开实施例的用于多集群架构的资源动态调整方法,基于多集群架构下,实时监控应用针对容器资源的申请详情,并依据当前s个集群的资源使用信息,实时分析出申请部署的容器资源应部署的集群范围,在资源不满足的条件下,动态的调用物理资源池的物理资源进行宿主机申请以及纳管,以达到自动动态扩容的目的。另外,本方法可以有序地管理和分配集群资源以及物理部署区域,可以解决现有技术中集群资源混乱,管理和应用毫无章法的问题。According to the method for dynamically adjusting resources for a multi-cluster architecture according to an embodiment of the present disclosure, based on the multi-cluster architecture, the application details of applications for container resources are monitored in real time, and according to the resource usage information of the current s clusters, the application for deployment is analyzed in real time. The scope of the cluster in which the container resources should be deployed. If the resources are not satisfied, the physical resources of the physical resource pool are dynamically called for host application and management, so as to achieve the purpose of automatic and dynamic expansion. In addition, the method can manage and allocate cluster resources and physical deployment areas in an orderly manner, and can solve the problems in the prior art that cluster resources are chaotic and management and application are incoherent.
在一些实施例中,每个所述集群的资源使用信息包括已用资源和未用资源,所述已用资源包括所述应用的历史容器部署情况,所述统计s个集群的资源使用信息包括:根据所述应用的历史容器部署情况统计所述应用对所述s个集群中每个集群的亲和性分值;以及根据所述s个集群中每个集群的未用资源,给每个集群打分,以得到资源分值。In some embodiments, the resource usage information of each of the clusters includes used resources and unused resources, the used resources include historical container deployment situations of the application, and the statistical resource usage information of the s clusters includes : Count the affinity score of the application to each of the s clusters according to the historical container deployment situation of the application; and according to the unused resources of each of the s clusters, give each Cluster scores to get resource scores.
在一些实施例中,根据所述请求部署的容器资源和所述预部署集群的资源使用信息,从所述预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群,具体包括:根据所述亲和性分值和所述资源分值,计算t个预部署集群的加权分值;以及根据所述加权分值,从t个预部署集群选择出至少一个集群,将该至少一个集群作为实际部署集群。In some embodiments, at least one cluster is selected from the pre-deployed clusters according to the requested deployment container resources and resource usage information of the pre-deployed clusters, and the at least one cluster is used as the actual deployment cluster, which specifically includes: : calculate the weighted score of the t pre-deployed clusters according to the affinity score and the resource score; and select at least one cluster from the t pre-deployed clusters according to the weighted score, and select the at least one cluster from the t pre-deployed clusters. A cluster as the actual deployment cluster.
在一些实施例中,所述根据所述实际部署集群确定与所述实际部署集群对应的宿主机的物理部署区域包括:根据所述请求部署的容器资源生成宿主机特征;获取物理资源池的物理资源特征,其中,所述物理资源池包括k个搭建区域,每个所述搭建区域具有所述物理资源特征,k为大于等于1的整数;将所述宿主机特征和所述k个搭建区域的物理资源特征进行特征匹配;将特征匹配成功的g个搭建区域作为预搭建区域,其中,g为大于等于1且小于k的整数;以及根据所述预搭建区域确定与所述实际部署集群对应的宿主机的物理部署区域。In some embodiments, the determining, according to the actual deployment cluster, the physical deployment area of the host corresponding to the actual deployment cluster includes: generating a host feature according to the requested deployment container resource; Resource characteristics, wherein the physical resource pool includes k construction areas, each of the construction areas has the physical resource characteristics, and k is an integer greater than or equal to 1; the host characteristics and the k construction areas are combined Perform feature matching on the physical resource features of the The physical deployment area of the host.
在一些实施例中,所述根据所述预搭建区域确定与所述实际部署集群对应的宿主机的物理部署区域包括:获取每个预搭建区域的区域特征信息;根据所述区域特征信息给每个预搭建区域打分,得到区域分值;以及根据所述区域分值,从g个预搭建区域中选择至少一个作为所述实际部署集群对应的宿主机的物理部署区域。In some embodiments, the determining, according to the pre-built area, the physical deployment area of the host corresponding to the actual deployment cluster includes: acquiring area feature information of each pre-build area; The pre-built areas are scored to obtain a regional score; and according to the regional score, at least one of the g pre-built areas is selected as the physical deployment area of the host corresponding to the actual deployment cluster.
在一些实施例中,所述区域特征信息包括可选IP数、中央处理器资源使用率、内存资源使用率和物理存储资源使用率中的至少一个。In some embodiments, the area feature information includes at least one of optional IP numbers, CPU resource usage, memory resource usage, and physical storage resource usage.
在一些实施例中,所述根据所述区域特征信息给每个预搭建区域打分,得到区域分值包括:给所述可选IP数、所述中央处理器资源使用率、所述内存资源使用率和所述物理存储资源使用率分别打分,得到多个区域特征分值;以及对所述多个区域特征分值加权求和得到区域分值。In some embodiments, scoring each pre-built area according to the area feature information, and obtaining the area score includes: assigning the optional IP number, the CPU resource usage rate, the memory resource usage rate The physical storage resource utilization rate and the physical storage resource usage rate are respectively scored to obtain a plurality of regional characteristic scores; and a weighted summation of the plurality of regional characteristic scores is obtained to obtain a regional score.
在一些实施例中,所述宿主机特征包括对应的网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小和物理存储大小中的至少一个;和/或,所述物理资源特征包括对应的网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小和物理存储大小中的至少一个。In some embodiments, the host machine characteristics include at least one of a corresponding network region, central processing unit architecture, cloud type, central processing machine size, memory size, and physical storage size; and/or, the physical resource characteristics Include at least one of corresponding network area, central processing unit architecture, cloud type, central processing machine size, memory size, and physical storage size.
在一些实施例中,所述容器特征包括容器对应的网络区域、网络特点、部署集群的中央处理器架构和平台版本中的至少一个;和/或,所述集群特征包括集群对应的网络区域、网络特点、中央处理器架构和平台版本中的至少一个。In some embodiments, the container feature includes at least one of a network area corresponding to the container, a network feature, a CPU architecture and a platform version on which the cluster is deployed; and/or, the cluster feature includes a network area corresponding to the cluster, At least one of network characteristics, central processing unit architecture, and platform version.
在一些实施例中,所述获取应用针对容器资源的部署请求包括:根据所述容器特征对请求部署的容器资源进行分类;所述将请求部署的容器资源中的每个容器的容器特征与所述s个集群的集群特征进行匹配包括:将分类后的容器资源中的每个容器的容器特征与所述s个集群的特征进行匹配。In some embodiments, acquiring the deployment request of the application for the container resource includes: classifying the container resource requested to be deployed according to the container feature; The matching of the cluster features of the s clusters includes: matching the container features of each container in the classified container resources with the features of the s clusters.
在一些实施例中,所述获取应用针对容器资源的部署请求还包括:统一所述n个容器的规格。In some embodiments, the acquiring the deployment request for the container resource by the application further includes: unifying the specifications of the n containers.
本公开的另一个方面提供了一种用于多集群架构的资源动态调整装置,包括:获取模块,所述获取模块用于执行获取应用针对容器资源的部署请求,其中,请求部署的容器资源包括n个容器,每个所述容器具有容器特征,n为大于等于1的整数;统计模块,所述统计模块用于执行统计s个集群的资源使用信息,其中,s为大于等于2的整数,每个所述集群具有集群特征;比较模块,所述比较模块用于执行比较所述请求部署的容器资源与所述s个集群的资源使用信息,以从所述s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群;确定模块,所述确定模块用于执行根据所述实际部署集群确定与所述实际部署集群对应的宿主机的物理部署区域;以及调整模块,所述调整模块用于执行根据所述物理部署区域对物理资源进行动态调整。Another aspect of the present disclosure provides a resource dynamic adjustment device for a multi-cluster architecture, including: an acquisition module, the acquisition module is configured to execute a deployment request for acquiring an application for container resources, wherein the container resources requested to be deployed include: n containers, each container has container characteristics, n is an integer greater than or equal to 1; a statistics module, the statistics module is used to perform statistics on resource usage information of s clusters, where s is an integer greater than or equal to 2, Each of the clusters has cluster characteristics; a comparison module is configured to perform a comparison between the container resources 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 a cluster, using the at least one cluster as an actual deployment cluster; a determining module, the determining module is configured to determine the physical deployment area of the host corresponding to the actual deployment cluster according to the actual deployment cluster; and an adjustment module, the The adjustment module is configured to perform dynamic adjustment of physical resources according to the physical deployment area.
其中,所述比较模块具体包括:匹配单元,所述匹配单元用于执行将请求部署的容器资源中的每个容器的容器特征与所述s个集群的集群特征进行匹配;命令单元,所述命令单元用于执行将匹配成功的t个集群作为预部署集群,其中,t为大于等于1且小于等于s的整数;以及选择单元,所述选择单元用于执行根据所述请求部署的容器资源和所述预部署集群的资源使用信息,从所述预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。Wherein, the comparison module specifically includes: a matching unit, the matching unit is configured to perform matching between the container feature of each container in the container resources requested to be deployed and the cluster feature of the s clusters; a command unit, the The command unit is used to execute the t clusters that are matched successfully as pre-deployed clusters, where t is an integer greater than or equal to 1 and less than or equal to s; and a selection unit, the selection unit is used to execute the container resources deployed according to the request and resource usage information of the pre-deployed clusters, at least one cluster is selected from the pre-deployed clusters, and the at least one cluster is used as the actual deployment cluster.
本公开的另一方面提供了一种电子设备,包括一个或多个处理器以及一个或多个存储器,其中,所述存储器用于存储可执行指令,所述可执行指令在被所述处理器执行时,实现如上所述方法。Another aspect of the present disclosure provides an electronic device including one or more processors and one or more memories, wherein the memories are used to store executable instructions, the executable instructions being executed by the processor When executed, the method described above is implemented.
本公开的另一方面提供了一种计算机可读存储介质,存储有计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which when executed, are used to implement the method as described above.
本公开的另一方面提供了一种计算机程序产品,包括计算机程序,所述计算机程序包括计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of the present disclosure provides a computer program product comprising a computer program comprising computer-executable instructions that, when executed, are used to implement the method as described above.
附图说明Description of 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:
图1示意性示出了根据本公开实施例的可以应用方法、装置的示例性系统架构;FIG. 1 schematically shows an exemplary system architecture to which methods and apparatuses according to embodiments of the present disclosure can be applied;
图2示意性示出了根据本公开实施例的用于多集群架构的资源动态调整方法的流程图;FIG. 2 schematically shows a flowchart of a method for dynamic resource adjustment in a multi-cluster architecture according to an embodiment of the present disclosure;
图3示意性示出了根据本公开实施例的统计s个集群的资源使用信息的流程图;FIG. 3 schematically shows a flow chart of counting resource usage information of s clusters according to an embodiment of the present disclosure;
图4示意性示出了根据本公开实施例的比较请求部署的容器资源与s个集群的资源使用信息,以从s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群的流程图;FIG. 4 schematically illustrates comparing the container resources requested to be deployed and the resource usage information of s clusters according to an embodiment of the present disclosure, so as to select at least one cluster from the s clusters, and use the at least one cluster as the actual deployment cluster. flow chart;
图5示意性示出了根据本公开实施例的根据请求部署的容器资源和预部署集群的资源使用信息,从预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群的流程图;FIG. 5 schematically shows a process of selecting at least one cluster from the pre-deployed clusters and using the at least one cluster as the actual deployment cluster according to the container resources deployed on request and the resource usage information of the pre-deployed clusters according to an embodiment of the present disclosure picture;
图6示意性示出了根据本公开实施例的根据实际部署集群确定与实际部署集群对应的宿主机的物理部署区域的流程图;6 schematically shows a flowchart of determining a physical deployment area of a host machine corresponding to an actual deployment cluster according to an actual deployment cluster according to an embodiment of the present disclosure;
图7示意性示出了根据本公开实施例的根据预搭建区域确定与实际部署集群对应的宿主机的物理部署区域的流程图;7 schematically shows a flowchart of determining a physical deployment area of a host machine corresponding to an actual deployment cluster according to a pre-built area according to an embodiment of the present disclosure;
图8示意性示出了根据本公开实施例的根据区域特征信息给每个预搭建区域打分,得到区域分值的流程图;8 schematically shows a flow chart of scoring each pre-built area according to the area feature information to obtain the area score according to an embodiment of the present disclosure;
图9示意性示出了根据本公开实施例的获取应用针对容器资源的部署请求的流程图;FIG. 9 schematically shows a flow chart of acquiring a deployment request of an application for a container resource according to an embodiment of the present disclosure;
图10示意性示出了根据本公开实施例的将请求部署的容器资源中的每个容器的容器特征与s个集群的集群特征进行匹配的流程图;FIG. 10 schematically shows a flowchart of matching the container feature of each container in the container resource requested to be deployed with the cluster feature of s clusters according to an embodiment of the present disclosure;
图11示意性示出了根据本公开实施例的用于多集群架构的资源动态调整装置的结构框图;FIG. 11 schematically shows a structural block diagram of an apparatus for dynamic resource adjustment for a multi-cluster architecture according to an embodiment of the present disclosure;
图12示意性示出了根据本公开实施例的比较模块的结构框图;FIG. 12 schematically shows a structural block diagram of a comparison module according to an embodiment of the present disclosure;
图13示意性示出了根据本公开实施例的资源动态调整装置的结构图;FIG. 13 schematically shows a structural diagram of an apparatus for dynamic resource adjustment according to an embodiment of the present disclosure;
图14示意性示出了根据本公开实施例的申请详情统计装置的内部结构图;FIG. 14 schematically shows an internal structure diagram of an application details statistics device according to an embodiment of the present disclosure;
图15示意性示出了根据本公开实施例的集群资源统计装置的内部结构图;FIG. 15 schematically shows an internal structure diagram of a cluster resource statistics apparatus according to an embodiment of the present disclosure;
图16示意性示出了根据本公开实施例的申请资源分析装置的内部结构图;FIG. 16 schematically shows an internal structure diagram of an application resource analysis device according to an embodiment of the present disclosure;
图17示意性示出了根据本公开实施例的设备申请扩容装置的内部结构图;FIG. 17 schematically shows an internal structure diagram of a device for applying for capacity expansion according to an embodiment of the present disclosure;
图18示意性示出了根据本公开实施例的电子设备的方框图。FIG. 18 schematically shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that these descriptions are exemplary only, and are not intended to limit the scope of the present disclosure. In the following detailed description, for convenience of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It will be apparent, however, that one or more embodiments may be practiced without these specific details. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.
在本公开的技术方案中,所涉及的用户个人信息的获取,存储和应用等,均符合相关法律法规的规定,采取了必要保密措施,且不违背公序良俗。在本公开的技术方案中,对数据的获取、收集、存储、使用、加工、传输、提供、公开和应用等处理,均符合相关法律法规的规定,采取了必要保密措施,且不违背公序良俗。In the technical solution of the present disclosure, the acquisition, storage and application of the user's personal information involved all comply with the relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good customs. In the technical solution of the present disclosure, the acquisition, collection, storage, use, processing, transmission, provision, disclosure and application of data are all in compliance with the provisions of relevant laws and regulations, and necessary confidentiality measures have been taken, and do not violate public order and good customs.
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the present disclosure. The terms "comprising", "comprising" and the like as used herein indicate 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.
在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。Where expressions like "at least one of A, B, or C, etc.," are used, they should generally be interpreted in accordance with the meaning of the expression as commonly understood by those skilled in the art (eg, "has A, B, or C, etc." At least one of the "systems" shall include, but not be limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc. ). The terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second" may expressly or implicitly include one or more of said features.
随着IT架构转型,越来越多的业务部署在云上集群,各个公司机构纷纷搭建起私有云以及完成物理资源的池化设计,池化设计大大提高了资源利用率,但也造成了资源管理上的困难。例如,云平台提供的快速弹性伸缩能力,为应对突发流量增长场景提供了有力的支撑,但随着流量的缩减或者说应用规模的下降,缩容后的空闲资源的统计以及再利用都将是资源管理上的难题。With the transformation of IT architecture, more and more businesses are deployed in cloud clusters, and various companies and institutions have built private clouds and completed the pooling design of physical resources. The pooling design greatly improves resource utilization, but also causes resources management difficulties. For example, the fast elastic scaling capability provided by the cloud platform provides strong support for dealing with sudden traffic growth scenarios. However, with the reduction of traffic or the decrease of application scale, the statistics and reuse of idle resources after the reduction will be reduced. It's a resource management problem.
此外,由于网络类型的多样、集群版本的灰度等限制或者公司业务规模的扩张,单集群的私有云架构不再满足需求。考虑到各个集群资源使用状况的不同以及集群属性的多样性,考虑到私有云架构不存在租户的概念,针对各用户容器资源的申请要综合考虑整个私有云资源使用情况,以达到给出用户容器一个合理部署范围的目的,跨越多集群的统计分析将是资源管理上的又一大难题。In addition, the single-cluster private cloud architecture no longer meets the requirements due to restrictions on the diversity of network types, the grayscale of cluster versions, or the expansion of the company's business scale. Considering the difference in resource usage of each cluster and the diversity of cluster attributes, and considering that the private cloud architecture does not have the concept of tenants, the application for each user's container resources should comprehensively consider the resource usage of the entire private cloud, so as to give the user container For the purpose of a reasonable deployment range, statistical analysis across multiple clusters will be another major challenge in resource management.
本公开的实施例提供了一种用于多集群架构的资源动态调整方法、装置、电子设备、计算机可读存储介质和计算机程序产品。用于多集群架构的资源动态调整方法包括:获取应用针对容器资源的部署请求,其中,请求部署的容器资源包括n个容器,每个容器具有容器特征,n为大于等于1的整数;统计s个集群的资源使用信息,其中,s为大于等于2的整数,每个集群具有集群特征;比较请求部署的容器资源与s个集群的资源使用信息,以从s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群;根据实际部署集群确定与实际部署集群对应的宿主机的物理部署区域;以及根据物理部署区域对物理资源进行动态调整。Embodiments of the present disclosure provide a resource dynamic adjustment method, apparatus, electronic device, computer-readable storage medium, and computer program product for a multi-cluster architecture. A resource dynamic adjustment method for a multi-cluster architecture includes: acquiring a deployment request of an application for a container resource, wherein the container resource requested to be deployed includes n containers, each container has container characteristics, and n is an integer greater than or equal to 1; statistics s resource usage information of each cluster, where s is an integer greater than or equal to 2, and each cluster has cluster characteristics; compare the container resources requested for deployment with the resource usage information of s clusters to select at least one cluster from s clusters , using the at least one cluster as the actual deployment cluster; determining the physical deployment area of the 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.
其中,比较请求部署的容器资源与s个集群的资源使用信息,以从s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群,具体包括:将请求部署的容器资源中的每个容器的容器特征与s个集群的集群特征进行匹配;将匹配成功的t个集群作为预部署集群,其中,t为大于等于1且小于等于s的整数;以及根据请求部署的容器资源和预部署集群的资源使用信息,从预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。Wherein, comparing the container resources requested to be deployed and the resource usage information of the s clusters, to select at least one cluster from the s clusters, and use the at least one cluster as the actual deployment cluster, which specifically includes: The container characteristics of each container are matched with the cluster characteristics of s clusters; the t clusters that are successfully matched are used as pre-deployed clusters, where t is an integer greater than or equal to 1 and less than or equal to s; and the container resources deployed according to the request and Resource usage information of the pre-deployed cluster, at least one cluster is selected from the pre-deployed cluster, and the at least one cluster is used as the actual deployment cluster.
需要说明的是,本公开的用于多集群架构的资源动态调整方法、装置、电子设备、计算机可读存储介质和计算机程序产品可用于云计算技术领域,也可用于除云计算技术领域之外的任意领域,例如金融领域,这里对本公开的领域不做限定。It should be noted that the method, apparatus, electronic device, computer-readable storage medium and computer program product for dynamic adjustment of resources for multi-cluster architecture of the present disclosure can be used in the field of cloud computing technology, and can also be used in the field of cloud computing technology. In any field, such as the financial field, the field of the present disclosure is not limited here.
图1示意性示出了根据本公开实施例的可以应用用于多集群架构的资源动态调整方法、装置、电子设备、计算机可读存储介质和计算机程序产品的示例性系统架构100。需要注意的是,图1所示仅为可以应用本公开实施例的系统架构的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。1 schematically illustrates an
如图1所示,根据该实施例的系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。The user can use the
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The
服务器105可以是提供各种服务的服务器,例如对用户利用终端设备101、102、103所浏览的网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的用户请求等数据进行分析等处理,并将处理结果(例如根据用户请求获取或生成的网页、信息、或数据等)反馈给终端设备。The
需要说明的是,本公开实施例所提供的用于多集群架构的资源动态调整方法一般可以由服务器105执行。相应地,本公开实施例所提供的用于多集群架构的资源动态调整装置一般可以设置于服务器105中。本公开实施例所提供的用于多集群架构的资源动态调整方法也可以由不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的用于多集群架构的资源动态调整装置也可以设置于不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群中。It should be noted that, the method for dynamic resource adjustment for a multi-cluster architecture provided by the embodiments of the present disclosure may generally be executed by the
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
以下将基于图1描述的场景,通过图2~图11对本公开实施例的用于多集群架构的资源动态调整方法进行详细描述。Based on the scenario described in FIG. 1 , the following will describe in detail the method for dynamic resource adjustment for a multi-cluster architecture according to an embodiment of the present disclosure with reference to FIGS. 2 to 11 .
图2示意性示出了根据本公开实施例的用于多集群架构的资源动态调整方法的流程图。FIG. 2 schematically shows a flowchart of a method for dynamic resource adjustment in a multi-cluster architecture according to an embodiment of the present disclosure.
如图2所示,该实施例的用于多集群架构的资源动态调整方法包括操作S210~操作S250。As shown in FIG. 2 , the method for dynamic resource adjustment for a multi-cluster architecture in this embodiment includes operations S210 to S250.
在操作S210,获取应用针对容器资源的部署请求,其中,请求部署的容器资源包括n个容器,每个容器具有容器特征,n为大于等于1的整数。In operation S210, a deployment request for a container resource by an application is obtained, wherein 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.
在操作S220,统计s个集群的资源使用信息,其中,s为大于等于2的整数,每个集群具有集群特征。In operation S220, the resource usage information of s clusters is counted, where s is an integer greater than or equal to 2, and each cluster has cluster characteristics.
作为一种可能实现的方式,每个集群的资源使用信息包括已用资源和未用资源,已用资源包括应用的历史容器部署情况,可以理解的是,在收到应用的部署请求之前,s个集群上可能已经部署了容器,已经部署的容器可以理解为上文提到的历史容器,历史容器可能是提出请求的应用部署的,也可能是提出请求的应用以外的其它应用部署的,这里不做具体限定。As a possible implementation method, the resource usage information of each cluster includes used resources and unused resources, and the used resources include the historical container deployment situation of the application. It can be understood that before receiving the deployment request of the application, s Containers may have been deployed on each cluster, and the deployed containers can be understood as the historical containers mentioned above. The historical containers may be deployed by the application that made the request, or by other applications other than the application that made the request. Here No specific limitation is made.
如图3所示,操作S220统计s个集群的资源使用信息可以包括操作S221和操作S222。As shown in FIG. 3 , the operation S220 to count the resource usage information of the s clusters may include operation S221 and operation S222.
在操作S221,根据应用的历史容器部署情况统计应用对s个集群中每个集群的亲和性分值。其中,根据应用的历史容器部署情况统计应用对s个集群中每个集群的亲和性分值可以理解为根据历史容器在各个集群的部署数量统计应用对各个集群的亲和性分值。换言之,可以统计应用在某个集群部署历史容器的数量,部署的历史容器数量越多,则该应用与某个集群的亲和性越高,亲和性分值越高。例如,应用1在集群a上部署了3个历史容器,应用1在集群b上部署了1个历史容器,因此确定应用1与集群a的亲和性较高,应用1对集群a的亲和性分值大于应用1对集群b的亲和性分值。In operation S221, the affinity score of the application to each of the s clusters is counted according to the historical container deployment situation of the application. The statistics of the affinity score of the application to each of the s clusters according to the historical container deployment situation of the application can be understood as the statistics of the affinity score of the application to each cluster according to the number of historical containers deployed in each cluster. In other words, the number of historical containers deployed by an application in a cluster can be counted. The more historical containers deployed, the higher the affinity between the application and a cluster, and the higher the affinity score. For example,
在操作S222,根据s个集群中每个集群的未用资源,给每个集群打分,以得到资源分值。其中,未用资源可以理解为集群上未部署历史容器的情况,未部署历史容器的资源越多,也即未用资源越多,资源分值越高。In operation S222, each cluster is scored according to the unused resources of each of the s clusters to obtain a resource score. Among them, the unused resources can be understood as the situation that the historical container is not deployed on the cluster. The more resources that are not deployed in the historical container, that is, the more unused resources, the higher the resource score.
通过操作S221和操作S222可以便于实现统计s个集群的资源使用信息,得到亲和性分值和资源分值。Through operation S221 and operation S222, it is convenient to implement statistics of resource usage information of s clusters to obtain an affinity score and a resource score.
在操作S230,比较请求部署的容器资源与s个集群的资源使用信息,以从s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。In operation S230, the container resources requested to be deployed are compared with 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 the actual deployment cluster.
作为一种可能实现的方式,容器特征可以包括容器对应的网络区域、网络特点、部署集群的中央处理器架构和平台版本中的至少一个;和/或,集群特征可以包括集群对应的网络区域、网络特点、中央处理器架构和平台版本中的至少一个。其中,网络区域可以为内部网络或者外部网络,但是并不限于此;网络特点可以为局域网或者广域网,但是并不限于此;平台版本可以为k8s版本等,但是并不限于此。As a possible implementation manner, the container feature may include at least one of the network area corresponding to the container, the network feature, the CPU architecture and platform version on which the cluster is deployed; and/or the cluster feature may include the network area corresponding to the cluster, At least one of network characteristics, central processing unit architecture, and platform version. Wherein, the network area can be an internal network or an external network, but is not limited to this; the network feature can be a local area network or a wide area network, but is not limited to this; the platform version can be the k8s version, etc., but is not limited to this.
作为一种可能实现的方式,如图4所示,操作S230比较请求部署的容器资源与s个集群的资源使用信息,以从s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群,具体包括操作S231~操作S233。As a possible implementation manner, as shown in FIG. 4 , operation S230 compares the container resources requested to be deployed with 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 the actual cluster. Deploying the cluster specifically includes operations S231 to S233.
在操作S231,将请求部署的容器资源中的每个容器的容器特征与s个集群的集群特征进行匹配。In operation S231, the container characteristic of each container in the container resource requested to be deployed is matched with the cluster characteristic of the s clusters.
在操作S232,将匹配成功的t个集群作为预部署集群,其中,t为大于等于1且小于等于s的整数。In operation S232, the t clusters that are successfully matched are used as pre-deployed clusters, where t is an integer greater than or equal to 1 and less than or equal to s.
在操作S233,根据请求部署的容器资源和预部署集群的资源使用信息,从预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。In operation S233, at least one cluster is selected from the pre-deployed clusters according to the container resources requested to be deployed and the resource usage information of the pre-deployed clusters, and the at least one cluster is used as the actual deployment cluster.
可以理解的是,容器特征和集群特征均可以包括一个或者多个要素,容器特征要素与集群特征要素为一一对应的,可以将每个要素逐一匹配。It can be understood that both the container feature and the cluster feature may include one or more elements, the container feature element and the cluster feature element are in one-to-one correspondence, and each element may be matched one by one.
例如,每个容器特征可以包括四个要素,分别为容器对应的网络区域、网络特点、部署集群的中央处理器架构和平台版本。对应地,每个集群特征可以包括四个要素,分别为集群对应的网络区域、网络特点、部署集群的中央处理器架构和平台版本。For example, each container feature may include four elements, which are the network area corresponding to the container, network characteristics, and the central processing unit architecture and platform version of the deployed cluster. Correspondingly, each cluster feature may include four elements, which are the network area corresponding to the cluster, network characteristics, and the architecture and platform version of the central processor where the cluster is deployed.
进一步例如,容器1的网络区域为内部网络,网络特点为局域网,部署集群的中央处理器架构为X86,平台版本为k8s版本。集群a的网络区域为外部网络,网络特点为广域网,部署集群的中央处理器架构为X86,平台版本为k8s版本;集群b的网络区域为内部网络,网络特点为局域网,部署集群的中央处理器架构为X86,平台版本为k8s版本;集群c的网络区域为内部网络,网络特点为局域网,部署集群的中央处理器架构为X86,平台版本为k8s版本。For further example, the network area of
将容器1的四个要素与集群a的四个要素分别匹配,将容器1的四个要素与集群b的四个要素分别匹配,将容器1的四个要素与集群c的四个要素分别匹配,由此,可以将与容器1特征匹配成功的集群b和集群c作为容器1的预部署集群。Match the four elements of
作为一种可能实现的方式,如图5所示,操作S233根据请求部署的容器资源和预部署集群的资源使用信息,从预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群,具体包括操作S2331和操作S2332。As a possible implementation manner, as shown in FIG. 5 , operation S233 selects at least one cluster from the pre-deployed clusters according to the requested deployment container resource and the resource usage information of the pre-deployed cluster, and uses the at least one cluster as the actual deployment The cluster specifically includes operations S2331 and S2332.
在操作S2331,根据亲和性分值和资源分值,计算t个预部署集群的加权分值。可以理解的是,在操作S221中已经计算了应用对每个集群的亲和性分值,这里,若应用未在某个集群上部署历史容器,则应用对于该集群的亲和性分值可以记为0。由此,可以得到应用对于每个预部署集群的亲和性分值,通过操作S222可以得到每个预部署集群的资源分值,进而根据亲和性分值和资源分值,可以计算每个预部署集群的加权分值,加权分值可以理解为给亲和性分值和资源分值分别加权,得到亲和性加权分和资源加权分,然后求亲和性加权分和资源加权分的和。In operation S2331, the weighted scores of the t pre-deployed clusters are calculated according to the affinity score and the resource score. It can be understood that the affinity score of the application to each cluster has been calculated in operation S221. Here, if the application has not deployed a history container on a certain cluster, the affinity score of the application to the cluster can be Record it as 0. Thus, the affinity score of the application for each pre-deployed cluster can be obtained, and the resource score of each pre-deployed cluster can be obtained by operation S222, and then each pre-deployed cluster can be calculated according to the affinity score and the resource score. The weighted score of the pre-deployed cluster. The weighted score can be understood as weighting the affinity score and the resource score respectively to obtain the affinity weighted score and the resource weighted score, and then calculate the sum of the affinity weighted score and the resource weighted score. .
在操作S2332,根据加权分值,从t个预部署集群选择出至少一个集群,将该至少一个集群作为实际部署集群。其中,根据加权分值,从t个预部署集群选择出至少一个集群,将该至少一个集群作为实际部署集群可以理解为根据加权分值的排序确定一个或者多个实际部署集群。换言之,得到每个预部署集群的加权分值后,可以对多个预部署集群进行排序,这里,排序可以为升序也可以为降序,根据排序顺序,选取分值由高到低的r个预部署集群作为实际部署集群,r为大于等于1且小于等于t的整数,因此可以得到应用实际可以部署容器的集群。In operation S2332, according to the weighted score, at least one cluster is selected from the t pre-deployed clusters, and the at least one cluster is used as the actual deployment cluster. Wherein, selecting at least one cluster from the t pre-deployed clusters according to the weighted score, and taking the at least one cluster as the actual deployment cluster can be understood as determining one or more actual deployment clusters according to the ranking of the weighted scores. In other words, after obtaining the weighted score of each pre-deployed cluster, multiple pre-deployed clusters can be sorted. Here, the sorting can be in ascending order or descending order. According to the sorting order, r pre-deployment clusters with high to low scores are selected. The deployment cluster is used as the actual deployment cluster, and r is an integer greater than or equal to 1 and less than or equal to t, so the cluster where the application can actually deploy containers can be obtained.
通过操作S2331和操作S2332可以便于实现根据请求部署的容器资源和预部署集群的资源使用信息,从预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。Through operations S2331 and S2332, it is convenient to implement the container resources deployed according to the request and the resource usage information of the pre-deployed clusters, select at least one cluster from the pre-deployed clusters, and use the at least one cluster as the actual deployment cluster.
在操作S240,根据实际部署集群确定与实际部署集群对应的宿主机的物理部署区域。In operation S240, the physical deployment area of the host machine corresponding to the actual deployment cluster is determined according to the actual deployment cluster.
作为一种可实施的方式,如图6所示,操作S240根据实际部署集群确定与实际部署集群对应的宿主机的物理部署区域包括操作S241~操作S245。As an implementable manner, as shown in FIG. 6 , the operation S240 to determine the physical deployment area of the host machine corresponding to the actual deployment cluster according to the actual deployment cluster includes operations S241 to S245 .
在操作S241,根据请求部署的容器资源生成宿主机特征。In operation S241, a host feature is generated according to the container resource requested to be deployed.
在操作S242,获取物理资源池的物理资源特征,其中,物理资源池包括k个搭建区域,每个搭建区域具有物理资源特征,k为大于等于1的整数。In operation S242, physical resource characteristics of the physical resource pool are acquired, wherein the physical resource pool includes k construction areas, each construction area has a physical resource characteristic, and k is an integer greater than or equal to 1.
在操作S243,将宿主机特征和k个搭建区域的物理资源特征进行特征匹配。In operation S243, feature matching is performed between the host machine feature and the physical resource features of the k build areas.
作为一些具体的示例,宿主机特征可以包括对应的网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小和物理存储大小中的至少一个;和/或物理资源特征可以包括对应的网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小和物理存储大小中的至少一个。As some specific examples, the host machine characteristics may include at least one of corresponding network region, central processing unit architecture, cloud type, central processing machine size, memory size, and physical storage size; and/or physical resource characteristics may include corresponding At least one of network area, central processing unit architecture, cloud type, central processing machine size, memory size, and physical storage size.
在操作S244,将特征匹配成功的g个搭建区域作为预搭建区域,其中,g为大于等于1且小于k的整数。In operation S244, the g construction areas with successful feature matching are used as pre-construction areas, where g is an integer greater than or equal to 1 and less than k.
可以理解的是,每个宿主机特征和每个物理资源特征均可以包括一个或者多个要素,宿主机特征要素与物理资源特征要素为一一对应的,可以将每个要素逐一匹配。It can be understood that each host feature and each physical resource feature may include one or more elements, the host feature elements and the physical resource feature elements are in one-to-one correspondence, and each element may be matched one by one.
例如,每个宿主机特征可以包括六个要素,分别为网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小和物理存储大小。对应地,每个物理资源特征可以包括六个要素,分别为网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小和物理存储大小。将每个宿主机特征的每个要素与每个物理资源特征的每个要素逐一匹配后可以得到与申请宿主机特征匹配成功的g个搭建区域,进而可以将g个搭建区域作为所申请宿主机的预搭建区域。For example, each host characteristic may include six elements, namely network area, CPU architecture, cloud type, CPU size, memory size, and physical storage size. Correspondingly, each physical resource characteristic may include six elements, namely network area, central processing unit architecture, cloud type, central processing machine size, memory size, and physical storage size. After matching each element of each host feature with each element of each physical resource feature one by one, g construction areas that are successfully matched with the applied host characteristics can be obtained, and then the g construction areas can be used as the applied host. pre-built area.
在操作S245,根据预搭建区域确定与实际部署集群对应的宿主机的物理部署区域。In operation S245, the physical deployment area of the host machine corresponding to the actual deployment cluster is determined according to the pre-built area.
作为一种可能实施的方式,如图7所示,操作S245根据预搭建区域确定与实际部署集群对应的宿主机的物理部署区域包括操作S2451~操作S2453。As a possible implementation manner, as shown in FIG. 7 , the operation S245 to determine the physical deployment area of the host machine corresponding to the actual deployment cluster according to the pre-built area includes operations S2451 to S2453 .
在操作S2451,获取每个预搭建区域的区域特征信息。在一些具体的示例中,区域特征信息可以包括可选IP数、中央处理器资源使用率、内存资源使用率和物理存储资源使用率中的至少一个。In operation S2451, area feature information of each pre-built area is acquired. In some specific examples, the area characteristic information may include at least one of an optional IP number, a CPU resource usage rate, a memory resource usage rate, and a physical storage resource usage rate.
在操作S2452,根据区域特征信息给每个预搭建区域打分,得到区域分值。In operation S2452, each pre-built region is scored according to the region feature information to obtain a region score.
在一些具体的示例中,如图8所示,操作S2452根据区域特征信息给每个预搭建区域打分,得到区域分值包括操作S24521和操作S24522。In some specific examples, as shown in FIG. 8 , operation S2452 scores each pre-built area according to the area feature information, and obtaining the area score includes operation S24521 and operation S24522.
在操作S24521,给可选IP数、中央处理器资源使用率、内存资源使用率和物理存储资源使用率分别打分,得到多个区域特征分值。In operation S24521, the number of optional IPs, the CPU resource utilization rate, the memory resource utilization rate, and the physical storage resource utilization rate are respectively scored to obtain a plurality of regional characteristic scores.
在操作S24522,对多个区域特征分值加权求和得到区域分值。In operation S24522, a weighted summation of a plurality of regional feature scores is performed to obtain a regional score.
需要说明的是,可选IP数越大,打分越高;中央处理器资源使用率越低,打分越高;内存资源使用率越低,打分越高;物理存储资源使用率越低,打分越高。打分后可以给可选IP数的打分分值(也即区域特征分值)加权,给中央处理器资源使用率的打分分值(也即区域特征分值)加权,给内存资源使用率的打分分值(也即区域特征分值)加权和给物理存储资源使用率的打分分值(也即区域特征分值)加权,加权后求和即可得到与每个区域特征信息对应的搭建区域的区域分值。It should be noted that the larger the number of optional IPs, the higher the score; the lower the CPU resource usage, the higher the score; the lower the memory resource usage, the higher the score; the lower the physical storage resource usage, the higher the score high. After scoring, you can weight the score of the optional IP number (that is, the regional feature score), weight the score of the CPU resource utilization rate (that is, the regional feature score), and score the memory resource utilization rate. The weighted sum of the score (that is, the regional feature score) weights the scoring score (that is, the regional feature score) of the physical storage resource utilization rate. Regional score.
通过操作S24521和操作S24522可以便于实现根据区域特征信息给每个预搭建区域打分,得到区域分值。Through the operations S24521 and S24522, it is convenient to score each pre-built area according to the area characteristic information, and obtain the area score.
在操作S2453,根据区域分值,从g个预搭建区域中选择至少一个作为实际部署集群对应的宿主机的物理部署区域。其中,根据区域分值,从g个预搭建区域中选择至少一个作为实际部署集群对应的宿主机的物理部署区域可以理解为根据区域分值的排序从g个预搭建区域中选择至少一个作为实际部署集群对应的宿主机的物理部署区域。需要说明的是,排序可以为升序也可以为降序,根据排序顺序,可以选取区域分值由高到低的f个预搭建区域作为物理部署区域,f为大于等于1且小于等于g的整数。In operation S2453, according to the area score, at least one of the g pre-built areas is selected as the physical deployment area of the host corresponding to the actual deployment cluster. Among them, according to the area score, selecting at least one of the g pre-built areas as the physical deployment area of the host corresponding to the actual deployment cluster can be understood as selecting at least one of the g pre-build areas as the actual deployment area according to the sorting of the area scores. The physical deployment area of the host corresponding to the deployment cluster. It should be noted that the sorting can be in ascending order or descending order. According to the sorting order, f pre-built areas with regional scores from high to low can be selected as physical deployment areas, where f is an integer greater than or equal to 1 and less than or equal to g.
由此,通过操作S2451~操作S2453可以便于更准确、高效地实现根据预搭建区域确定与实际部署集群对应的宿主机的物理部署区域包括。Therefore, through operations S2451 to S2453, it can be facilitated to more accurately and efficiently realize that the physical deployment area of the host corresponding to the actual deployment cluster is determined according to the pre-built area.
在操作S250,根据物理部署区域对物理资源进行动态调整。In operation S250, the physical resources are dynamically adjusted according to the physical deployment area.
根据本公开实施例的用于多集群架构的资源动态调整方法,基于多集群架构下,实时监控应用针对容器资源的申请详情,并依据当前s个集群的资源使用信息,实时分析出申请部署的容器资源应部署的集群范围,在资源不满足的条件下,动态的调用物理资源池的物理资源进行宿主机申请以及纳管,以达到自动动态扩容的目的。另外,通过操作S210~操作S250可以有序地管理和分配集群资源以及物理部署区域,可以解决现有技术中集群资源混乱,管理和应用毫无章法的问题。According to the method for dynamically adjusting resources for a multi-cluster architecture according to an embodiment of the present disclosure, based on the multi-cluster architecture, the application details of applications for container resources are monitored in real time, and according to the resource usage information of the current s clusters, the application for deployment is analyzed in real time. The scope of the cluster in which the container resources should be deployed. If the resources are not satisfied, the physical resources of the physical resource pool are dynamically called for host application and management, so as to achieve the purpose of automatic and dynamic expansion. In addition, through operations S210 to S250, cluster resources and physical deployment areas can be managed and allocated in an orderly manner, which can solve the problems in the prior art that cluster resources are chaotic and management and application are incoherent.
根据本公开的一些实施例,如图9所示,操作S210获取应用针对容器资源的部署请求包括操作S211:根据容器特征对请求部署的容器资源进行分类。例如,每个容器特征可以包括四个要素,分别为网络区域、网络特点、部署集群的中央处理器架构和平台版本。当两个容器的四个要素均相同时,则将两个容器归为一类。According to some embodiments of the present disclosure, as shown in FIG. 9 , operation S210 to obtain a deployment request of an application for container resources includes operation S211 : classifying the container resources requested to be deployed according to container characteristics. For example, each container characteristic can include four elements, namely network area, network characteristics, CPU architecture and platform version of the deployed cluster. When the four elements of the two containers are the same, the two containers are classified into one class.
进一步例如,假设有5个容器申请部署,容器1的网络区域为内部网络,网络特点为局域网,部署集群的中央处理器架构为X86,平台版本为k8s版本;容器2的网络区域为内部网络,网络特点为广域网,部署集群的中央处理器架构为X86,平台版本为k8s版本;容器3的网络区域为内部网络,网络特点为局域网,部署集群的中央处理器架构为X86,平台版本为k8s版本;容器4的网络区域为外部网络,网络特点为局域网,部署集群的中央处理器架构为X86,平台版本为k8s版本;容器5的网络区域为外部网络,网络特点为局域网,部署集群的中央处理器架构为X86,平台版本为k8s版本。For further example, suppose there are 5 containers applying for deployment, the network area of
分别比较上述5个容器的网络区域、网络特点、部署集群的中央处理器架构和平台版本,可以得到容器1和容器3的网络区域、网络特点、部署集群的中央处理器架构和平台版本均相同,因此将容器1和容器3归为一类;可以得到容器4和容器5的网络区域、网络特点、部署集群的中央处理器架构和平台版本均相同,因此将容器4和容器5归为一类;容器2为一类。Comparing the network area, network characteristics, CPU architecture and platform version of the deployment cluster of the above five containers respectively, it can be found that the network area, network characteristics, CPU architecture and platform version of the deployment cluster are the same for
如图10所示,操作S231将请求部署的容器资源中的每个容器的容器特征与s个集群的集群特征进行匹配包括操作S2311:将分类后的容器资源中的每个容器的容器特征与s个集群的特征进行匹配。具体地,可以将同类容器的每个容器特征和s个集群的特征进行特征匹配。可以理解的是,可以将同类容器的四个要素分别与每个集群特征的对应要素进行匹配,匹配成功时可以将该集群特征对应的集群作为该同类容器的预部署集群。通过对n个容器进行分类可以提高容器的部署效率和准确率。As shown in FIG. 10 , the operation S231 to match the container feature of each container in the container resource requested to be deployed with the cluster feature of the s clusters includes operation S2311 : matching the container feature of each container in the classified container resource with the The features of the s clusters are matched. Specifically, feature matching can be performed on each container feature of the same container and the features of the s clusters. It can be understood that the four elements of the same type of container can be respectively matched with the corresponding elements of each cluster feature, and when the matching is successful, the cluster corresponding to the cluster feature can be used as the pre-deployed cluster of the same type of container. By classifying n containers, the deployment efficiency and accuracy of containers can be improved.
在一些示例中,容器特征还可以包括容器类型和容器角色。其中,容器类型可以包括普通容器、系统容器和安全容器,容器角色可以包括提供者和消费者。由此可以丰富容器特征的种类,使得容器的分类更加精确。In some examples, container characteristics may also include container type and container role. Among them, container types can include common containers, system containers, and security containers, and container roles can include providers and consumers. Thereby, the types of container features can be enriched, so that the classification of containers is more accurate.
根据本公开的一些实施例,如图9所示,操作S210获取应用针对容器资源的部署请求还包括操作S212:统一n个容器的规格。通过对n个容器进行统一规格同样可以提高容器的部署效率和准确率。According to some embodiments of the present disclosure, as shown in FIG. 9 , the operation S210 to obtain the deployment request for the container resource by the application further includes operation S212 : unify the specifications of the n containers. The deployment efficiency and accuracy of containers can also be improved by unifying the specifications of n containers.
基于上述用于多集群架构的资源动态调整方法,本公开还提供了一种用于多集群架构的资源动态调整装置10。以下将结合图11对用于多集群架构的资源动态调整装置10进行详细描述。Based on the above method for dynamic resource adjustment for a multi-cluster architecture, the present disclosure also provides a resource
图11示意性示出了根据本公开实施例的用于多集群架构的资源动态调整装置10的结构框图。FIG. 11 schematically shows a structural block diagram of a resource
用于多集群架构的资源动态调整装置10包括获取模块1、统计模块2、比较模块3、确定模块4和调整模块5。The resource
获取模块1,获取模块1用于执行操作S210:获取应用针对容器资源的部署请求,其中,请求部署的容器资源包括n个容器,每个容器具有容器特征,n为大于等于1的整数。Obtaining
统计模块2,统计模块2用于执行操作S220:统计s个集群的资源使用信息,其中,s为大于等于2的整数,每个集群具有集群特征。
比较模块3,比较模块3用于执行操作S230:比较请求部署的容器资源与s个集群的资源使用信息,以从s个集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。Comparing
确定模块4,确定模块4用于执行操作S240:根据实际部署集群确定与实际部署集群对应的宿主机的物理部署区域。Determining
调整模块5,调整模块5用于执行操作S250:根据物理部署区域对物理资源进行动态调整。
其中,如图12所示,比较模块3具体包括匹配单元301、命令单元302和选择单元303。Wherein, as shown in FIG. 12 , the
匹配单元301,匹配单元301用于执行操作S231:将请求部署的容器资源中的每个容器的容器特征与s个集群的集群特征进行匹配。
命令单元302,命令单元302用于执行操作S232:将匹配成功的t个集群作为预部署集群,其中,t为大于等于1且小于等于s的整数。
选择单元303,选择单元303用于执行操作S233:根据请求部署的容器资源和预部署集群的资源使用信息,从预部署集群中选择出至少一个集群,将该至少一个集群作为实际部署集群。
由于上述用于多集群架构的资源动态调整装置10是基于用于多集群架构的资源动态调整方法设置的,因此上述用于多集群架构的资源动态调整装置10的有益效果与用于多集群架构的资源动态调整方法的相同,这里不再赘述。Since the above-mentioned dynamic
另外,根据本公开的实施例,获取模块1、统计模块2、比较模块3、确定模块4和调整模块5中的任意多个模块可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。In addition, according to the embodiment of the present disclosure, any number of modules among the
根据本公开的实施例,获取模块1、统计模块2、比较模块3、确定模块4和调整模块5中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。According to an embodiment of the present disclosure, at least one of the
或者,获取模块1、统计模块2、比较模块3、确定模块4和调整模块5中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。Alternatively, at least one of the
下面参照图13-图17详细描述根据本公开实施例的资源动态调整装置。值得理解的是,下述描述仅是示例性说明,而不是对本公开的具体限制。The apparatus for dynamic resource adjustment according to an embodiment of the present disclosure will be described in detail below with reference to FIG. 13 to FIG. 17 . It is to be understood that the following description is illustrative only, and not specific limitation of the present disclosure.
本公开提供了一种多集群私有云架构下,分析用户容器申请情况,规划其部署范围的资源动态调整装置,主要包括以下装置。The present disclosure provides a resource dynamic adjustment device under the multi-cluster private cloud architecture, which analyzes user container application status and plans its deployment scope, mainly including the following devices.
步骤1):申请详情统计装置,对所有用户申请的容器资源进行整合以及规范化,紧接着触发集群资源统计装置。Step 1): the application details statistics device integrates and normalizes the container resources applied by all users, and then triggers the cluster resource statistics device.
步骤2):集群资源统计装置,查询Prometheus监控获取各个集群、各个节点总的资源使用详情以及查询数据库获取集群特征,最终整合获取私有云集群资源视图,紧接着触发申请资源分析装置。Step 2): Cluster resource statistics device, query Prometheus monitoring to obtain the total resource usage details of each cluster and each node, query the database to obtain cluster characteristics, and finally integrate and obtain the private cloud cluster resource view, and then trigger the application resource analysis device.
步骤3):申请资源分析装置,依据私有云集群视图,计算出用户容器应当部署的集群以及各个集群应当扩容的节点数,紧接着触发设备申请扩容装置。Step 3): apply for a resource analysis device, calculate the clusters that the user container should deploy and the number of nodes that each cluster should expand according to the private cloud cluster view, and then trigger the device to apply for the expansion device.
步骤4):设备申请扩容装置,根据步骤3)申请资源分析装置的计算结果,向基础设施云申请虚拟机或物理机设备以及调用对应的Ansible运维作业扩容相关集群。Step 4): The device applies for the expansion device, and according to the calculation result of the application for the resource analysis device in step 3), applies to the infrastructure cloud for a virtual machine or physical machine device and invokes the corresponding Ansible operation and maintenance job to expand the related cluster.
如图13所示,是本公开的资源动态调整装置的结构图,包括:申请详情统计装置a、集群资源统计装置b、申请资源分析装置c和设备申请扩容装置d。申请详情统计装置a与集群资源统计装置b通讯连接,集群资源统计装置b与申请资源分析装置c通讯连接,申请资源分析装置c与设备申请扩容装置d通讯连接。As shown in FIG. 13 , it is a structural diagram of the resource dynamic adjustment device of the present disclosure, including: an application details statistics device a, a cluster resource statistics device b, an application resource analysis device c, and an equipment application expansion device d. The application details statistics device a is in communication connection with the cluster resource statistics device b, the cluster resource statistics device b is in communication connection with the application resource analysis device c, and the application resource analysis device c is in communication connection with the equipment application expansion device d.
申请详情统计装置a:对所有用户申请的容器资源根据特征值(包括网络区域、集群宿主机中央处理器架构、K8S版本、集群特征、云类型)进行归类整合并统一以固定规格作为单位将应用容器规格规约化,最终形成整个用户群的资源申请视图,紧接着触发集群资源统计装置b。Application details statistics device a: Classify and integrate the container resources applied by all users according to characteristic values (including network area, cluster host CPU architecture, K8S version, cluster characteristics, cloud type), and uniformly use fixed specifications as the unit. The specification of the application container is normalized, and finally a resource application view of the entire user group is formed, and then the cluster resource statistics device b is triggered.
集群资源统计装置b:通过监控组件收集集群系统资源使用详情,为了达到简化计算目的,以固定容器规格为单位,计算出集群已用资源以及冗余资源数据,计算方式如下。Cluster resource statistics device b: collects the details of cluster system resource usage through the monitoring component. In order to achieve the purpose of simplifying the calculation, the cluster used resources and redundant resource data are calculated in units of fixed container specifications. The calculation method is as follows.
结合集群网络区域、集群宿主机中央处理器架构、K8S版本、集群特征、云类型特征值形成整个私有云资源使用率视图。此外,依据用户在各个集群已部署容器数,统计出用户对各个集群的亲和性,用户在集群中部署容器越多,亲和性越高,反之,亲和性越低。然后触发申请资源折算装置c。Combine the cluster network area, cluster host CPU architecture, K8S version, cluster characteristics, and cloud type characteristic values to form a view of the resource utilization rate of the entire private cloud. In addition, according to the number of containers deployed by the user in each cluster, the affinity of the user to each cluster is calculated. The more containers the user deploys in the cluster, the higher the affinity, and vice versa, the lower the affinity. Then trigger to apply for resource conversion device c.
申请资源折算装置c:对比资源申请视图与私有云资源使用率视图,首先进行预选,将用户申请容器特征值与集群特征值进行比对筛选出用户可选部署范围;然进行优选,依据集群资源统计装置b统计出的用户对各个集群的亲和性对集群进行打分,亲和性越高,分数越高,反之,分数越低;依据私有云资源使用率视图中集群冗余资源率对集群进行打分,冗余率越高,分数越高,反之,分数越低;将得分加权求和并排序。申请资源折算装置c在集群满足固定冗余率以及集群节点最大个数的限制下,按照排序结果依次选择部署集群,直到满足用户申请资源为止。申请资源折算装置c通过预选与优选最终计算出用户实际部署集群以及所需申请物理机数。Application resource conversion device c: Compare the resource application view and the private cloud resource utilization rate view, first perform pre-selection, compare the user's application container characteristic value with the cluster characteristic value, and filter out the user's optional deployment range; The user's affinity for each cluster calculated by the statistics device b is used to score the cluster. The higher the affinity, the higher the score; otherwise, the lower the score. Scoring, the higher the redundancy rate, the higher the score, and vice versa, the lower the score; the scores are weighted and summed and sorted. The application resource conversion device c selects and deploys the clusters in sequence according to the sorting results under the condition that the cluster satisfies the fixed redundancy rate and the maximum number of cluster nodes until the user's application for resources is satisfied. The application resource conversion device c finally calculates the actual deployment cluster of the user and the number of physical machines required for application through preselection and optimization.
设备申请扩容装置d:统计分析得出物理资源使用率视图,首先进行预选,将用户申请物理机特征值(即网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小、物理存储大小)与物理资源特征值(即网络区域、中央处理器架构、云类型、中央处理机器大小、内存大小、物理存储大小)比对筛选出用户可选申请物理机搭建区域;然后进行优选,根据可选IP数、中央处理器资源使用率、内存资源使用率、物理存储资源使用率等对各个物理资源逻辑区域(依据不同方案,存在不同的逻辑区域划分)进行打分,将得分加权求和并排序。通过预选与优选两步得出宿主机所在物理资源逻辑区域,最终调用基础设施云进行物理机的搭建以及集群节点的安装。Device application expansion device d: Statistical analysis is used to obtain a view of physical resource utilization. First, pre-selection is performed, and the characteristic values of physical machines (ie network area, CPU architecture, cloud type, central processing machine size, memory size, physical storage size) and the characteristic values of physical resources (i.e. network area, central processing unit architecture, cloud type, central processing machine size, memory size, physical storage size) to screen out the user's optional application for physical machine construction area; The number of optional IPs, CPU resource utilization, memory resource utilization, physical storage resource utilization, etc. are scored for each physical resource logical area (there are different logical area divisions according to different schemes), and the scores are weighted and summed. sort. The physical resource logical area where the host is located is obtained through the two steps of pre-selection and optimization, and finally the infrastructure cloud is called to build the physical machine and install the cluster nodes.
图14是申请详情统计装置a的内部结构图,包括容器申请规约单元11和容器申请分类单元12。FIG. 14 is an internal structure diagram of the application details statistics device a, including a container
其中,容器申请规约单元11:统一以固定规格作为单位将应用容器规格规约化。Among them, the container application specification unit 11: uniformly reduces the specification of the application container by taking the fixed specification as a unit.
容器申请分类单元12:对所有用户申请的容器资源根据特征值(包括网络区域、网络特点、集群宿主机中央处理器架构、K8S版本、集群特征、云类型)进行归类。Container application classification unit 12: Classify container resources applied by all users according to characteristic values (including network area, network characteristics, cluster host CPU architecture, K8S version, cluster characteristics, cloud type).
图15是集群资源统计装置b的内部结构图,包括集群资源详情获取单元21和集群资源整合分类单元22。FIG. 15 is an internal structure diagram of the cluster resource statistics device b, including a cluster resource
其中,集群资源详情获取单元21:通过调用Prometheus接口,获取各个集群、中央处理器资源使用率、内存资源使用率。Among them, the cluster resource details obtaining unit 21: obtains each cluster, the CPU resource usage rate, and the memory resource usage rate by calling the Prometheus interface.
集群资源整合分类单元22:以固定容器规格为单位,计算出集群可用资源、已用资源以及冗余资源数据,结合集群网络区域、网络特点、集群宿主机中央处理器架构、K8S版本、集群特征、云类型特征值形成整个私有云资源使用率视图。Cluster resource integration and classification unit 22: Using the fixed container specification as a unit, calculate the available resources, used resources and redundant resource data of the cluster, and combine the cluster network area, network characteristics, cluster host CPU architecture, K8S version, and cluster characteristics. , cloud type characteristic values to form the entire private cloud resource utilization view.
图16是申请资源分析装置c的内部结构图,包括用户部署范围分析单元31和物理资源整合分析单元32。FIG. 16 is an internal structure diagram of the application resource analysis device c, including a user deployment
其中,用户部署范围分析单元31:对比资源申请视图与私有云资源使用率视图,针对集群进行打分排序,通过预选与优选两步得出用户可选部署范围。The user deployment
物理资源整合分析单元32:根据集群冗余率与集群节点最大限制数计算出用户实际部署集群以及所需申请物理机数,然后生成相应的申请任务。The physical resource integration analysis unit 32 : calculates the actual deployment of the cluster and the number of physical machines required by the user according to the cluster redundancy rate and the maximum limit number of cluster nodes, and then generates a corresponding application task.
图17是设备申请扩容装置d的内部结构图,包括设备申请单元41和节点纳管单元42。FIG. 17 is an internal structure diagram of the device application expansion device d, including a
其中,设备申请单元41:统计得出物理资源使用率视图,针对各个物理资源逻辑区域进行打分排序,通过预选与优选两步得出宿主机物理部署区域,根据物理部署区域进行物理机的搭建。The device application unit 41 : obtains a physical resource usage rate view by statistics, scores and sorts each physical resource logical area, obtains the physical deployment area of the host machine through two steps of pre-selection and optimization, and builds the physical machine according to the physical deployment area.
节点纳管单元42:使用Ansible运维作业,将设备申请单元41搭建出的物理机纳管至相应集群并交付使用。Node management unit 42: Use Ansible operation and maintenance operations to manage the physical machines built by the
图18示意性示出了根据本公开实施例的适于实现上述方法的电子设备的方框图。FIG. 18 schematically shows a block diagram of an electronic device suitable for implementing the above method according to an embodiment of the present disclosure.
如图18所示,根据本公开实施例的电子设备900包括处理器901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。处理器901例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC))等等。处理器901还可以包括用于缓存用途的板载存储器。处理器901可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 18 , an
在RAM 903中,存储有电子设备900操作所需的各种程序和数据。处理器901、ROM902以及RAM 903通过总线904彼此相连。处理器901通过执行ROM 902和/或RAM 903中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 902和RAM 903以外的一个或多个存储器中。处理器901也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the
根据本公开的实施例,电子设备900还可以包括输入/输出(I/O)接口905,输入/输出(I/O)接口905也连接至总线904。电子设备900还可以包括连接至I/O接口905的以下部件中的一项或多项:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至输入/输出(I/O)接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。According to an embodiment of the present disclosure, the
本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be included in the device/apparatus/system described in the above embodiments; it may also exist alone without being assembled into the device/system. device/system. The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, implement the method according to the embodiment of the present disclosure.
根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM 902和/或RAM 903和/或ROM 902和RAM 903以外的一个或多个存储器。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM) , erasable programmable read only memory (EPROM or flash memory), portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include one or more memories other than
本公开的实施例还包括一种计算机程序产品,其包括计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。当计算机程序产品在计算机系统中运行时,该程序代码用于使计算机系统实现本公开实施例的方法。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 flowchart. When the computer program product is run in a computer system, the program code is used to cause the computer system to implement the methods of the embodiments of the present disclosure.
在该计算机程序被处理器901执行时执行本公开实施例的系统/装置中限定的上述功能。根据本公开的实施例,上文描述的系统、装置、模块、单元等可以通过计算机程序模块来实现。When the computer program is executed by the
在一种实施例中,该计算机程序可以依托于光存储器件、磁存储器件等有形存储介质。在另一种实施例中,该计算机程序也可以在网络介质上以信号的形式进行传输、分发,并通过通信部分909被下载和安装,和/或从可拆卸介质911被安装。该计算机程序包含的程序代码可以用任何适当的网络介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal over a network medium, and downloaded and installed through the
在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被处理器901执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。In such an embodiment, the computer program may be downloaded and installed from the network via the
根据本公开的实施例,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例提供的计算机程序的程序代码,具体地,可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。程序设计语言包括但不限于诸如Java,C++,python,“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。According to the embodiments of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure may be written in any combination of one or more programming languages, and specifically, high-level procedures and/or object-oriented programming may be used. programming language, and/or assembly/machine language to implement these computational programs. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. 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 the case of a remote computing device, the remote computing device 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 an external computing device (eg, using an Internet service provider business via an Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。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 that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks 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 is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。Those skilled in the art will appreciate that various combinations and/or combinations of features recited in various embodiments and/or claims of the present disclosure are possible, 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 in the claims may be made without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of this disclosure.
以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。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 various embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present disclosure.
Claims (15)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115361281A (en) * | 2022-08-19 | 2022-11-18 | 浙江极氪智能科技有限公司 | A 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 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017084276A1 (en) * | 2015-11-17 | 2017-05-26 | 乐视控股(北京)有限公司 | Method and system for scheduling host used for container deployment |
US20180203736A1 (en) * | 2017-01-13 | 2018-07-19 | Red Hat, Inc. | Affinity based hierarchical container scheduling |
CN109032755A (en) * | 2018-06-29 | 2018-12-18 | 优刻得科技股份有限公司 | A kind of container service mandatory system and provide the method for container service |
CN110389836A (en) * | 2019-07-17 | 2019-10-29 | 腾讯科技(深圳)有限公司 | A multi-cluster management method, device, server and storage medium |
CN112379971A (en) * | 2020-11-17 | 2021-02-19 | 深圳前海微众银行股份有限公司 | Application container management method, device and equipment |
-
2022
- 2022-02-16 CN CN202210143644.0A patent/CN114490086A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017084276A1 (en) * | 2015-11-17 | 2017-05-26 | 乐视控股(北京)有限公司 | Method and system for scheduling host used for container deployment |
US20180203736A1 (en) * | 2017-01-13 | 2018-07-19 | Red Hat, Inc. | Affinity based hierarchical container scheduling |
CN109032755A (en) * | 2018-06-29 | 2018-12-18 | 优刻得科技股份有限公司 | A kind of container service mandatory system and provide the method for container service |
CN110389836A (en) * | 2019-07-17 | 2019-10-29 | 腾讯科技(深圳)有限公司 | A multi-cluster management method, device, server and storage medium |
CN112379971A (en) * | 2020-11-17 | 2021-02-19 | 深圳前海微众银行股份有限公司 | Application container management method, device and equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115361281A (en) * | 2022-08-19 | 2022-11-18 | 浙江极氪智能科技有限公司 | A 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 |
---|---|---|
Jafarnejad Ghomi et al. | Applying queue theory for modeling of cloud computing: A systematic review | |
CN111427971B (en) | Business modeling method, device, system and medium for computer system | |
US10956214B2 (en) | Time frame bounded execution of computational algorithms | |
US12038979B2 (en) | Metadata indexing for information management using both data records and associated metadata records | |
CN109614227A (en) | Task resource allocation method, apparatus, electronic device, and computer-readable medium | |
CN114490086A (en) | Method, device, electronic equipment, medium and program product for dynamically adjusting resources | |
CN110389873A (en) | A method and device for judging server resource usage | |
CN114546786A (en) | Anomaly monitoring method based on multi-level cache | |
CN118897834A (en) | Object data migration method, device, and equipment | |
He et al. | UELLM: A Unified and Efficient Approach for Large Language Model Inference Serving | |
CN119149116B (en) | Data processing method, device, equipment and storage medium | |
CN114139039B (en) | Service stability determination method, device, equipment and storage medium | |
US11886928B2 (en) | Automated service tiering between edge computing sites and a core data center | |
CN114610758A (en) | Data processing method and device based on data warehouse, readable medium and equipment | |
US20220004759A1 (en) | Dataset driven custom learning for multi-scale object detection | |
CN110119300A (en) | The load-balancing method and device of dummy unit cluster | |
CN118502956A (en) | Resource scheduling method, device, electronic device, storage medium and program product based on cloud storage system | |
US20210165725A1 (en) | Integrated event processing and policy enforcement | |
CN115080606B (en) | Business data query method, device, equipment and medium | |
CN113535673A (en) | Method and device for generating configuration file and processing data | |
CN116089367A (en) | Dynamic barrel dividing method, device, electronic equipment and medium | |
CN119226428A (en) | Search method and computer equipment | |
US20230273907A1 (en) | Managing time series databases using workload models | |
US20230342356A1 (en) | Generate digital signature of a query execution plan using similarity hashing | |
CN110209785A (en) | Querying method and device, electronic equipment, the storage medium of business information |
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 |