CN113760516A - A method, device, device and medium for elastic scaling in a multi-cloud environment - Google Patents
A method, device, device and medium for elastic scaling in a multi-cloud environment Download PDFInfo
- Publication number
- CN113760516A CN113760516A CN202010495551.5A CN202010495551A CN113760516A CN 113760516 A CN113760516 A CN 113760516A CN 202010495551 A CN202010495551 A CN 202010495551A CN 113760516 A CN113760516 A CN 113760516A
- Authority
- CN
- China
- Prior art keywords
- cloud
- cloud platforms
- elastic scaling
- application
- platforms
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请提供了一种多云环境下的弹性伸缩方法,包括:对多个云平台提供的资源进行建模,获得多个云平台的资源模型,当部署在多个云平台的应用实例的监控指标值满足预设条件时,根据多个云平台的资源模型以及弹性伸缩策略,调整应用实例。如此,实现了在多个云平台的环境下,自动的、应用实例跨云弹性伸缩,无需人工手动干预,提升了弹性伸缩效率,避免了手动干预导致资源浪费或者服务质量难以得到保障。整个伸缩过程无需人工参与,可以实现应用实例跨云平台的分钟级甚至秒级弹性伸缩,提高资源利用率以及保障服务质量。
The present application provides an elastic scaling method in a multi-cloud environment, including: modeling resources provided by multiple cloud platforms, obtaining resource models of multiple cloud platforms, and monitoring indicators of application instances deployed on multiple cloud platforms When the value meets the preset conditions, the application instance is adjusted according to the resource models and elastic scaling policies of multiple cloud platforms. In this way, in the environment of multiple cloud platforms, automatic and cross-cloud elastic scaling of application instances is realized without manual intervention, which improves the efficiency of elastic scaling and avoids the waste of resources or the difficulty of guaranteeing service quality caused by manual intervention. The entire scaling process does not require manual participation, and can achieve elastic scaling of application instances across cloud platforms in minutes or even seconds, improving resource utilization and ensuring service quality.
Description
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种多云环境下的弹性伸缩方法、装置、设备以及计算机可读存储介质。The present application relates to the field of computer technologies, and in particular, to an elastic scaling method, apparatus, device, and computer-readable storage medium in a multi-cloud environment.
背景技术Background technique
云技术(cloud technology)是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。按照用户需求通过云技术提供服务的服务提供商即为云服务提供商。Cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data. A service provider that provides services through cloud technology according to user needs is a cloud service provider.
云服务提供商提供的云平台上可以部署应用,以对外提供服务。为了保障服务质量,同时节省资源,业界提出了一种弹性伸缩方法。具体地,监控应用的特定指标,如处理器(central process unit,CPU)使用率、内存使用率,当特定指标的指标值达到预设阈值时,按照设定的弹性伸缩策略调整应用实例的个数。Applications can be deployed on cloud platforms provided by cloud service providers to provide external services. To ensure service quality and save resources, the industry proposes an elastic scaling method. Specifically, monitor specific indicators of the application, such as processor (central process unit, CPU) usage rate and memory usage rate, and when the indicator value of the specific indicator reaches a preset threshold, adjust the individual application instance according to the set elastic scaling policy number.
然而,上述弹性伸缩方法主要适用于部署在单一云平台的应用。对于部署在多云平台即多云环境下的应用,往往需要人工手动干预,难以实现快速弹性伸缩,导致资源浪费或者服务质量难以得到保障。However, the above elastic scaling methods are mainly applicable to applications deployed on a single cloud platform. For applications deployed in a multi-cloud platform, that is, a multi-cloud environment, manual intervention is often required, which makes it difficult to achieve rapid elastic scaling, resulting in wasted resources or difficult to guarantee service quality.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种多云环境下的弹性伸缩方法,解析了相关技术中需要人工手动干预,难以实现快速弹性伸缩,导致资源浪费或者服务质量难以得到保障的问题。本申请还提供了上述方法对应的装置、设备、计算机可读存储介质以及计算机程序产品。The present application provides an elastic scaling method in a multi-cloud environment, which resolves the problems in the related art that manual intervention is required, rapid elastic scaling is difficult to achieve, and resources are wasted or service quality is difficult to guarantee. The present application also provides apparatuses, devices, computer-readable storage media, and computer program products corresponding to the above methods.
第一方面,本申请提供了一种多云环境下的弹性伸缩方法。该方法用于在多个云平台的环境下,实现自动的、应用实例跨云弹性伸缩,无需人工手动干预,提升了弹性伸缩效率,避免了手动干预导致资源浪费或者服务质量难以得到保障。In a first aspect, the present application provides an elastic scaling method in a multi-cloud environment. The method is used to realize automatic, cross-cloud elastic scaling of application instances in the environment of multiple cloud platforms, without manual intervention, which improves the efficiency of elastic scaling, and avoids the waste of resources or the difficulty in guaranteeing service quality caused by manual intervention.
具体地,多个云平台中的每个云平台提供有至少一种资源。该资源可以是提供服务的硬件资源或软件资源。资源还可以根据功能分为计算资源、存储资源和网络资源。例如,计算资源可以包括处理器资源,如中央处理器(CPU,central processing unit)资源。存储资源可以包括内存(memory)资源、外存资源等等。内存资源可以是内存储器,外存资源可以是硬盘、光盘、闪存盘等等。Specifically, each of the multiple cloud platforms is provided with at least one resource. The resource can be a hardware resource or a software resource that provides a service. Resources can also be classified into computing resources, storage resources, and network resources according to their functions. For example, computing resources may include processor resources, such as central processing unit (CPU, central processing unit) resources. The storage resources may include memory resources, external memory resources, and the like. The memory resource may be an internal memory, and the external memory resource may be a hard disk, an optical disk, a flash disk, and the like.
在具体实现时,跨云弹性伸缩控制器可以先对多个云平台提供的资源进行建模,获得所述多个云平台的资源模型。其中,该资源模型可以实现同一类资源在多个云平台间的映射转换,例如实现存储资源在云平台A和云平台B之间的映射转换。然后,当部署在所述多个云平台的应用实例的监控指标值满足预设条件时,例如监控指标值达到设定的阈值时,跨云弹性伸缩控制器可以根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例。由于无需人工手动干预,可以实现应用实例跨云平台的分钟级甚至秒级弹性伸缩,提高资源利用率以及保障服务质量。During specific implementation, the cross-cloud elastic scaling controller may first model resources provided by multiple cloud platforms to obtain resource models of the multiple cloud platforms. The resource model can realize the mapping and transformation of the same type of resources among multiple cloud platforms, for example, realize the mapping and transformation of storage resources between cloud platform A and cloud platform B. Then, when the monitoring index values of the application instances deployed on the multiple cloud platforms meet the preset conditions, for example, when the monitoring index value reaches the set threshold, the cross-cloud elastic scaling controller can The resource model and the elastic scaling strategy are used to adjust the application instance. Since no manual intervention is required, application instances can be scaled elastically in minutes or even seconds across cloud platforms, improving resource utilization and ensuring service quality.
在一些可能的实现方式中,跨云弹性伸缩控制器可以配置一种或多种弹性伸缩策略。例如,跨云弹性伸缩控制器可以配置亲和性(affinity)策略、反亲和性(anti-affinity)策略、成本优先策略、性能优先策略中的一种或多种。其中,亲和性策略具体是指将应用实例配置在同一云平台的相近区域(region),该相近region包括同一region,甚至是同一region中的相近节点(包括同一节点)。反亲和性策略具体是指避免将应用实例配置在相近region和同一region中的相近节点。成本优先策略是指以成本最小为目标进行弹性伸缩的策略,性能优先策略是指以性能最高为目标进行弹性伸缩的策略。In some possible implementations, the cross-cloud elastic scaling controller may be configured with one or more elastic scaling policies. For example, the cross-cloud elastic scaling controller may be configured with one or more of an affinity policy, an anti-affinity policy, a cost priority policy, and a performance priority policy. The affinity policy specifically refers to configuring the application instance in a close region (region) of the same cloud platform, and the close region includes the same region, or even close nodes (including the same node) in the same region. The anti-affinity policy specifically refers to avoiding configuring application instances in adjacent regions and adjacent nodes in the same region. The cost-first strategy refers to the strategy of elastic scaling with the goal of minimum cost, and the performance-first strategy refers to the strategy of elastic scaling with the goal of the highest performance.
基于此,跨云弹性伸缩控制器可以根据多个云平台的资源模型以及亲和性策略、反亲和性策略、成本优先策略、性能优先策略中的任意一种或多种策略,调整所述应用实例。由此可以实现根据用户需求对应用实例进行弹性伸缩。Based on this, the cross-cloud elastic scaling controller can adjust the Applications. In this way, application instances can be elastically scaled according to user requirements.
在一些可能的实现方式中,跨云弹性伸缩控制器在对应用实例进行弹性伸缩时,可以根据多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的数量。例如新增应用实例,或者删除应用实例。当然,跨云弹性伸缩控制器也可以根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的配置。例如,提升或降低应用实例的计算资源、存储资源和/或网络资源。In some possible implementations, the cross-cloud elastic scaling controller may adjust the number of application instances according to resource models of multiple cloud platforms and elastic scaling policies when elastically scaling application instances. For example, adding an application instance, or deleting an application instance. Of course, the cross-cloud elastic scaling controller may also adjust the configuration of the application instance according to the resource models and elastic scaling policies of the multiple cloud platforms. For example, increase or decrease the computing resources, storage resources and/or network resources of the application instance.
在一些可能的实现方式中,跨云弹性伸缩控制器可以通过如下方式调试应用实例。具体地,跨云弹性伸缩控制器根据所述多个云平台的资源模型以及弹性伸缩策略确定目标云平台,然后通过所述目标云平台的应用程序编程接口(application programminginterface,API)创建新的应用实例。该新的实例即部署在目标云平台。In some possible implementations, the cross-cloud elastic scaling controller can debug the application instance in the following ways. Specifically, the cross-cloud elastic scaling controller determines the target cloud platform according to the resource models of the multiple cloud platforms and the elastic scaling policy, and then creates a new application through the application programming interface (API) of the target cloud platform instance. The new instance is deployed on the target cloud platform.
在一些可能的实现方式中,在创建新的应用实例之后,当部署在所述多个云平台的应用实例的监控指标值不满足预设条件时,跨云弹性伸缩控制器通过所述API删除所述新的应用实例。In some possible implementations, after creating a new application instance, when the monitoring indicator values of the application instances deployed on the multiple cloud platforms do not meet the preset conditions, the cross-cloud elastic scaling controller deletes the application through the API The new application example.
在一些可能的实现方式中,所述多个云平台包括多个公有云平台,或者多个私有云平台,或者至少一个公有云平台和至少一个私有云平台形成的混合云平台。考虑到成本问题,可以选择多个公有云平台部署应用实例。考虑到安全问题,可以选择多个私有云平台部署应用实例。综合考虑成本问题和安全问题,可以选择至少一个公有云平台和至少一个私有云平台形成的混合云平台部署应用实例。In some possible implementations, the multiple cloud platforms include multiple public cloud platforms, or multiple private cloud platforms, or a hybrid cloud platform formed by at least one public cloud platform and at least one private cloud platform. Considering the cost issue, you can choose multiple public cloud platforms to deploy application instances. Considering security issues, you can choose multiple private cloud platforms to deploy application instances. Considering cost issues and security issues comprehensively, a hybrid cloud platform formed by at least one public cloud platform and at least one private cloud platform can be selected to deploy application instances.
第二方面,本申请提供了一种多云环境下的弹性伸缩装置。所述装置包括:In a second aspect, the present application provides an elastic scaling device in a multi-cloud environment. The device includes:
建模单元,用于对多个云平台提供的资源进行建模,获得所述多个云平台的资源模型;a modeling unit, configured to model resources provided by multiple cloud platforms, and obtain resource models of the multiple cloud platforms;
调整单元,用于当部署在所述多个云平台的应用实例的监控指标值满足预设条件时,根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例。An adjustment unit, configured to adjust the application instances according to the resource models of the multiple cloud platforms and the elastic scaling policy when the monitoring index values of the application instances deployed on the multiple cloud platforms meet preset conditions.
在一些可能的实现方式中,所述调整单元具体用于:In some possible implementations, the adjustment unit is specifically used for:
根据所述多个云平台的资源模型以及亲和性策略、反亲和性策略、成本优先策略、性能优先策略中的任意一种或多种策略,调整所述应用实例。The application instance is adjusted according to the resource models of the multiple cloud platforms and any one or more strategies of an affinity strategy, an anti-affinity strategy, a cost priority strategy, and a performance priority strategy.
在一些可能的实现方式中,所述调整单元具体用于:In some possible implementations, the adjustment unit is specifically used for:
根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的数量;或者,Adjust the number of the application instances according to the resource models and elastic scaling policies of the multiple cloud platforms; or,
根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的配置。The configuration of the application instance is adjusted according to the resource models of the multiple cloud platforms and the elastic scaling policy.
在一些可能的实现方式中,所述调整单元具体用于:In some possible implementations, the adjustment unit is specifically used for:
根据所述多个云平台的资源模型以及弹性伸缩策略确定目标云平台;Determine the target cloud platform according to the resource models of the multiple cloud platforms and the elastic scaling strategy;
通过所述目标云平台的应用程序编程接口(API)创建新的应用实例。A new application instance is created through the application programming interface (API) of the target cloud platform.
在一些可能的实现方式中,所述调整单元还用于:In some possible implementations, the adjustment unit is further used for:
在创建新的应用实例之后,当部署在所述多个云平台的应用实例的监控指标值不满足预设条件时,通过所述API删除所述新的应用实例。After a new application instance is created, when the monitoring index values of the application instances deployed on the multiple cloud platforms do not meet the preset conditions, the new application instance is deleted through the API.
在一些可能的实现方式中,所述多个云平台包括多个公有云平台,或者多个私有云平台,或者至少一个公有云平台和至少一个私有云平台形成的混合云平台。In some possible implementations, the multiple cloud platforms include multiple public cloud platforms, or multiple private cloud platforms, or a hybrid cloud platform formed by at least one public cloud platform and at least one private cloud platform.
第三方面,本申请提供一种设备,所述设备包括处理器和存储器。所述处理器、所述存储器进行相互的通信。所述处理器用于执行所述存储器中存储的指令,以使得设备执行如第一方面或第一方面的任一种实现方式所述的多云环境下的弹性伸缩方法。In a third aspect, the present application provides an apparatus including a processor and a memory. The processor and the memory communicate with each other. The processor is configured to execute the instructions stored in the memory, so that the device executes the method for elastic scaling in a multi-cloud environment according to the first aspect or any implementation manner of the first aspect.
第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,所述指令指示设备执行上述第一方面或第一方面的任一种实现方式所述的多云环境下的弹性伸缩方法。In a fourth aspect, the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and the instructions instruct a device to execute the first aspect or any implementation manner of the first aspect. An elastic scaling method in a multi-cloud environment.
第五方面,本申请提供了一种包含指令的计算机程序产品,当其在设备上运行时,使得设备执行上述第一方面或第一方面的任一种实现方式所述的多云环境下的弹性伸缩方法。In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on a device, enables the device to perform the elasticity in a multi-cloud environment according to the first aspect or any implementation manner of the first aspect Scaling method.
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。On the basis of the implementation manners provided by the above aspects, the present application may further combine to provide more implementation manners.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方法,下面将对实施例中所需使用的附图作以简单地介绍。In order to illustrate the technical methods of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings used in the embodiments.
图1为本申请实施例提供的一种的多云环境下的弹性伸缩方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of an elastic scaling method in a multi-cloud environment provided by an embodiment of the present application;
图2为本申请实施例提供的一种多云环境下的弹性伸缩方法的架构图;FIG. 2 is an architectural diagram of an elastic scaling method in a multi-cloud environment provided by an embodiment of the present application;
图3为本申请实施例提供的一种多云环境下的弹性伸缩方法的架构图;FIG. 3 is an architectural diagram of an elastic scaling method in a multi-cloud environment provided by an embodiment of the present application;
图4为本申请实施例提供的一种弹性伸缩控制器的结构示意图;FIG. 4 is a schematic structural diagram of an elastic scaling controller according to an embodiment of the present application;
图5为本申请实施例提供的一种多云环境下的弹性伸缩方法的流程图;FIG. 5 is a flowchart of an elastic scaling method in a multi-cloud environment provided by an embodiment of the present application;
图6为本申请实施例提供的一种多云环境下的弹性伸缩的结构示意图;FIG. 6 is a schematic structural diagram of elastic scaling in a multi-cloud environment according to an embodiment of the present application;
图7为本申请实施例提供的一种设备的结构示意图。FIG. 7 is a schematic structural diagram of a device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。The terms "first" and "second" in the embodiments of the present application are only used for the purpose of description, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature.
首先对本申请实施例中所涉及到的一些技术术语进行介绍。First, some technical terms involved in the embodiments of this application are introduced.
云技术(cloud technology)是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。按照用户需求通过云技术提供服务的服务提供商即为云服务提供商,云服务提供商通过云技术提供的服务也称之为云服务。Cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data. A service provider that provides services through cloud technology according to user needs is a cloud service provider, and the services provided by a cloud service provider through cloud technology are also called cloud services.
云服务包括以下几种服务模式:基础设施即服务(Infrastructure as aService,IaaS)、平台即服务(Platform as a Service,PaaS)和软件即服务(Software asa Service,SaaS)。在一些实现方式中,云服务还可以包括函数即服务(Function as aService,FaaS)模式。Cloud services include the following service modes: Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS). In some implementations, the cloud service may also include a function as a service (Function as a Service, FaaS) model.
IaaS模式下,服务提供商提供硬件资源,用户自行部署操作系统、中间件以及运行库等,然后自行安装软件。In the IaaS model, service providers provide hardware resources, and users deploy operating systems, middleware, and runtime libraries by themselves, and then install software by themselves.
PaaS模式下,服务提供商不仅提供硬件资源,还部署操作系统,提供中间件以及运行库等,用户自行安装软件。In the PaaS model, service providers not only provide hardware resources, but also deploy operating systems, provide middleware and runtime libraries, etc., and users install software by themselves.
SaaS模式下,服务提供商提供硬件资源,并且部署有操作系统,提供中间件及运行库等基础环境。此外,服务提供商还提供软件,用户可以直接使用软件。In the SaaS model, service providers provide hardware resources, deploy operating systems, and provide basic environments such as middleware and runtime libraries. In addition, service providers provide software that users can use directly.
FaaS模式下,软件(如应用程序)被抽象成函数。只有当程序被调用时才会执行函数启动。程序未被调用时则不启动,如此,也不会占用资源。In the FaaS model, software (such as applications) is abstracted into functions. The function start is executed only when the program is called. When the program is not called, it will not start, so it will not occupy resources.
云平台,也称云系统、云环境或云,是一种云供应商提供云服务的软件系统。需要说明,该软件系统可以是提供IaaS模式、PaaS模式、SaaS模式或FaaS模式的云服务的软件系统。A cloud platform, also known as a cloud system, cloud environment or cloud, is a software system for cloud providers to provide cloud services. It should be noted that the software system may be a software system that provides cloud services in an IaaS model, a PaaS model, a SaaS model, or a FaaS model.
公有云,是第三方的公有云供应商为广大的个人或企业提供的云平台。在公有云中,硬件、软件和其他结构均为第三方的公有云供应商所拥有和管理。Public cloud is a cloud platform provided by third-party public cloud providers for the majority of individuals or enterprises. In a public cloud, hardware, software, and other structures are owned and managed by a third-party public cloud provider.
私有云,是为一个企业或组织提供的专用的云平台。私有云可以由对应的企业或组织进行内部操作。私有云主要是面向企业用户,也称企业云。A private cloud is a dedicated cloud platform provided for an enterprise or organization. A private cloud can be operated internally by the corresponding enterprise or organization. Private cloud is mainly for enterprise users, also known as enterprise cloud.
混合云,是指不同的云平台所形成的云平台。混合云包括至少两个云平台,也称多云平台或多云。可选地,混合云融合了公有云和私有云。出于安全考虑,一些企业用户更愿意将数据存放在私有云中,但是同时又希望可以获得公有云的计算资源。在这种情况下,包括公有云和私有云的混合云被越来越多地采用。混合云将公有云和私有云进行混合和匹配,以获得良好的使用效果。Hybrid cloud refers to a cloud platform formed by different cloud platforms. Hybrid cloud includes at least two cloud platforms, also known as multi-cloud platform or multi-cloud. Optionally, a hybrid cloud combines public and private clouds. For security reasons, some enterprise users prefer to store data in the private cloud, but at the same time hope to obtain the computing resources of the public cloud. In this context, hybrid clouds including public and private clouds are increasingly being adopted. A hybrid cloud mixes and matches public and private clouds for good use.
应用程序接口(application programming interface,API),又称程序接口,是云平台的操作系统向用户,如编程人员,提供的“程序与操作系统的接口”。该接口可以是用户(如开发人员)在编程时使用的。用户通过该应用程序接口,可访问云平台中的资源和取得相应的服务。一个应用程序接口是一组定义、函数、程序和/或协议的集合。例如,云平台的一个应用程序接口包括一个或多个系统调用(system call),每个系统调用都是一个能完成特定功能的程序。An application programming interface (API), also known as a program interface, is an "interface between a program and an operating system" provided by the operating system of the cloud platform to users, such as programmers. This interface may be used by a user (eg, a developer) while programming. Through the application program interface, users can access resources in the cloud platform and obtain corresponding services. An API is a collection of definitions, functions, procedures, and/or protocols. For example, an application program interface of a cloud platform includes one or more system calls, and each system call is a program that can perform a specific function.
API网关(API Gateway,APIG)具体是一种提供API托管服务的网关。API网关可以对API进行统一鉴权、计量、发布和/或流量控制等管理。API Gateway (API Gateway, APIG) is specifically a gateway that provides API hosting services. The API gateway can perform unified authentication, metering, publishing, and/or flow control management for APIs.
资源可以是提供服务的硬件资源或软件资源。资源还可以根据功能分为计算资源、存储资源和网络资源。例如,计算资源可以包括处理器资源,如中央处理器(CPU,central processing unit)资源。存储资源可以包括内存(memory)资源、外存资源等等。内存资源可以是内存储器,外存资源可以是硬盘、光盘、闪存盘等等。A resource can be a hardware resource or a software resource that provides a service. Resources can also be classified into computing resources, storage resources, and network resources according to their functions. For example, computing resources may include processor resources, such as central processing unit (CPU, central processing unit) resources. The storage resources may include memory resources, external memory resources, and the like. The memory resource may be an internal memory, and the external memory resource may be a hard disk, an optical disk, a flash disk, and the like.
弹性伸缩(auto scaling)是根据用户的业务需求,通过策略自动调整其业务资源的服务。例如,用户的业务量较大时,可以通过策略自动增加业务资源,如增加该业务对应的应用实例。其中,应用实例是指根据应用创建的实例(instance)。实例可以认为是处于运行态的应用。通过启动(或打开)一个应用,可以生成一个实例。Auto scaling is a service that automatically adjusts its business resources through policies according to users' business needs. For example, when the user's service volume is large, service resources can be automatically increased through a policy, such as adding an application instance corresponding to the service. The application instance refers to an instance (instance) created according to the application. An instance can be thought of as a running application. An instance is spawned by starting (or opening) an application.
云服务提供商可以通过云平台为用户提供服务。为了保障服务质量,同时节省资源,业界提出了一种弹性伸缩方法。具体地,监控应用的特定指标,如CPU使用率、内存使用率,当特定指标的指标值达到预设阈值时,按照设定的弹性伸缩策略调整应用实例的个数。Cloud service providers can provide services to users through cloud platforms. To ensure service quality and save resources, the industry proposes an elastic scaling method. Specifically, specific indicators of the application, such as CPU usage and memory usage, are monitored, and when the indicator value of the specific indicator reaches a preset threshold, the number of application instances is adjusted according to the set elastic scaling policy.
然而,上述弹性伸缩方法主要适用于部署在单一云平台的应用。对于部署在多云平台即多云环境下的应用,往往需要人工手动干预,难以实现快速弹性伸缩,导致资源浪费或者服务质量难以得到保障。However, the above elastic scaling methods are mainly applicable to applications deployed on a single cloud platform. For applications deployed in a multi-cloud platform, that is, a multi-cloud environment, manual intervention is often required, which makes it difficult to achieve rapid elastic scaling, resulting in wasted resources or difficult to guarantee service quality.
有鉴于此,本申请提供了一种多云环境下的弹性伸缩方法。该方法可以由跨云弹性伸缩控制器执行。具体地,跨云弹性伸缩控制器可以先对多个云平台提供的资源进行建模,获得所述多个云平台的资源模型。其中,该资源模型可以实现同一类资源在多个云平台间的映射转换,例如实现存储资源在云平台A和云平台B之间的映射转换。然后,当部署在所述多个云平台的应用实例的监控指标值满足预设条件时,例如监控指标值达到设定的阈值时,跨云弹性伸缩控制器可以根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例。In view of this, the present application provides an elastic scaling method in a multi-cloud environment. The method can be executed by the cross-cloud elastic scaling controller. Specifically, the cross-cloud elastic scaling controller may first model resources provided by multiple cloud platforms to obtain resource models of the multiple cloud platforms. The resource model can realize the mapping and transformation of the same type of resources among multiple cloud platforms, for example, realize the mapping and transformation of storage resources between cloud platform A and cloud platform B. Then, when the monitoring index values of the application instances deployed on the multiple cloud platforms meet the preset conditions, for example, when the monitoring index value reaches the set threshold, the cross-cloud elastic scaling controller can The resource model and the elastic scaling strategy are used to adjust the application instance.
如此,实现了在多个云平台的环境下,自动的、应用实例跨云弹性伸缩,无需人工手动干预,提升了弹性伸缩效率,避免了手动干预导致资源浪费或者服务质量难以得到保障。整个伸缩过程无需人工参与,可以实现应用实例跨云平台的分钟级甚至秒级弹性伸缩,提高资源利用率以及保障服务质量。In this way, in the environment of multiple cloud platforms, automatic and cross-cloud elastic scaling of application instances is realized without manual intervention, which improves the efficiency of elastic scaling and avoids the waste of resources or the difficulty of guaranteeing service quality caused by manual intervention. The entire scaling process does not require manual participation, and can achieve elastic scaling of application instances across cloud platforms in minutes or even seconds, improving resource utilization and ensuring service quality.
为了使得本申请的技术方案更加清楚、易于理解,下面结合附图对本申请实施例提供的多云环境下的弹性伸缩方法的应用场景进行介绍。In order to make the technical solutions of the present application clearer and easier to understand, the following describes application scenarios of the elastic scaling method in a multi-cloud environment provided by the embodiments of the present application with reference to the accompanying drawings.
参见图1所示的多云环境下的弹性伸缩方法的应用场景示意图,如图1所示,该场景中包括弹性伸缩控制器102以及多个云平台104。多个云平台104可以分别记作云平台1至云平台n,n大于1。Referring to the schematic diagram of an application scenario of the elastic scaling method in a multi-cloud environment shown in FIG. 1 , as shown in FIG. 1 , the scenario includes an
平台1至云平台n中至少有一个云平台部署有应用A的实例。其中,至少一个云平台可以部署一个或多个应用A的实例。在一个示例中,云平台1部署有多个应用A的实例,具体为实例11至实例1m,云平台n部署有多个应用A的实例,具体为实例n1至实例nm。其中,m为正整数。At least one cloud platform from platform 1 to cloud platform n has an instance of application A deployed. Wherein, at least one cloud platform can deploy one or more instances of application A. In one example, cloud platform 1 deploys multiple instances of application A, specifically instance 11 to instance 1m, and cloud platform n deploys multiple instances of application A, specifically instance n1 to instance nm. where m is a positive integer.
弹性伸缩控制器102与上述多个云平台104连接,例如通过通信通路进行连接。弹性伸缩控制器102对多个云平台104提供的资源进行建模,获得所述多个云平台104的资源模型。当部署在多个云平台104的应用实例的监控指标值满足预设条件时,弹性伸缩控制器102根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例。如此,实现多云环境下的自动弹性伸缩。The
如图2所示,弹性伸缩控制器102可以部署在云环境,具体为云环境上的一个或多个计算设备(例如:中心服务器)。该弹性伸缩控制器102也可以部署在边缘环境中,具体为边缘环境中的一个或多个计算设备(边缘计算设备)上,边缘计算设备可以为服务器、计算盒子等。所述云环境指示云服务提供商拥有的,用于提供计算、存储、通信资源的中心计算设备集群;所述边缘环境指示在地理位置上距离端设备(即端侧设备)较近的,用于提供计算、存储、通信资源的边缘计算设备集群。As shown in FIG. 2 , the
上述弹性伸缩控制器102也可以部署在端设备上。端设备包括终端等物理机(physical machine)。其中,终端包括但不限于台式机、笔记本电脑、平板电脑或者智能手机。弹性伸缩控制器102也可以部署在上述物理机上的虚拟机(virtual machine)或容器(container)中。考虑到负载均衡和可靠性,在一些实现方式中,弹性伸缩控制器102也可以多副本的形式部署在集群中。The above-mentioned
进一步地,如图3所示,弹性伸缩控制器102可以包括多个部分(例如包括多个功能模块)。基于此,弹性伸缩控制器102的各个部分也可以分布式地部署在不同环境中。例如,可以在云环境、边缘环境、端设备中的三个环境,或其中任意两个环境上分别部署弹性伸缩控制器102的一部分。Further, as shown in FIG. 3 , the
弹性伸缩控制器102内部的功能模块可有多种划分方式,本申请不对其进行限制。图4为一种示例性的划分方式,如图4所示,弹性伸缩控制器102包括指标监控模块1022和弹性伸缩控制模块1024。在一些实现方式中,弹性伸缩控制器102还可以包括弹性伸缩策略管理模块1026、多云成本洞察模块1028、多云性能评估模块1029中的一种或多种。The functional modules inside the
其中,指标监控模块1022用于通过各云平台的监控系统所开放的API读取应用相关监控指标对应的监控指标值。当该监控指标值满足预设条件,例如监控指标值达到预设阈值时,弹性伸缩控制模块1024可以根据多个云平台104的资源模型以及弹性伸缩策略,调整所述应用实例。The
在一些方式中,弹性伸缩策略管理模块1026用于对弹性伸缩策略进行管理,以便弹性伸缩控制模块1024使用。具体地,弹性伸缩策略管理模块1026提供有跨云弹性伸缩策略管理组件,用户可以通过跨云弹性伸缩策略管理组件配置基于应用多种性能或其他用户自定义指标的弹性伸缩策略。该弹性伸缩策略可以包括亲和性(affinity)策略、反亲和性(anti-affinity)策略、性能优先策略或成本优先策略中的一种或多种。In some manners, the elastic scaling policy management module 1026 is configured to manage the elastic scaling policy for use by the elastic scaling control module 1024 . Specifically, the elastic scaling policy management module 1026 provides a cross-cloud elastic scaling policy management component, and a user can configure an elastic scaling policy based on various application performances or other user-defined indicators through the cross-cloud elastic scaling policy management component. The elastic scaling strategy may include one or more of an affinity strategy, an anti-affinity strategy, a performance priority strategy or a cost priority strategy.
对于弹性伸缩策略,本申请实施例仅仅描述了亲和性策略、反亲和性策略、成本优先策略、性能优先策略等。在一些实现方式中,弹性伸缩控制器102也可将弹性伸缩策略管理模块1026标准化、插件化。后续若需支持更多的类似策略,可由第三方开发者按需开发选择相应的插件即可。Regarding the elastic scaling policy, the embodiments of the present application only describe the affinity policy, the anti-affinity policy, the cost priority policy, the performance priority policy, and the like. In some implementations, the
其中,亲和性策略具体是指将应用实例配置在同一云平台的相近region(包括同一region),甚至是同一region中的相近节点(包括同一节点)。反亲和性策略具体是指避免将应用实例配置在相近region或同一region中的相近节点。当应用对响应效率要求较高时,可以将应用实例配置在同一云平台的相近region。当应用对服务可靠性要求较高时,可以避免将应用实例配置在同一云平台的相近region。The affinity policy specifically refers to configuring the application instance in a similar region (including the same region) of the same cloud platform, or even a similar node (including the same node) in the same region. Specifically, the anti-affinity policy refers to avoiding configuring application instances in adjacent regions or adjacent nodes in the same region. When the application requires high response efficiency, the application instance can be configured in a similar region of the same cloud platform. When applications have high requirements on service reliability, it is possible to avoid configuring application instances in similar regions of the same cloud platform.
多云成本洞察模块1028用于对多个云平台上资源的成本进行评估。针对公有云,多云成本洞察模块1028可以通过访问公有云的资源报价系统,获取各类资源各种规格的报价,从而得到该公有云上各类资源各种规格的成本。针对私有云,多云成本洞察模块1028可以根据该私有云的硬件配置、操作系统配置等配置信息分析该私有云一次性固定投资费用和周期性维护费用,基于该费用确定各类资源各种规格的成本,例如确定各类计算、存储、网络等资源单位时间单位计量单位使用成本。The multi-cloud cost insight module 1028 is used to evaluate the cost of resources on multiple cloud platforms. For the public cloud, the multi-cloud cost insight module 1028 can access the resource quotation system of the public cloud to obtain quotations of various types of resources and various specifications, so as to obtain the costs of various types of resources on the public cloud in various specifications. For a private cloud, the multi-cloud cost insight module 1028 can analyze the one-time fixed investment cost and periodic maintenance cost of the private cloud according to the hardware configuration, operating system configuration and other configuration information of the private cloud, and determine the cost of various types of resources based on the cost. Costs, such as determining the usage cost of various computing, storage, network and other resources per unit of time, unit of measurement, and unit of measurement.
多云性能评估模块1029用于对各云平台上资源的性能进行评估。具体地,多云性能评估模块1029可以对不同云平台各规格的相同配置资源进行性能测试,例如跑分测试,得到计算速率、网络速率、磁盘输入输出(input/output,I/O)速率等性能值。The multi-cloud performance evaluation module 1029 is used to evaluate the performance of resources on each cloud platform. Specifically, the multi-cloud performance evaluation module 1029 can perform performance tests on the same configuration resources of different cloud platforms and specifications, such as running score tests, to obtain performance such as computing rate, network rate, and disk input/output (I/O) rate. value.
当采用成本优先策略进行弹性伸缩时,弹性伸缩控制模块1024还可以从多云成本洞察模块1028获取多个云平台104上各类资源各种规格的成本,然后基于多个云平台104的资源模型、多个云平台104上各类资源各种规格的成本以及成本优先策略,调整所述应用实例。When the cost priority strategy is adopted for elastic scaling, the elastic scaling control module 1024 can also obtain the costs of various types of resources on
当采用性能优先策略进行弹性伸缩时,弹性伸缩控制模块1024还可以从多云性能评估模块1029获取多个云平台104上各类资源各种规格的性能,然后基于多个云平台104的资源模型、多个云平台104上各类资源各种规格的性能以及性能优先策略,调整所述应用实例。When the performance-priority policy is adopted for elastic scaling, the elastic scaling control module 1024 can also obtain the performance of various types of resources on
接下来,从弹性伸缩控制器的角度,对本申请实施例提供的多云环境下的弹性伸缩方法进行介绍。Next, from the perspective of an elastic scaling controller, the elastic scaling method provided in the embodiment of the present application in a multi-cloud environment is introduced.
参见图5所示的多云环境下的弹性伸缩方法的流程图,该方法包括:Referring to the flowchart of the elastic scaling method in a multi-cloud environment shown in FIG. 5, the method includes:
S502:弹性伸缩控制器102对多个云平台提供的资源进行建模,获得所述多个云平台的资源模型。S502: The
其中,资源模型可以实现同一类资源在多个云平台间的映射转换,例如实现存储资源在云平台A和云平台B之间的映射转换。在一些实现方式中,资源可以通过资源参数进行表征。资源参数具体可以是描述资源配置情况的参数。例如,针对计算资源,资源参数可以包括核数,如CPU为4核。又例如,针对存储资源,资源参数可以包括内存容量,如内存为2GB(吉字节,GigByte)。The resource model can realize the mapping and transformation of the same type of resources among multiple cloud platforms, for example, realize the mapping and transformation of storage resources between cloud platform A and cloud platform B. In some implementations, resources can be characterized by resource parameters. The resource parameter may specifically be a parameter describing the resource configuration situation. For example, for computing resources, the resource parameter may include the number of cores, for example, the CPU is 4 cores. For another example, for a storage resource, the resource parameter may include a memory capacity, for example, the memory is 2GB (gigabyte, GigByte).
资源参数的格式(schema,也称规格),简称资源参数格式。例如,与某一资源对应的资源参数格式可以为:资源参数为CPU个数或GPU个数等计算资源规格参数。在具体实现时,弹性伸缩控制器102可以统一资源参数格式,以实现对资源进行统一建模。Resource parameter format (schema, also called specification), referred to as resource parameter format. For example, the resource parameter format corresponding to a certain resource may be: the resource parameter is a computing resource specification parameter such as the number of CPUs or the number of GPUs. During specific implementation, the
在一些实现方式中,弹性伸缩控制器102可以获取标准资源参数格式,然后建立多个云平台104中至少一个云平台(例如可以是每个云平台)支持的资源参数格式与上述标准资源参数格式的对应关系,从而获得多个云平台104的资源模型,该资源模型也可以称作转义模型。以该资源模型中标准资源参数格式作为参考值,对资源参数格式进行转义,可以得到同一类资源在多个云平台间的映射转换关系。In some implementations, the
其中,标准资源参数格式可以是多个云平台104中一个云平台支持的资源参数格式。当然,标准资源参数格式也可以是对多个云平台104中至少一个云平台支持的资源参数格式进行处理得到。The standard resource parameter format may be a resource parameter format supported by one cloud platform among the
S504:当部署在所述多个云平台104的应用实例的监控指标值满足预设条件时,弹性伸缩控制器102根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例。S504: When the monitoring index values of the application instances deployed on the
弹性伸缩控制器102可以监控部署在所述多个云平台104的应用实例的指标,得到监控指标值。具体地,弹性伸缩控制器102可以从云平台104上的监控系统中读取监控指标值。监控系统中可以包括多个监控指标的指标值,弹性伸缩控制器102根据实际需求获取相应的监控指标值。在一些示例中,弹性伸缩控制器102获取的监控指标值可以是CPU使用率,内存使用率等等。The
当监控指标值满足预设条件时,弹性伸缩控制器102可以根据所述多个云平台104的资源模型以及弹性伸缩策略,调整所述应用实例。其中,预设条件可以根据实际需求而设定。例如,预设条件可以设置为监控指标值大于该指标对应的阈值,或者监控指标值小于该指标对应的阈值等等。指标对应的阈值可以根据经验值进行设置,本申请实施例对此不作限定。When the monitoring index value satisfies the preset condition, the
在一些实现方式中,弹性伸缩控制器102在对应用实例进行调整时,可以根据所述多个云平台的资源模型以及亲和性策略、反亲和性策略、成本优先策略、性能优先策略中的任意一种或多种策略,调整所述应用实例。In some implementations, when the
其中,应用对于响应速率要求较高时,弹性伸缩控制器102可以根据所述多个云平台的资源模型以及亲和性策略,调整所述应用实例。例如,弹性伸缩控制器102可以将对于响应速率要求较高的应用实例部署在同一云平台的相近region,如部署在同一region的相近节点上。Wherein, when the application has higher requirements on the response rate, the
应用对于可靠性、可用性要求较高时,弹性伸缩控制器102可以根据所述多个云平台104的资源模型以及反亲和性策略,调整所述应用实例。例如,弹性伸缩控制器102可以避免将对可靠性、可用性要求较高的应用实例部署在同一云平台的相近region,即弹性伸缩控制器102可以将其部署在不同云平台104上。When the application has high requirements on reliability and availability, the
用户优先考虑成本时,弹性伸缩控制器102在对应用实例进行调整时,可以根据所述多个云平台104的资源模型以及成本优先策略,调整所述应用实例。例如,弹性伸缩控制器102可以选择价格最低的云平台104部署应用实例。When the user prioritizes cost, when adjusting the application instance, the
用户优先考虑性能时,弹性伸缩控制器102在对应用实例进行调整时,可以根据多个云平台104的资源模型以及性能优先策略,调整所述应用实例。例如,弹性伸缩控制器102可以选择性能最优的云平台104部署应用实例。When the user prioritizes performance, when adjusting the application instance, the
在一些实现方式中,弹性伸缩控制器102在对应用实例进行调整时,可以根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的数量。例如,弹性伸缩控制器102可以根据多个云平台的资源模型以及弹性伸缩策略,新增应用实例。又例如,弹性伸缩控制器102可以根据多个云平台的资源模型以及弹性伸缩策略,删除应用实例。In some implementations, when adjusting the application instances, the
在另一些实现方式中,弹性伸缩控制器102在对应用实例进行调整时,可以根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的配置。例如,弹性伸缩控制器102可以将应用实例的配置由1核1G(表示处理器为单核,内存为1G)提升为4核2G(表示处理器为4核,内存为2G)。In other implementations, when adjusting the application instance, the
下面以调整应用实例的数量为例,对调整过程进行详细说明。The following describes the adjustment process in detail by taking the adjustment of the number of application instances as an example.
具体地,弹性伸缩控制器102可以根据所述多个云平台的资源模型以及弹性伸缩策略确定目标云平台,然后通过所述目标云平台的API创建新的应用实例。该示例中假设弹性伸缩策略为成本优先策略。监控指标值大于对应的阈值时,弹性伸缩控制器102需要新增应用实例。Specifically, the
为此,弹性伸缩控制器102可以通过资源模型中各云平台支持的资源参数格式与标准资源参数格式之间的对应关系,确定一个计量单位的标准资源对应多少计量单位的云平台的资源,然后基于各类资源各种规格的成本,确定部署应用实例总成本最低的云平台作为目标云平台。弹性伸缩控制器102调用该API,在目标云平台创建新的应用实例,从而实现通过较多的应用实例保障服务质量。To this end, the
进一步地,在新增应用实例之后,当部署在所述多个云平台的应用实例的监控指标值不满足预设条件时,弹性伸缩控制器102还可以通过所述API删除所述新的应用实例,从而避免资源浪费。Further, after adding an application instance, when the monitoring index values of the application instances deployed on the multiple cloud platforms do not meet the preset conditions, the
需要说明的是,在新增应用实例或者删除应用实例时,弹性伸缩控制器102也可以选择合适的云平台,即目标云平台,通过混合云API网关创建或删除应用实例。It should be noted that, when adding an application instance or deleting an application instance, the
上文结合图1至图5对本申请实施例提供的多云环境下的弹性伸缩方法进行了详细介绍,下面将结合附图对本申请实施例提供的装置、设备进行介绍。The elastic scaling method in a multi-cloud environment provided by the embodiments of the present application is described in detail above with reference to FIGS. 1 to 5 , and the apparatus and equipment provided by the embodiments of the present application will be introduced below with reference to the accompanying drawings.
参见图6所示的多云环境下的弹性伸缩装置的结构示意图,该装置600包括:Referring to the schematic structural diagram of an elastic scaling device in a cloudy environment shown in FIG. 6 , the
建模单元602,用于对多个云平台提供的资源进行建模,获得所述多个云平台的资源模型;A
调整单元604,用于当部署在所述多个云平台的应用实例的监控指标值满足预设条件时,根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例。The
在一些可能的实现方式中,所述调整单元604具体用于:In some possible implementations, the adjusting
根据所述多个云平台的资源模型以及亲和性策略、反亲和性策略、成本优先策略、性能优先策略中的任意一种或多种策略,调整所述应用实例。The application instance is adjusted according to the resource models of the multiple cloud platforms and any one or more strategies of an affinity strategy, an anti-affinity strategy, a cost priority strategy, and a performance priority strategy.
在一些可能的实现方式中,所述调整单元604具体用于:In some possible implementations, the adjusting
根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的数量;或者,根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的配置。Adjust the number of the application instances according to the resource models and elastic scaling policies of the multiple cloud platforms; or adjust the configuration of the application instances according to the resource models and elastic scaling policies of the multiple cloud platforms.
在一些可能的实现方式中,所述调整单元604具体用于:In some possible implementations, the adjusting
根据所述多个云平台的资源模型以及弹性伸缩策略确定目标云平台;Determine the target cloud platform according to the resource models of the multiple cloud platforms and the elastic scaling strategy;
通过所述目标云平台的应用程序编程接口(API)创建新的应用实例。A new application instance is created through the application programming interface (API) of the target cloud platform.
在一些可能的实现方式中,所述调整单元604还用于:In some possible implementations, the
在创建新的应用实例之后,当部署在所述多个云平台的应用实例的监控指标值不满足预设条件时,通过所述API删除所述新的应用实例。After a new application instance is created, when the monitoring index values of the application instances deployed on the multiple cloud platforms do not meet the preset conditions, the new application instance is deleted through the API.
在一些可能的实现方式中,所述多个云平台包括多个公有云平台,或者多个私有云平台,或者至少一个公有云平台和至少一个私有云平台形成的混合云平台。In some possible implementations, the multiple cloud platforms include multiple public cloud platforms, or multiple private cloud platforms, or a hybrid cloud platform formed by at least one public cloud platform and at least one private cloud platform.
根据本申请实施例的多云环境下的弹性伸缩装置600可对应于执行本申请实施例中描述的方法,并且多云环境下的弹性伸缩装置600的各个模块/单元的上述和其它操作和/或功能分别为了实现图5所示实施例中的各个方法的相应流程,为了简洁,在此不再赘述。The
本申请实施例还提供了一种设备700。该设备700可以是笔记本电脑、台式机等端侧设备,也可以是云环境或边缘环境中的计算机集群。弹性伸缩控制器102部署在设备700中,设备700具体用于实现如图6所示实施例中多云环境下的弹性伸缩装置600的功能。This embodiment of the present application further provides a device 700 . The device 700 may be an end-side device such as a notebook computer and a desktop computer, or may be a computer cluster in a cloud environment or an edge environment. The
图7提供了一种设备700的结构示意图,如图7所示,设备700包括总线701、处理器702、通信接口703和存储器704。处理器702、存储器704和通信接口703之间通过总线701通信。FIG. 7 provides a schematic structural diagram of a device 700 . As shown in FIG. 7 , the device 700 includes a bus 701 , a processor 702 , a communication interface 703 and a memory 704 . The processor 702 , the memory 704 and the communication interface 703 communicate through the bus 701 .
总线701可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 701 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like. The bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
其中,处理器702可以为中央处理器(central processing unit,CPU)。、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理器(digital signal processor,DSP)等处理器中的任意一种或多种。The processor 702 may be a central processing unit (central processing unit, CPU). Any one or more of processors such as a graphics processor (graphics processing unit, GPU), a microprocessor (micro processor, MP), or a digital signal processor (digital signal processor, DSP).
通信接口703用于与外部通信。例如,获取多个云平台104上各类资源各种规格的成本,或者获取多个云平台104上各类资源各种规格的性能等。The communication interface 703 is used for external communication. For example, the cost of various types of resources on
存储器704可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器704还可以包括非易失性存储器(non-volatilememory),例如只读存储器(read-only memory,ROM),快闪存储器,机械硬盘(hard drivedrive,HDD)或固态硬盘(solid state drive,SSD)。Memory 704 may include volatile memory, such as random access memory (RAM). The memory 704 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, hard drive drive (HDD) or solid state drive (SSD) ).
存储器704中存储有可执行代码,处理器702执行该可执行代码以执行前述多云环境下的弹性伸缩方法。Executable code is stored in the memory 704, and the processor 702 executes the executable code to execute the aforementioned elastic scaling method in a multi-cloud environment.
具体地,在实现图6所示实施例的情况下,且图6实施例中所描述的多云环境下的弹性伸缩装置600的各单元为通过软件实现的情况下,执行图6中的建模单元602、弹性伸缩控制单元604功能所需的软件或程序代码存储在存储器704中。通信模块功能通过通信接口703实现。Specifically, in the case where the embodiment shown in FIG. 6 is implemented, and each unit of the
通信接口703接收多个云平台104的资源参数格式,将其通过总线701传输至处理器702,处理器702执行存储器704中存储的各单元对应的程序代码,如建模单元602、弹性伸缩控制单元604对应的程序代码,以执行根据多个云平台104的资源参数格式和标准资源参数格式,对多个云平台提供的资源进行建模,获得所述多个云平台的资源模型,当部署在所述多个云平台的应用实例的监控指标值满足预设条件时,根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的步骤。The communication interface 703 receives the resource parameter formats of the
在一些实现方式中,处理器702具体用于执行弹性伸缩控制单元604对应的程序代码,以执行如下方法步骤:In some implementations, the processor 702 is specifically configured to execute program codes corresponding to the elastic
根据所述多个云平台的资源模型以及亲和性策略、反亲和性策略、成本优先策略、性能优先策略中的任意一种或多种策略,调整所述应用实例。The application instance is adjusted according to the resource models of the multiple cloud platforms and any one or more strategies of an affinity strategy, an anti-affinity strategy, a cost priority strategy, and a performance priority strategy.
在一些实现方式中,处理器702具体用于执行弹性伸缩控制单元604对应的程序代码,以执行如下方法步骤:In some implementations, the processor 702 is specifically configured to execute program codes corresponding to the elastic
根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的数量;或者,Adjust the number of the application instances according to the resource models and elastic scaling policies of the multiple cloud platforms; or,
根据所述多个云平台的资源模型以及弹性伸缩策略,调整所述应用实例的配置。The configuration of the application instance is adjusted according to the resource models of the multiple cloud platforms and the elastic scaling policy.
在一些实现方式中,处理器702具体用于执行弹性伸缩控制单元604对应的程序代码,以执行如下方法步骤:In some implementations, the processor 702 is specifically configured to execute program codes corresponding to the elastic
根据所述多个云平台的资源模型以及弹性伸缩策略确定目标云平台;Determine the target cloud platform according to the resource models of the multiple cloud platforms and the elastic scaling strategy;
通过所述目标云平台的应用程序编程接口(API)创建新的应用实例。A new application instance is created through the application programming interface (API) of the target cloud platform.
在一些实现方式中,处理器702具体用于执行弹性伸缩控制单元604对应的程序代码,以执行如下方法步骤:In some implementations, the processor 702 is specifically configured to execute program codes corresponding to the elastic
在创建新的应用实例之后,当部署在所述多个云平台的应用实例的监控指标值不满足预设条件时,通过所述API删除所述新的应用实例。After a new application instance is created, when the monitoring index values of the application instances deployed on the multiple cloud platforms do not meet the preset conditions, the new application instance is deleted through the API.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括指令,所述指令指示计算机执行上述应用于多云环境下的弹性伸缩装置600的多云环境下的弹性伸缩方法。Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium includes instructions, the instructions instruct a computer to execute the above-mentioned elastic scaling method in a multi-cloud environment that is applied to the
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括指令,所述指令指示计算机执行上述应用于多云环境下的弹性伸缩装置600的多云环境下的弹性伸缩方法。Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium includes instructions, the instructions instruct a computer to execute the above-mentioned elastic scaling method in a multi-cloud environment that is applied to the
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品被计算机执行时,所述计算机执行前述多云环境下的弹性伸缩方法的任一方法。该计算机程序产品可以为一个软件安装包,在需要使用前述多云环境下的弹性伸缩方法的任一方法的情况下,可以下载该计算机程序产品并在计算机上执行该计算机程序产品。An embodiment of the present application further provides a computer program product, when the computer program product is executed by a computer, the computer executes any one of the foregoing elastic scaling methods in a multi-cloud environment. The computer program product may be a software installation package, and when any one of the aforementioned elastic scaling methods in a multi-cloud environment needs to be used, the computer program product may be downloaded and executed on a computer.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be A physical unit, which can be located in one place or distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware. Special components, etc. to achieve. Under normal circumstances, all functions completed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or special circuit, etc. However, software program implementation is the preferred embodiment in many cases for this application. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art. The computer software products are stored in a readable storage medium, such as a floppy disk of a computer. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to enable a computer device (which may be a personal computer, training device, or network device, etc.) to execute the various embodiments of the application. method.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be retrieved from a website, computer, training device, or data Transmission from the center to another website site, computer, training facility or data center via wired (eg coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a training device, a data center, or the like that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010495551.5A CN113760516B (en) | 2020-06-03 | Elastic expansion method, device, equipment and medium in cloud environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010495551.5A CN113760516B (en) | 2020-06-03 | Elastic expansion method, device, equipment and medium in cloud environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113760516A true CN113760516A (en) | 2021-12-07 |
CN113760516B CN113760516B (en) | 2025-07-25 |
Family
ID=
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114513344A (en) * | 2022-01-26 | 2022-05-17 | 鼎捷软件股份有限公司 | Integration system and method between cloud applications |
CN115033338A (en) * | 2022-04-26 | 2022-09-09 | 京东科技控股股份有限公司 | Application instance configuration method and device |
CN115208891A (en) * | 2022-07-15 | 2022-10-18 | 济南浪潮数据技术有限公司 | Hybrid cloud elastic expansion method, device, equipment and storage medium |
WO2023106980A1 (en) * | 2021-12-10 | 2023-06-15 | Telefonaktiebolaget Lm Ericsson (Publ) | Scaling arrangement and method performed therein |
WO2024198602A1 (en) * | 2023-03-27 | 2024-10-03 | 华为云计算技术有限公司 | Method for managing instances and instance management platform |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105323282A (en) * | 2014-07-28 | 2016-02-10 | 神州数码信息系统有限公司 | Enterprise application deployment and management system for multiple tenants |
CN105975277A (en) * | 2016-05-11 | 2016-09-28 | 广东浪潮大数据研究有限公司 | Template-based mixed cloud elastic telescoping set building method |
CN106201718A (en) * | 2016-07-05 | 2016-12-07 | 北京邮电大学 | A kind of cloud computing resources dynamic retractility method based on load estimation |
CN106293868A (en) * | 2015-05-15 | 2017-01-04 | 苏宁云商集团股份有限公司 | In a kind of cloud computing environment, virtual machine expands capacity reduction method and scalable appearance system |
CN107506241A (en) * | 2017-08-25 | 2017-12-22 | 郑州云海信息技术有限公司 | A kind of flexible method of cloud platform automatic elastic |
CN107656807A (en) * | 2016-07-26 | 2018-02-02 | 华为技术有限公司 | The automatic elastic telescopic method and device of a kind of virtual resource |
CN109144666A (en) * | 2018-07-30 | 2019-01-04 | 上海思询信息科技有限公司 | A kind of method for processing resource and system across cloud platform |
CN110865881A (en) * | 2018-08-27 | 2020-03-06 | 中移(苏州)软件技术有限公司 | Method and device for resource scheduling |
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105323282A (en) * | 2014-07-28 | 2016-02-10 | 神州数码信息系统有限公司 | Enterprise application deployment and management system for multiple tenants |
CN106293868A (en) * | 2015-05-15 | 2017-01-04 | 苏宁云商集团股份有限公司 | In a kind of cloud computing environment, virtual machine expands capacity reduction method and scalable appearance system |
CN105975277A (en) * | 2016-05-11 | 2016-09-28 | 广东浪潮大数据研究有限公司 | Template-based mixed cloud elastic telescoping set building method |
CN106201718A (en) * | 2016-07-05 | 2016-12-07 | 北京邮电大学 | A kind of cloud computing resources dynamic retractility method based on load estimation |
CN107656807A (en) * | 2016-07-26 | 2018-02-02 | 华为技术有限公司 | The automatic elastic telescopic method and device of a kind of virtual resource |
CN107506241A (en) * | 2017-08-25 | 2017-12-22 | 郑州云海信息技术有限公司 | A kind of flexible method of cloud platform automatic elastic |
CN109144666A (en) * | 2018-07-30 | 2019-01-04 | 上海思询信息科技有限公司 | A kind of method for processing resource and system across cloud platform |
CN110865881A (en) * | 2018-08-27 | 2020-03-06 | 中移(苏州)软件技术有限公司 | Method and device for resource scheduling |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023106980A1 (en) * | 2021-12-10 | 2023-06-15 | Telefonaktiebolaget Lm Ericsson (Publ) | Scaling arrangement and method performed therein |
CN114513344A (en) * | 2022-01-26 | 2022-05-17 | 鼎捷软件股份有限公司 | Integration system and method between cloud applications |
TWI795207B (en) * | 2022-01-26 | 2023-03-01 | 大陸商鼎捷軟件股份有限公司 | Integrated system between multi-cloud applications and method thereof |
CN114513344B (en) * | 2022-01-26 | 2024-05-24 | 鼎捷软件股份有限公司 | Integration system and method between cloud applications |
CN115033338A (en) * | 2022-04-26 | 2022-09-09 | 京东科技控股股份有限公司 | Application instance configuration method and device |
CN115208891A (en) * | 2022-07-15 | 2022-10-18 | 济南浪潮数据技术有限公司 | Hybrid cloud elastic expansion method, device, equipment and storage medium |
WO2024198602A1 (en) * | 2023-03-27 | 2024-10-03 | 华为云计算技术有限公司 | Method for managing instances and instance management platform |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106537338B (en) | self-scaling cloud | |
US11044230B2 (en) | Dynamically opening ports for trusted application processes hosted in containers | |
CN110162345B (en) | Application program access method and device and storage medium | |
US10594800B2 (en) | Platform runtime abstraction | |
JP2018198068A (en) | Profile-based sla guarantees under workload migration in distributed cloud | |
CN107832139A (en) | For the method, apparatus and system for the computing resource for managing block chain link point | |
CN113645262A (en) | Cloud computing service system and method | |
TW200901039A (en) | Resource manager and method | |
CN103763346A (en) | Distributed resource scheduling method and device | |
US20150163285A1 (en) | Identifying The Workload Of A Hybrid Cloud Based On Workload Provisioning Delay | |
NL2018627B1 (en) | Cloud platform configurator | |
CN112527669B (en) | Self-test method and system for local services | |
CN116260725A (en) | Bandwidth allocation method and device of server, electronic equipment and storage medium | |
WO2020143199A1 (en) | Application program plug-in method and system, and related apparatus | |
JP2017068480A (en) | Job management method, job management device, and program | |
WO2023093197A1 (en) | Application management method and related system | |
CN114296953B (en) | Multi-cloud heterogeneous system and task processing method | |
WO2019222941A1 (en) | Method for evaluating application deployment, apparatus, computer program product, and readable medium | |
CN113760516A (en) | A method, device, device and medium for elastic scaling in a multi-cloud environment | |
CN113760516B (en) | Elastic expansion method, device, equipment and medium in cloud environment | |
US20240103818A1 (en) | Annotation driven just in time and state-based rbac policy control | |
CN113900931B (en) | A Docker-based testing method, device, equipment and storage medium | |
WO2022134895A1 (en) | Mock response method and related device | |
CN113138772B (en) | Construction method and device of data processing platform, electronic equipment and storage medium | |
CN114595061A (en) | Resource configuration method and apparatus, electronic device and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220207 Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province Applicant after: Huawei Cloud Computing Technologies Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |