Container orchestration method and device, cloud management platform, and cloud system
Through the integer programming solution model and cross-availability zone traffic interaction minimization grouping strategy, the problem of high container orchestration costs in public clouds is solved, low-cost cloud server rental and communication costs are reduced, and the economy and efficiency of cloud services are improved. .
Patent Information
- Application Number
- PCT/CN2024/076391
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-29
- Filing Date
- 2024-02-06
- Publication Date
- 2024-10-03
AI Technical Summary
Existing container orchestration strategies do not fully consider cost factors in public clouds, resulting in high cloud server overhead. Especially in software as a service (SaaS), IT resource overhead accounts for a large proportion, affecting users' willingness to use cloud servers.
Solve the model optimization objectives through integer programming, combine container information and cloud server information, determine the orchestration strategy with the goal of minimizing cloud service costs, realize the construction of container clusters, reduce the rental cost of cloud servers, and minimize cross-availability zone traffic interaction The optimized grouping strategy further reduces communication costs.
It effectively reduces the cost of cloud servers for building container clusters and the total cost of using cloud services, and improves the economy and efficiency of cloud services.
Smart Images

Figure CN2024076391_03102024_PF_FP_ABST
Abstract
Description
A container orchestration method, device, cloud management platform and cloud system
[0001] This application claims priority to Chinese patent application number 202310351364.3, filed on March 29, 2023, entitled “A container orchestration method, device, cloud management platform and cloud system,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of cloud computing technology, and in particular to a container orchestration method, device, cloud management platform, and cloud system. Background Art
[0003] Cloud computing is a model for increasing, using, and delivering Internet-related services, typically involving the provision of dynamically scalable virtualized resources over the Internet.
[0004] Container technology is the mainstream technology for current service deployment. It allows developers to package their applications and dependency packages into a portable container, and run container instances by leasing virtualized resources on the public cloud, thereby providing users with the required services.
[0005] In related technologies, container orchestration strategies are mainly applied to cluster construction in private clouds, and cluster construction is carried out based on indicators such as container performance and stability, but the cost of cluster construction for users in public clouds is not fully considered. In particular, in software as a service (SaaS), the overhead of IT resources is relatively high, among which the overhead of cloud servers (elastic compute service, ECS) accounts for a large proportion.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a container orchestration method, which determines the container orchestration strategy with the goal of minimizing costs, effectively reduces the cloud server cost of building a container cluster, and thus reduces the cost of using cloud services.
[0008] In a first aspect, the present application provides a container orchestration method, comprising obtaining container information, the container information including cloud resource requirements of multiple containers; obtaining cloud server information, the cloud server information including specification information and cost information of multiple cloud servers; and determining an orchestration strategy for multiple containers that meets preset conditions based on the container information and cloud server information, the preset conditions including minimizing cloud server costs, the orchestration strategy indicating that each of the multiple containers is deployed on a target cloud server, and the multiple cloud servers including the target cloud server.
[0009] The container orchestration method provided in this application determines the container orchestration strategy with the goal of minimizing cloud service costs, effectively reducing the cloud server costs required to build a container cluster (for example, the cost of renting cloud servers in a public cloud), thereby reducing the cost of using cloud services.
[0010] In one possible implementation, by minimizing the cloud server cost as the optimization goal of an integer programming solution model, taking the container information and the cloud server information as inputs of the integer programming solution model, and outputting the orchestration strategy of the multiple containers, an orchestration strategy for multiple containers that meets preset conditions is determined based on the container information and the cloud server information.
[0011] In this possible implementation, the container orchestration is transformed into a two-dimensional vector packing problem. With container information and cloud server information as decision variables and minimizing cloud server cost as the goal, an integer programming model for vector packing is constructed. The container information and cloud server information are used as inputs of the integer programming model, and the container orchestration strategy is output. Containers are deployed according to the orchestration strategy to minimize the cost of the cloud server deployed with the containers while meeting the cloud resource requirements for container deployment.
[0012] In one possible implementation, the container orchestration method provided in the present application also includes sending a first request message to a first cloud management platform, where the first request message carries an orchestration strategy so that the first cloud management platform deploys multiple containers in a target cloud server according to the orchestration strategy.
[0013] By using the container orchestration strategy derived from the container orchestration method provided in the embodiments of the present application, multiple containers are deployed in the target cloud server to realize the construction of a container cluster, thereby reducing the cost of the cloud server, for example, reducing the cost of renting the cloud server in a public cloud and reducing the cost of building the cloud server in a private cloud.
[0014] In one possible implementation, the preset condition further includes minimizing cross-availability zone traffic interaction, and the container orchestration method provided in this application further includes determining grouping information of multiple containers based on minimizing cross-availability zone traffic interaction.
[0015] By minimizing cross-availability zone traffic interactions, we determine the grouping of containers and take this into account when determining the orchestration strategy. By building a container cluster based on the orchestration strategy, we can reduce the communication costs of containers between different availability zones and further lower the cost of using cloud services.
[0016] In one example, traffic interaction information between containers can be used to determine grouping information for multiple containers. For example, traffic interaction information between multiple containers can be obtained; based on the traffic interaction information and minimizing cross-availability zone traffic interaction, grouping information for the multiple containers can be determined, where containers belonging to the same group are deployed in the same availability zone.
[0017] There are many ways to determine the grouping information of multiple containers based on minimizing cross-zone traffic interactions, such as community discovery algorithms or graph neural networks.
[0018] Exemplarily, a specific implementation of container grouping through a community discovery algorithm is: based on traffic interaction information, determining a traffic interaction graph, wherein the traffic interaction graph includes multiple nodes and multiple connection edges, the multiple nodes represent multiple containers, the connection edges connect nodes with traffic interaction relationships, and the weight of the connection edge is determined based on the interaction traffic between the two nodes connected by the connection edge; based on the weight of the connection edge, determining the modularity between adjacent nodes; dividing the traffic interaction graph based on the modularity, determining the grouping results of the multiple nodes, and the grouping results of the multiple nodes indicate the grouping results of the multiple containers.
[0019] A specific implementation of container grouping through graph neural networks is: based on traffic interaction information, determine a traffic interaction graph, where the traffic interaction graph includes multiple nodes and multiple connecting edges, multiple nodes represent multiple containers, connecting edges connect nodes with traffic interaction relationships, and the weight of the connecting edge is determined based on the interaction traffic between the two nodes connected by the connecting edge; use the traffic interaction graph as the input of the trained graph neural network, output the grouping results of multiple nodes, and the grouping results of multiple nodes indicate the grouping results of multiple containers.
[0020] It should be explained that the traffic interaction information between containers can be determined based on empirical analysis or based on historical traffic interaction information between containers, and this embodiment of the present application does not specifically limit this.
[0021] In another possible implementation, the process of determining the grouping information of multiple containers can also be completed in cloud computing. For example, a second request message is sent to the second cloud management platform, and the second request message is used to instruct the second cloud management platform to determine the grouping information of multiple containers with the goal of minimizing cross-availability zone traffic interaction, where containers belonging to the same group are deployed in the same availability zone; and a second response message sent by the second cloud management platform is received, and the second response message includes the grouping information of multiple containers.
[0022] In one example, the orchestration policy includes grouping information of multiple containers, specification information of a target cloud server, and container information deployed in each cloud server in the target cloud service.
[0023] In another possible implementation, cloud server information can be obtained by interacting with the cloud, for example, sending a third request message to a third cloud management platform, the third request message is used to request to obtain the cloud server information; receiving a third response message sent by the third cloud management platform, the third response message is used to carry the cloud server information.
[0024] In a second aspect, an embodiment of the present application further provides a container orchestration device, which is a policy computing node that can be deployed on the user side or a third-party platform. The container orchestration device includes an acquisition module and a determination module. The acquisition module is used to acquire container information, which includes the cloud resource requirements of multiple containers; and acquire cloud server information, which includes the specification information and cost information of multiple cloud servers; the determination module is used to determine the orchestration strategy of multiple containers that meet preset conditions based on the container information and cloud server information. The preset conditions include minimizing the cloud server cost, and the orchestration strategy indicates that each container in the multiple containers is deployed on a target cloud server, and the multiple cloud servers include the target cloud server.
[0025] When the container orchestration device provided in the embodiment of the present application is deployed on a user-side computing device, the user-side computing device directly determines the container orchestration strategy to be deployed by executing the container orchestration method. The computing device sends a cluster construction request to the cloud management platform of the cloud system where the container is to be deployed. The cluster construction request carries the container orchestration strategy, instructing the cloud management platform to deploy the container according to the orchestration strategy, thereby effectively reducing the cluster construction cost.
[0026] When the container orchestration device provided by the embodiment of the present application is deployed on a third-party platform, when the user needs to deploy a container in the cloud system, a container orchestration request is sent to the third-party platform through the user-side computing device. The request carries the container information to be deployed. The third-party platform responds to the request by executing the container orchestration method provided by the embodiment of the present application, determines the container orchestration strategy, and feeds back the strategy to the user-side computing device. The user-side computing device sends a cluster construction request to the cloud management platform of the cloud system where the container is to be deployed. The cluster construction request carries the container orchestration strategy, instructing the cloud management platform to deploy the container according to the strategy, thereby effectively reducing the cluster construction cost.
[0027] In one possible implementation, the determination module is specifically used to minimize the cloud server cost as the optimization goal of the integer programming solution model, use the container information and the cloud server information as inputs of the integer programming solution model, and output the orchestration strategy of multiple containers.
[0028] In another possible implementation, the container orchestration device provided in the embodiment of the present application also includes a sending module for sending a first request message to the first cloud management platform, where the first request message carries an orchestration strategy so that the first cloud management platform deploys multiple containers in the target cloud server according to the orchestration strategy.
[0029] In another possible implementation, the preset condition further includes minimizing cross-availability zone traffic interaction. The container orchestration device provided in the embodiment of the present application further includes a grouping module for determining grouping information of multiple containers based on minimizing cross-availability zone traffic interaction.
[0030] In another possible implementation, the grouping module is specifically used to obtain traffic interaction information between multiple containers; based on the traffic interaction information and minimization of cross-availability zone traffic interaction, determine grouping information of the multiple containers, where containers belonging to the same group are deployed in the same availability zone.
[0031] In another possible implementation, the grouping module can group containers in multiple ways, such as a community discovery algorithm or a graph neural network.
[0032] Exemplarily, when the grouping of containers is implemented by a community discovery algorithm, the grouping module is specifically used to determine a traffic interaction graph based on traffic interaction information, the traffic interaction graph including multiple nodes and multiple connection edges, the multiple nodes representing multiple containers, the connection edges connecting nodes with traffic interaction relationships, the weight of the connection edges being determined based on the interaction traffic between the two nodes connected by the connection edges; based on the weight of the connection edges, the modularity between adjacent nodes is determined; based on the modularity, the traffic interaction graph is divided to determine the grouping results of the multiple nodes, the grouping results of the multiple nodes indicating the grouping results of the multiple containers
[0033] When containers are grouped through a graph neural network, the grouping module is specifically used to determine a traffic interaction graph based on traffic interaction information. The traffic interaction graph includes multiple nodes and multiple connecting edges. The multiple nodes represent multiple containers. The connecting edges connect nodes with traffic interaction relationships. The weight of the connecting edge is determined based on the interaction traffic between the two nodes connected by the connecting edge. The traffic interaction graph is used as the input of the trained graph neural network, and the grouping results of the multiple nodes are output. The grouping results of the multiple nodes indicate the grouping results of the multiple containers.
[0034] It should be explained that the traffic interaction information between containers can be determined based on empirical analysis or based on historical traffic interaction information between containers, and this embodiment of the present application does not specifically limit this.
[0035] In another possible implementation, the process of determining the grouping information of multiple containers can also be completed in cloud computing. For example, a second request message is sent to the second cloud management platform, and the second request message is used to instruct the second cloud management platform to determine the grouping information of multiple containers with the goal of minimizing cross-availability zone traffic interaction, where containers belonging to the same group are deployed in the same availability zone; and a second response message sent by the second cloud management platform is received, and the second response message includes the grouping information of multiple containers.
[0036] In one example, the orchestration policy includes grouping information of multiple containers, specification information of a target cloud server, and container information deployed in each cloud server in the target cloud service.
[0037] In another possible implementation, the acquisition module is specifically used to send a third request message to a third cloud management platform, where the third request message is used to request cloud server information; and receive a third response message sent by the third cloud management platform, where the third response message is used to carry cloud server information.
[0038] On the third aspect, an embodiment of the present application also provides a container orchestration method, which is applied to a first cloud management platform, and the first cloud management platform manages multiple cloud servers. The container orchestration method provided by the embodiment of the present application includes: receiving a container cluster construction request sent by a policy computing node, the container cluster construction request carries an orchestration policy, the orchestration policy is determined by the policy computing node based on container information and cloud server information, the container information includes cloud resource requirements of multiple containers, the cloud server information includes specification information and cost information of multiple cloud servers, the orchestration policy indicates that each container in the multiple containers is deployed on a target cloud server, the multiple cloud servers include the target cloud server, the orchestration policy meets preset conditions, and the preset conditions include minimizing cloud server costs; based on the orchestration policy, the multiple containers are deployed on the target cloud server.
[0039] In a fourth aspect, an embodiment of the present application further provides a cloud management platform, which manages multiple cloud servers and includes a receiving module and a deployment module, wherein the receiving module is used to receive a container cluster construction request sent by a policy computing node, and the container cluster construction request carries an orchestration strategy. The orchestration strategy is determined by the policy computing node based on container information and cloud server information. The container information includes cloud resource requirements of multiple containers, and the cloud server information includes specification information and cost information of multiple cloud servers. The orchestration strategy indicates that each container in the multiple containers is deployed on a target cloud server. The multiple cloud servers include a target cloud server. The orchestration strategy satisfies preset conditions, and the preset conditions include minimizing the cost of the cloud server. The deployment module is used to deploy multiple containers on the target cloud server based on the orchestration strategy.
[0040] In a fifth aspect, an embodiment of the present application also provides a container orchestration method, which is applied to a second cloud management platform, the method comprising: receiving a second request message sent by a policy computing node, the second request message carrying an identifier of each container in a plurality of containers to be orchestrated; responding to the second request message, obtaining traffic interaction information between the plurality of containers; based on the traffic interaction information, with the goal of minimizing traffic interaction across availability zones, grouping the plurality of containers, wherein containers belonging to the same group are deployed in the same availability zone; sending the grouping information of the plurality of containers to the policy computing node, so that the policy computing node determines the orchestration strategy of the plurality of containers using at least the grouping information as a constraint condition.
[0041] In a sixth aspect, an embodiment of the present application also provides a cloud management platform, which includes a receiving module, an acquisition module, a grouping module and a sending module, wherein the receiving module is used to receive a second request information sent by the policy computing node, and the second request information carries the identifier of each container in the multiple containers to be orchestrated; the acquisition module is used to respond to the second request information and obtain traffic interaction information between the multiple containers; the grouping module is used to group the multiple containers based on the traffic interaction information, with the goal of minimizing traffic interaction across availability zones, wherein containers belonging to the same group are deployed in the same availability zone; the sending module is used to send the grouping information of the multiple containers to the policy computing node, so that the policy computing node determines the orchestration strategy of the multiple containers using at least the grouping information as a constraint condition.
[0042] In the seventh aspect, an embodiment of the present application also provides a container orchestration method, which is applied to a third cloud management platform, and the third cloud management platform manages multiple cloud servers. The method includes receiving a third request message sent by a policy computing node, and the third request message is used to request the policy computing node to send and obtain cloud server information. The cloud server information includes specification information and cost information of multiple cloud servers. The cloud server information is used by the policy computing node to determine an orchestration strategy that meets preset conditions. The preset conditions include minimizing the cloud server cost. The orchestration strategy indicates that each container in multiple containers is deployed on a target cloud server, and the multiple cloud servers include the target cloud server; sending a third response message, and the third response message is used to carry cloud server information.
[0043] In the eighth aspect, an embodiment of the present application also provides a cloud management platform, which includes a receiving module and a sending module, wherein the receiving module is used to receive a third request information sent by the policy computing node, and the third request information is used to request the policy computing node to send and obtain cloud server information, the cloud server information includes specification information and cost information of multiple cloud servers, and the cloud server information is used by the policy computing node to determine an orchestration strategy that meets preset conditions, the preset conditions include minimizing the cloud server cost, and the orchestration strategy indicates that each container in multiple containers is deployed on a target cloud server, and the multiple cloud servers include the target cloud server; the sending module is used to send a third response message, and the third response message is used to carry cloud server information.
[0044] In a ninth aspect, an embodiment of the present application further provides a container orchestration system, which includes a policy computing node and a first cloud management platform, the first cloud management platform managing multiple cloud servers; the policy computing node is used to obtain container information, the container information includes the cloud resource requirements of multiple containers; obtain cloud server information, the cloud server information includes specification information and cost information of multiple cloud servers; and determine an orchestration strategy for multiple containers that meet preset conditions based on the container information and cloud server information, the preset conditions include minimizing the cloud server cost, the orchestration strategy indicates that each container in the multiple containers is deployed on a target cloud server, and the multiple cloud servers include a target server; the first management platform is used to deploy the multiple containers on the target cloud server according to the orchestration strategy.
[0045] In one possible implementation, the container orchestration system provided by an embodiment of the present application also includes a second cloud management platform, which is used to receive grouping request information sent by a policy computing node, where the grouping request information carries the identifier of each container; obtain traffic interaction information between multiple containers; based on the traffic interaction information, with the goal of minimizing traffic interaction across availability zones, group multiple containers, where containers in the same group are deployed in the same availability zone; and send the grouping information of multiple containers to the policy computing node; the policy computing node receives the grouping information, uses the grouping information as a constraint condition, and determines the orchestration strategy for multiple containers that meets preset conditions.
[0046] In another possible implementation, the container orchestration system provided by the embodiment of the present application also includes a third cloud management platform, which is used to receive third request information, the third request information is used to request cloud service information, the cloud server information includes specification information and cost information of multiple cloud servers; and send third response information, the third response information is used to carry cloud server information.
[0047] In a tenth aspect, an embodiment of the present application provides a cloud system, including a cloud management platform, multiple cloud servers and a policy computing node, wherein the cloud management platform manages the multiple cloud servers; wherein the policy computing node is used to determine the orchestration strategy of multiple containers with the goal of minimizing the cost of cloud services, and send the orchestration strategy to the cloud management platform; the cloud management platform is used to deploy multiple containers in a target server based on the orchestration strategy, and the multiple cloud servers include a target cloud server.
[0048] In an eleventh aspect, the present application provides a computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method provided in the first aspect of the present application.
[0049] In the twelfth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the method provided in the first aspect, the third aspect, the fifth aspect, or the seventh aspect of the present application.
[0050] In the thirteenth aspect, the present application provides a computer program or a computer program product, which includes instructions. When the instructions are executed, the method provided in the first aspect, the third aspect, the fifth aspect or the seventh aspect of the present application is implemented.
[0051] In the fourteenth aspect, an embodiment of the present application also provides a chip, comprising at least one processor and a communication interface, wherein the processor is used to execute the method provided in the first aspect, the third aspect, the fifth aspect, or the seventh aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the multiple embodiments disclosed in this specification, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings described below are only the multiple embodiments disclosed in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] The following is a brief introduction to the drawings required for describing the embodiments or prior art.
[0054] FIG1 shows a schematic diagram of a public cloud architecture;
[0055] FIG2 is a schematic diagram showing an application scenario of the container orchestration method provided in an embodiment of the present application;
[0056] FIG3 is a schematic diagram of a matrix corresponding to interactive flow information of a container;
[0057] FIG4 shows a traffic interaction graph constructed based on traffic interaction data between containers;
[0058] FIG5 is a schematic diagram of implementing container grouping through a traffic interaction graph;
[0059] FIG6 is a schematic diagram of a method for orchestrating containers provided by an embodiment of the present application, which is implemented collaboratively by a terminal and a cloud management platform on a cloud system;
[0060] FIG7 is a schematic diagram showing that the container orchestration method provided in an embodiment of the present application can also be implemented collaboratively by a terminal and cloud management platforms on multiple cloud systems;
[0061] FIG8 is a flowchart of a container orchestration method provided in an embodiment of the present application;
[0062] FIG9 is a schematic diagram of the structure of a container arrangement device provided in an embodiment of the present application;
[0063] FIG10 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to better introduce the embodiments of the present application, the relevant concepts in the embodiments of the present application are first introduced below.
[0065] Public cloud: It is the cloud infrastructure provided by cloud service providers to the general public or large industrial groups. Any qualified user can obtain public cloud resources from cloud service providers through leasing, thus having the ability to deploy and use cloud services.
[0066] A private cloud is a cloud infrastructure with software and hardware resources built within a firewall, allowing departments within an organization or enterprise to share data center resources. A private cloud is a cloud infrastructure operated entirely for a specific organization. It can be managed by the organization itself or a third party and located either inside or outside the organization.
[0067] A hybrid cloud refers to a cloud computing environment composed of private cloud resources and public cloud resources.
[0068] Software as a service (SaaS) refers to the provision of software services through the Internet.
[0069] Pod: The smallest unit of operation and deployment on an Elastic Compute Service (ECS) cloud server. In the embodiments of this application, Pod is the same as a container and can be used interchangeably with container in writing.
[0070] Data centers are the underlying material foundation of cloud services, encompassing the fundamental resources owned by cloud service providers (e.g., computing, storage, and network resources). To serve users in diverse regions, cloud service providers need to establish numerous data centers across the country and even globally. To better organize and design these data centers and provide users with more secure and reliable cloud services, while also taking into account local policies, laws, and regulations, a two-tiered architecture, consisting of regions and availability zones (AZs), can be used, as shown in Figure 1, to decouple cloud services from the underlying physical data centers.
[0071] Region: This is a geographical concept, usually referring to the geographical area where the data center is located. Regions can be divided according to various dimensions. For example, they can be divided according to the regional level, such as North China, South China, and East China; they can also be divided according to the provincial level, such as Hebei Province, Henan Province, Hubei Province, and Guangdong Province; they can also be divided according to the city level, such as Beijing, Shenzhen, and Shanghai, and even divided according to the county level. The embodiments of this application do not specifically limit the division method, number, and name of regions.
[0072] An availability zone (AZ) is a partition of physical resources, typically the physical area where a computer room or site is located. The present application does not limit the specific division of AZs. For example, independently powered computer rooms or racks can be divided into AZs. AZs are independent of each other in terms of energy consumption and network connectivity, so a failure in one AZ will not affect another. A region can have multiple AZs, but an AZ can belong to only one region.
[0073] Modularity: also known as modularity metric, is a commonly used method to measure the strength of network community structure.
[0074] The technical solutions provided by the embodiments of the present application are further described in detail below through the accompanying drawings and examples.
[0075] In related technologies, container orchestration strategies for building container clusters are often determined based on metrics such as container performance and stability, without considering the cost of cluster construction. This results in high costs for container clusters built based on these strategies. For example, in SaaS, building a container cluster incurs significant IT resource overhead, particularly for ECS. Building a container cluster based on a cost-insensitive container orchestration strategy will result in significant ECS cost overhead, which will undoubtedly significantly hinder users' willingness to use cloud servers.
[0076] To this end, an embodiment of the present application provides a container orchestration method, which takes the cost of ECS (such as construction cost or rental cost) as a consideration in the container orchestration strategy. By reasonably orchestrating containers, the cost associated with building the ECS of the cluster is minimized, thereby reducing the cost of using cloud services.
[0077] The container orchestration method provided in the embodiments of the present application can be applied to building a container cluster on the cloud to obtain the required cloud services at a lower cost. For example, the container orchestration method and device provided in the embodiments of the present application are applied to cloud systems such as private clouds, public clouds, and hybrid clouds to achieve low-cost cluster construction and obtain the required cloud services.
[0078] For example, on a private cloud, containers can be orchestrated using the container orchestration method provided in an embodiment of the present application to minimize ECS resource overhead to build a cluster, saving ECS resources on the private cloud and reducing ECS overhead costs on the private cloud. On a public or hybrid cloud, containers can be orchestrated using the container orchestration method provided in an embodiment of the present application to minimize ECS resource leasing costs to build a cluster, reducing ECS leasing costs on the public cloud and reducing cloud service overhead.
[0079] Taking the construction of a cluster on a public cloud as an example, the container orchestration method, device, cloud management platform and cloud system provided by the embodiments of the present application are introduced in detail.
[0080] Figure 1 shows a schematic diagram of a public cloud architecture. As shown in Figure 1, the public cloud includes multiple cloud data centers, such as cloud data center 100 and cloud data center 200. Each cloud data center includes multiple regions, such as region 10 and region 20. Each region includes multiple low-latency interconnected availability zones, which can be used to design services such as disaster recovery and load balancing across availability zones within the region. For example, region 10 includes availability zones 1, 2, and 3, while region 20 includes availability zones 4, 5, and 6.
[0081] It should be noted that the names and numbers of cloud data centers, regions, and availability zones in Figure 1 are only exemplary. In practice, a public cloud system can have more or better cloud data centers, more or fewer regions can be set in each cloud data center, and more or fewer availability zones can be set in each region. The embodiments of the present application do not make specific limitations on this.
[0082] Users can obtain corresponding cloud services by leasing cloud resources on the public cloud, such as cloud servers, and deploying containers with corresponding functions in the cloud services.
[0083] Figure 2 shows a schematic diagram of an application scenario of the container orchestration method provided in an embodiment of the present application. As shown in Figure 2, tenant A can lease cloud resources from a cloud service provider's public cloud system 23, such as an ECS in a cloud resource pool, deploy containers with specific functions on the ECS, and build a container cluster to provide specific cloud services to users.
[0084] The public cloud system 23 includes a cloud management platform 231 and a cloud resource pool 232. The cloud resource pool 232 includes at least multiple ECSs, such as ECS 1, ECS 2 and ECS 3. The cloud management platform 231 is used to manage the resources in the cloud resource pool 232. For example, the cloud management platform 231 manages multiple ECSs in the cloud resource pool 232.
[0085] Optionally, multiple ECSs in cloud resource pool 232 can be configured as shown in Figure 1 , i.e., multiple geographically dispersed cloud data centers, such as cloud data center 100 and cloud data center 200. Each cloud data center includes multiple regions, such as region 10 and region 20. Each region includes multiple low-latency interconnected availability zones, which can be used to design services such as disaster recovery and load balancing across availability zones within the same region. For example, region 10 includes availability zones 1, 2, and 3, and region 20 includes availability zones 4, 5, and 6.
[0086] It should be explained that the public cloud system shown in FIG2 is merely exemplary. In practice, the cloud resource pool of the public cloud system may have more or fewer ECSs, and the embodiments of the present application do not impose any specific limitation on this.
[0087] Tenant A can log in to the cloud management platform 231 through the client on the terminal 21 via the Internet 22 using the account and password pre-registered on the cloud management platform 231, and send a cluster building request to the cloud management platform 231. The cloud management platform 231 selects an ECS deployment container that meets the requirements from the cloud resource pool 232 based on its cluster building request to build a cluster to provide the required cloud services to tenant A.
[0088] The container orchestration device provided in the embodiment of the present application can be deployed on the terminal 10 to execute the container orchestration method provided in the embodiment of the present application.
[0089] For example, tenant A logs in to the client in terminal 21 and enters the container information to be deployed in the cloud on the configuration page. The container information includes the set of containers to be deployed in the cloud and the cloud resource requirements of each container. For example, the container set can be {pod1, pod2, pod3, ..., podn}, where the cloud resource requirements of each container include the number of cores of the central processing unit (CPU) and the memory capacity. Taking pod 1 as an example, the cloud resource requirement information of the container is {name: pod 1, cup: 1.5 cores, memory: 2Gb, ...}. In this way, terminal 21 obtains the cloud resource requirements of multiple containers to be deployed.
[0090] Then, the terminal 21 obtains ECS related information through the API interface of the public cloud system 23, including the specifications of the ECS available for rent provided by the cloud service provider and the rental price of each specification of ECS. Optionally, the ECS related information is shown in Table 1:
[0091] Table 1
[0092] It can be understood that the specifications of ECS are used to define the hardware specification parameters of ECS, which indicate the size of cloud resources that ECS can provide. In some other examples, the specifications of ECS may also include more other parameters, such as the size of the disk, etc. The embodiments of the present application do not limit the specific implementation of the specifications of ECS, and may include more or fewer parameters.
[0093] The arrangement of containers can usually be understood as a two-dimensional vector packing problem. The set of arranged containers can be represented as {(c1,m1),…,(c n ,m n )}, where c1 and m1 are the CPU and memory required by pod1 respectively. The available ECS specifications are {(C1,M1,P1),…,(C k ,M k ,P k)}, C1, M1, and P1 represent the CPU, memory, and price available in ECS specification 1, respectively. The problem can be defined as finding the purchased ECS to place all containers under optimal cost control. For example, if the specification (i.e., cloud resource requirements) of one container is <2 cores, 1GB>, and the specification of another container is <2 cores, 1GB>, then according to Table 1, leasing 4vCPUs and 8GB costs $87.36 per month to complete the deployment of both containers. However, if the size of the second container is changed to <2 cores, 8GB>, then leasing 4vCPUs and 8GB cannot meet the requirements of both containers in both dimensions, and the lease needs to be changed to <2 cores, 16GB> to meet the memory requirements.
[0094] After obtaining the cloud resource requirements of each container, the specifications of each ECS, and the rental cost of each ECS, terminal 21 determines the orchestration strategy of multiple containers based on container information (such as the cloud resource requirements of each container) and ECS information (such as the specifications of each ECS and the rental cost of each ECS) with the goal of minimizing the rental cost. The orchestration strategy indicates how multiple containers to be deployed (also called to be orchestrated) are deployed in multiple ECSs in the cloud resource pool.
[0095] For example, an integer programming model for vector packing is constructed based on the cloud resource requirements of each container, the specifications of each ECS, and the rental cost of each ECS: {optimization objective: cost minimization; decision variables: ECS specifications and prices, cloud resource requirements of each container}; the specific formula is as follows:
[0096] Subject to:
[0097] Where C represents the cost of leasing ECS for building a container cluster, and p ijt Indicates whether the i-th container in the t-th partition is deployed on the j-th ECS; k jt represents the number of the jth ECS in partition t; m i represents the resource requirements of container i; L j Represents an ECS resource vector.
[0098] The container orchestration strategy calculated using the above formula is: ECS1 (4-core CPU, 8GB memory): {pod1, pod2, pod3}; ECS2 (16-core CPU, 32GB memory): {pod4, pod5}.
[0099] After calculating the container's orchestration strategy, terminal 21 sends a cluster building request to cloud management platform 231. The cluster building request carries the container's orchestration strategy. Cloud management platform 231 responds to the cluster building request and deploys multiple containers in the corresponding ECS according to the orchestration strategy, that is, deploying pod1, pod2, and pod3 in ECS1, and deploying pod4 and pod5 in ECS2, so as to realize container cluster construction, minimize ECS leasing costs, and reduce the cost burden of tenants using cloud services.
[0100] In another example, the container orchestration device provided in the embodiment of the present application can also be deployed on the cloud management platform 231 to execute the container orchestration method provided in the embodiment of the present application.
[0101] Exemplarily, tenant A logs into the client in terminal 21 and enters the container information that needs to be deployed in the cloud on the configuration page, where the container information includes the set of containers that need to be deployed in the cloud and the cloud resource requirements of each container; terminal 21 sends a cluster construction request to the cloud management platform 231 through the Internet 22, and the cluster construction request carries the container information. The cloud management platform 231 responds to the cluster construction request, reads the rentable ECS information stored in the storage space (including ECS specifications and the price of each ECS specification), and obtains the ECS information; with the goal of minimizing the rental cost, the orchestration strategy of multiple containers is determined based on the cloud resource requirements of each container, the specifications of each ECS and the rental cost of each ECS. Finally, the cloud management platform builds a container cluster based on the container orchestration strategy.
[0102] The specific implementation method of the orchestration strategy is similar to the description above. Please refer to the above description and will not be repeated here for the sake of brevity.
[0103] When using cloud services, users often incur traffic charges for containers deployed in different AZs, in addition to the ECS rental fee. For example, if two containers communicate with each other and are deployed in different AZs, the public cloud provider will charge the corresponding traffic fees. AZs are the physical data centers of cloud computing providers. Containers are typically deployed in as many data centers as possible to ensure disaster recovery (preventing all machines from shutting down in the event of an incident). When leasing ECS to deploy containers, it is important to maximize the use of each AZ for disaster recovery, but most companies don't consider the communication costs between AZs.
[0104] Therefore, to further reduce the cost of cloud services for users, the container deployment partitions are also considered when determining the container orchestration strategy. By reducing ECS costs through reasonable container orchestration and minimizing traffic between AZs through reasonable partitioning, the cost of building a cluster is minimized.
[0105] In one example, based on traffic interaction information between containers, multiple containers can be grouped to obtain container grouping information with the goal of minimizing cross-availability zone traffic interaction. Containers belonging to the same group are deployed in the same AZ.
[0106] Optionally, the traffic interaction information between containers may be determined based on empirical analysis or based on historical traffic interaction information between containers.
[0107] The partitioning of containers (i.e., grouping of containers) can be determined in a variety of ways, for example, through graph neural networks or community detection algorithms.
[0108] Exemplarily, the specific implementation of grouping containers through the community discovery algorithm is as follows: based on the traffic interaction information between containers, a traffic interaction graph is determined, the traffic interaction graph includes multiple nodes and multiple connection edges, the multiple nodes represent multiple containers, the connection edges connect nodes with traffic interaction relationships, and the weight of the connection edge is determined based on the interaction traffic between the two nodes connected by the connection edge; based on the weight of the connection edge, the modularity between adjacent nodes is determined; based on the modularity, the traffic interaction graph is divided to determine the grouping results of multiple nodes, and the grouping results of multiple nodes indicate the grouping results of multiple containers.
[0109] Taking the historical interaction traffic information of a container as an example, the interaction traffic information of a container is usually presented in the form of a symmetric matrix, corresponding to the element t in the i-th row and j-th column of the matrix i,j , represents the interactive traffic size between the i-th container and the j-th container within one hour, in Gb. The matrix corresponding to the interactive traffic information of a container is shown in Figure 3.
[0110] A traffic interaction graph is constructed based on the traffic interaction data between containers (see Figure 4).
[0111] Using the community discovery algorithm, the traffic interaction graph is divided based on the concept of modularity. There can be many community algorithms, including but not limited to Louvain and greedy algorithms. Taking the Louvain algorithm as an example, in step 1, each node in the traffic interaction graph is used as a group label, that is, from node pod1 to node pod5, each node is a group. Step 2, each node is merged with its adjacent nodes in turn (the meaning of merging here is to divide them into the same group), and calculate whether their maximum modularity gain is greater than 0. If it is greater than 0, the node is placed in the group where the adjacent node with the largest modularity increment is located. The calculation formula for modularity is as follows:
[0112] Among them, Q represents modularity, m represents the number of edges in the entire traffic interaction graph, ∑ inis the number of edges in community c, ∑ tot is the sum of the degrees of the nodes in community c.
[0113] Modularity is often used as a metric to measure the quality of node grouping. The greater the modularity, the tighter the group's links are. This is calculated by subtracting the sum of the external edges from the sum of the internal edges. The Louvain algorithm repeats step 2 above. When the groups to which all nodes belong no longer change, step 3 is executed, compressing all nodes in each group into a single node. The weights of the points within the group are converted into the weights of the new node ring, and the weights between groups are converted into the weights of the new node edges. Steps 1-3 are repeated until the algorithm stabilizes.
[0114] The Louvain algorithm minimizes the edge weights between groups. Each container is divided into groups and labeled accordingly. As shown in Figure 5, the grouping results are group 1 {pod1, pod2, pod3} and group 2 {pod4, pod5}.
[0115] In one example, container grouping using a graph neural network is implemented by using the traffic interaction graph corresponding to the containers as input to a trained graph neural network, outputting a grouping result for multiple nodes. This grouping result indicates the container grouping results. For example, the output of the graph neural network is {pod1, pod2, pod3}, {pod4, and pod5}, indicating that the containers are divided into two groups: one consisting of pod1, pod2, and pod3, and the other consisting of pod4 and pod5. Specifically, pod1, pod2, and pod3 are deployed in the same AZ, while pod4 and pod5 are deployed in another AZ.
[0116] A trained graph neural network is obtained by training the graph neural network using a training sample set. For example, the training sample set includes a traffic interaction graph corresponding to multiple containers with different traffic interaction relationships, and the container grouping results corresponding to the traffic interaction graph. The traffic interaction graph is input into the graph neural network to be trained, and an estimate of the container grouping result corresponding to the traffic interaction graph is output. A loss value is determined based on the estimated value of the container grouping result and the true value of the container grouping result. The parameters of the graph neural network are adjusted in the direction of decreasing the loss value until preset training conditions are met, such as model convergence or reaching a preset number of training rounds. The graph neural network that meets the preset training conditions is the trained graph neural network mentioned above.
[0117] After obtaining the container grouping results, with the goal of minimizing cost, the resource requirements of each container, the specifications of each ECS, and the rental cost of each ECS are used as variables, and the container grouping results are used as constraints. An integer programming model is constructed and solved using the branch and bound algorithm.
[0118] For example, an integer programming model is constructed: {optimization objective: cost minimization; decision variables: ECS specifications and prices, cloud resource requirements of each container; constraints: container grouping}; the specific formula is as follows:
[0119] Subject to:
[0120] Where C represents the cost of leasing ECS for building a container cluster, and p ijt Indicates whether the i-th container in the t-th partition is deployed on the j-th ECS; k jt represents the number of the jth ECS in partition t; V t Represents the constraints of partition t; m i represents the resource requirements of container i; L j Represents an ECS resource vector.
[0121] For example, the container orchestration strategy calculated using the above formula is: AZ1: {ECS1 (4-core CPU, 8GB memory): {pod1, pod2, pod3}}; AZ2: {ECS2 (16-core CPU, 32GB memory): {pod4, pod5}}. This means that in AZ 1, containers pod1, pod2, and pod3 are deployed on ECS 1, which has 4 cores and 8GB of memory. In AZ 2, containers pod4 and pod5 are deployed on ECS 2, which has 16 cores and 32GB of memory.
[0122] By grouping containers, those with high communication volume are assigned to one availability zone, and those with low communication volume are assigned to another availability zone. This reduces the communication cost between containers and also reduces the communication latency between containers.
[0123] The container orchestration method provided in the embodiments of the present application can be implemented by a single computing device or by collaboration of multiple computing devices.
[0124] Exemplarily, the container orchestration method provided in the embodiment of the present application is implemented by executing a user-side computing device, for example, the terminal 21 in FIG. 2 .
[0125] The terminal has a cloud client installed. The user opens the cloud client and enters container information on its container configuration page. This information includes the set of containers to be deployed in the cloud and the cloud resource requirements of each container. For example, the container set could be {pod1, pod2, pod3, …, podn}. Each container's cloud resource requirements include the number of CPU cores and memory capacity. For pod 1, the container's cloud resource requirements are {name: pod 1, CPU: 1.5 cores, memory: 2Gb, …}. This allows the terminal to obtain the cloud resource requirements of the multiple containers to be deployed. The terminal then uses the API provided by the cloud service provider to obtain information about available ECS instances, including their specifications and the rental cost of each ECS instance. Based on the traffic interaction information between the containers to be deployed, the terminal groups the multiple containers, minimizing cross-availability zone traffic interaction and obtaining container grouping information. The terminal uses the ECS rental cost as the optimization target and the container grouping as the constraint condition. It determines the container orchestration strategy based on the container's cloud resource requirements, ECS specifications, and ECS rental costs. It implements a cluster built according to the orchestration strategy, minimizes ECS rental costs and communication costs, and reduces the overall cost of using cloud services.
[0126] The container orchestration method provided in the embodiment of the present application can also be implemented through a cloud management platform in a public cloud system. For example, a cloud client is installed on the terminal, and the user enters the container information on its container configuration page by opening the cloud client. The container information includes the set of containers that need to be deployed in the cloud and the cloud resource requirements of each container. For example, the container set can be {pod1, pod2, pod3, ..., podn}, where the cloud resource requirements of each container include the number of CPU cores and the size of the memory capacity, etc. Taking pod 1 as an example, the cloud resource requirement information of the container is {name: pod 1, cup: 1.5 cores, memory: 2Gb, ...}. In this way, the terminal obtains the cloud resource requirements of multiple containers that need to be deployed. The terminal sends the container information to the cloud management platform via the Internet, and the cloud management platform obtains the container information. The cloud management platform reads the relevant information of the rentable ECS stored in the cloud database, including the specifications of the ECS and the rental cost of each specification of ECS. The cloud management platform obtains traffic interaction information between containers. In one example, the traffic interaction information between containers is determined based on experience. For example, traffic interaction information between multiple containers to be deployed is obtained based on empirical analysis, and then the traffic interaction information between containers is input into a terminal and then sent to the cloud management platform via the terminal. In another example, the traffic interaction information between containers is determined based on historical traffic interaction information. For example, if the multiple containers to be deployed are not being deployed on the public cloud for the first time, the traffic interaction information between containers is determined by obtaining historical traffic interaction information corresponding to the multiple containers. Based on the traffic interaction information between the containers to be deployed, the cloud management platform groups the multiple containers with the goal of minimizing cross-availability zone traffic interaction, and obtains container grouping information. The cloud management platform then uses the ECS leasing cost as the optimization target and the container grouping as a constraint. Based on the container's cloud resource requirements, ECS specifications, and ECS leasing cost, it determines the container orchestration strategy, implements a cluster constructed according to the orchestration strategy, minimizes ECS leasing costs and communication costs, and overall reduces the cost of using cloud services.
[0127] As shown in Figure 6, the container orchestration method provided in the embodiment of the present application can also be implemented collaboratively through the terminal and the cloud management platform on the cloud system. For example, a user wants to deploy multiple containers originally deployed on a private cloud to a public cloud system.
[0128] For example, a user opens a public cloud client on their terminal and enters container information on the container configuration page. This information includes the set of containers to be deployed on the cloud and the cloud resource requirements of each container. For example, the container set could be {pod1, pod2, pod3, ..., podn}. Each container's cloud resource requirements include the number of CPU cores and memory capacity. For pod 1, the container's cloud resource requirements are {Name: pod 1, CPU: 1.5 cores, Memory: 2 GB, ...}. In this way, the terminal obtains the cloud resource requirements of the multiple containers to be deployed.
[0129] The terminal obtains information about available ECS instances in the public cloud system. The ECS information includes the ECS specifications and the rental cost of each ECS instance.
[0130] In another example, the terminal further obtains availability zone information of the public cloud system, where the availability zone information includes, for example, one or more of the number of availability zones, ECS information in the availability zones, and the like.
[0131] Optionally, the terminal may obtain information about available ECS instances and / or availability zones through an API of the public cloud system.
[0132] The terminal sends a group request to the second cloud management platform (for example, the cloud management platform on the private cloud where the container was previously deployed). The group request carries the container identifiers of multiple containers to be deployed and the availability zone information of the public cloud where the containers can be deployed. The availability zone information includes, for example, one or more of the number of availability zones, ECS information in the availability zones, etc.
[0133] In response to the grouping request, the second cloud management platform retrieves historical traffic interaction information between the multiple containers to be deployed from the cloud database. Based on this historical traffic interaction information, the multiple containers are grouped with the goal of minimizing cross-availability zone traffic interaction, obtaining container grouping information. After calculating the container grouping information, the second cloud management platform sends the container grouping information to the terminal. The terminal uses the ECS rental cost as the optimization target and the container grouping as a constraint, determining the container orchestration strategy based on the container's cloud resource requirements, ECS specifications, and ECS rental cost.
[0134] The terminal sends a cluster building request to the first cloud management platform in the public cloud system, where the cluster building request carries a container orchestration strategy.
[0135] The first cloud management platform receives the cluster building request sent by the terminal, and deploys the container to be deployed in the target cloud server according to the container orchestration strategy.
[0136] For example, the container orchestration policy is: AZ1: {ECS1 (4-core CPU, 8GB memory): {pod1, pod2, pod3}}; AZ2: {ECS2 (16-core CPU, 32GB memory): {pod4, pod5}}. This indicates that the target cloud servers are ECS1 with a 4-core CPU and 8GB memory and ECS2 with a 16-core CPU and 32GB memory. The grouping information is that pod1, pod2, and pod3 are deployed in AZ1, and pod4 and pod5 are deployed in AZ2. Containers pod1, pod2, and pod3 are deployed in ECS1, and containers pod4 and pod5 are deployed in ECS2.
[0137] The first cloud management platform responds to the cluster build request and, based on the container orchestration policy included in the cluster build request, deploys containers pod1, pod2, and pod3 to ECS1 in AZ1 and pod4 and pod5 to ECS2 in AZ2. This minimizes ECS rental and communication costs, reducing the overall cost of using cloud services.
[0138] As shown in FIG7 , the container orchestration method provided in the embodiment of the present application can also be implemented collaboratively through a terminal and cloud management platforms on multiple cloud systems.
[0139] Exemplarily, the user opens a cloud client of a public cloud on a terminal and enters container information on its container configuration page. The container information includes a set of containers to be deployed on the cloud and cloud resource requirements of each container.
[0140] The terminal sends an acquisition request to the third cloud management platform, where the acquisition request is used to request ECS information of multiple cloud service providers, such as Huawei Cloud, Alibaba Cloud, and Tencent Cloud.
[0141] The third cloud management platform responds to the acquisition request and sends the ECS information of each cloud service provider to the terminal, such as the specifications of the ECS that can be rented in the public cloud system corresponding to Huawei Cloud, and the rental prices of ECS of each specification, the specifications of the ECS that can be rented in the public cloud system corresponding to Alibaba Cloud, and the rental prices of ECS of each specification, etc.
[0142] In another example, the acquisition request sent by the terminal to the third cloud management platform is also used to obtain the availability zone information of multiple cloud service providers.
[0143] The terminal sends a group request to a second cloud management platform (for example, a cloud management platform on a private cloud, public cloud, or hybrid cloud where the container was previously deployed). The group request carries container identifiers of multiple containers to be deployed and availability zone information of multiple public clouds that can provide deployment containers. The availability zone information includes, for example, one or more of the number of availability zones, ECS information in the availability zones, etc.
[0144] The second cloud management platform responds to the grouping request and obtains historical traffic interaction information between multiple containers to be deployed from the cloud database. Based on the historical traffic interaction information between the containers, the second cloud management platform groups the multiple containers with the goal of minimizing cross-availability zone traffic interaction to obtain container grouping information. After calculating the container grouping information, the second cloud management platform sends the container grouping information to the terminal. The terminal uses the ECS rental cost as the optimization target and the container grouping as the constraint. Based on the container's cloud resource requirements, ECS specifications, and ECS rental costs, it determines the orchestration strategies corresponding to the containers of the multiple cloud providers. The cloud service provider with the lowest cost in the orchestration strategy is selected for container deployment. For example, if Huawei Cloud has the lowest cost of cluster construction among the calculated orchestration strategies, Huawei Cloud is selected to build the container cluster.
[0145] The terminal sends a cluster building request to the first cloud management platform in the public cloud system corresponding to Huawei Cloud. The cluster building request carries the container orchestration policy.
[0146] The first cloud management platform receives the cluster building request sent by the terminal, and deploys the container to be deployed in the target cloud server according to the container orchestration strategy.
[0147] Optionally, the third cloud management platform can be a cloud management platform on a private cloud built by the user, responsible for collecting ECS information or availability zone information from each cloud service provider (for example, obtained through the API interface provided by each cloud service provider). When receiving the user's acquisition request, it responds to the acquisition request and sends the ECS information or availability zone information provided by multiple cloud services to the terminal.
[0148] Of course, in another example, the ECS information or availability zone information of the cloud service provider can also be obtained through other means. For example, user input and pre-storage. For example, the user obtains the ECS information of the cloud service provider by viewing the official website of the cloud service provider, and then enters the ECS information of the cloud service provider through the configuration interface of the cloud client. For another example, the ECS information of the cloud service provider is pre-stored in the terminal, and when executing the container orchestration method of the embodiment of the present application, the ECS information of the cloud service provider is directly read from the terminal.
[0149] Figure 8 is a flow chart of a container orchestration method provided in an embodiment of the present application. It is understood that the method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities.
[0150] For example, the execution subject of the container orchestration method provided in the embodiments of the present application can be a terminal such as a mobile phone, tablet computer, multimedia playback device, wearable device, etc., or a server. The server involved in this solution can be a hardware server or embedded in a virtualized environment. For example, the server involved in this solution can be a virtual machine executed on a hardware server including one or more other virtual machines. For ease of explanation, in the following method embodiments, only a computer device as the execution subject of the container orchestration method is used as an example for description. The computer device can be any electronic device with computing and storage capabilities, such as the terminal described above.
[0151] As shown in FIG8 , a container orchestration method provided in an embodiment of the present application includes at least steps S801 to S803 .
[0152] In step S801 , container information is obtained, where the container information includes cloud resource requirements of multiple containers.
[0153] The terminal 21 is used to log in to the client in the terminal and enter the container information to be deployed in the cloud on the configuration page. The container information includes the set of containers to be deployed in the cloud and the cloud resource requirements of each container. For example, the container set can be {pod1, pod2, pod3, ..., podn}, where the cloud resource requirements of each container include the number of cores of the central processing unit (CPU) and the memory capacity. Taking pod 1 as an example, the cloud resource requirement information of the container is {name: pod 1, cup: 1.5 cores, memory: 2Gb, ...}. In this way, the terminal 21 obtains the cloud resource requirements of multiple containers to be deployed.
[0154] In step S802 , cloud server information is obtained, where the cloud server information includes specification information and cost information of multiple cloud servers.
[0155] There are various ways to obtain cloud service information. For example, a terminal can obtain ECS information through an API provided by a cloud service provider. This ECS information includes at least the specifications of the available ECSs offered by the cloud service provider and the rental price of each ECS. ECS specifications include, for example, the number of CPU cores and memory capacity of the ECS. Optionally, the ECS information is shown in Table 1.
[0156] It can be understood that the specifications of ECS are used to define the hardware specification parameters of ECS, which indicate the size of cloud resources that ECS can provide. In some other examples, the specifications of ECS may also include more other parameters, such as the size of the disk, etc. The embodiments of the present application do not limit the specific implementation of the specifications of ECS, and may include more or fewer parameters.
[0157] For another example, a terminal obtains a cloud service provider's ECS information by interacting with a specific cloud management platform (e.g., a cloud management platform on a user's private cloud). For example, the terminal sends a request to the cloud management platform requesting the cloud service provider's ECS information. The cloud management platform responds to the request and sends the cloud service provider's ECS information to the terminal.
[0158] For another example, the ECS information of a cloud service provider is obtained through user input. The user obtains the ECS information of the cloud service provider by viewing the official website of the cloud service provider, and then enters the ECS information of the cloud service provider through the configuration interface of the cloud client.
[0159] For another example, the ECS information of the cloud service provider is pre-stored in the terminal. When the container orchestration method of the embodiment of the present application is executed, the ECS information of the cloud service provider is directly read from the terminal.
[0160] In step S803, an orchestration strategy for multiple containers that meets a preset condition is determined based on the container information and the cloud server information. The preset condition includes minimizing the cloud server cost.
[0161] In one example, after obtaining ECS information and container information, the terminal determines the orchestration strategy for multiple containers based on the container information (such as the cloud resource requirements of each container) and ECS information (such as the specifications of each ECS and the rental cost of each ECS) with the goal of minimizing rental costs. The orchestration strategy indicates how multiple containers to be deployed (also referred to as to be orchestrated) are deployed in multiple ECSs in the cloud resource pool.
[0162] The specific implementation of determining the orchestration strategy for multiple containers based on container information and ECS information with the goal of minimizing rental costs can be found in the above description and will not be repeated here for the sake of brevity.
[0163] The terminal sends a cluster build request to the public cloud system's cloud management platform, which includes the container orchestration policy. The cloud management platform responds to the cluster build request and deploys multiple containers on the corresponding ECS instances based on the orchestration policy. This minimizes ECS rental costs, builds container clusters, and reduces the cost burden of cloud services for tenants.
[0164] In another example, to further reduce the cost of cloud services for users, the partitions for container deployment are also considered when determining the container orchestration strategy. This reduces ECS costs through reasonable container orchestration and minimizes inter-AZ traffic through reasonable partitioning, thereby minimizing the cost of building a cluster.
[0165] By using traffic interaction information between containers and minimizing cross-zone traffic interaction, multiple containers are grouped to obtain container grouping information. Using ECS rental costs as the optimization target and container grouping as a constraint, the container orchestration strategy is determined based on container and ECS information.
[0166] By using traffic interaction information between containers and minimizing cross-availability zone traffic interaction, multiple containers are grouped to obtain container grouping information. Furthermore, with the ECS rental cost as the optimization target and container grouping as the constraint, the specific implementation of determining the container orchestration strategy based on container information and ECS information can be found in the description above and will not be repeated here for the sake of brevity.
[0167] The terminal sends a cluster building request to the public cloud system's cloud management platform, which includes the container orchestration policy. The cloud management platform responds to the cluster building request and deploys multiple containers on the corresponding ECS instances based on the orchestration policy. By building a cluster based on the orchestration policy, ECS rental and communication costs are minimized, reducing the overall cost of using cloud services.
[0168] Based on the same concept as the aforementioned embodiment of the container orchestration method, an embodiment of the present application further provides a container orchestration device 900, which includes units or modules for implementing each step in the container orchestration method shown in Figures 1-8.
[0169] Figure 9 is a schematic diagram of the structure of the container orchestration device provided in an embodiment of the present application. The device can be deployed on any device, equipment, platform or device cluster with computing capabilities, such as a terminal or cloud management platform, to achieve low-cost construction of container clusters.
[0170] As shown in Figure 9, the container orchestration device 900 provided in an embodiment of the present application includes an acquisition module 901 and a determination module 902. The acquisition module 901 is used to obtain container information, which includes cloud resource requirements of multiple containers; and obtain cloud server information, which includes specification information and cost information of multiple cloud servers; the determination module 902 is used to determine an orchestration strategy for multiple containers that meets preset conditions based on the container information and cloud server information. The preset conditions include minimizing cloud server costs, and the orchestration strategy indicates that each container in the multiple containers is deployed on a target cloud server, and the multiple cloud servers include the target cloud server.
[0171] In one possible implementation, the determination module 902 is specifically configured to use minimizing cloud server costs as an optimization objective of an integer programming solution model, use container information and cloud server information as inputs of the integer programming solution model, and output an orchestration strategy for multiple containers.
[0172] In another possible implementation, the container orchestration device 900 provided in the embodiment of the present application also includes a sending module 903, which is used to send a first request information to the first cloud management platform, where the first request information carries an orchestration policy so that the first cloud management platform deploys multiple containers in the target cloud server according to the orchestration policy.
[0173] In another possible implementation, the preset condition further includes minimizing cross-availability zone traffic interaction. The container orchestration device 900 provided in the embodiment of the present application further includes a grouping module 904 for determining grouping information of multiple containers based on minimizing cross-availability zone traffic interaction.
[0174] In another possible implementation, the grouping module 904 is specifically used to obtain traffic interaction information between multiple containers; based on the traffic interaction information and minimization of cross-availability zone traffic interaction, determine grouping information of the multiple containers, where containers belonging to the same group are deployed in the same availability zone.
[0175] In another possible implementation, the grouping module 904 may group the containers in a variety of ways, such as a community discovery algorithm or a graph neural network.
[0176] Exemplarily, when the grouping of containers is implemented by a community discovery algorithm, the grouping module 904 is specifically used to determine a traffic interaction graph based on traffic interaction information, where the traffic interaction graph includes multiple nodes and multiple connection edges, where the multiple nodes represent multiple containers, and the connection edges connect nodes with traffic interaction relationships, and the weight of the connection edges is determined based on the interaction traffic between the two nodes connected by the connection edges; based on the weight of the connection edges, the modularity between adjacent nodes is determined; based on the modularity, the traffic interaction graph is divided to determine the grouping results of the multiple nodes, and the grouping results of the multiple nodes indicate the grouping results of the multiple containers.
[0177] When the grouping of containers is implemented through a graph neural network, the grouping module 904 is specifically used to determine a traffic interaction graph based on traffic interaction information. The traffic interaction graph includes multiple nodes and multiple connecting edges. The multiple nodes represent multiple containers. The connecting edges connect nodes with traffic interaction relationships. The weight of the connecting edge is determined based on the interaction traffic between the two nodes connected by the connecting edge. The traffic interaction graph is used as the input of the trained graph neural network, and the grouping results of the multiple nodes are output. The grouping results of the multiple nodes indicate the grouping results of the multiple containers.
[0178] It should be explained that the traffic interaction information between containers can be determined based on empirical analysis or based on historical traffic interaction information between containers, and this embodiment of the present application does not specifically limit this.
[0179] In another possible implementation, the process of determining the grouping information of multiple containers can also be completed in cloud computing. For example, a second request message is sent to the second cloud management platform, and the second request message is used to instruct the second cloud management platform to determine the grouping information of multiple containers with the goal of minimizing cross-availability zone traffic interaction, where containers belonging to the same group are deployed in the same availability zone; and a second response message sent by the second cloud management platform is received, and the second response message includes the grouping information of multiple containers.
[0180] In one example, the orchestration policy includes grouping information of multiple containers, specification information of a target cloud server, and container information deployed in each cloud server in the target cloud service.
[0181] In another possible implementation, the acquisition module 901 is specifically used to send a third request message to a third cloud management platform, where the third request message is used to request cloud server information; and receive a third response message sent by the third cloud management platform, where the third response message is used to carry cloud server information.
[0182] The container orchestration device 900 provided according to an embodiment of the present application may correspond to executing the method described in the embodiment of the present application. The above and other operations and / or functions of each module in the container orchestration device 900 are respectively for implementing the corresponding processes of each method in Figures 1-8. For the sake of brevity, they are not further described here.
[0183] Based on the same concept as the embodiment of the aforementioned method, a computing device is also provided in the embodiment of the present application. The computing device includes at least a processor and a memory, and a program is stored in the memory. When the processor executes the program, it can implement the units or modules of each step in the method shown in Figures 1-8.
[0184] FIG10 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application.
[0185] As shown in Figure 10, the computing device 1000 includes at least one processor 1001, a memory 1002, and a communication interface 1003. The processor 1001, the memory 1002, and the communication interface 1003 are communicatively connected, and the communication connection can be achieved through a wired manner (such as a bus) or a wireless manner. The communication interface 1003 is used to receive data sent by other devices (such as packet information sent by the cloud management platform); the memory 1002 stores computer instructions, and the processor 1001 executes the computer instructions to perform the method in the aforementioned method embodiment.
[0186] It should be understood that in the embodiment of the present application, the processor 1001 may be a central processing unit (CPU), and the processor 1401 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0187] The memory 1002 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1001. The memory 1002 may also include a nonvolatile random access memory.
[0188] The memory 1002 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0189] It should be understood that the computing device 1000 according to the embodiment of the present application can execute the method shown in Figures 1-8 in the embodiment of the present application. The detailed description of the implementation of the method is given above and will not be repeated here for the sake of brevity.
[0190] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned method is implemented.
[0191] An embodiment of the present application provides a chip, which includes at least one processor and an interface, wherein the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the method mentioned above.
[0192] An embodiment of the present application provides a computer program or a computer program product, which includes instructions. When the instructions are executed, the computer is caused to perform the above-mentioned method.
[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A container arrangement method, characterized in that: include: Obtaining container information, where the container information includes cloud resource requirements of multiple containers; Acquire cloud server information, wherein the cloud server information includes specification information and cost information of multiple cloud servers; An orchestration strategy for the multiple containers that meets preset conditions is determined based on the container information and the cloud server information, wherein the preset conditions include minimizing cloud server costs, and the orchestration strategy indicates that each of the multiple containers is deployed on a target cloud server, and the multiple cloud servers include the target cloud server.
2. The method according to claim 1, characterized in that The determining, based on the container information and the cloud server information, an orchestration strategy for the plurality of containers that meets a preset condition includes: Minimizing the cloud server cost is used as an optimization goal of an integer programming solution model, the container information and the cloud server information are used as inputs of the integer programming solution model, and an orchestration strategy for the multiple containers is output.
3. The method according to claim 1 or 2, characterized in that: Also includes: Sending a first request message to a first cloud management platform, wherein the first request message carries the orchestration strategy, so that the first cloud management platform deploys the multiple containers in the target cloud server according to the orchestration strategy.
4. The method according to any one of claims 1 to 3, characterized in that: The preset condition also includes minimizing cross-zone traffic interaction, and the method further includes: The grouping information of the multiple containers is determined based on minimizing the cross-availability zone traffic interaction.
5. The method according to claim 4, characterized in that The determining the grouping information of the plurality of containers based on minimizing the cross-availability zone traffic interaction includes: Obtaining traffic interaction information between the multiple containers; Based on the traffic interaction information and the minimization of the cross-availability zone traffic interaction, grouping information of the multiple containers is determined, wherein containers belonging to the same group are deployed in the same availability zone.
6. The method according to claim 5, characterized in that The determining the grouping information of the multiple containers based on the traffic interaction information and the minimization of the cross-availability zone traffic interaction includes: Based on the traffic interaction information, determine a traffic interaction graph, the traffic interaction graph comprising a plurality of nodes and a plurality of connection edges, the plurality of nodes representing the plurality of containers, the connection edges connecting nodes having a traffic interaction relationship, and the weight of the connection edge being determined based on the interaction traffic between two nodes connected by the connection edge; Determining the modularity between adjacent nodes based on the weights of the connecting edges; The traffic interaction graph is divided based on the modularity to determine grouping results of the multiple nodes, where the grouping results of the multiple nodes indicate grouping results of the multiple containers.
7. The method according to claim 5, characterized in that Determining grouping information of the multiple containers based on the traffic interaction information and the minimization of the cross-availability zone traffic interaction includes: Based on the traffic interaction information, determine a traffic interaction graph, the traffic interaction graph comprising a plurality of nodes and a plurality of connection edges, the plurality of nodes representing the plurality of containers, the connection edges connecting nodes having a traffic interaction relationship, and the weight of the connection edge being determined based on the interaction traffic between two nodes connected by the connection edge; The traffic interaction graph is used as an input of a trained graph neural network, and grouping results of the multiple nodes are output, where the grouping results of the multiple nodes indicate grouping results of the multiple containers.
8. The method according to claim 4, characterized in that The determining the grouping information of the plurality of containers based on minimizing the cross-availability zone traffic interaction includes: Sending a second request information to the second cloud management platform, where the second request information is used to instruct the second cloud management platform to determine grouping information of multiple containers with the goal of minimizing the cross-availability zone traffic interaction, wherein containers belonging to the same group are deployed in the same availability zone; A second response message sent by the second cloud management platform is received, where the second response message includes grouping information of the multiple containers.
9. The method according to any one of claims 4 to 8, characterized in that: The orchestration strategy includes grouping information of the multiple containers, specification information of the target cloud server, and container information deployed in each cloud server in the target cloud service.
10. The method according to any one of claims 1 to 9, characterized in that: The obtaining of cloud server information includes: Sending a third request message to a third cloud management platform, wherein the third request message is used to request to obtain the cloud server information; Receive a third response message sent by the third cloud management platform, where the third response message is used to carry the cloud server information.
11. A container arrangement method, characterized in that: Applied to a first cloud management platform, the first cloud management platform manages multiple cloud servers, the method includes: Receive a container cluster building request sent by a policy computing node, the container cluster building request carries the orchestration policy, the orchestration policy is determined by the policy computing node based on container information and cloud server information, the container information includes cloud resource requirements of multiple containers, the cloud server information includes specification information and cost information of the multiple cloud servers, the orchestration policy indicates that each container in the multiple containers is deployed on a target cloud server, the multiple cloud servers include the target cloud server, and the orchestration policy satisfies a preset condition, the preset condition includes minimizing the cloud server cost; The multiple containers are deployed in the target cloud server based on the orchestration strategy.
12. A container arrangement method, characterized in that: Applied to the second cloud management platform, the method includes: receiving second request information sent by the policy computing node, where the second request information carries an identifier of each container in the multiple containers to be orchestrated; In response to the second request information, acquiring traffic interaction information between the multiple containers; Based on the traffic interaction information, the multiple containers are grouped with the goal of minimizing cross-availability zone traffic interactions, wherein containers belonging to the same group are deployed in the same availability zone; The grouping information of the multiple containers is sent to the policy computing node, so that the policy computing node determines the orchestration strategy of the multiple containers by taking at least the grouping information as a constraint condition.
13. A container arrangement method, characterized in that: Applied to a third cloud management platform, the third cloud management platform manages multiple cloud servers, the method includes: receiving a third request message sent by a policy computing node, the third request message being used to request the policy computing node to send and obtain cloud server information, the cloud server information including specification information and cost information of the plurality of cloud servers, the cloud server information being used by the policy computing node to determine an orchestration strategy that satisfies a preset condition, the preset condition including minimizing cloud server cost, the orchestration strategy indicating that each container in a plurality of containers is deployed on a target cloud server, the plurality of cloud servers including the target cloud server; Send a third response message, where the third response message is used to carry the cloud server information.
14. A container orchestration system, characterized in that: The orchestration system includes a policy computing node and a first cloud management platform, wherein the first cloud management platform manages a plurality of cloud servers; The policy computing node is used to obtain container information, where the container information includes cloud resource requirements of multiple containers; Acquire cloud server information, wherein the cloud server information includes specification information and cost information of multiple cloud servers; as well as Determine, based on the container information and the cloud server information, an orchestration strategy for the multiple containers that meets a preset condition, the preset condition including minimizing cloud server cost, the orchestration strategy indicating that each container in the multiple containers is deployed on a target cloud server, the multiple cloud servers including the target server; The first management platform is used to deploy the multiple containers in the target cloud server according to the orchestration strategy.
15. The system according to claim 14, characterized in that The system also includes a second cloud management platform, The second cloud management platform is used to receive the grouping request information sent by the policy computing node, where the grouping request information carries the identifier of each container; Obtaining traffic interaction information between the multiple containers; Based on the traffic interaction information, the multiple containers are grouped with the goal of minimizing traffic interactions across availability zones, wherein containers in the same group are deployed in the same availability zone; as well as Sending grouping information of the multiple containers to the policy computing node; The policy computing node receives the grouping information, takes the grouping information as a constraint, and determines an orchestration policy for the multiple containers that meets the preset condition.
16. The system according to claim 14 or 15, characterized in that It also includes the third cloud management platform. The third cloud management platform is used to receive third request information, wherein the third request information is used to request to obtain cloud service information, and the cloud server information includes specification information and cost information of the multiple cloud servers; as well as Send a third response message, where the third response message is used to carry the cloud server information.
17. A cloud system, characterized in that: It includes a cloud management platform, a plurality of cloud servers and a policy computing node, wherein the cloud management platform manages the plurality of cloud servers; The policy computing node is used to determine the orchestration strategy of multiple containers with the goal of minimizing the cost of cloud services, and send the orchestration strategy to the cloud management platform; The cloud management platform is used to deploy the multiple containers in a target server based on the orchestration strategy, and the multiple cloud servers include the target cloud server.
18. A computing device comprising a memory and a processor, characterized in that: Instructions are stored in the memory, and when the instructions are executed by the processor, the method according to any one of claims 1 to 13 is implemented.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Kubernetes container cluster node selection method based on hybrid element heuristic algorithm
CN112217676A
Cloud data center high-efficiency container arrangement method and system
CN115658230A
New cloud database containerization deployment method and system, electronic equipment and medium
CN117032889A
Resource management method and related device
CN117130761A
Apparatus for container orchestration in geographically distributed multi-cloud environment and method using the same
US20220329651A1
