Resource allocation method and device, cluster and program product

By creating anti-affinity groups in the cloud management platform and scheduling gateway instances to clusters of different fault domains, the problem of low reliability of gateway instances in cloud computing services is solved, and a high reliability and simplified configuration process is achieved.

CN119629074AActive Publication Date: 2025-03-14SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411551459.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-14
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

In cloud computing service scenarios, the lack of anti-affinity between multiple gateway instances, resulting in low reliability of gateway instances.

Method used

By creating an anti-affinity group including multiple failure domains in the cloud management platform, ensuring anti-affinity among gateway instances deployed in different failure domains, and scheduling the first gateway instances of multiple gateway instances into the first cluster of the infrastructure.

Benefits of technology

It realizes high reliability among gateway instances, ensuring that when one gateway instance fails, the remaining gateway instances can operate normally, simplifying the difficulty of users configuring multiple gateway instances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629074A_ABST
    Figure CN119629074A_ABST
Patent Text Reader

Abstract

The invention discloses a resource allocation method and device, a cluster and a program product, and relates to the technical field of cloud computing. In a resource allocation process, the cloud management platform creates an anti-affinity group including a plurality of fault domains in response to the first request. And creating a plurality of gateway instances in the anti-affinity group according to the plurality of obtained instance creation requests. And a plurality of gateway instances in the same anti-affinity group are respectively scheduled to clusters in different fault domains. Therefore, the anti-affinity among the gateway instances deployed in different fault domains can be ensured, so that the explosion radiuses of different gateway instances are different, and the other gateway instances can operate normally under the condition that one gateway instance breaks down, thereby improving the overall reliability. Besides, the anti-affinity group is utilized to ensure the anti-affinity among the plurality of gateway instances, so that the user does not need to configure the anti-affinity among the plurality of gateway instances by himself, and the difficulty of deploying the plurality of gateway instances by the user can be greatly simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a resource allocation method, device, cluster, and program product. Background Art

[0002] Cloud computing services manage and schedule a large number of computing resources in a unified manner, forming a resource pool and providing services to users on demand through the network. In cloud computing service scenarios, in order to ensure the reliability of the service level agreement (SLA), for the same business, multiple gateway instances are usually deployed in the cloud platform to forward data flows.

[0003] However, since multiple gateway instances may be located in the same rack, the same computer room, or the same physical device, there is a lack of anti-affinity between multiple gateway instances processing the same service, resulting in low reliability of the gateway instances. Summary of the invention

[0004] The present application provides a resource allocation method, device, cluster and program product to solve the problem of gateway high availability.

[0005] In a first aspect, the present application provides a resource allocation method. During the resource allocation process, a cloud management platform receives a first request and creates an anti-affinity group including multiple fault domains in the cloud management platform. The cloud management platform obtains multiple instance creation requests in the anti-affinity group, creates multiple gateway instances in the anti-affinity group according to the multiple instance creation requests, and schedules a first gateway instance among the multiple gateway instances to a first cluster of the infrastructure, and ensures that the fault domain where the first cluster is located is different from the fault domain where other clusters with scheduled gateway instances are located.

[0006] Based on the first aspect, it is possible to ensure anti-affinity between gateway instances deployed in different fault domains, so that the explosion radius of different gateway instances is different. When one gateway instance fails, the remaining gateway instances can operate normally, thereby improving overall reliability. In addition, the use of anti-affinity groups to ensure anti-affinity between multiple gateway instances means that users do not need to configure anti-affinity between multiple gateway instances themselves, which can greatly simplify the difficulty of users deploying multiple gateway instances.

[0007] In an optional implementation, in response to the first request, an anti-affinity group is created in the cloud management platform, which is specifically implemented as follows:

[0008] The cloud management platform provides a first interface in response to the first request, and the first interface includes: an anti-affinity group identifier input box. The cloud management platform provides a second interface in response to the first operation on the first interface. In the second interface, the anti-affinity group identifier input box includes the anti-affinity group identifier. In response to the second operation on the second interface, the cloud management platform creates an anti-affinity group.

[0009] In this way, the anti-affinity group is created through interface interaction, which simplifies the process of creating an anti-affinity gateway instance and reduces the difficulty of creating an anti-affinity gateway instance.

[0010] In an optional implementation, the specific implementation is: the second interface also includes an anti-affinity group query box. In the process of obtaining multiple instance creation requests, the cloud management platform responds to the third operation on the second interface and provides a third interface; in the third interface, the anti-affinity group query box includes an anti-affinity group identifier. The cloud management platform responds to the fourth operation on the third interface and provides a fourth interface. Among them, the fourth interface includes: the anti-affinity group identifier, the number of instances of the anti-affinity group corresponding to the anti-affinity group identifier, and the instance operation function control. And, the cloud management platform responds to the fifth operation on the fourth interface to obtain the instance creation request.

[0011] Exemplarily, the number of instances includes the number of gateway instances associated with the anti-affinity group and the total number of gateway instances supported by the anti-affinity group; the instance operation function control is used to create an instance within the anti-affinity group.

[0012] In this way, the cloud management platform uses an interface to interact with users, and users set gateway instances through the interface, which simplifies the difficulty of deploying multiple gateway instances and is conducive to improving the reliability of deploying gateway instances in the cloud management platform.

[0013] In an optional implementation, obtaining multiple instance creation requests is specifically implemented as follows: the cloud management platform obtains a second request; the second request carries an anti-affinity group identifier. And, the cloud management platform responds to the second request and provides a fifth interface. The fifth interface includes an anti-affinity group input box and an instance input box; the anti-affinity group input box includes an anti-affinity group identifier. Finally, the cloud management platform responds to a sixth operation on the fifth interface and obtains an instance creation request; the instance creation request carries an anti-affinity group identifier.

[0014] In the first aspect of the present application, the cloud management platform provides users with an anti-affinity group model, so that users do not need to configure the anti-affinity between multiple gateway instances by themselves, thereby greatly simplifying the difficulty of users deploying multiple gateway instances.

[0015] In an optional implementation, the specific implementation is: each instance creation request carries the anti-affinity group identifier of the anti-affinity group. In the implementation in which the cloud management platform creates multiple gateway instances in the anti-affinity group according to multiple instance creation requests, for the first instance creation request among the multiple instance creation requests, the cloud management platform responds to the first instance creation request and provides a sixth interface, which includes the anti-affinity group identifier and the first instance identifier carried by the first instance creation request. In response to the seventh operation on the sixth interface, the cloud management platform creates a first gateway instance and associates the first gateway instance with the anti-affinity group identifier.

[0016] In this way, the cloud management platform provides users with an anti-affinity group model through interface interaction, so that users do not need to configure the anti-affinity between multiple gateway instances by themselves, which can greatly simplify the difficulty of users deploying multiple gateway instances.

[0017] In an optional implementation, the specific implementation is: the fault domains included in the anti-affinity group are related to the instance types in the anti-affinity group; the instance types include: cross-availability zone instances and non-cross-availability zone instances.

[0018] The cross-availability zone instance is used to indicate that multiple nodes in the first cluster are in at least two availability zones, and the non-cross-availability zone instance is used to indicate that all nodes in the first cluster are in the same availability zone.

[0019] Optionally, when the instance type is a cross-availability zone instance, the fault domain included in the anti-affinity group is a host group.

[0020] Optionally, when the instance type is a non-cross-availability zone instance, the fault domains included in the anti-affinity group are availability zones or host groups.

[0021] In this way, the cloud management platform can provide multiple fault domain setting methods and set the corresponding fault domain based on the instance type of the gateway instance, thereby improving the flexibility of fault domain setting.

[0022] In an optional implementation, the specific implementation is: multiple gateway instances of the anti-affinity group operate in a master-master mode. Multiple data flows are processed by the multiple gateway instances of the anti-affinity group; and different gateway instances process different data flows.

[0023] In this way, multiple gateway instances belonging to the same anti-affinity group run in master-master mode and forward data streams in parallel, which can improve the efficiency of data stream forwarding. And when a gateway instance fails, it can automatically switch to other normal gateway instances, thus ensuring the high availability of the gateway.

[0024] In an optional implementation, the multiple gateway instances of the anti-affinity group are specifically implemented as follows: the multiple gateway instances of the anti-affinity group are operated in a master-slave mode. The data flow is processed by the first gateway instance. When the first gateway instance fails, the transmission node of the data flow is switched to the second gateway instance among the multiple gateway instances, and the second gateway instance is any gateway instance among the multiple gateway instances except the first gateway instance.

[0025] In this way, when multiple gateway instances belonging to the same anti-affinity group run in active-standby mode, redundant gateway instances are provided, thereby improving the reliability of the gateway. In addition, when the primary gateway instance fails, it can automatically switch to the standby gateway instance, thereby ensuring the high availability of the gateway.

[0026] In an optional implementation, the specific implementation is: the first gateway instance is a cross-availability zone instance, and the second gateway instance is a cross-availability zone instance; the second gateway instance is any gateway instance among the multiple gateway instances except the first gateway instance.

[0027] The first gateway instance includes multiple first gateway entities; different first gateway entities correspond to different availability zones;

[0028] The second gateway instance includes multiple second gateway entities; different second gateway entities correspond to different availability zones. In the event of a failure of the first gateway instance, the cloud management platform switches the transmission node of the data flow of the first gateway entity in the first availability zone to the second gateway entity in the first availability zone.

[0029] In this way, when switching the transmission node of the data flow across availability zones, the data flow in the same availability zone is forwarded by the second gateway entity in the availability zone without detouring the availability zone, thereby shortening the transmission time of the data flow and reducing the transmission delay.

[0030] In an optional implementation, scheduling the first gateway instance to the first cluster of the infrastructure is specifically implemented as follows: the cloud management platform initializes multiple clusters in the infrastructure; the number of clusters is the same as the number of fault domains included in the anti-affinity group. The cloud management platform selects the first cluster from the multiple candidate clusters based on the resource specifications of the first gateway instance; and schedules the first gateway instance to the first cluster.

[0031] Optionally, the specification of the first cluster matches the resource specification of the first gateway instance; the candidate cluster includes a cluster among the multiple clusters that has no gateway instance scheduled.

[0032] Based on this optional implementation, the cluster of scheduled gateway instances is determined based on resource specifications to ensure the degree of adaptation between the cluster and the gateway instance, thereby improving the reliability of the gateway instance. In addition, the cloud management platform can schedule the gateway instance by itself, and users do not need to worry about the complexity of the underlying scheduling, which can greatly simplify the difficulty of deploying multiple gateway instances for users.

[0033] In a second aspect, the present application provides a resource allocation device. The device is deployed on a cloud management platform; the cloud management platform is used to manage infrastructure, and the infrastructure includes multiple hosts; the device includes: a communication module, a processing module, and a storage module.

[0034] The communication module is used to respond to the first request and obtain multiple instance creation requests.

[0035] The processing module is used to create an anti-affinity group corresponding to the first request, create multiple gateway instances in the anti-affinity group according to multiple instance creation requests; and schedule the first gateway instance among the multiple gateway instances to a first cluster of the infrastructure.

[0036] The storage module is used to store executable program codes, data of the resource allocation device during the resource allocation process, etc.

[0037] Among them, one gateway instance corresponds to one instance creation request; the anti-affinity group includes multiple fault domains, and the gateway instances deployed in different fault domains have anti-affinity, and the fault domain is an availability zone, a host group or a host; the first cluster includes M hosts among multiple hosts, and the fault domain where the first cluster is located is different from the fault domain where other clusters with gateway instances scheduled are located.

[0038] In an optional implementation, the processing module is used to: provide a first interface in response to a first request, the first interface including an anti-affinity group identifier input box; provide a second interface in response to a first operation on the first interface; in the second interface, the anti-affinity group identifier input box includes an anti-affinity group identifier; and, in response to a second operation on the second interface, create an anti-affinity group.

[0039] In an optional implementation, the specific implementation is: the second interface also includes: an anti-affinity group query box. The above-mentioned processing module is used to: respond to the third operation on the second interface and provide a third interface, in which the anti-affinity group query box includes an anti-affinity group identifier; and, in response to the fourth operation on the third interface, provide a fourth interface; wherein the fourth interface includes: an anti-affinity group identifier, the number of instances of the anti-affinity group corresponding to the anti-affinity group identifier, and an instance operation function control. Exemplarily, the number of instances includes the number of gateway instances associated with the anti-affinity group and the total number of gateway instances supported by the anti-affinity group; the instance operation function control is used to create instances within the anti-affinity group. The above-mentioned processing module is also used to: obtain an instance creation request in response to the fifth operation on the fourth interface.

[0040] In an optional implementation, the processing module is used to:

[0041] Obtain a second request; the second request carries an anti-affinity group identifier;

[0042] And, in response to the second request, providing a fifth interface; wherein the fifth interface includes an anti-affinity group input box and an instance input box; the anti-affinity group input box includes an anti-affinity group identifier;

[0043] The above processing module is further used to: in response to a sixth operation on the fifth interface, obtain an instance creation request; the instance creation request carries an anti-affinity group identifier.

[0044] In an optional implementation, the specific implementation is: each instance creation request carries the anti-affinity group identifier of the anti-affinity group. The above-mentioned processing module is used to: for the first instance creation request among multiple instance creation requests, in response to the first instance creation request, provide a sixth interface. And, in response to the seventh operation on the sixth interface, create a first gateway instance, and associate the first gateway instance with the anti-affinity group identifier. Among them, the sixth interface includes the anti-affinity group identifier and the first instance identifier carried by the first instance creation request.

[0045] In an optional implementation, the specific implementation is: the fault domains included in the anti-affinity group are related to the instance types in the anti-affinity group; the instance types include: cross-availability zone instances and non-cross-availability zone instances.

[0046] The cross-availability zone instance is used to indicate that multiple nodes in the first cluster are in at least two availability zones, and the non-cross-availability zone instance is used to indicate that all nodes in the first cluster are in the same availability zone.

[0047] Optionally, when the instance type is a cross-availability zone instance, the fault domain included in the anti-affinity group is a host group.

[0048] Optionally, when the instance type is a non-cross-availability zone instance, the fault domains included in the anti-affinity group are availability zones or host groups.

[0049] In an optional implementation, the specific implementation is: multiple gateway instances of the anti-affinity group operate in a master-master mode. Multiple data flows are processed by the multiple gateway instances of the anti-affinity group; and different gateway instances process different data flows.

[0050] In an optional implementation, the specific implementation is as follows: multiple gateway instances of the anti-affinity group operate in a master-slave mode. The data flow is processed by the first gateway instance. In the event of a failure of the first gateway instance, the transmission node of the data flow is switched to the second gateway instance among the multiple gateway instances. The second gateway instance is any gateway instance among the multiple gateway instances except the first gateway instance.

[0051] In an optional implementation, the specific implementation is: the first gateway instance is a cross-availability zone instance, and the second gateway instance is a cross-availability zone instance; the second gateway instance is any gateway instance among the multiple gateway instances except the first gateway instance.

[0052] The first gateway instance includes multiple first gateway entities; different first gateway entities correspond to different availability zones.

[0053] The second gateway instance includes multiple second gateway entities; different second gateway entities correspond to different available zones.

[0054] The processing module is further used to: when the first gateway instance fails, switch the transmission node of the data flow of the first gateway entity in the first availability zone to the second gateway entity in the first availability zone.

[0055] In an optional implementation, the specific implementation is as follows: the processing module is further used to initialize multiple clusters in the infrastructure; the number of clusters is the same as the number of fault domains included in the anti-affinity group; and based on the resource specifications of the first gateway instance, a first cluster is selected from multiple candidate clusters; and the first gateway instance is scheduled to the first cluster.

[0056] Optionally, the specification of the first cluster matches the resource specification of the first gateway instance; the candidate cluster includes a cluster among the multiple clusters that has no gateway instance scheduled.

[0057] In a third aspect, the present application provides a computing device cluster. The computing device cluster includes at least one computing device. Each computing device includes a processor and a memory; the processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster performs the method in the first aspect or any optional implementation of the first aspect.

[0058] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed by a computing device cluster, enables the computing device cluster to execute the method in the above-mentioned first aspect or any optional implementation manner of the first aspect.

[0059] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the instructions in the computing program stored in the computer-readable storage medium to execute the method in the above-mentioned first aspect or any optional implementation of the first aspect.

[0060] The technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the first aspect or any optional implementation method in the first aspect. No further details will be given here. Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 Schematic diagram of forwarding data flow for multiple gateway instances;

[0062] Figure 2 A schematic diagram of the structure of the computer system provided for this application;

[0063] Figure 3 A flowchart of the resource allocation method provided in this application;

[0064] Figure 4 Schematic diagram of gateway instances of different instance types provided for this application;

[0065] Figure 5 A flow chart of the scheduling gateway instance provided for this application;

[0066] Figure 6 A schematic diagram of gateway instance scheduling in master-master mode provided for this application;

[0067] Figure 7 A schematic diagram of the gateway instance scheduling in the active-standby mode provided for this application;

[0068] Figure 8 A schematic diagram of gateway instance scheduling across availability zones provided for this application;

[0069] Fig. 9 Schematic diagram of the interactive interface for creating an anti-affinity group provided for this application Figure 1 ;

[0070] Fig.10 Schematic diagram of the interactive interface for creating an anti-affinity group provided for this application Figure 2 ;

[0071] Fig.11A Schematic diagram of the interactive interface for obtaining instance creation request provided by this application Figure 1 ;

[0072] Fig. 11B Schematic diagram of the interactive interface for obtaining instance creation request provided by this application Figure 2 ;

[0073] Fig. 11C Schematic diagram of the interactive interface for obtaining instance creation request provided by this application Figure 3 ;

[0074] Fig.12 A schematic diagram of the interactive interface for creating a gateway instance provided for this application;

[0075] Fig.13 A schematic diagram of the structure of the resource allocation device provided in this application;

[0076] Fig.14 A schematic diagram of the structure of the computing device provided for this application;

[0077] Fig.15 A schematic diagram of the structure of the computing device cluster provided for this application;

[0078] Fig.16 A schematic diagram of the network connection between computing devices in the computing device cluster provided in this application. DETAILED DESCRIPTION

[0079] For the same service, multiple gateway instances are usually deployed in the cloud platform to forward data flows. Figure 1 As shown in (a), Figure 1 Figure (a) is a schematic diagram of multiple gateway instances forwarding data flows. Virtual machine 1 processes service 1. During the process of virtual machine 1 processing the service, the data flow of service 1 is distributed to gateway instance 1 and gateway instance 2 through load balancing. Gateway instance 1 and gateway instance 2 forward the data flow they receive to virtual machine 1.

[0080] Currently, when gateway instances are deployed, multiple gateway instances may be located in the same rack, the same computer room, or the same physical device, resulting in anti-affinity between multiple gateway instances belonging to the same task.

[0081] like Figure 1 As shown in Figure (b), gateway instance 1 and gateway instance 2 are created in the cloud platform, where gateway instance 1 includes gateway entity 1 and flow diversion entity 1, gateway entity 2 and flow diversion entity 2. Figure 2As shown, gateway entity 1 and gateway entity 2 are located in the gateway node cluster of the cloud platform. Drainage entity 1 and drainage entity 2 are located in the drainage cluster of the cloud platform. It can be seen that gateway entity 1 (or drainage entity 1) and gateway entity 2 (or drainage entity 2) may be located in the same rack, the same computer room or the same physical device.

[0082] like Figure 1 As shown in Figure (c), relative to Figure 1 In Figure (b), Figure 1 In Figure (c), gateway instance 1 is located in availability zone 1, gateway instance 2 is located in availability zone 2, and drainage entity 1 and drainage entity 2 are located in the drainage cluster of the cloud platform. It can be seen that Figure 1 The deployment diagram provided in Figure (c) still has the problem of lack of affinity between gateway instances. In addition, when gateway instance 1 in availability zone 1 fails, the data flow forwarded by gateway instance 1 will be forwarded by gateway instance 2. Since gateway entity 1 and gateway entity 2 are located in different availability zones, the data flow needs to detour across availability zones, resulting in high latency.

[0083] Based on this, the present application provides a resource allocation method to solve the problem of high availability of gateways. This method ensures the anti-affinity between gateway instances deployed in different fault domains, so that the explosion radius of different gateway instances is different, thereby ensuring that when a gateway instance fails, it will not affect other gateway instances, thus improving the overall reliability. In addition, the anti-affinity between multiple gateway instances is guaranteed by anti-affinity groups, so that users do not need to configure the anti-affinity between multiple gateway instances by themselves, thereby greatly simplifying the difficulty of users deploying multiple gateway instances.

[0084] Specifically, during the resource allocation process, an anti-affinity group including multiple fault domains is created in the cloud management platform, multiple gateway instances are created in the anti-affinity group, and the first gateway instance among the multiple gateway instances is scheduled to the first cluster of the infrastructure, and it is ensured that the fault domain where the first cluster is located is different from the fault domain where other clusters with gateway instances are scheduled.

[0085] It should be noted that the resource allocation method provided in the embodiment of the present application can be used not only for the deployment of multiple gateway instances, but also for the deployment of multiple containers and virtual machines. This is not limited in the embodiment of the present application. It is understandable that when the resource allocation method is used for the deployment of multiple containers and virtual machines, the anti-affinity group includes multiple instances or containers, and the instances or containers in the anti-affinity group have anti-affinity.

[0086] The terms used in the implementation method of this application are only used to explain the specific embodiments of this application, and are not intended to limit this application. The following is a brief introduction to some concepts that may be involved in this application.

[0087] Resources refer to virtual computing resources in a cloud service, such as threads, processes, or data streams. They can also refer to hardware resources, such as processors, network connections, or expansion cards.

[0088] A resource pool refers to a collection of various hardware and software involved in a cloud computing data center, which can be divided into computing resources, storage resources, and network resources according to their types.

[0089] Scheduling is the process of allocating resources required by instances in a cloud service.

[0090] Cloud computing environment: An entity that uses basic resources to provide cloud services to users in the cloud computing model. The cloud environment includes cloud data centers and cloud service platforms.

[0091] The cloud data center includes a large number of basic resources (including computing clusters, storage resources and network resources) owned by the cloud service provider. In this article, the cloud data center can also be called a cloud management platform, a cloud computing platform, etc.

[0092] Host: A physical server deployed in a cloud management platform. The physical resources of a host include a physical central processing unit (CPU) and memory devices. Virtualization software runs on each host, which virtualizes some physical resources into virtual resources for use by instances. For example, virtualization software virtualizes the CPU into a virtual CPU (vCPU). The host also has resources such as memory channels, cache channels, cache, network input and output (IO) bandwidth, and storage IO bandwidth for sharing by instances running on the host.

[0093] Instance: A computing node running on a host. Common instances include virtual machines (VMs) or containers. Each instance occupies some or all of the virtual resources of the host. Generally, instances deployed on a computing node can be used for data transmission, data computing, etc. In this article, instances used for data transmission are referred to as gateway instances. In other implementations, instances used for data transmission may also be referred to as gateways.

[0094] Gateway instance, data flow forwarding gateway, usually a virtual gateway, mainly functions including route matching forwarding, network address translation (NAT), etc. Gateway instance is generally composed of traffic diversion entity and gateway entity.

[0095] The traffic diversion entity refers to the front-end access layer of the gateway instance. The traffic diversion entity is used to divert traffic to multiple gateway entity nodes.

[0096] The gateway entity is composed of multiple gateway nodes and is responsible for processing data flows, such as NAT conversion or routing forwarding.

[0097] An anti-affinity group refers to a set of gateway instances. Different gateway instances in the same anti-affinity group are located in different fault domains. Instances in different fault domains do not affect each other. In the following, an anti-affinity group includes multiple gateway instances.

[0098] A fault domain is an area or part of a computer system where a fault may occur. Depending on the level of the fault domain, the fault domain can usually include: region, availability zone, host group, host.

[0099] The following are examples of regions, availability zones, host groups, and hosts.

[0100] Region refers to the collection of data centers covered by a cloud service provider in a geographical scope. It usually includes multiple physical locations close to each other. Generally, a region can span one or more geographical locations. Different regions are connected by a high degree of network, and there is physical isolation between different regions. Usually a region contains one or more availability zones.

[0101] An availability zone (AZ) refers to a collection of one or more physical data centers. The network connections and power supplies between different availability zones are isolated from each other. Usually, an availability zone contains one or more units.

[0102] A group (also called a host group or rack) refers to a logically or physically grouped set of computing resources in an availability zone. In this article, a group contains one or more hosts.

[0103] The following uses fault domains of different levels as an example to illustrate that different gateway instances of an anti-affinity group are in different fault areas.

[0104] In the first example, the failure domain is the region. Different gateway instances in an anti-affinity group are located in different regions.

[0105] In the second example, the failure domain is the availability zone. Different gateway instances in an anti-affinity group are located in different availability zones. Multiple availability zones can be located in the same region, or at least two of the multiple availability zones can be located in different regions.

[0106] In the third example, the failure domain is the machine group. Different gateway instances in an anti-affinity group are located on different machines groups. Multiple machines groups can be located in the same availability zone, or at least two of the multiple machines groups can be located in different availability zones.

[0107] In the fourth example, the failure domain is the host. Different gateway instances within an anti-affinity group are located on different hosts. Multiple hosts can be located on the same group. Alternatively, different hosts can be located on different groups.

[0108] The above four examples are merely exemplary descriptions of different gateway instances in an anti-affinity group being in different fault areas at different fault domain levels, and should not be construed as limiting the resource allocation method provided in the embodiments of the present application.

[0109] The explosion radius, also known as the explosion radius of a gateway instance, indicates the scope of impact of a gateway instance when a gateway instance fails. Understandably, when the explosion radius of different gateway instances is different, when one gateway instance fails, the other gateway instances can operate normally.

[0110] The instance specification, which can also be called instance size or resource specification, indicates the amount of resources occupied by the instance.

[0111] Specifications include: number of vCPUs and memory size (in gigabytes (GB)).

[0112] Alternatively, the specifications include: number of vCPUs, memory size, memory bandwidth, network bandwidth, number of graphics processing units (GPUs), size of non-volatile storage devices (generally high-speed storage media, such as solid state drives (SSDs), NVMe SSDs), etc. In this article, the resource specifications of the gateway instance mainly include memory size, memory bandwidth, network bandwidth, etc. The specifications of the cluster where the gateway instance is deployed mainly include memory size, memory bandwidth, network bandwidth, etc.

[0113] A service level agreement (SLA) is an agreement defined between a service provider and a user or between service providers to ensure the performance and reliability of the service.

[0114] Virtual Private Cloud (VPC) isolates networks through logical means, providing a secure and isolated network environment.

[0115] In a virtual private cloud scenario, you can usually create multiple gateway instances and use them to process the data flow of a service, thereby ensuring the network security of the virtual private cloud. Data flow can also be called service flow, service traffic, etc.

[0116] Load Balancing (LB) is a network technology that can distribute traffic to multiple gateway instances and has the ability to detect gateway instance failover.

[0117] The resource allocation method provided by the present application is described below with reference to the accompanying drawings.

[0118] See first Figure 2 , Figure 2 A schematic diagram of the structure of a computer system provided for this application. Figure 2 As shown, the computer system includes a client 20 , a cloud service platform 30 and a cloud management platform 10 .

[0119] In the first optional implementation, the client 20 may be a computer running an application, and the computer running the application may be a physical machine or a virtual machine. For example, if the computer running the application is a physical computing device, the physical computing device may be a host or a terminal. Among them, the terminal may also be referred to as a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the client 20.

[0120] In a second optional implementation, the client 20 may be an application, such as a cloud computer application. Alternatively, the client 20 may be a web client. The client 20 runs on a terminal device, which includes but is not limited to a mobile phone terminal, a tablet computer, a personal computer or a laptop computer.

[0121] It should be noted that the above two implementations are only different implementations of the client 20. In practical applications, the client 20 may also have other implementations. For example, the client 20 may be a software module running on any one or more hosts in the computing cluster 110. This application does not limit this.

[0122] In an optional implementation, a resource management system 120 is deployed in the cloud management platform 10 .

[0123] In some implementations, the resource management system 120 may be independently deployed in an instance of the cloud management platform 10 . Alternatively, the resource management system 120 may be deployed in multiple instances of the cloud management platform 10 in a distributed manner.

[0124] like Figure 2 As shown, the resource management system 120 is abstracted into a cloud service by the cloud service provider on the cloud service platform 30 and provided to users. After the user purchases the cloud service on the cloud service platform 30 through the client 20 (it can be pre-charged and then settled according to the final resource usage), the cloud environment uses the resource management system 120 deployed on the cloud management platform 10 to provide cloud services to users. When using cloud services, users can determine the tasks to be performed and upload data to the cloud environment through the application program interface (API) or graphical user interface (GUI) in the client 20. The resource management system 120 in the cloud environment receives the user's task information and data, performs data processing and performs corresponding tasks to obtain processing results. The resource management system 120 returns the processing results of the task or the status information during the execution process to the user through the API or GUI. Among them, tasks include but are not limited to AI model training tasks, AI recognition tasks, content generation tasks, instance scheduling, data analysis services, etc. This application does not limit this.

[0125] In addition, in other implementations, the functions of the resource management system 120 can be completed by the cloud management platform 10 or other components of the cloud management platform 10, and this application does not limit its implementation method.

[0126] In an optional implementation, Figure 2 As shown, the cloud management platform 10 also includes a computing cluster 110 .

[0127] The computing cluster 110 refers to a collection of computers connected via a local area network or the Internet, including multiple hosts. Figure 2 As shown, computing cluster 110 includes host 111 and host 112. Host 111 and host 112 correspond to different fault domains.

[0128] The resource management system 120 establishes a communication connection with each host and schedules different gateway instances in the same anti-affinity group to hosts in different fault domains. Figure 2The illustrated computer system architecture is only an example, and the device type or number within the system can be configured according to actual needs, and the present application embodiment does not limit this. For example, the computer system may also include more computing clusters 110, or the computer system may also include a resource pool ( Figure 2 not shown).

[0129] Combine the following Figure 2 The structure of each module included in the resource management system 120 is introduced.

[0130] like Figure 2 As shown, the resource management system 120 includes a load balancer 121 , a resource management module 122 , an anti-affinity group creation module 123 , and an instance creation module 124 .

[0131] It is worth noting that the functions implemented by the load balancer 121, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124 can be completed by the cloud management platform 10 or other components of the cloud management platform 10, and this application does not limit their implementation methods.

[0132] The connection relationship among the load balancer 121 , the resource management module 122 , the anti-affinity group creation module 123 , and the instance creation module 124 , and the functions implemented by each module are exemplarily described below.

[0133] The load balancer 121 establishes a communication connection with each host in the computing cluster 110. The resource management module 122 establishes a communication connection with the load balancer 121, the instance creation module 124, the anti-affinity creation module and each host in the computing cluster 110 respectively.

[0134] The following is an example of how to deploy the load balancer 121 , the resource management module 122 , the anti-affinity group creation module 123 , and the instance creation module 124 .

[0135] In a first optional deployment mode, the load balancer 121, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124 may be deployed in the same device.

[0136] In a second optional deployment mode, the load balancer 121, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124 may be deployed in different devices respectively.

[0137] For example, the load balancer 121, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124 may be deployed in different computing devices, respectively.

[0138] For another example, the load balancer 121, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124 may be respectively deployed in different virtual machines of the same computing device.

[0139] It should be noted that the above two optional implementations are only different implementations of deploying the load balancer 121, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124. In actual applications, the load balancer 121, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124 may also have other deployment methods. For example, the resource management module 122, the anti-affinity group creation module 123, and the instance creation module 124 are deployed in device 1, and the load balancer 121 is deployed in device 2. Device 1 and device 2 are different devices. This application does not limit this.

[0140] The functions of each module in the resource management system 120 are described below.

[0141] The anti-affinity group creation module 123 is used to create an anti-affinity group in the cloud management platform.

[0142] The instance creation module 124 is used to create multiple gateway instances in the anti-affinity group.

[0143] The resource management module 122 is used to schedule different gateway instances in the anti-affinity group to hosts in different fault domains in the computing cluster 110 .

[0144] The load balancer 121 is used to distribute the data flow to different gateway instances in a load balancing manner.

[0145] It should be noted that Figure 2 These are merely illustrative drawings and do not constitute a limitation on the example scheduling method provided in the embodiments of the present application. Figure 2 The naming and division of modules in the resource management system 120 shown in FIG. 1 are schematic. In practical applications, the resource management system 120 may also have other grouping methods, which are not limited in this application. In addition, the resource management system 120 may also be named as a resource allocation device. The resource allocation device may include different Figure 2 The resource allocation device can refer to the following module Fig.13 The present application does not elaborate on the embodiments provided.

[0146] Next, combine Figures 3 to 8 The implementation of the resource allocation method provided in this application is described.

[0147] See also Figure 3 , Figure 3 Schematic diagram of the resource allocation method provided in the embodiment of the present application Figure 1 The resource allocation method shown can be applied to Figure 2 In the cloud management platform 10 shown, the resource allocation method is executed by the cloud management platform 10. The cloud management platform can be called a cloud computing platform, a management node, a cloud platform side, etc. Alternatively, the resource allocation method can also be executed by the resource management system 120 in the cloud management platform 10.

[0148] Taking the resource allocation method provided in the embodiment of the present application as executed by the cloud management platform 10 as an example, Figure 3 As shown, the resource allocation method includes steps S310 to S340.

[0149] S310 , the cloud management platform 10 creates an anti-affinity group in the cloud management platform 10 in response to the first request.

[0150] An anti-affinity group includes multiple fault domains, and gateway instances deployed in different fault domains have anti-affinity.

[0151] In the process corresponding to S310 , the client 20 sends a first request to the cloud management platform 10 . The cloud management platform 10 receives the first request sent by the client 20 .

[0152] In some feasible situations, the first request may also be sent by other devices to the cloud management platform 10. The other devices may refer to clients, terminals, user equipment, servers or other types of equipment.

[0153] In other feasible situations, the first request may also be sent by an application deployed on one or more devices that are in communication with the cloud platform to the cloud management platform 10. The application may include, but is not limited to: distributed training applications, cloud computer applications, video playback applications, live broadcast applications, game applications, etc.

[0154] In some other feasible situations, the first request may also be automatically generated by the cloud management platform 10, for example, the cloud management platform 10 automatically triggers the generation of the first request when providing business services to the client 10. The business services include but are not limited to: content generation services, cloud computer services, data computing services, model training services, etc.

[0155] The above three situations are merely different optional methods for the first request and should not be understood as limitations on the resource allocation method provided in this application.

[0156] The following is an exemplary description of the content included in the first request.

[0157] In an optional implementation, the first request is used to provide the cloud management platform 10 with requirement information for creating an anti-affinity group.

[0158] For example, the user inputs the requirement information for creating an anti-affinity group through the display interface provided by the cloud management platform 10 to generate a first request. The cloud management platform 10 receives the first request through the display interface. Specifically, the implementation method of the cloud management platform 10 receiving the first request based on the display interface can refer to the following Figures 9 and 10 The embodiments provided are not described in detail here.

[0159] The following three specific examples are used to illustrate the requirement information for creating an anti-affinity group.

[0160] In the first optional example, the first request includes: target application type and target service level agreement SLA, the target application type is for example remote dictionary server (Redis) and load balancing service (Nginx). That is, the requirement information for creating an anti-affinity group includes the target application type and target SLA.

[0161] The target application type is used to determine the maximum resource specification of the gateway instance in the anti-affinity group. For example, the cloud management platform 10 determines the resource specification of the gateway instance in the anti-affinity group based on the correspondence between the application type and the resource specification.

[0162] The target SLA is used to indicate the reliability of the gateway instance in the anti-affinity group. It can be understood that the larger the target SLA is, the higher the reliability of the gateway instance in the corresponding anti-affinity group is.

[0163] In a second optional example, the first request further includes: an anti-affinity group identifier and a fault domain level of the anti-affinity group. Accordingly, the requirement information for creating an anti-affinity group includes: a target application type, a target SLA, an anti-affinity group identifier and a fault domain level of the anti-affinity group.

[0164] The anti-affinity group identifier is unique and is used to distinguish a unique and determined anti-affinity group in the cloud management platform 10. In the embodiment of the present application, the specific form of the anti-affinity group identifier is not limited.

[0165] The fault domain level is used to indicate the level of the fault domain of the anti-affinity group. For example, the fault domain level can be the region level, availability zone level, group level, or host level.

[0166] In the third optional instance, the first request also includes: an anti-affinity group identifier, a fault domain level of the anti-affinity group, and a required number of instances. Correspondingly, the requirement information for creating an anti-affinity group includes: a target application type, a target SLA, an anti-affinity group identifier, a fault domain level of the anti-affinity group, a gateway instance specification, and a required number of instances.

[0167] The required number of instances is used to indicate the total number of gateway instances that support association in the anti-affinity group.

[0168] The above three optional implementations are only different optional forms of the requirement information for creating an anti-affinity group when the first request includes different information. In practical applications, the requirement information for creating an anti-affinity group may also have other forms, which are not limited in the embodiments of the present application.

[0169] In addition to the first request being used to provide demand information, in another optional implementation, the first request can be used to request the cloud management platform 10 to create an anti-affinity group. For example, a user sends a first request to the cloud management platform 10 through the client 20, and the cloud management platform 10 responds to the first request and provides an interface to the client 20. The user inputs the demand information of the anti-affinity group based on the interface. The cloud management platform 10 creates the anti-affinity group based on the demand information input on the interface. Specifically, the cloud management platform 10 can refer to the following Fig. 9 The provided embodiment creates an anti-affinity group. The embodiment of the present application is not described in detail here.

[0170] S320, the cloud management platform 10 obtains multiple instance creation requests.

[0171] Corresponding to the process of S320, the client 20 sends multiple instance creation requests to the cloud management platform 10. Figure 3 As shown, the cloud management platform 10 obtains N instance creation requests: instance creation request 1, instance creation request 2...instance creation request N, where N is an integer greater than 2.

[0172] In an optional implementation, the multiple instance creation requests may be any multiple instance creation requests in the instance creation data stream. The instance creation data stream may also be referred to as a data stream, which includes multiple instance creation requests. Each instance creation request is used to request the cloud management platform 10 to create a gateway instance, and each instance creation request carries the number of gateway instances requested to be created. Different instance creation requests carry the number of gateway instances requested to be created.

[0173] In the present application, the number of gateway instances specified in the creation request is not specifically limited. For example, the number of gateway instances requested to be created included in the instance creation request is 1, and one instance creation request is used to create a gateway instance in the anti-affinity group. For another example, the number of gateway instances requested to be created included in the instance creation request is at least two, and one instance creation request is used to create at least two gateway instances in the anti-affinity group.

[0174] The following three specific examples illustrate instance creation requests.

[0175] In a first optional example, multiple instance creation requests come from an instance creation data stream sent by the same device. The setting may refer to a terminal, a user device, a server, or other types of devices.

[0176] In a second optional example, multiple instance creation requests come from an instance creation data stream sent by the same application.

[0177] For example, the application can be deployed on one or more devices that are connected to the cloud platform. The application can include but is not limited to: cloud computer applications, artificial intelligence (AI) training applications, data analysis applications, etc.

[0178] In the third optional example, multiple instance creation requests come from the instance creation data stream of the same task. The task can be a disaster recovery deployment task, a distributed storage task, a distributed AI training task, a gateway deployment task, etc. In the embodiment of the present application, the specific form of the task is not limited.

[0179] The above three possible examples are only optional ways of providing multiple instance creation requests in the embodiments of the present application, and should not be understood as limiting the resource allocation method provided in the embodiments of the present application. In addition, in other cases, the instance creation data stream may also be referred to as a request sequence, a data request stream, or other names, etc., which are not limited in the embodiments of the present application.

[0180] In another optional implementation, each instance creation request may also carry a group ID and an instance ID. The group ID is used to indicate the anti-affinity group for creating the gateway instance. The instance ID is similar to the anti-affinity group ID, both of which are unique and are used to determine the unique gateway instance in the cloud platform.

[0181] In some optional examples, different instance creation requests carry the same group identifier, and different instance creation requests carry different instance identifiers. Alternatively, in other optional examples, at least two instance creation requests among the multiple instance creation requests carry different group identifiers, and different instance creation requests carry different instance identifiers.

[0182] In addition, in some optional implementations, the instance creation request may also carry instance type information. The instance type information is used to indicate the instance type of the gateway instance requested to be created.

[0183] In an optional implementation, the instance types of the gateway instance include: a cross-availability zone instance and a non-cross-availability zone instance.

[0184] The following combination Figure 4Figures (a) and (b) in the figure provide examples of cross-zone instances and non-zone instances, respectively.

[0185] A cross-zone instance means that multiple traffic diversion entities included in a gateway instance are located in multiple zones, and multiple gateway entities are located in multiple zones.

[0186] For example, a gateway instance includes two traffic diversion entities and two gateway entities. Figure 4 As shown in Figure (a), gateway instance 1 includes gateway entity 1-1, gateway entity 1-2, diversion entity 1-1 and diversion entity 1-2.

[0187] like Figure 4 As shown in Figure (a), the gateway entity 1-1 and the traffic diversion entity 1-1 are located in availability zone 1, and the gateway entity 1-2 and the traffic diversion entity 1-2 are located in availability zone 2.

[0188] Non-cross-availability zone instances refer to that multiple traffic diversion entities included in a gateway instance are located in one availability zone, and multiple gateway entities are located in one availability zone. Multiple traffic diversion entities and multiple gateway entities are located in the same availability zone.

[0189] like Figure 4 As shown in Figure (b), Figure 4 Compared with the deployment diagram shown in Figure (a) in Figure 4 In Figure (b), the gateway entity 1-1 and the traffic diversion entity 1-1 are located in availability zone 1, and the traffic diversion entity 1-1 and the traffic diversion entity 1-2 are also located in availability zone 1.

[0190] The above mainly uses the example that the instance types of the gateway instance include cross-availability zone instances and non-cross-availability zone instances to illustrate the instance types of the gateway instance. In other embodiments, the instance type may also include other forms. The specific form of the instance type of the gateway instance is not limited in the embodiments of the present application.

[0191] S330, the cloud management platform 10 creates multiple gateway instances in the anti-affinity group according to the multiple instance creation requests.

[0192] like Figure 3 As shown, the cloud management platform 10 creates S gateway instances in the anti-affinity group according to multiple instance creation requests: gateway instance 1, gateway instance 2, and gateway instance S. Wherein, S is greater than or equal to N, that is, the number of created gateway instances is greater than or equal to the number of acquired instance creation requests.

[0193] In an optional implementation, one instance creation request may be used to create one or more gateway instances.

[0194] In the first example, the number of gateway instances requested to be created in the instance creation request is 1. One instance creation request is used to create a gateway instance in the anti-affinity group, that is, one gateway instance corresponds to one instance creation request. The number of gateway instances created is equal to the number of instance creation requests obtained. Figure 3 As shown, gateway instance 1 corresponds to instance creation request 1, gateway instance 2 corresponds to instance creation request 2, and gateway instance S corresponds to instance creation request N.

[0195] In the second example, the instance creation request includes multiple gateway instances requested to be created, and one instance creation request is used to create multiple gateway instances in the anti-affinity group, that is, at least two gateway instances correspond to the same instance creation request. In this example, the number of created gateway instances is greater than the number of acquired instance creation requests.

[0196] The following uses an instance creation request as an example to illustrate how to create a gateway instance in an anti-affinity group.

[0197] In a first optional implementation, the instance creation request includes the number of gateway instances requested to be created. Based on the instance creation request, the cloud server side determines the number of gateway instances requested to be created, and creates a gateway instance that meets the number of instances in the anti-affinity group. Assign instance identifiers of one or more created gateway instances, and associate the instance identifiers of one or more created gateway instances with the anti-affinity group identifier of the anti-affinity group, respectively. In an embodiment of the present application, there is no limitation on the method of assigning instance identifiers of gateway instances, such as randomly assigning instance identifiers of gateway instances. For another example, the instance identifier of the gateway instance is generated based on the time code of the created gateway instance.

[0198] In a second optional implementation, the instance creation request includes the number of instances requested to be created, the group identifier, and the instance identifier. The cloud management platform 10 determines the number of gateway instances requested to be created, the anti-affinity group for creating the gateway instance indicated by the group identifier, and the instance identifiers of the one or more gateway instances requested to be created based on the instance creation request. The cloud management platform 10 creates gateway instances that meet the number of instances and associates the instance identifier of each gateway instance with the group identifier.

[0199] In a third optional implementation, the instance creation request includes the number of gateway instances requested to be created, the group identifier, the instance identifier, and the instance type information. Relative to the second optional implementation, in the third optional implementation, the cloud management platform 10 further marks the instance type of the created gateway instance based on the instance type information. Alternatively, the cloud management platform 10 further marks the instance type of the anti-affinity group based on the instance type information.

[0200] It is worth noting that in some cases, the instance types of the gateway instances in the same anti-affinity group are the same, or in other cases, the instance types of the gateway instances in the same anti-affinity group are different.

[0201] The above three optional implementation methods are only different implementation methods for the cloud management platform 10 to create multiple gateway instances in an anti-affinity group based on an instance creation request. In other embodiments, the cloud management platform 10 may also use other implementation methods to create gateway instances. This application is not limited to this. For example, the cloud server side generates instance creation guidance information based on the instance creation request, and the instance creation guidance information includes the instance status of each fault domain in the anti-affinity group and the estimated instance creation results. After the client 20 confirms the instance creation request according to the instance creation guidance information, the cloud management platform 10 creates an instance in the anti-affinity group based on the instance creation guidance information.

[0202] The instance status of each fault domain includes: the fault domain is associated with a gateway instance or the fault domain is not associated with a gateway instance. The estimated instance creation result includes: the gateway instance is successfully created or the gateway instance is failed.

[0203] S340, for a first gateway instance among the multiple gateway instances, the cloud management platform 10 schedules the first gateway instance to a first cluster of the infrastructure.

[0204] The first gateway instance is any gateway instance that needs to be scheduled among the multiple gateway instances. Figure 3 As shown, the first gateway instance is gateway instance i, where i is a positive integer less than or equal to S.

[0205] The first cluster includes M hosts among the multiple hosts, and the fault domain where the first cluster is located is different from the fault domain where other clusters with gateway instances are scheduled. M is an integer greater than or equal to 1, and M is less than the number of hosts in the computing cluster 110. Figure 3 As shown, the first cluster includes host 111 and host 112 .

[0206] In an optional implementation, the cloud management platform 10 initializes multiple clusters in the infrastructure. In an implementation of scheduling the first gateway instance, the cloud management platform 10 determines multiple candidate clusters in the multiple clusters that do not have gateway instances scheduled. The cloud management platform 10 selects a first cluster from the multiple candidate clusters. The cloud management platform 10 schedules the first gateway instance to the first cluster.

[0207] In an optional implementation, it can be known from the above description of the gateway instance that the gateway instance includes a drainage entity and a gateway entity, and a corresponding cluster includes a gateway subcluster and a drainage subcluster. Among them, the gateway subcluster is used to provide the gateway entity of the gateway instance. The drainage subcluster is used to provide the drainage entity of the gateway instance. In some optional ways, the gateway subcluster can also be called a gateway node cluster, a gateway cluster, and the drainage subcluster can also be called a drainage cluster, which is not limited in the embodiments of the present application.

[0208] Similarly, the first cluster includes the first gateway sub-cluster and the first drainage sub-cluster. In the implementation of scheduling the first gateway instance to the first cluster, the cloud management platform 10 uses the first gateway sub-cluster in the first cluster as the first gateway entity in the first gateway instance, and uses the first drainage sub-cluster in the first cluster as the first drainage entity of the first gateway instance.

[0209] In an optional implementation, "multiple candidate clusters that do not have a scheduled gateway instance" may refer to a cluster that does not have a scheduled gateway instance that belongs to the same anti-affinity group as the first gateway instance. That is, the candidate cluster may schedule gateway instances that belong to other anti-affinity groups. Alternatively, "multiple candidate clusters that do not have a scheduled gateway instance" may also refer to a cluster that does not have any scheduled gateway instance.

[0210] The above S340 uses the first gateway instance to illustrate the gateway instance scheduling process of the cloud management platform 10. In some optional schemes, the cloud management platform 10 can also schedule the second gateway instance to the second cluster of the infrastructure. The second gateway instance is other gateway instances among multiple gateway instances except the first gateway instance. The second cluster is a cluster in the infrastructure of the cloud management platform 10 that matches the second gateway instance. The implementation method of the cloud management platform 10 scheduling the second gateway instance to the second cluster can refer to the scheduling process of the first gateway instance.

[0211] The following describes how the cloud management platform 10 initializes multiple clusters.

[0212] In an optional implementation, the cloud management platform 10 may initialize multiple clusters in the infrastructure based on the fault domain level of the anti-affinity group, wherein the number of clusters is the same as the number of fault domains included in the anti-affinity group.

[0213] For example, the fault domain level of the anti-affinity group is the availability zone level. The cloud management platform 10 treats the hosts in the same availability zone in the infrastructure as a cluster based on the availability zone to which the hosts belong. Alternatively, the cloud management platform 10 deploys virtual machines on hosts in the same availability zone in the infrastructure based on the availability zone to which the hosts belong, and treats the virtual machines deployed on the hosts in the same availability zone as a cluster.

[0214] For another example, the fault level of the anti-affinity group is the group level. The cloud management platform 10 treats the hosts belonging to the same group in the infrastructure as a cluster based on the group to which the hosts belong. Alternatively, the cloud management platform 10 deploys virtual machines on the hosts belonging to the same group in the infrastructure based on the group to which the hosts belong, and treats the virtual machines deployed on the hosts in the same group as a cluster.

[0215] For another example, the fault level of the anti-affinity group is the host level. The cloud management platform 10 regards a host in the infrastructure as a cluster. Alternatively, the cloud management platform 10 deploys one or more virtual machines on each host. One or more virtual machines deployed on a host are regarded as a cluster.

[0216] The above are only different implementations of initializing a cluster based on the fault level of an anti-affinity group. In other embodiments, there may be other implementations of initializing a cluster. For example, the cluster may be initialized based on the number of gateway instances and the fault level of an anti-affinity group. For another example, the cloud management platform 10 may also initialize a cluster based on the instance type of an anti-affinity group. This is not limited in the embodiments of the present application.

[0217] The following describes how to implement cluster initialization based on the number of gateway instances and the failure level of the anti-affinity group.

[0218] In an optional implementation, the cloud management platform 10 initializes a cluster in the infrastructure that satisfies the number of gateway instances based on the fault domain level of the anti-affinity group.

[0219] For example, the fault domain level of the anti-affinity group is the availability zone level. The cloud management platform 10 selects a candidate availability zone that satisfies the number of gateway instances based on multiple availability zones in the infrastructure. The cloud management platform 10 treats a candidate availability zone as a cluster. Alternatively, the cloud management platform 10 deploys virtual machines on hosts in a candidate availability zone and treats the virtual machines deployed on hosts in a candidate availability zone as a cluster.

[0220] For another example, the fault level of the anti-affinity group is the unit level. The cloud management platform 10 selects a candidate unit that meets the number of gateway instances based on multiple units in the infrastructure. The cloud management platform 10 regards a candidate unit as a cluster. Alternatively, the cloud management platform 10 deploys virtual machines on the host of each candidate unit and regards the virtual machines deployed on all hosts in a candidate unit as a cluster.

[0221] For another example, the fault level of the anti-affinity group is the host level. The cloud management platform 10 selects a candidate host that satisfies the number of gateway instances based on multiple hosts in the infrastructure. The cloud management platform 10 treats a candidate host as a cluster. Alternatively, the cloud management platform 10 deploys one or more virtual machines on a candidate host and treats the one or more virtual machines deployed on a candidate host as a cluster.

[0222] The following is an exemplary description of how to initialize a cluster based on the instance type of a gateway instance.

[0223] In an optional implementation, the instance type of the anti-affinity group is cross-availability zone. The cloud management platform 10 initializes multiple clusters based on multiple units in the infrastructure.

[0224] For example, the cloud management platform 10 initializes multiple clusters based on multiple units in the infrastructure, referring to the above-mentioned implementation method of the fault domain level based on the anti-affinity group. The embodiments of the present application are not described in detail here.

[0225] For another example, the cloud management platform 10 can initialize multiple clusters based on multiple groups in the infrastructure, referring to the implementation of initializing clusters based on the number of gateway instances and the fault level of the anti-affinity group. The embodiments of the present application are not described in detail here.

[0226] In addition, in some optional situations, the instance type of the anti-affinity group may also be non-cross-availability zone. In the case where the instance type of the anti-affinity group is non-cross-availability zone, the cloud management platform 10 may initialize the availability zone based on the fault level of the anti-affinity group.

[0227] For example, the cloud management platform 10 initializes multiple clusters based on multiple units in the infrastructure. For another example, the cloud management platform 10 initializes multiple clusters based on multiple availability zones in the infrastructure.

[0228] The above mainly describes the implementation method of initializing the cluster. The following describes the implementation method of selecting the first cluster.

[0229] In a first optional implementation manner, the cloud management platform 10 may select any candidate cluster from the candidate clusters as the first cluster.

[0230] In a second optional implementation, the cloud management platform 10 may select a first cluster from multiple candidate clusters based on the resource specifications of the first gateway instance.

[0231] The first cluster is a candidate cluster whose specifications meet the resource specifications of the first gateway instance. For example, a candidate cluster whose specifications are greater than or equal to the resource specifications of the first gateway instance is taken as the first cluster.

[0232] The gateway instance specification may be set by the user, or the gateway instance specification may be configured by the cloud management platform 10 itself, which is not limited in the embodiment of the present application.

[0233] It should be noted that the above two optional implementation methods are only different implementation methods for selecting the first cluster. In practical applications, other implementation methods can also be used. For example, when there is no candidate cluster whose specifications meet the resource specifications of the first gateway instance among multiple candidate clusters, the cloud management platform 10 can initialize the first cluster that meets the resource specifications of the first gateway instance from the resource pool of the cloud platform. This is not limited in the embodiments of the present application.

[0234] In an optional implementation, after the first gateway instance is scheduled to the first cluster, a next first gateway instance is selected, and the above S340 is executed to schedule the next gateway instance until multiple gateway instances in the anti-affinity group are all scheduled to corresponding clusters.

[0235] It is worth noting that in the embodiments of the present application, the execution order of the above S330 and S340 is not limited. For example, in some optional implementations, after the cloud management platform 10 creates multiple gateway instances in the anti-affinity group, it schedules the multiple gateway instances in the anti-affinity group, that is, executes in the execution order of S330→S340. For another example, in other optional implementations, the cloud management platform 10 initializes multiple clusters according to the fault domain level of the anti-affinity group. In the implementation of creating a gateway instance based on an instance creation request, the cloud management platform 10 schedules the gateway instance created based on an instance creation request to the cluster, and then creates a gateway instance based on the next instance creation request. That is, it is executed in the execution order of S330→S340→S330.

[0236] The following takes the fault domain as an example. Figure 5 The implementation method of the scheduling gateway instance is described.

[0237] like Figure 5 As shown, Figure 5 A schematic diagram of a process flow of a scheduling gateway instance provided in an embodiment of the present application. The process flow of the scheduling gateway instance includes phases ① to ③.

[0238] In stage ①, the cloud management platform 10 initializes cluster 1 in unit 1 of the infrastructure and initializes cluster 2 in unit 2. Unit 1 is in fault domain 1, and unit 2 is in fault domain 2.

[0239] Cluster 1 includes gateway sub-cluster 1 and traffic diversion sub-cluster 1. Cluster 2 includes gateway sub-cluster 2 and traffic diversion sub-cluster 2.

[0240] Phase ②: the cloud management platform 10 creates a gateway instance 1 in the anti-affinity group. The gateway entity 1 of the gateway instance 1 is located in the gateway subcluster 1. The drainage entity 1 of the gateway instance 1 is located in the drainage subcluster 1.

[0241] Phase ③: the cloud management platform 10 creates a gateway instance 2 in the anti-affinity group. The gateway entity 2 of the gateway instance 2 is located in the gateway subcluster 2. The drainage entity 2 of the gateway instance 2 is located in the drainage subcluster 2.

[0242] In stage ③, since gateway instance 1 has been created in cluster 1 in stage ②, the cloud management platform 10 creates gateway instance 2 in cluster 2 where no gateway instance has been scheduled.

[0243] It is worth noting that in Figure 5 In the provided embodiment, gateway instance 1 is scheduled to cluster 1. In other cases, the cloud management platform 10 may also schedule gateway instance 1 to cluster 2. Accordingly, when gateway instance 1 is scheduled to cluster 2, the cloud management platform 10 schedules gateway instance 2 to cluster 1.

[0244] In addition, the above Figure 5 The description is made by taking the anti-affinity group including two gateway instances as an example. In actual applications, the anti-affinity group may include more gateway instances, and the corresponding cloud management platform 10 may initialize more clusters. This is not limited in the embodiments of the present application.

[0245] based on Figure 3 In the provided embodiment, multiple gateway instances are created in an anti-affinity group, and the first gateway instance among the multiple gateway instances is scheduled to the first cluster of the infrastructure, and it is ensured that the fault domain where the first cluster is located is different from the fault domain where other clusters where gateway instances are scheduled are located. In this way, the anti-affinity between gateway instances deployed in different fault domains is ensured, so that the explosion radius of different gateway instances is different. When one gateway instance fails, the remaining gateway instances can operate normally, thereby improving overall reliability. In addition, the anti-affinity between multiple gateway instances is guaranteed by the anti-affinity group, so that users do not need to configure the anti-affinity between multiple gateway instances by themselves, which can greatly simplify the difficulty of users deploying multiple gateway instances.

[0246] The following is an exemplary description of the implementation method in which the cloud management platform 10 responds to the first request and creates an anti-affinity group.

[0247] In an optional implementation, to ensure high availability of the gateway, in the above S310, the cloud management platform 10 can respond to the first request and obtain the requirement information for creating an anti-affinity group. The cloud management platform 10 determines the creation guidance information of the anti-affinity group based on the requirement information for creating the anti-affinity group, and creates the anti-affinity group based on the creation guidance information. In this way, the reliability of the gateway instance in the anti-affinity group is ensured.

[0248] The creation guidance information includes the fault domain level of the anti-affinity group, the number of instance requirements, and the maximum resource specification of the gateway instance. The maximum resource specification of the gateway instance can be determined by the cloud management platform 10 based on the target application type. Alternatively, the maximum resource specification of the gateway instance can also be set by the user. This is not limited in the embodiments of the present application.

[0249] In an optional implementation, the demand information includes a target application type and a target SLA. The cloud management platform 10 generates a plurality of candidate creation guidance information based on the target application type. The cloud management platform 10 simulates candidate anti-affinity groups under different candidate creation guidance information. And obtains SLA indicators of different candidate anti-affinity groups. An anti-affinity group is created based on the candidate creation guidance information corresponding to the candidate anti-affinity group that meets the target SLA.

[0250] Different candidate creation guidance information has different fault domain levels, and different candidate creation guidance information has different instance requirement quantities.

[0251] The candidate anti-affinity group that meets the target SLA may be a candidate anti-affinity group whose SLA index is greater than or equal to the target SLA.

[0252] The following describes how to obtain SLA indicators.

[0253] The cloud management platform 10 calculates the SLA index based on the fault domain level, instance requirement number, and fault rate of the candidate anti-affinity group, wherein the fault rate includes the fault rate of each fault domain in the multiple fault domains included in the candidate anti-affinity group.

[0254] Take the creation guidance information of the candidate anti-affinity group as follows: the fault domain level is the group and the number of instances required is S. Therefore, the candidate anti-affinity group includes S fault domains, that is, the S gateway instances are distributed in the S groups corresponding to the anti-affinity group. If the failure rate of the fault domain is p, the SLA index of the candidate anti-affinity group can be calculated by the following formula (1). Where,

[0255]

[0256] Wherein, i is a positive integer greater than 1 and less than S.

[0257] For example, when the instance requirement quantity S is 2 and the failure rate p is 99.9%, the SLA indicator of the candidate anti-affinity group can be obtained as 99.9999% by formula (1).

[0258] In addition, in some other optional situations, the demand information includes: target application type, target SLA, anti-affinity group identifier, and fault domain level of the anti-affinity group. In the case where the demand information also includes the anti-affinity group identifier and the fault domain level of the anti-affinity group, the cloud management platform 10 can create the anti-affinity group in other implementation methods.

[0259] For example, in an optional implementation, the cloud management platform 10 can obtain SLA indicators under different candidate instance demand quantities based on the fault domain level of the anti-affinity group. The target candidate instance demand quantity whose SLA indicator meets the target SLA is selected from multiple candidate instance demand quantities. The cloud management platform 10 determines the maximum resource specification of the gateway instance based on the target application type. The cloud management platform 10 generates creation guidance information based on the target candidate instance demand quantity, the maximum resource specification, and the fault domain level of the anti-affinity group. The cloud management platform 10 creates an anti-affinity group based on the creation guidance information, and associates the anti-affinity group identifier with the created anti-affinity group.

[0260] Among them, the cloud management platform 10 can refer to the above formula (1) to obtain the SLA indicators under different candidate instance demand quantities, which is not repeated in the embodiments of the present application.

[0261] The following two specific examples are used to illustrate the required number of target candidate instances.

[0262] In a first optional example, among the multiple candidate instance requirement quantities, there is a candidate instance requirement quantity whose SLA indicator satisfies the target SLA. The cloud management platform 10 uses the candidate instance requirement quantity whose SLA indicator satisfies the target SLA as the target candidate instance requirement quantity.

[0263] In the second optional example, there are multiple candidate instance demand quantities whose SLA indicators meet the target SLA. The cloud management platform 10 uses the maximum value of the multiple candidate instance demand quantities that meet the target SLA as the target candidate instance demand quantity, thereby using more gateway instances to improve the reliability of the gateway.

[0264] In a third optional example, there are multiple candidate instance requirements whose SLA indicators meet the target SLA among the multiple candidate instance requirements. The cloud management platform 10 uses the minimum value among the multiple candidate instance requirements that meet the target SLA as the target candidate instance requirement, so that a smaller number of gateway instances are used to ensure the reliability of the gateway.

[0265] The above three examples are only optional methods with different required numbers of target candidate instances. In practical applications, there may be other methods, which are not limited in the embodiments of the present application.

[0266] In addition, in some optional situations, the demand information includes: target application type, target SLA, anti-affinity group identifier, fault domain level of the anti-affinity group, gateway instance specifications, and required number of instances. In the case where the demand information also includes the required number of instances and gateway instance specifications, the cloud management platform 10 can obtain creation guidance information based on the fault domain level, gateway instance specifications, and required number of instances of the anti-affinity group in the demand information. The cloud management platform 10 creates an anti-affinity group based on the creation guidance information, and associates the anti-affinity group identifier with the created anti-affinity group.

[0267] The above mainly describes different implementations of the cloud management platform 10 creating anti-affinity groups based on demand information. In other embodiments, the cloud management platform 10 can also have other implementations of creating anti-affinity groups. This is not limited in the embodiments of the present application.

[0268] For example, the cloud management platform 10 generates an anti-affinity group calculation result according to the demand information provided by the first request. The cloud management platform 10 provides the anti-affinity group calculation result to the client 20. The anti-affinity group calculation result includes: SLA indicators.

[0269] After the client 20 obtains the anti-affinity group calculation result, the user can modify the first request according to the anti-affinity group calculation result. For example, the user can modify one or more of the fault domain level, gateway instance specification, and instance requirement quantity in the first request. The cloud management platform 10 creates the anti-affinity group again based on the requirement information indicated by the modified first request.

[0270] Alternatively, after the client 20 obtains the anti-affinity group calculation result, the user inputs an anti-affinity group calculation result confirmation operation. The cloud management platform 10 receives the anti-affinity group calculation result confirmation operation and creates an anti-affinity group according to the requirement information indicated by the first request.

[0271] In an optional implementation, to ensure high availability of the gateway, after scheduling multiple gateway instances in an anti-affinity group to clusters in different fault domains, the multiple gateway instances belonging to the same anti-affinity group can operate in an active-active mode or an active-standby mode.

[0272] The master-master mode means that multiple data flows between the client 20 and the cloud platform are processed by multiple gateway instances of the anti-affinity group, and different gateway instances process different data flows.

[0273] The master-slave mode refers to the cloud management platform 10 dividing multiple gateway instances of the anti-affinity group into master gateway instances and backup gateway instances. The master gateway instance processes multiple data flows between the client 20 and the cloud platform. In the event of a failure of the master gateway instance, the cloud management platform 10 switches the transmission node of the data flow from the master gateway instance to the backup gateway instance.

[0274] The following combination Figure 6 to Figure 7 The master-master mode and the master-standby mode are exemplarily described respectively.

[0275] First, the master-master mode will be described.

[0276] See also Figure 6 , Figure 6 A schematic diagram of the master-master mode provided for an embodiment of the present application. Anti-affinity group 1 includes gateway instance 1 and gateway instance 2, gateway instance 1 is respectively connected to the load balancer 121 and the virtual machine 1 in the VPC in communication, and gateway instance 2 is respectively connected to the load balancer 121 and the virtual machine 1 in the VPC in communication. Among them, virtual machine 1 is used to process business 1. In some optional ways, gateway instance 1 can also be called the first gateway instance, and gateway instance 2 can be called the second gateway instance.

[0277] When the cloud management platform 10 receives multiple data streams of service 1, the cloud management platform 10 controls the load balancer 121 to dispatch the multiple data streams to gateway instance 1 and gateway instance 2. Gateway instance 1 and gateway instance 2 pass the data streams they receive to virtual machine 1. In this way, using multiple gateway instances to forward data streams in parallel can improve the efficiency of data stream forwarding.

[0278] like Figure 6 As shown in FIG. 1 (a), the data streams of service 1 received by the cloud management platform 10 include: data stream 1, data stream 2, data stream 3, and data stream 4. The load balancer 121 schedules data stream 1 and data stream 2 to gateway instance 1, and schedules data stream 3 and data stream 4 to gateway instance 2.

[0279] In an optional implementation, the load balancer 121 may obtain the hash value of each data flow according to the hash rule, and determine the gateway instance to forward the data flow based on the hash value of the data flow. For example, the load balancer 121 calculates the remainder of the hash value of the data flow to 2, and when the remainder is 0, the gateway instance 1 is used as the gateway instance to forward the data flow. When the remainder is 1, the gateway instance 2 is used as the gateway instance to forward the data flow.

[0280] In an optional implementation, the load balancer 121 obtains the instance status of gateway instance 1 and gateway instance 2. The instance status includes normal or faulty. When the load balancer 121 determines that the instance status of gateway instance 1 (or gateway instance 2) is faulty, the load balancer 121 switches the gateway instance that forwards the data flow from gateway instance 1 and gateway instance 2 to gateway instance 2 (or gateway instance 1). In this way, by using multiple gateway instances, when a gateway instance fails, it can automatically switch to other normal gateway instances. This ensures the high availability of the gateway.

[0281] It should be noted that in the embodiment of the present application, there is no limitation on the load balancer 121 obtaining the instance status of the gateway instance 1 and the gateway instance 2. For example, the load balancer 121 can obtain the instance status of the gateway instance 1 and the gateway instance 2 in any of the following ways: heartbeat detection, active detection, passive detection, and port check.

[0282] like Figure 6 As shown in Figure (b), the instance status of gateway instance 1 is faulty, and the load balancer 121 switches the transmission node of data flow 1 and data flow 2 from gateway instance 1 to gateway instance 2. At this time, gateway instance 2 forwards data flow 1, data flow 2, data flow 3 and data flow 4.

[0283] In addition, in some other optional situations, when the failed gateway instance returns to normal, the load balancer 121 directs the data flow received according to the hash rule to the gateway instance that has returned to normal.

[0284] like Figure 6 As shown in FIG. 1 (c), when the instance status of gateway instance 1 is normal, the load balancer 121 directs the received data stream 5 and data stream 6 to gateway instance 1. At this time, gateway instance 2 forwards data stream 1, data stream 2, data stream 3, and data stream 4, and gateway instance 1 forwards data stream 5 and data stream 6.

[0285] In addition, in some other optional situations, when the instance status of gateway instance 1 and gateway instance 2 are both faulty, the cloud management platform 10 creates a gateway instance 3 in anti-affinity group 1 based on the instance specification of gateway instance 1 or gateway instance 2. Gateway instance 3 is used as a transmission node for forwarding the data flow of service 1.

[0286] like Figure 6 As shown in (d) of FIG. 1 , the instance status of gateway instance 1 and gateway instance 2 is faulty. Gateway instance 3 is added to anti-affinity group 1, and load balancer 121 switches the transmission node of data stream 1 and data stream 2 from gateway instance 1 to gateway instance 3. Load balancer 121 switches the transmission node of data stream 3 and data stream 4 from gateway instance 2 to gateway instance 3.

[0287] based on Figure 6 According to the provided embodiment, multiple gateway instances belonging to the same anti-affinity group can run in master-master mode and forward data streams in parallel, which can improve the data stream forwarding efficiency. When a gateway instance fails, it can automatically switch to other normal gateway instances, thereby ensuring the high availability of the gateway.

[0288] Next, the master-slave mode is explained.

[0289] See also Figure 7 , Figure 7 A schematic diagram of the master-slave mode provided in an embodiment of the present application. Figure 6 In the master-master mode shown in FIG. (a), in the master-slave mode, when the cloud management platform 10 receives multiple data streams of service 1, the cloud management platform 10 controls the load balancer 121 to dispatch the multiple data streams to the master gateway instance. The master gateway instance transmits the data stream to virtual machine 1. In this way, redundant gateway instances are provided to improve the reliability of the gateway.

[0290] like Figure 7 As shown in (a) of FIG. 1 , gateway instance 1 is used as the main gateway instance, and gateway instance 2 is used as the backup gateway instance. The data streams of service 1 received by the cloud management platform 10 include: data stream 1, data stream 2, data stream 3, and data stream 4. The load balancer 121 schedules data stream 1, data stream 2, data stream 3, and data stream 4 to gateway instance 1. In some optional embodiments, gateway instance 1 can also be called the first gateway instance, and gateway instance 2 can be called the second gateway instance.

[0291] In an optional implementation, the load balancer 121 obtains the instance status of the gateway instance 1 and the gateway instance 2. When the load balancer 121 determines that the instance status of the gateway instance 1 is faulty, the load balancer 121 switches the gateway instance that forwards the data flow from the gateway instance 1 to the gateway instance 2. In this way, by using the active and standby gateway instances, when the active gateway instance fails, it can automatically switch to the standby gateway instance. This ensures the high availability of the gateway.

[0292] like Figure 7 As shown in FIG. 1( b ), the instance status of gateway instance 1 is faulty, and the main gateway instance is changed from gateway instance 1 to gateway instance 2, and gateway instance 1 serves as a backup gateway instance. The load balancer 121 switches the transmission nodes of data stream 1, data stream 3, and data stream 4 from gateway instance 1 to gateway instance 2.

[0293] based on Figure 7The provided embodiment can provide redundant gateway instances when multiple gateway instances belonging to the same anti-affinity group are running in the master-slave mode, thereby improving the reliability of the gateway. When the master gateway instance fails, it can automatically switch to the backup gateway instance, thereby ensuring the high availability of the gateway.

[0294] Above Figure 6 and Figure 7 The switching method of the transmission node of the data flow in the master-master mode and the master-standby mode of the gateway instance in the anti-affinity group is mainly described. In other embodiments, when the type of the gateway instance in the anti-affinity group is cross-availability zone, the first gateway instance in the anti-affinity group is a cross-availability zone instance, and the second gateway instance in the anti-affinity group is a cross-availability zone instance. When the cloud management platform 10 switches the transmission node of the data flow from the first gateway instance to the second gateway instance, the switching of the transmission node of the data flow is realized according to the availability zone where the gateway entity and the diversion entity in the first gateway instance are located.

[0295] The following is an exemplary description of the switching method of the transmission node of the data flow across the availability zones.

[0296] In an optional implementation, the first gateway instance includes multiple first gateway entities; different first gateway entities correspond to different availability zones. The second gateway instance includes multiple second gateway entities; different second gateway entities correspond to different availability zones.

[0297] Take the first gateway instance as gateway instance 1 and the second gateway instance as gateway instance 2 as an example. Figure 8 As shown, Figure 8 The figure is a schematic diagram of switching transmission nodes for data flow across availability zones.

[0298] like Figure 8 As shown in (a) of FIG. 1 , fault domain 1 includes gateway subcluster 1 and drainage subcluster 1. Fault domain 2 includes gateway subcluster 2 and drainage subcluster 2. Gateway instance 1 includes gateway entity 1-1, gateway entity 1-2, drainage entity 1-1, and drainage entity 1-2. Gateway instance 2 includes gateway entity 2-1, gateway entity 2-2, drainage entity 2-1, and drainage entity 2-2.

[0299] Among them, the gateway entity 1-1, the flow diversion entity 1-1, the gateway entity 2-1 and the flow diversion entity 2-1 are located in the availability zone 1. The gateway entity 1-2, the flow diversion entity 1-2, the gateway entity 2-2 and the flow diversion entity 2-2 are located in the availability zone 2.

[0300] like Figure 8As shown in Figure (a), gateway instance 1 forwards data stream 1 and data stream 2 in service 1, where data stream 1 is forwarded by gateway entity 1-1 and traffic diversion entity 1-1 in availability zone 1. Data stream 2 is forwarded by gateway entity 1-2 and traffic diversion entity 1-2 in availability zone 2.

[0301] In an optional implementation, when the first gateway instance fails, the cloud management platform 10 switches the transmission node of the data flow of the first gateway entity in the first availability zone to the second gateway entity in the first availability zone.

[0302] The first availability zone may be an availability zone where any first gateway entity in the first gateway instance is located.

[0303] like Figure 8 As shown in (b) of FIG. 1 , the instance status of gateway instance 1 is faulty, and the cloud management platform 10 switches the transmission nodes of data stream 1 and data stream 2 from gateway instance 1 to gateway instance 2. Moreover, data stream 1 is forwarded by gateway entity 2-1 and flow diversion entity 2-1 in availability zone 1. Data stream 2 is forwarded by gateway entity 2-2 and flow diversion entity 2-2 in availability zone 2.

[0304] based on Figure 8 In the provided embodiment, when switching the transmission node of the data flow across availability zones, the data flow within the same availability zone is forwarded by the second gateway entity within the availability zone without detouring the availability zone, thereby shortening the transmission time of the data flow and further reducing the transmission delay.

[0305] Above Figures 3 to 8 The technical solution provided by this application is mainly described from the perspective of the interaction between the cloud management platform 10 and the client 20. Figures 9 to 12 The interactive interface between the cloud management platform 10 and the client 20 is exemplarily described.

[0306] First, an interactive interface for creating an anti-affinity group is exemplarily described.

[0307] In an optional implementation, the cloud management platform 10 provides the client 20 with an anti-affinity group creation interface. Fig. 9 As shown in FIG. 1( a ), the anti-affinity group creation interface displays an “anti-affinity group creation” control. The user clicks the “anti-affinity group creation” control in the anti-affinity group creation interface, and the client 20 sends a first request to the cloud management platform 10 .

[0308] The cloud management platform 10 responds to the first request and provides Fig. 9 The first interface shown in FIG. (b) in FIG. The first interface displays an anti-affinity group input box. The client 20 displays Fig. 9In the first interface shown in FIG. (b), the user inputs a first operation based on the anti-affinity group input box in the first interface. In response to the first operation, the cloud management platform 10 provides the following Fig. 9 The second interface shown in FIG. 10( c ) ...

[0309] The user clicks the "Confirm Creation" control in the second interface to input the second operation, and the cloud management platform 10 creates an anti-affinity group in response to the second operation. When the cloud management platform 10 receives the user's input operation on the "Cancel Control" in the second interface, the cloud management platform 10 provides the following Fig. 9 The first interface shown in FIG. (b) in FIG. Or the cloud management platform 10 provides Fig. 9 The anti-affinity group creation interface shown in Figure (a)

[0310] Taking the first operation as an example, the implementation form of the first operation is described. Similarly, the implementation form of the second operation can refer to the implementation form of the first operation.

[0311] The first operation may be a contact operation, such as a touch operation such as a light touch, a long press, a slide, a double click, a single click, etc. Alternatively, the first operation may be a non-contact operation, such as a gesture input, a physical button, a voice input, etc. Alternatively, the first operation may be a typing operation, such as a typing operation through a mouse or a typing operation through a keyboard.

[0312] In another case, the anti-affinity group creation interface provided by the cloud management platform 10 may also include a requirement information input box, through which the user inputs requirement information for creating an anti-affinity group. The client 20 sends a first request to the cloud management platform 10 based on the requirement information for creating an anti-affinity group input by the user.

[0313] Take the anti-affinity group ID as an example for explanation. Fig. 9 The anti-affinity group creation interface provided is Fig.10 The anti-affinity group creation interface shown in FIG. (a) also includes a requirement information input box. The requirement information input box includes the following items that need to be input by the user: an anti-affinity group identifier.

[0314] The user clicks the requirement information input box in the anti-affinity group creation interface to enter the requirement information, such as Fig.10 As shown in Figure (b), the required information input box in the anti-affinity group creation interface includes the following content: Anti-affinity group identifier: Group 1.

[0315] User clicks Fig.10The client 20 sends a first request to the cloud management platform 10 by clicking the "Anti-Affinity Group Creation" control in the anti-affinity group creation interface shown in FIG. (b) of FIG. 1 . The cloud management platform 10 creates an anti-affinity group according to the demand information carried in the first request.

[0316] Next, an example description is given of an interactive interface for obtaining an instance creation request.

[0317] In an optional implementation, the second interface provides an anti-affinity group query box and a query control. Fig. 9 Take the second interface provided in Figure (c) as an example. Fig.11A As shown in FIG. 1( a ), the second interface provides an anti-affinity group query box and a query control. The user inputs a third operation based on the anti-affinity group query box in the second interface.

[0318] In response to the third operation, the cloud management platform 10 fills the content input by the third operation into the anti-affinity group query box, and provides Fig.11A The third interface shown in FIG. 1 (b) in the third interface includes the anti-affinity group query box.

[0319] User clicks Fig.11A The fourth operation is input into the query control in the third interface shown in FIG. (b). The cloud management platform 10 provides the number of instances of the anti-affinity group corresponding to the anti-affinity group identifier and an instance creation control. The user clicks the instance creation control to send an instance creation request to the cloud management platform 10.

[0320] The number of instances of the anti-affinity group includes the number of gateway instances associated with the anti-affinity group and the total number of gateway instances supported by the anti-affinity group for association. The total number of gateway instances supported by the anti-affinity group for association may also be referred to as the required number of instances.

[0321] For example, in response to the fourth operation, the cloud management platform 10 provides a query result page of group 1 in the third interface. Fig.11A As shown in Figure (c), the first line of the query result page of group 1 displays: "Name", "Number of Instances" and "Operation", and the second line displays: Group 1, 1 / 2, "Add Instance" control and "Delete" control. Among them, "1 / 2" is used to indicate that the total number of gateway instances that support association in the anti-affinity group named Group 1 is 2, and the number of gateway instances associated with the anti-affinity group is 1. The user clicks the "Add Instance" control to send an instance creation request to the cloud management platform 10.

[0322] For another example, in response to the fourth operation, the cloud management platform 10 provides Fig.11AThe fourth interface shown in FIG. (d) in FIG. The fourth interface includes: anti-affinity group identifier: group 1, number of instances: 1 / 2, "add instance" control and "delete" control. The user clicks the "add instance" control in the fourth interface to enter the fifth operation, and the cloud management platform 10 obtains the instance creation request in response to the fifth operation.

[0323] In an optional scenario, the cloud management platform 10 provides an instance creation interface in response to the fifth operation, such as Fig. 11B As shown in FIG. (a) in FIG. 1 , the instance creation interface displays an “instance creation” control and an anti-affinity group identifier: group 1. The user clicks the “instance creation” control, and the client 20 sends a second request to the cloud management platform 10 .

[0324] In response to the second request, the cloud management platform 10 provides Fig. 11B The fifth interface shown in FIG. (b) of FIG. The fifth interface includes: an anti-affinity group input box, an instance input box, a "cancel" control, and an "OK" control. The anti-affinity group input box includes: Group 1.

[0325] The user inputs a sixth operation based on the fifth interface, and the cloud management platform 10 obtains an instance creation request in response to the sixth operation.

[0326] In another optional scenario, an anti-affinity group input box and an "instance creation" control are displayed in the instance creation interface. Fig. 11C As shown in Figure (a).

[0327] The user clicks the anti-affinity group input box in the instance creation interface to input an identification input operation, and the cloud management platform 10 responds to the identification input operation and provides the following Fig. 11C The instance creation interface shown in Figure (b) of the Fig. 11C In the example creation interface shown in Figure (b), the anti-affinity group input box includes: Group 1. The user clicks Fig. 11C In (b) of the figure, the "OK" control in the second sub-operation is input, and the client 20 sends a second request to the cloud management platform 10 based on the data content in the instance input box. The cloud management platform 10 responds to the second request and provides Fig. 11B The fifth interface shown in Figure (b).

[0328] Among them, the identification input operation can be a data input, or a selection operation, which is not limited in the embodiments of the present application.

[0329] Finally, the interactive interface for creating a gateway instance is explained.

[0330] In an optional implementation, the cloud management platform 10 responds to the first instance creation request among the multiple instance creation requests and provides: Fig.12The sixth interface shown includes: creating XX1 gateway instance, anti-affinity group identifier: group 1, instance identifier: XX1, and a "confirm" control.

[0331] The user clicks the "Confirm" control to input the seventh operation, and the cloud management platform 10 creates a first gateway instance XX1 in the anti-affinity group corresponding to group 1 in response to the seventh operation, and associates the first gateway instance XX1 with group 1.

[0332] The above mainly introduces the technical solution provided by the embodiment of the present application from the perspective of the interaction between the cloud management platform 10 and the client 20. It is understandable that the cloud management platform 10 includes hardware structures and / or software modules corresponding to the execution of various functions. It is easy for those skilled in the art to realize that, in combination with the algorithm steps of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0333] The embodiment of the present application can group the functional modules of the cloud management platform 10 according to the above method example. For example, each functional module can be grouped according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the naming and grouping of the module groups in the embodiment of the present application are schematic, which is only a logical functional grouping. There may be other grouping methods in actual implementation.

[0334] For example, the resource management system deployed in the cloud management platform 10 can also be named as a resource allocation device. Fig.13 As shown, Fig.13 The schematic diagram of the structure of the resource allocation device provided in the embodiment of the present application includes: a communication module 131 , a processing module 132 and a storage module 133 .

[0335] The communication module 131 is used to respond to the first request and obtain multiple instance creation requests. For example, the communication module 131 executes the above Figure 3 S310 and S320 in.

[0336] The processing module 132 is configured to create an anti-affinity group corresponding to the first request, and to create multiple gateway instances in the anti-affinity group according to the multiple instance creation requests; and to schedule the first gateway instance in the multiple gateway instances to the first cluster of the infrastructure. Figure 3 Steps S330 and S340 in .

[0337] The storage module 133 is used to store executable program codes, data of the resource allocation device during the resource allocation process, etc.

[0338] Among them, one gateway instance corresponds to one instance creation request; the anti-affinity group includes multiple fault domains, and the gateway instances deployed in different fault domains have anti-affinity, and the fault domain is an availability zone, a host group or a host; the first cluster includes M hosts among multiple hosts, and the fault domain where the first cluster is located is different from the fault domain where other clusters with gateway instances scheduled are located.

[0339] Among them, the communication module 131, the processing module 132 and the storage module 133 can be implemented by software or by hardware. Exemplarily, the following takes the processing module 132 as an example to introduce the implementation of the processing module 132. Similarly, the communication module 131 and the storage module 133 can refer to the implementation of the processing module 132.

[0340] As an example of a software functional unit, the processing module 132 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the computing instance may be one or more. For example, the processing module 132 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with similar geographical locations. Generally, a region may include multiple AZs.

[0341] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0342] As an example of a hardware functional unit, the processing module 132 may include at least one computing device, such as a server, etc. Alternatively, the processing module 132 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0343] The multiple computing devices included in the processing module 132 can be distributed in the same region or in different regions. The multiple computing devices included in the communication module 131 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the processing module 132 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0344] It should be noted that, in other embodiments, the processing module 132 can be used to execute any step in the resource allocation method. The communication module 131 can be used to execute any step in the resource allocation method. The storage module 133 can be used to execute any step in the resource allocation method. The communication module 131, the processing module 132 and the storage module 133 can be used to execute any step in the resource allocation method. The steps that the communication module 131, the processing module 132 and the storage module 133 are responsible for implementing can be specified as needed. The full functions of the resource allocation device 13 are realized by respectively implementing different steps in the resource allocation method through the communication module 131, the processing module 132 and the storage module 133.

[0345] An embodiment of the present application also provides a computing device for executing the above resource allocation method.

[0346] In one example, the computing device may include: Fig.13 The resource allocation device 13 shown in the figure includes a communication module 131 , a processing module 132 and a storage module 133 .

[0347] In another example, Fig.14 As shown, the computing device 14 includes a bus 142, a processor 144, a memory 146, and a communication interface 148. The processor 144, the memory 146, and the communication interface 148 communicate with each other through the bus 142. The computing device 14 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors 144 and memories 146 in the computing device 14.

[0348] The bus 142 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 The bus 142 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 142 may include a path for transmitting information between various components of the computing device 14 (eg, the memory 146, the processor 144, and the communication interface 148).

[0349] The processor 144 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0350] In the present application, the processor 144 may execute the above Figure 3 A resource allocation method is provided. For example, in response to a first request, an anti-affinity group including multiple fault domains is created in a cloud management platform. Multiple instance creation requests are obtained, multiple gateway instances are created in the anti-affinity group according to the multiple instance creation requests, and a first gateway instance among the multiple gateway instances is scheduled to a first cluster of the infrastructure, and it is ensured that the fault domain where the first cluster is located is different from the fault domain where other clusters where the gateway instances are scheduled are located.

[0351] The memory 146 may include a volatile memory, such as a random access memory (RAM). The processor 144 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0352] The memory 146 stores executable program codes, and the processor 144 executes the executable program codes to respectively implement the functions of the aforementioned communication module 131, processing module 132 and storage module 133, thereby implementing the resource allocation method. That is, the memory 146 stores instructions for executing the resource allocation method.

[0353] The communication interface 148 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 14 and other devices or a communication network.

[0354] The resource allocation method disclosed in the above method embodiment may be applied to the processor 144, or implemented by the processor 144. The processor 144 may be an integrated circuit chip having signal processor capabilities.

[0355] In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 144. The above processor 144 can be a general-purpose processor, including a CPU, a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete electron tubes or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 146, and the processor 144 reads the information in the memory 146 and completes the steps of the above method in combination with its hardware.

[0356] In a possible implementation, the processor 144 may also be used to execute a resource allocation method. For a specific implementation, reference may be made to the embodiments provided in the above resource allocation method, and the embodiments of the present application will not be described in detail herein.

[0357] In the embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.

[0358] The embodiment of the present application also provides a computing device cluster 15 for executing the above resource allocation method.

[0359] In one example, the computing device cluster 15 may include: Fig.13 The resource allocation device 13 shown includes a communication module 131 , a processing module 132 and a storage module 133 .

[0360] In another example, Fig.15 As shown, the computing device cluster 15 includes at least one Fig.14 The computing device 14 shown includes a bus 142, a processor 144, a memory 146, and a communication interface 148. The processor 144, the memory 146, and the communication interface 148 communicate with each other via the bus 142. The computing device 14 may be a server or a terminal device.

[0361] In a possible implementation, one or more computing devices in the computing device cluster 15 may be connected via a network, which may be a wide area network or a local area network. Fig.16 A possible implementation is shown. Fig.16 As shown, two computing devices 14A and 14B are connected via a network. Specifically, they are connected to the network via a communication interface in each computing device. In this type of possible implementation, the memory 146 in the computing device 14A stores instructions for executing the functions of the communication module 131. At the same time, the memory 146 in the computing device 14B stores instructions for executing the functions of the processing module 132 and the storage module 133.

[0362] Fig.16 The connection mode between the computing device clusters shown may be based on the resource allocation method provided by the present application. In the resource allocation process, the creation of anti-affinity groups and the scheduling of gateway instances are involved, which requires the processing of a large amount of data. Therefore, it is considered that the functions implemented by the processing module 132 and the storage module 133 are performed by the computing device 14B, and the functions implemented by the communication module 131 are performed by the computing device 14A.

[0363] It should be understood that Fig.16The functionality of computing device 14A shown in FIG. 1 may also be performed by multiple computing devices 14. Similarly, the functionality of computing device 14B may also be performed by multiple computing devices 14.

[0364] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the above-mentioned resource allocation method.

[0365] For example, when the computer program product is run on at least one computing device, the at least one computing device is caused to execute Figure 3 The resource allocation method shown.

[0366] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by a computer program to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be a terminal of any of the above embodiments, such as: an internal storage unit including a data transmission end and / or a data receiving end, such as a hard disk or memory of a terminal. The above computer-readable storage medium can also be an external storage device of the above terminal, such as a plug-in hard disk equipped on the above terminal, a smart memory card (smart media card, SMC), a secure digital (securedigital, SD) card, a flash card (flash card), etc. Further, the above computer-readable storage medium can also include both the internal storage unit of the above terminal and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above terminal. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.

[0367] It should be noted that the terms "first" and "second" in the specification, claims and drawings of the present application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0368] It should be understood that in the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0369] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A. For example, B can be determined based on A. It should also be understood that determining B based on A does not mean determining B only based on A, but B can also be determined based on A and / or other information. In addition, the "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not impose any limitation on this.

[0370] Unless otherwise specified, the "transmission" (transmit / transmission) that appears in the embodiments of the present application refers to bidirectional transmission, including the actions of sending and / or receiving. Specifically, the "transmission" in the embodiments of the present application includes the sending of data, the receiving of data, or the sending of data and the receiving of data. In other words, the data transmission here includes uplink and / or downlink data transmission. Data may include channels and / or signals, uplink data transmission is uplink channel and / or uplink signal transmission, and downlink data transmission is downlink channel and / or downlink signal transmission.

[0371] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A resource allocation method, characterized in that: The method is applied to a cloud management platform, and the cloud management platform is used to manage infrastructure, and the infrastructure includes multiple hosts; the method includes: In response to the first request, an anti-affinity group is created in the cloud management platform; the anti-affinity group includes multiple fault domains, and gateway instances deployed in different fault domains have anti-affinity, and the fault domains are available zones, host groups, or hosts; Get multiple instance creation requests; According to the multiple instance creation requests, create multiple gateway instances in the anti-affinity group; wherein one gateway instance corresponds to one instance creation request; For a first gateway instance among the multiple gateway instances, the first gateway instance is scheduled to a first cluster of the infrastructure; the first cluster includes M hosts among multiple hosts, and the fault domain where the first cluster is located is different from the fault domain where other gateway instance clusters are scheduled.

2. The method according to claim 1, characterized in that The step of creating an anti-affinity group in the cloud management platform in response to the first request includes: In response to the first request, providing a first interface, the first interface comprising: an anti-affinity group identifier input box; In response to a first operation on the first interface, a second interface is provided; in the second interface, the anti-affinity group identifier input box includes an anti-affinity group identifier; In response to a second operation on the second interface, the anti-affinity group is created.

3. The method according to claim 2, characterized in that The second interface also includes: an anti-affinity group query box; The obtaining of multiple instance creation requests includes: In response to a third operation on the second interface, providing a third interface; in the third interface, the anti-affinity group query box includes the anti-affinity group identifier; In response to a fourth operation on the third interface, a fourth interface is provided; the fourth interface includes: the anti-affinity group identifier, the number of instances of the anti-affinity group corresponding to the anti-affinity group identifier, and an instance operation function control; the number of instances includes the number of gateway instances associated with the anti-affinity group and the total number of gateway instances supported by the anti-affinity group for association; the instance operation function control is used to create an instance within the anti-affinity group; In response to a fifth operation on the fourth interface, an instance creation request is obtained.

4. The method according to any one of claims 1 to 3, characterized in that The obtaining of multiple instance creation requests includes: Obtaining a second request; the second request carries an anti-affinity group identifier; In response to the second request, a fifth interface is provided; the fifth interface includes an anti-affinity group input box and an instance input box; the anti-affinity group input box includes the anti-affinity group identifier; In response to a sixth operation on the fifth interface, an instance creation request is obtained; the instance creation request carries the anti-affinity group identifier.

5. The method according to any one of claims 1 to 4, characterized in that Each instance creation request carries the anti-affinity group identifier of the anti-affinity group; The step of creating multiple gateway instances in the anti-affinity group according to the multiple instance creation requests includes: For a first instance creation request among the multiple instance creation requests, in response to the first instance creation request, providing a sixth interface, wherein the sixth interface includes the anti-affinity group identifier and the first instance identifier carried by the first instance creation request; In response to a seventh operation on the sixth interface, a first gateway instance is created, and the first gateway instance is associated with the anti-affinity group identifier.

6. The method according to any one of claims 1 to 5, characterized in that The fault domains included in the anti-affinity group are related to the instance types in the anti-affinity group; the instance types include: cross-availability zone instances and non-cross-availability zone instances; The cross-availability zone instance is used to indicate that multiple nodes in the first cluster are located in at least two availability zones; The non-cross-availability zone instance is used to indicate that all nodes in the first cluster are in the same availability zone; In the case where the instance type is a cross-availability zone instance, the fault domain included in the anti-affinity group is a host group; When the instance type is a non-cross-availability zone instance, the fault domains included in the anti-affinity group are availability zones or host groups.

7. The method according to any one of claims 1 to 6, characterized in that The multiple gateway instances of the anti-affinity group operate in a master-master mode or a master-standby mode; In the master-master mode, multiple data flows are processed by multiple gateway instances of the anti-affinity group; Different gateway instances handle different data streams; In the master-slave mode, the data flow is processed by the first gateway instance. In the event of a failure of the first gateway instance, the transmission node of the data flow is switched to a second gateway instance among the multiple gateway instances, where the second gateway instance is any gateway instance among the multiple gateway instances except the first gateway instance.

8. The method according to any one of claims 1 to 7, characterized in that The first gateway instance is a cross-availability zone instance, and the second gateway instance is a cross-availability zone instance; the second gateway instance is any gateway instance among the multiple gateway instances except the first gateway instance; The first gateway instance includes multiple first gateway entities; different first gateway entities correspond to different availability zones; The second gateway instance includes a plurality of second gateway entities; different second gateway entities correspond to different availability zones; After scheduling the first gateway instance to the first cluster of the infrastructure, the method further includes: In the event that the first gateway instance fails, the transmission node of the data flow of the first gateway entity in the first availability zone is switched to the second gateway entity in the first availability zone.

9. The method according to any one of claims 1 to 8, characterized in that The step of scheduling the first gateway instance to the first cluster of the infrastructure includes: Initializing a plurality of clusters in the infrastructure; the number of the clusters is the same as the number of fault domains included in the anti-affinity group; Selecting a first cluster from multiple candidate clusters based on the resource specifications of the first gateway instance; the specifications of the first cluster match the resource specifications of the first gateway instance; the candidate cluster includes a cluster in the multiple clusters that has no gateway instance scheduled; Schedule the first gateway instance to the first cluster.

10. A resource allocation device, characterized in that: The device is deployed on a cloud management platform; The cloud management platform is used to manage infrastructure, and the infrastructure includes multiple hosts; the device includes: A communication module, configured to respond to the first request and obtain multiple instance creation requests; a processing module, configured to create an anti-affinity group corresponding to the first request, create multiple gateway instances in the anti-affinity group according to the multiple instance creation requests; and schedule a first gateway instance among the multiple gateway instances to a first cluster of the infrastructure; Among them, one gateway instance corresponds to one instance creation request; the anti-affinity group includes multiple fault domains, and the gateway instances deployed in different fault domains have anti-affinity, and the fault domain is an availability zone, a host group or a host; the first cluster includes M hosts among multiple hosts, and the fault domain where the first cluster is located is different from the fault domain where other clusters with gateway instances scheduled are located.

11. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 9.

12. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster is caused to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • OpenStack cloud platform resource dynamic scheduling system and method based on flow affinity

    CN106534318A

  • Multi-tenant management method and device

    CN113918268A

  • Application instance construction method, device and equipment

    CN114675940A

  • Anti-affinity scheduling method and device for creating cloud host and medium

    CN115061823A

  • Container cluster management method and device

    CN116724543A