CONTAINER CREATION METHOD, DEVICE, ELECTRONIC DEVICE, STORAGE MEDIUM, AND COMPUTER PROGRAM

The method addresses the challenge of non-uniform container distribution in K8S by prioritizing racks and server nodes based on resource occupancy, ensuring even distribution and high availability across zones and nodes, thus preventing system downtime and reducing maintenance costs.

JP7549132B2Active Publication Date: 2024-09-10BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023511608
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-08-31
Filing Date
2021-08-30
Publication Date
2024-09-10
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

Existing container management systems, such as Kubernetes (K8S), struggle with achieving uniform distribution of containers across multiple availability zones, racks, and server nodes, leading to potential system downtime due to non-uniform distribution and high maintenance costs.

Method used

A method and apparatus for container creation that involves obtaining an available rack list and network address list, prioritizing racks and server nodes based on resource occupancy, and strategically assigning containers to ensure even distribution across availability zones, racks, and server nodes, using a four-tier service tree structure to manage cluster services.

Benefits of technology

Ensures even distribution of containers, meeting service requirements for cross-availability zones, cross-racks, and high availability of server nodes, thereby preventing system downtime and reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007549132000005
    Figure 0007549132000005
  • Figure 0007549132000004
    Figure 0007549132000004
  • Figure 0007549132000006
    Figure 0007549132000006
Patent Text Reader

Abstract

A container creation method, device, electronic device, and storage medium, the method comprising the steps of: obtaining an available rack list and an available network address list, where the available rack list includes a plurality of available racks in different availability zones, each available rack including at least one server node, and the available network address list including at least one available network address (S410); locating a free server node in the available rack in the available rack list (S420); and locating the free server node in the available rack in the available rack list (S420). The method includes creating a current container in the node corresponding to the available network address (S430), updating the available network address list (S440), reordering the available racks in the available rack list based on the resource occupancy information of the available racks in the available rack list (S450), and creating another container based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list (S460).
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims priority to Chinese patent application No. 201010900719.6, entitled “CONTAINER MANUFACTURING METHOD, APPARATUS, ELECTRONIC DEVICE AND STORAGE MEDIUM,” filed with the State Intellectual Property Office of the People's Republic of China on August 31, 2020, the entire contents of which are incorporated herein by reference.

[0002] The present disclosure belongs to the field of computer technology, and more particularly to a container creation method, device, and electronic device 、 storage medium and computer programs Regarding. [Background technology]

[0003] With the continuous expansion of products on the dedicated cloud platform, the platform also has more and more different product services and containers. If all the containers are manually maintained by maintenance personnel, it will obviously result in large manpower consumption and uncertainties, leading to increased maintenance work costs and failure rates.

[0004] In order to solve the above problems, various container cluster management platforms have emerged. The container cluster management platform can provide a series of functions such as container orchestration, resource scheduling, elasticity, deployment management, and service discovery. Here, an example of the container cluster management platform is Kubernetes (abbreviated as K8S). Summary of the Invention [Means for solving the problem]

[0005] One aspect of the present disclosure provides a container creation method, which includes: obtaining an available rack list and an available network address list, where the available rack list includes a plurality of available racks in different availability zones, each of the available racks includes at least one server node, and the available network address list includes at least one available network address; locating free server nodes in the available racks in the available rack list; creating current containers for the free server nodes corresponding to the available network addresses; updating the available network address list; reordering the available racks in the available rack list according to resource occupancy information of the available racks in the available rack list; and creating another container according to the free server nodes in the available racks in the reordered available rack list and the updated available network address list.

[0006] According to an embodiment of the present disclosure, obtaining the available rack list includes obtaining total resources of each server node in each rack; obtaining used resources of each of the server nodes, where the used resources are resources used in a created container; identifying an available rack based on the total resources of each of the server nodes and the used resources of each of the server nodes; and generating the available rack list based on the available racks.

[0007] According to an embodiment of the present disclosure, the available racks in the available rack list are ordered in a priority order.

[0008] According to an embodiment of the present disclosure, ordering the available racks in the available rack list by priority is achieved by a method including: obtaining a created container list, where the created container list includes a plurality of created containers, each of the created containers having a corresponding server node, an associated application, and an associated group; identifying creation count information corresponding to each of the server nodes, where the creation count information includes the number of created containers belonging to the same application and the number of created containers belonging to the same group; and ordering the available racks in the available rack list by priority based on the creation count information corresponding to each of the server nodes.

[0009] According to an embodiment of the present disclosure, locating a free server node in an available rack in the available rack list includes: identifying an available rack with the highest priority in the available rack list as a current track; determining whether the number of free server nodes in the current track is greater than a predetermined threshold; if the number of free server nodes in the current track is greater than the predetermined threshold, locating the free server node in the current track; if the number of free server nodes in the current track is equal to or less than the predetermined threshold, identifying an available rack with the next highest priority in the available rack list as a current track; and returning to the operation of determining whether the number of free server nodes in the current track is greater than the predetermined threshold until locating the free server node in the current track.

[0010] According to an embodiment of the present disclosure, reordering available racks in the available rack list based on resource occupancy information of available racks in the available rack list includes obtaining an application to which the current container belongs and a group to which it belongs, obtaining previous resource occupancy information of the current rack in the available rack list, obtaining previous resource occupancy information of other racks in the available rack list, identifying current resource occupancy information of the current track based on the application to which the current container belongs, the group to which the current container belongs, and the previous resource occupancy information of the current track, and reordering available racks in the available rack list based on the current resource occupancy information of the current rack in the available rack list and the previous resource occupancy information of other racks in the available rack list.

[0011] According to an embodiment of the present disclosure, the previous resource occupancy information of the current rack and other racks in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and a first pit number, where the first pit number is the ratio of the total resources of the rack to the resources used by all the created containers.

[0012] According to an embodiment of the present disclosure, reordering available racks in the available rack list based on current resource occupancy information of the current rack in the available rack list and previous resource occupancy information of other racks in the available rack list includes reordering available racks in the available rack list based on a predetermined rack priority rule, the current resource occupancy information of the current rack in the available rack list, and previous resource occupancy information of other racks in the available rack list, where the predetermined rack priority rule includes: an available rack with fewer containers belonging to the same application has a higher corresponding priority; if the number of containers belonging to the same application is the same, an available rack with fewer containers belonging to the same group has a higher corresponding priority; and if the number of containers belonging to the same group is the same, an available rack with a larger number of first pits has a higher corresponding priority.

[0013] According to an embodiment of the present disclosure, the method further includes reordering server nodes in available racks in the available rack list based on resource occupancy information of server nodes in available racks in the available rack list, and creating another container based on free server nodes in available racks in the reordered available rack list and an updated available network address list includes identifying a new free server node in an available rack based on the available racks and server nodes in the available racks in the reordered available rack list, and creating another container based on the new free server node and the updated available network address list.

[0014] According to an embodiment of the present disclosure, the resource occupancy information of a server node in an available rack in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and a second pit number, where the second pit number is the ratio between the total resources of the server node and the resources used by all created containers.

[0015] According to an embodiment of the present disclosure, reordering server nodes in available racks in the available rack list based on resource occupancy information of server nodes in available racks in the available rack list includes reordering server nodes in available racks in the available rack list based on a predetermined server node priority rule and resource occupancy information of server nodes in available racks in the available rack list, where the predetermined server node priority rule includes: a server node having a smaller number of containers belonging to the same application has a higher corresponding priority; if the number of containers belonging to the same application is the same, a server node having a smaller number of containers belonging to the same group has a higher corresponding priority; and if the number of containers belonging to the same group is the same, a server node having a larger number of second pits has a higher corresponding priority.

[0016] Another aspect of the present disclosure provides a container creation device, the container creation device including: an acquisition module configured to acquire an available rack list and an available network address list, the available rack list including a plurality of available racks in different availability zones, each of the available racks including at least one server node, the available network address list including at least one available network address; a positioning module configured to position a free server node in the available rack in the available rack list; and a positioning module configured to position the free server node in the available rack based on the available network address; The system includes a first creation module provided for creating a current container corresponding to a work address, an update module provided for updating the available network address list, a first ordering module provided for reordering available racks in the available rack list based on resource occupancy information of the available racks in the available rack list, and a second creation module provided for creating another container based on free server nodes in the available racks in the reordered available rack list and the updated available network address list.

[0017] Yet another aspect of the present disclosure provides an electronic device comprising one or more processors and a memory for storing one or more programs, the one or more programs, when executed by the one or more processors, causing the one or more processors to implement the method described above.

[0018] Yet another aspect of the present disclosure provides a computer readable storage medium having executable instructions stored thereon that, when executed by a processor, cause the processor to implement the method described above.

[0019] Yet another aspect of the present disclosure provides a computer program comprising computer executable instructions, the instructions being configured, when executed, to implement the method as set forth above. [Brief description of the drawings]

[0020] [Figure 1] FIG. 1 is a schematic diagram of a service tree according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of instance distribution in the related art. [Diagram 3] FIG. 3 is a schematic diagram illustrating an example system architecture to which the container creation method according to an embodiment of the present disclosure can be applied. [Figure 4] FIG. 4 illustrates a schematic flow chart of a container creation method according to an embodiment of the present disclosure. [Diagram 5] FIG. 5 illustrates a schematic flow chart of another method for creating a container according to an embodiment of the present disclosure. [Figure 6] FIG. 6 is a schematic diagram illustrating a flow chart of a resource calculation flow according to an embodiment of the present disclosure. [Figure 7] FIG. 7 is a schematic diagram illustrating an application of a method for producing a container according to an embodiment of the present disclosure. [Figure 8] FIG. 8 is a schematic block diagram of a container production device according to an embodiment of the present disclosure. [Figure 9] FIG. 9 is a schematic block diagram of an electronic device suitable for implementing a method for creating a container according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0021] Hereinafter, the embodiments of the present invention will be described with reference to the drawings. However, it should be understood that these descriptions are merely illustrative and do not limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are described to provide a thorough understanding of the embodiments of the present disclosure. However, it will be apparent that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of known structures and techniques are omitted to avoid unnecessarily confusing the concept of the present disclosure.

[0022] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the present disclosure. As used herein, the terms "comprises", "including", and the like indicate the presence of stated features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

[0023] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted to have a meaning consistent with the context of this specification and should not be interpreted in an ideal or overly formal manner.

[0024] When a phrase similar to "at least one of A, B, and C, etc." is used, it should be interpreted as the meaning of the phrase is generally understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" includes, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, C, etc.). When a phrase similar to "at least one of A, B, or C, etc." is used, it should be interpreted as the meaning of the phrase is generally understood by a person skilled in the art (e.g., "a system having at least one of A, B, or C" includes, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0025] The technical solution provided by the embodiments of the present disclosure can be used to address the container distribution problem of K8S in a dedicated cloud scenario. In order to better understand the technical solution of the embodiments of the present disclosure, the basic concept related to the embodiments of the present disclosure will first be described.

[0026] A dedicated cloud is a service that allows a cloud service provider to deploy a complete cloud computing service for a customer in its own data center. All resources in a dedicated cloud are provided by the cloud service provider, but data is physically and network isolated and can only be accessed via an intranet.

[0027] The availability zones may be in data centers with independent power and network in the same region. The availability of different availability zones does not affect each other, so the server nodes of the client service system can be deployed in cross availability zones, which greatly improves availability.

[0028] A rack may be a monolithic cabinet that contains multiple server nodes and provides unified power and network access for the multiple server nodes.

[0029] The server node may be a physical server device.

[0030] Cross availability zone may refer to allocating multiple containers to different availability zones.

[0031] Cross-racking may refer to the allocation of multiple containers to different racks in the same availability zone.

[0032] Cross-server node may be the allocation of multiple containers to different server nodes in the same rack.

[0033] High availability may mean evenly deploying multiple containers in a system, and ensuring that when one server node fails and cannot run normally, the containers on the non-failed server nodes can run normally and provide services to the outside world, thereby ensuring the availability of the system.

[0034] A cluster may be a collection of computing, storage and network resources.

[0035] A product line may be a cloud platform product on a dedicated cloud, for example a cloud hosted product.

[0036] A system may be an independent service module on a product line. A product line may contain one or more systems.

[0037] An application may be an independent functional module in a system. A system may include one or more applications.

[0038] A group may be an independent module that solves different scene problems in an application. An application can contain one or more groups. A group is provided to manage the environment variables and external configurations required for the operation of a container, and is the smallest unit of deployment.

[0039] A Node node may be a worker node in a cluster, on which actual application programs are executed. A Node node executes Kubelet and Proxy of K8S, and Kubelet and Proxy are provided to create, start, monitor, restart, destroy Pods, and realize load balancing in software mode. A Node node may include a Node address, a Node running state, a Node system capacity, and other information. A Node address includes a host network address or a host identifier. A Node system capacity indicates the available system resources of a Node node, and may include CPU, memory, and the maximum number of Pods that can be scheduled.

[0040] A Pod is the smallest deployable unit of work that can be created and managed in K8S. A Pod can contain one or more closely related containers, e.g. Docker containers, that share memory, networking, and the declaration of how to run the containers. The containers in a Pod are scheduled as a whole by the Master node to run on the same Node. A Pod corresponds to a logical host, each Pod has a corresponding network address, and different containers belonging to the same Pod share the same network address and port space. The network address of each Pod changes as the Pod is destroyed and restarted.

[0041] A Service may be the external access interface for a set of Pods that provide the same service. A Service has a network address and a port, and provides load balancing for the Pods.

[0042] Controllers may be used to manage Pods. Controllers define the deployment characteristics of a Pod, such as how many copies it contains, what Nodes it runs on, etc. Running a Pod in K8S is done by a Controller, and accessing a Pod is done by a Service.

[0043] The Master node may be the master node of a cluster, and is provided to carry a control panel for controlling and managing the entire K8S cluster, on which a set of processes related to cluster management, ETCD, API Server, Controller Manager, and Scheduler, run. Here, the API Server, Controller Manager, and Scheduler constitute the overall control center of K8S, and these processes realize management functions such as cluster resource management, Pod scheduling, elastic expansion and contraction, safety control, system monitoring, and error correction.

[0044] ETCD may be a highly available distributed key-value database that can be used to persistently store all resource objects in a cluster. That is, it is mainly used to store cluster configuration information and the state information of various resources. When data changes, ETCD will promptly notify the relevant components of K8S.

[0045] The API (Application Programming Interface) Server may be the only external interface of K8S, and all requests must communicate through this interface. The API Server provides an encapsulation interface for operating ETCD. The encapsulation interface is basically an interface for adding, deleting, updating, and searching resource objects in the cluster, and for monitoring resource changes.

[0046] The Controller Manager may be a controller manager within a cluster, which is mainly deployed to realize various resources that manage the cluster and ensure that the resources are in the desired state. The Controller Manager may include Replication Controller (RC), Endpoints Controller, Number Controller, and Service Accounts Controller, etc. Here, RC is used to define Pods, the number of copies of Pods that need to be run, and Pod tags that need to be monitored.

[0047] A Scheduler may be a scheduler within a cluster that is primarily used to determine which nodes a Pod should be assigned to run on.

[0048] Kubelet may be used to manage the entire lifecycle of Pods on a Node, including creating, updating, monitoring, and deleting them, while reporting the status information of the Node to the Master node.

[0049] The Proxy may be a load balancer to realize the agent and software modes of the Service. The Proxy may be a reverse proxy server for one of the API Servers. Clients outside the K8S cluster can access the API Server through the Proxy.

[0050] Instances may be multiple resource allocation units with the same configuration and configured to support grouping functionality: multiple containers support high availability of a group.

[0051] The overbooking factor may be that the cloud service provider logically divides a physical core on a physical server into multiple virtual cores, and the multiple virtual cores share the functions of the same physical core, and uses a method such as slicing according to time to realize the use of the physical core as a resource. The overbooking factor allows the cloud service provider to allocate resources to more tenants, and further improves resource utilization.

[0052] To solve the container distribution problem, a possible solution is to add a filtering or priority policy to the K8S Scheduler. In the process of realizing the concept of the present disclosure, it was found that the above solution has a problem that it is difficult to achieve at least uniform distribution of containers.

[0053] In the process of realizing the concept of the present disclosure, it has been found that the main reason for the existence of the above problem is as follows: the above solution does not consider the location distribution of server nodes in multiple availability zones and multiple racks, and there are many products and services related to dedicated clouds and have very strict requirements for high availability of services, so adopting the above solution makes it difficult to realize uniform distribution of containers, where uniform distribution refers to the uniform distribution of containers in the same application in three layers, namely availability zones, racks and server nodes, and it is difficult to meet the service requirements for high availability of cross-availability zones, cross-racks and server nodes.

[0054] In order to realize uniform distribution of containers and ensure high availability of services across availability zones, across racks and across server nodes, different containers in the same application should be preferentially assigned to different availability zones, containers in the same availability zone should be preferentially assigned to different racks, and containers in the same rack should be preferentially assigned to different server nodes. Based on the above, the embodiments of the present disclosure provide a technical solution for realizing uniform distribution of containers. Note that, after determining which server node a container is to be assigned to, the container needs to be created on the corresponding server node, so realizing uniform creation of containers is, in other words, realizing uniform distribution of containers.

[0055] In order to better manage services in a cluster, the embodiment of the present disclosure adopts a tree structure (i.e., a service tree) with a height of 4 to store complete cluster services. FIG. 1 is a schematic diagram of a service tree according to the embodiment of the present disclosure. As shown in FIG. 1, the service tree can include tenants, applications, groups, and instances from top to bottom. Here, the tenants in the top layer are configured to manage quota information in the entire cluster. The applications in the second layer are configured to manage deployment modules and environment variable information. The groups in the third layer are configured to manage program versions, configuration versions, container specifications, and environment variables, and the instances in the fourth layer are configured to manage containers and network address information. Each instance in the service tree corresponds to one Pod (i.e., a set of containers) in K8S. Note that achieving the uniform distribution of containers described in the embodiment of the present disclosure is, in other words, achieving the uniform distribution of instances.

[0056] FIG. 2 is a schematic diagram showing an example of instance distribution in the related technology. As shown in FIG. 2, a rack includes rack 1, rack 2, and rack 3, and each rack includes four server nodes. It includes application 1, application 2, and application 3. Here, application 2 includes group 1, group 2, and group 3. Group 1 includes instance 1, group 2 includes instance 2, and group 3 includes instance 3. Using the related technology, instance 1, instance 2, and instance 3 which also belong to application 2 are respectively distributed to the server nodes in rack 1 and rack 3 Server nodes and racks in 3As can be seen from this, when using the related technology, instance 2 and instance 3, which also belong to application 2, are assigned to the same rack, that is, when using the related technology, uniform distribution of containers is not realized. This is because the related technology cannot identify availability zones and racks, so multiple instances of the same application may be assigned to the same availability zone or the same rack. If a problem occurs in the dedicated line or rack of an availability zone, it is likely to cause a system down and affect the overall function of the service. The technical solution provided by the embodiment of the present disclosure is made to solve the above problem. Hereinafter, a specific embodiment will be described.

[0057] The embodiments of the present disclosure provide a container creation method, an apparatus, an electronic device, and a storage medium, the method including a container creation step, in which an available rack list and an available network address list are obtained, an available server node in a rack in the available rack list is located, a current container corresponding to the available network address in the available server node is created, the available network address list is updated, and the available racks in the available rack list are reordered according to the resource occupancy information of the available racks in the available rack list, and another container is created according to the available server node in the available rack in the reordered available rack list and the updated available network address list.

[0058] 3 is a schematic diagram of an example of a system architecture 300 to which a container creation method according to an embodiment of the present disclosure can be applied. Note that what is shown in FIG. 3 is merely an example of a system architecture to which the embodiment of the present disclosure can be applied, and makes it easier for a person skilled in the art to understand the technical content of the present disclosure, but does not mean that the embodiment of the present disclosure cannot be used in other devices, systems, environments, or scenes.

[0059] As shown in FIG. 3, the system architecture 300 according to the embodiment may include an intelligent distribution system, a master node (i.e., Master node) and a worker node (i.e., Node node). Here, the intelligent distribution system includes an API gateway, a distributed key-value database (i.e., ETCD), intelligent resource distribution and resource scheduling. The master nodes include a master node 1, a master node 2 and a master node 3. The worker nodes corresponding to the master node 1 are a worker node 1 and a worker node 2. Each master node includes an application programming interface server (i.e., API Server), a scheduler (i.e., Scheduler), a distributed key-value database (i.e., ETCD) and a controller manager (i.e., Controller Manager). Each worker node includes a Kubelet, a proxy server (i.e., Proxy) and a Pod. Each Pod includes one or more containers.

[0060] The conventional K8S architecture includes a master node (i.e., Master node) and a worker node (i.e., Node node) in Fig. 3. The conventional container creation flow based on K8S is to generate RC request information including a Pod to be created, the number of copies corresponding to the Pod to be created, and the tag of the Pod to be created by Kubectl, and to send the RC request information to ETCD by API Server, and ETCD stores the RC request information.

[0061] When the Controller Manager monitors an RC event using the monitoring resource change interface in the API Server, it obtains RC request information. If it determines that the target Pod does not exist in the current cluster, it creates a Pod based on the RC request information and sends it to ETCD via the API Server. ECTD stores the Pod.

[0062] When the Scheduler monitors an RC event through the monitoring resource change interface in the API Server, it executes a scheduling flow to generate an allocation relationship, and the API Server sends the allocation relationship to ETCD, which then stores the allocation relationship. Here, the allocation relationship is between a Pod and a target Node that runs the Pod.

[0063] The Kubelet running on the target Node monitors the Pod through the API Server and starts the Pod based on the RC request information until the Pod's lifecycle is reached.

[0064] As shown in Fig. 3, an embodiment of the present disclosure adds an intelligent distribution system to a conventional K8S architecture. Here, the API gateway in the intelligent distribution system replaces the API Server of the Master node in K8S as the only entrance to the entire cluster. The intelligent distribution system takes charge of the allocation of containers in the cluster and some of the scheduling operations.

[0065] The intelligent distribution system in the embodiments of the present disclosure can be implemented independently and can be added to K8S non-intrusively, so that the intelligent distribution system can be applied to various K8S cluster environments without affecting the existing system.

[0066] The container creation method provided by the embodiments of the present disclosure may generally be performed by an intelligent distribution system, which may be provided in a server or a server cluster. Correspondingly, the container creation device provided by the embodiments of the present disclosure may generally be provided in a server or a server cluster.

[0067] FIG. 4 illustrates a schematic flow chart of a container creation method according to an embodiment of the present disclosure.

[0068] As shown in FIG. 4, the method includes operations S410 to S460.

[0069] In operation S410, an available rack list and an available network address list are obtained, where the available rack list includes multiple available racks in different availability zones, each available rack includes at least one server node, and the available network address list includes at least one available network address.

[0070] According to an embodiment of the present disclosure, the available rack list may include multiple available racks, where different available racks may belong to different availability zones, and each available rack may include at least one server node. The multiple available racks in the available rack list may be ranked according to a priority order.

[0071] Illustratively, for example, the available rack list includes available rack 1, available rack 2, and available rack 3. Here, available rack 1 and available rack 2 belong to availability zone 1, and available rack 3 belongs to availability zone 2. Server node 1, server node 2, and server node 3 are provided in available rack 1. Server node 4 and server node 5 are provided in available rack 2. Server node 6, server node 7, and server node 8 are provided in available rack 3.

[0072] The available network address list may include at least one available network address, where each available network address may be provided to set a network address of a Pod to be an unused network address. The available network address list may be obtained as follows:

[0073] Obtain a total network address list; obtain an assigned network address list; and determine an available network address list based on the total network address list and the assigned network address list. Here, the assigned network address list includes at least one assigned network address, and each assigned network address refers to a network address of a Pod that has already been provided. Each network address in the total network address list can be used to configure a Pod. Determining the available network address list based on the total network address list and the assigned network address list may include subtracting the assigned network address list from the total network address list to obtain the available network address list.

[0074] In operation S420, a free server node in an available rack is located in the available rack list.

[0075] In operation S430, a current container corresponding to the available network address is created in a free server node.

[0076] According to an embodiment of the present disclosure, an available rack in the available rack list may have a free server node, or may not have a free server node. A free server node may refer to a server node that has free resources. A free resource can be considered to have resources for providing a container.

[0077] In order to create a current container for a free server node, it is necessary to determine whether a free server node exists in an available rack in the available rack list. If a free server node exists, the free server node is located.

[0078] Since the available rack list includes multiple available racks, whether or not a free server node exists in each available rack is identified in a predetermined order until a free server node is identified. In addition, since the multiple available racks in the available rack list can be ranked according to priority, whether or not a free server node exists in each available rack can be identified in order of priority.

[0079] According to an embodiment of the present disclosure, after identifying a free server node, an available network address can be selected from the available network address list as a target network address, and a current container corresponding to the target network address can be created in the free server node. Creating a current container corresponding to the target network address in the free server node can include creating a current Pod corresponding to the target network address in the free server node, and creating a current container instance in the current Pod.

[0080] In operation S440, the available network address list is updated.

[0081] In an embodiment of the present disclosure, after a current container corresponding to an available network address is created in a free server node, the available network address here can point to a target network address, and since a current container corresponding to the target network address is created, the target network address becomes an assigned network address from an available network address, and accordingly, the available network address included in the available network address list changes, and the available network address list needs to be updated.

[0082] According to an embodiment of the present disclosure, updating the available network address list may include deleting the target network address in the available network address list and obtaining an updated available network address list.

[0083] In operation S450, the available racks in the available rack list are reordered based on the resource occupancy information of the available racks in the available rack list.

[0084] According to an embodiment of the present disclosure, the resource occupancy information of the available rack may indicate the resources occupied by the containers installed in the available rack. The resource occupancy information of the available rack may include the number of containers belonging to the same application, the number of containers belonging to the same group, and the first pit number, where the first pit number may be the ratio between the total number of resources of the available rack and the number of resources used by all the created containers.

[0085] According to an embodiment of the present disclosure, after a current container corresponding to an available network address is created in an available server node, the resource occupancy information of the available rack in the available rack list changes, so that it is necessary to reorder the available racks in the available rack list in order to obtain the available rack list after reordering.

[0086] Reordering the available racks in the available rack list based on the resource occupancy information of the available racks in the available rack list can include: obtaining an application and a group to which the current container belongs; obtaining the previous resource occupancy information of the current rack and the previous resource occupancy information of other racks in the available rack list; determining the current resource occupancy information of the current rack based on the application to which the current container belongs, the group to which the current container belongs, and the previous resource occupancy information of the current rack; and reordering the racks in the available rack list based on the current resource occupancy information of the current rack in the available rack list and the previous resource occupancy information of other racks in the available rack list. Here, the current rack can refer to the available rack with the highest priority in the available rack list.

[0087] In operation S460, another container is created based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list.

[0088] According to the embodiment of the present disclosure, after each container is created, it is necessary to update the available network address list and reorder the racks in the available rack list to create the next container until all containers are created, which also corresponds to assigning each container to the corresponding free server node to create the container on the corresponding free server node.

[0089] According to an embodiment of the present disclosure, a resource request can be obtained, where the resource request can include the number of containers to be created. In response to the resource request, a current available rack list and a current available network address list are obtained. A free server node in the available rack in the current available rack list is located. A current container corresponding to the current available network address is created in the free server node. The current available network address list is updated to obtain a new available network address list, and the new network address list is the current available network address list. According to the resource occupancy information of the available rack in the current available rack list, the available racks in the current available rack list are reordered to obtain a new available rack list, and the new available rack list is the current available rack list. Until the creation of the number of containers to be created is completed, a free server node in an available rack in the current available rack list is located, and a current container corresponding to the current available network address is created in the free server node, and this process is repeated.

[0090] According to an embodiment of the present disclosure, the resource request may further include a specification of a container to be created, an application to which the container to be created belongs, and a group to which the container to be created belongs. The specification of a container to be created may indicate a CPU and memory required for the container to be created.

[0091] According to the technical proposal of an embodiment of the present disclosure, an available rack list and an available network address list are obtained, the available rack list includes multiple available racks in different availability zones, each available rack includes at least one server node, the available network address list includes at least one available network address, free server nodes in the available racks in the available rack list are located, for the free server nodes, current containers corresponding to the available network addresses are created, the available network address list is updated, and based on the resource occupancy information of the available racks in the available rack list, the available racks in the available rack list are reordered, and another container is created based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list. Each time a container is created in a free server node, the available racks in the available rack list are reordered based on the resource occupancy information of the available racks in the available rack list, and the next container is created based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list, where the free server nodes come from available racks in different availability zones, so that the containers are evenly distributed. Thus, the technical problem that the related art is difficult to realize the even distribution of containers can be at least partially overcome. In addition, the even distribution of containers can be achieved, so that the service requirements of high availability of cross-availability zones, cross-racks and server nodes can be met, and the occurrence of system down situations can be effectively avoided.

[0092] According to an embodiment of the present disclosure, obtaining the available rack list may include the following operations.

[0093] Obtain the total resource of each server node in each rack. Obtain the used resource of each server node, where the used resource is the resource used for the created container. Identify available racks based on the total resource of each server node and the used resource of each server node. Generate an available rack list based on the available racks.

[0094] According to an embodiment of the present disclosure, the total resource of each server node can be determined as follows: Obtain the server node resource, where the server node resource includes CPU and memory; Obtain the overbooking factor corresponding to the server node; Identify the total resource of the server node based on the server node resource and the overbooking factor, i.e., multiply the server node resource by the overbooking factor to obtain the total resource of the server node.

[0095] For each server node in each rack, identifying an available rack based on the total resource of the server node and the used resource of the server node may include: subtracting the total resource of the server node from the used resource of the server node to obtain the remaining resource of the server node. Based on this, the remaining resource of each server node in the rack can be obtained. Based on the remaining resource of each server node in the rack, identifying whether the rack is an available rack. If the remaining resource of each server node in the rack is equal to or greater than the remaining resource threshold, the rack can be identified as an available rack. Here, the remaining resource threshold can be determined according to the actual situation and is not limited here.

[0096] According to an embodiment of the present disclosure, the available racks in the available rack list are ordered by priority.

[0097] According to an embodiment of the present disclosure, in order to achieve even distribution of containers, multiple available racks in an available rack list are ordered according to priority, and then a free server node can be selected according to the priority of the available rack, and a container can be created on the free server node.

[0098] According to an embodiment of the present disclosure, the following method is used to realize prioritizing the multiple available racks in the available rack list: Obtain a created container list, where the created container list includes multiple created containers, and each created container has a corresponding server node, an associated application, and an associated group; Identify creation number information corresponding to each server node, where the creation number information includes the number of created containers belonging to the same application and the number of created containers belonging to the same group; Prioritize the multiple available racks in the available rack list based on the creation number information corresponding to each server node.

[0099] According to an embodiment of the present disclosure, in order to realize the ordering of multiple available racks in the available rack list by priority, a created container list can be obtained, and the created container list can include multiple created containers, and the created container can indicate that a pod has been created. Each created container has a corresponding server node, which means that each created container has a server node to which it belongs. At the same time, each created container has an application and a group to which it belongs.

[0100] According to an embodiment of the present disclosure, identifying the creation count information corresponding to each server node may include, for each created container, incrementing a count of an application to which the created container belongs on the server node corresponding to the created container by 1, and incrementing a count of a group to which the created container belongs by 1. Based on this, the application to which each created container belongs and the group to which it belongs can be associated with the corresponding server node.

[0101] According to an embodiment of the present disclosure, for each server node, the creation number information corresponding to the server node is identified, where each creation number information can include the number of created containers belonging to the same application and the number of created containers belonging to the same group. Based on the creation number information of all server nodes included in each available rack, the creation number information of the available rack, i.e., the number of created containers belonging to the same application and the number of created containers belonging to the same group in the available rack, can be identified. Based on this, the creation number information of each available rack in the available rack list can be obtained.

[0102] According to an embodiment of the present disclosure, ordering each available rack in the available rack list in a priority order based on the creation number information of each available rack in the available rack list may include: ordering each available rack in the available rack list in a priority order based on a predetermined rack priority rule and the creation number information of each available rack in the available rack list, where the predetermined rack priority rule may include an available rack with a smaller number of containers belonging to the same application having a higher corresponding priority. If the number of containers belonging to the same application is the same, an available rack with a smaller number of containers belonging to the same group has a higher corresponding priority. If the number of containers belonging to the same group is the same, an available rack with a larger number of first pits has a higher corresponding priority. Here, the number of first pits may be a ratio between the total resources of the available rack and the resources used by all the created containers. The number of containers here refers to the number of created containers.

[0103] Illustratively, for example, the created container list includes created container 1, created container 2, and created container 3. The available rack list includes available rack 1 and available rack 2. Available rack 1 includes server node 1, server node 2, and server node 3. Available rack 2 includes server node 4 and server node 5.

[0104] The server node corresponding to created container 1 is server node 1, the associated application is application 1, and the associated group is group 1.

[0105] The server node corresponding to created container 2 is server node 1, the associated application is application 1, and the associated group is group 1.

[0106] The server node corresponding to created container 3 is server node 4, the associated application is application 1, and the associated group is group 2.

[0107] For the server node 1, the creation count information corresponding to the server node 1 is identified. Here, the creation count information includes that the number of created containers belonging to the application 1 is 2, and the number of created containers belonging to the group 1 is 2.

[0108] For server node 2, the creation number information corresponding to server node 2 is identified. Here, the creation number information is 0.

[0109] For the server node 3, the creation number information corresponding to the server node 3 is identified. Here, the creation number information is 0.

[0110] For the server node 4, the creation count information corresponding to the server node 4 is identified. Here, the creation count information includes that the number of created containers belonging to the application 1 is 1, and the number of created containers belonging to the group 2 is 1.

[0111] For the server node 5, the creation number information corresponding to the server node 5 is identified. Here, the creation number information is 0.

[0112] For the server node 6, the creation number information corresponding to the server node 6 is identified. Here, the creation number information is 0.

[0113] Based on the creation quantity information of server node 1, server node 2, and server node 3, it was determined that the creation quantity information of available rack 1 includes that the number of created containers belonging to application 1 is 2, and the number of created containers belonging to group 1 is 2.

[0114] Based on server node 4 and server node 5, it was determined that the creation quantity information of available rack 2 includes that the number of created containers belonging to application 1 is 1, and the number of created containers belonging to group 2 is 1.

[0115] Based on a predetermined rack priority rule, the creation number information of available rack 1 and the creation number information of available rack 2, the available rack 1 and the available rack 2 are ordered in order of priority. 2 Since the number of available racks belonging to the same application 1 in is greater than the number of available racks belonging to the same application 1 in, the priority of available rack 2 is higher than the priority of available rack 1.

[0116] According to an embodiment of the present disclosure, a priority ordering of available racks in the available rack list provides a basis for equal distribution of containers at the rack level.

[0117] According to an embodiment of the present disclosure, locating an empty server node in an available rack in the available rack list may include the following operations.

[0118] Identify the available rack with the highest priority in the available rack list as the current track. Determine whether the number of free server nodes in the current track is greater than a predetermined threshold. If the number of free server nodes in the current track is greater than the predetermined threshold, position the free server node in the current track. If the number of free server nodes in the current track is equal to or less than the predetermined threshold, identify the available rack with the next highest priority in the available rack list as the current track. Return to the operation of determining whether the number of free server nodes in the current track is greater than the predetermined threshold until the free server node in the current track is positioned.

[0119] In an embodiment of the present disclosure, the available racks in the available rack list are ordered by priority, so that when identifying an available server node, the available rack can be identified according to the priority of the available rack.

[0120] According to an embodiment of the present disclosure, the available rack with the highest priority in the available rack list is identified as a current track, and whether the number of free server nodes in the current track is greater than a predetermined threshold is identified. If the number of free server nodes in the current track is greater than a predetermined threshold, a free server node is located from the current track. If the number of free server nodes in the current track is equal to or less than the predetermined threshold, the available rack with the next highest priority in the available rack list is identified as a current track, and an operation of whether the number of free server nodes in the current track is greater than a predetermined threshold is performed until a free server node is located from the current track.

[0121] According to an embodiment of the present disclosure, the multiple server nodes included in each available rack in the available rack list are ordered in a priority order. The multiple server nodes are ordered in a priority order by the following method: obtain a created container list, where the created container list includes multiple created containers, and each created container has a corresponding server node, an application to which it belongs, and a group to which it belongs; identify creation number information corresponding to each server node, where the creation number information includes the number of created containers belonging to the same application and the number of created containers belonging to the same group; and order the multiple server nodes in a priority order based on the creation number information corresponding to each server node.

[0122] A plurality of server nodes are ordered by priority based on a predetermined server node priority rule and creation number information corresponding to each server node, where the predetermined server node priority rule can include a rule that a server node having a smaller number of containers belonging to the same application has a higher corresponding priority. If the number of containers belonging to the same application is the same, a server node having a smaller number of containers belonging to the same group has a higher corresponding priority. If the number of containers belonging to the same group is the same, a server node having a larger number of second pits has a higher corresponding priority. Here, the second pits number is the ratio between the total resources of the server node and the resources used by all the created containers. Here, the number of containers refers to the number of created containers.

[0123] According to an embodiment of the present disclosure, reordering the available racks in the available rack list based on the resource occupancy information of the available racks in the available rack list may include the following operations.

[0124] Obtain the application to which the current container belongs and the group to which it belongs. Obtain the previous resource occupancy information of the current rack in the available rack list. Obtain the previous resource occupancy information of other racks in the available rack list. Identify the current resource occupancy information of the current rack based on the application to which the current container belongs, the group to which the current container belongs, and the previous resource occupancy information of the current rack. Reorder the available racks in the available rack list based on the current resource occupancy information of the current rack in the available rack list and the previous resource occupancy information of other racks in the available rack list.

[0125] According to an embodiment of the present disclosure, after a current container is created in an available server node in the current track, the previous resource occupancy information of the current track changes, so it is necessary to update the previous resource occupancy information of the current track based on the application to which the current container belongs and the group to which it belongs, and obtain the current resource occupancy information of the current track.

[0126] In order to realize reordering the available racks in the available rack list, it is further necessary to obtain the previous resource occupancy information of other racks other than the current rack in the available rack list. The number of other racks is one or more. The previous resource occupancy information of the current rack and the previous resource occupancy information of the other racks both refer to the resource occupancy information corresponding to the current rack and the other racks before the current container is created.

[0127] After obtaining the current resource occupancy information of the current rack and the immediately preceding resource occupancy information of other racks, the available racks in the available rack list can be reordered based on the current resource occupancy information of the current rack and the immediately preceding resource occupancy information of other racks.

[0128] According to an embodiment of the present disclosure, the previous resource occupancy information of the current rack and other racks in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and the first pit number, where the first pit number is the ratio of the total resources of the rack to the resources used by all the created containers.

[0129] According to an embodiment of the present disclosure, the resource occupancy information of an available rack in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and the first pit number. Here, the available rack includes the current rack and other racks. The resource occupancy information includes the current resource occupancy information of the current rack and the previous resource occupancy information of the other racks. The first pit number can represent the resource information of the rack.

[0130] According to an embodiment of the present disclosure, reordering available racks in the available rack list based on current resource occupancy information of current racks in the available rack list and immediately preceding resource occupancy information of other racks in the available rack list may include the following operations:

[0131] Reorder the available racks in the available rack list based on a predetermined rack priority rule, current resource occupancy information of the current racks in the available rack list, and previous resource occupancy information of other racks in the available rack list, where the predetermined rack priority rule can include: available racks with fewer containers belonging to the same application have a higher corresponding priority; available racks with fewer containers belonging to the same group have a higher corresponding priority if the number of containers belonging to the same application is the same; available racks with a larger number of first pits have a higher corresponding priority if the number of containers belonging to the same group is the same.

[0132] According to an embodiment of the present disclosure, in order to realize uniform distribution of containers on racks, containers in the same availability zone need to be preferentially assigned to different racks. To realize preferentially assigning containers in the same availability zone to different racks, a predetermined rack priority rule can be set.

[0133] The current resource occupancy information of the current rack includes the number of containers belonging to the same application, the number of containers belonging to the same group, and the number of first pits, and the previous resource occupancy information of the other racks includes the number of containers belonging to the same application, the number of containers belonging to the same group, and the number of first pits, and therefore, for each application, the available racks in the available rack list are reordered according to a predetermined rack priority rule in which the available racks with fewer containers belonging to the same application have a higher corresponding priority, and if the number of containers belonging to the same application is the same, the available racks with fewer containers belonging to the same group have a higher corresponding priority, and if the number of containers belonging to the same group is the same, the available racks with more first pits have a higher corresponding priority. Here, the available racks include the current racks and the other racks.

[0134] According to an embodiment of the present disclosure, a priority ordering of available racks in the available rack list provides a basis for equal distribution of containers at the rack level.

[0135] According to an embodiment of the present disclosure, the container creation method may further include the following operations.

[0136] The server nodes in the available racks in the available rack list are reordered based on the resource occupancy information of the server nodes in the available racks in the available rack list.

[0137] Creating another container based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list may include the following operations.

[0138] Identify new free server nodes in the available rack based on the available racks in the reordered available rack list and the server nodes in the available racks Create other containers based on the new free server nodes and the updated available network address list.

[0139] According to an embodiment of the present disclosure, it is possible to obtain the application and group to which the current container belongs. Obtain previous resource occupancy information of the server node in the available rack list. Update previous resource occupancy information of the free server node based on the application and group to which the current container belongs, and obtain current resource occupancy information of the free server node. Reorder the server nodes in the available rack in the available rack list based on the current resource occupancy information of the free server node in the available rack in the available rack list and previous resource occupancy information of other server nodes other than the free server node in the available rack in the available rack list.

[0140] After obtaining the available racks in the reordered available rack list and the server nodes in the available racks, a new free server node in the available rack can be identified based on the above.

[0141] According to an embodiment of the present disclosure, the server nodes in the available racks in the available rack list can be ordered by priority, so that when locating an empty server node, the positioning can be performed according to the priority of the server node. That is, the available rack with the highest priority in the available rack list is identified as the current rack. The server node with the highest priority in the current rack is identified as the current server node. It is determined whether the current server node is an empty server node. If the current server node is an empty server node, it is determined as the empty server node. If the current server node is not an empty server node, it is determined as the server node with the next highest priority in the current rack as the current server node, and the process returns to the operation of determining whether the current server node is an empty server node until locating an empty server node.

[0142] If an available server node cannot be located in the current track, the next available rack with the next highest priority in the available rack list is identified as the current track, and the process returns to the operation of identifying the highest priority server node in the current track as the current server node until an available server node is located.

[0143] According to an embodiment of the present disclosure, the resource occupancy information of a server node in an available rack in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and a second pit number, where the second pit number is the ratio between the total resources of the server node and the resources used by all created containers.

[0144] According to an embodiment of the present disclosure, the second bit number can represent resource information of the server node.

[0145] According to an embodiment of the present disclosure, reordering server nodes in available racks in the available rack list based on resource occupancy information of server nodes in available racks in the available rack list may include the following operations:

[0146] The server nodes in the available racks in the available rack list are reordered based on a predetermined server node priority rule and resource occupancy information of the server nodes in the available racks in the available rack list, where the predetermined server node priority rule can include: a server node with a smaller number of containers belonging to the same application has a higher corresponding priority; if the number of containers belonging to the same application is the same, a server node with a smaller number of containers belonging to the same group has a higher corresponding priority; and if the number of containers belonging to the same group is the same, a server node with a larger number of second pits has a higher corresponding priority.

[0147] According to an embodiment of the present disclosure, in order to realize an even distribution of containers among server nodes, containers in the same rack need to be preferentially assigned to different server nodes. To realize the preferential assignment of containers in the same rack to different server nodes, a certain server priority rule can be set.

[0148] The resource occupancy information of the server node includes the number of containers belonging to the same application, the number of containers belonging to the same group, and the number of second pits, and therefore, for each application, the server nodes in the available racks in the available rack list are reordered according to predetermined server node priority rules, such that the server node with fewer containers belonging to the same application has a higher corresponding priority, if the number of containers belonging to the same application is the same, the server node with fewer containers belonging to the same group has a higher corresponding priority, and if the number of containers belonging to the same group is the same, the server node with a larger number of second pits has a higher corresponding priority.

[0149] According to an embodiment of the present disclosure, prioritizing server nodes within available racks in the available rack list provides a basis for even distribution of containers at the server node level.

[0150] FIG. 5 illustrates a schematic flow chart of another method for creating a container according to an embodiment of the present disclosure.

[0151] As shown in FIG. 5, the method includes operations S501 to S530.

[0152] In operation S501, a resource request is obtained, where the resource request includes the number of containers to be created.

[0153] In operation S502, in response to the resource request, the total resources of each server node in each rack are obtained.

[0154] In operation S503, the used resources of each server node are obtained, where the used resources are the resources used by the created containers.

[0155] In operation S504, an available rack is identified based on the total resources of each server node and the used resources of each server node.

[0156] In operation S505, an available rack list is generated based on the available racks.

[0157] In operation S506, a created container list is obtained, where the created container list includes a plurality of created containers, and each created container has a corresponding server node, an application to which it belongs, and a group to which it belongs.

[0158] In operation S507, creation number information corresponding to each server node is identified, where the creation number information includes the number of created containers belonging to the same application and the number of created containers belonging to the same group.

[0159] In operation S508, the multiple server nodes in the available racks in the available rack list are prioritized according to a predetermined server node priority rule and the creation number information corresponding to each server node.

[0160] In operation S509, the creation number information of each available rack is identified based on the creation number information of all server nodes included in each available rack.

[0161] In operation S510, the multiple available racks in the available rack list are prioritized according to a predetermined rack priority rule and the creation number information of the multiple available racks in the available rack list.

[0162] In operation S511, in response to a resource request, an available network address list is obtained, where the available network address list includes at least one available network address.

[0163] In operation S512, the available rack with the highest priority in the available rack list is identified as the current rack.

[0164] In operation S513, whether the number of free server nodes in the current track is greater than a predetermined threshold value. If so, execute operation S514. If not, execute operation S515.

[0165] In operation S514, a free server node in the current track is identified according to the priorities of the multiple service nodes in the current track, and operation S516 is performed.

[0166] In operation S515, whether or not there is an available rack with the next priority in the available rack list. If so, execute operation S518. If not, execute operation S519.

[0167] In operation S516, one available network address is selected from the available network address list as a target network address.

[0168] In operation S517, a current container corresponding to the target network address is created in a free server node, and operation S520 is executed.

[0169] In operation S518, the next priority available rack in the available rack list is identified as the current rack, and execution returns to operation S513.

[0170] In operation S519, allocation abnormality information is generated.

[0171] In operation S520, the available network address list is updated.

[0172] In operation S521, the application and group to which the current container belongs are obtained.

[0173] In operation S522, the resource occupancy information immediately before the current rack in the available rack list is obtained.

[0174] In operation S523, the previous resource occupancy information of other racks in the available rack list is obtained.

[0175] In operation S524, current resource occupancy information of the current track is determined based on the application to which the current container belongs, the group to which the current container belongs, and the previous resource occupancy information of the current track.

[0176] In operation S525, the available racks in the available rack list are reordered based on predetermined rack priority rules, current resource occupancy information of the current racks in the available rack list, and previous resource occupancy information of other racks in the available rack list.

[0177] In operation S526, the server nodes in the available racks in the available rack list are reordered according to the predetermined server node priority rule and the resource occupancy information of the server nodes in the available racks in the available rack list.

[0178] In operation S527, it is determined whether the number of containers that have already been created is equal to the number of containers to be created. If not, operation S528 is executed. If yes, operation S529 is executed.

[0179] In operation S528, a new free server node in the available rack is identified based on the available racks in the reordered available rack list and the server nodes in the available racks, and operation S530 is performed.

[0180] In operation S529, the container creation operation is completed.

[0181] In operation S530, the next container is created based on the new free server node and the updated available network address list, and the process returns to operation S520 with the next container as the current container.

[0182] According to the embodiment of the present disclosure, the substance of the container creation method based on K8S of the embodiment of the present disclosure is to allocate different containers (i.e., instances in the service tree) in the same application to corresponding server nodes according to a scheduling policy based on the availability zone, rack and server node seating information of the deployment environment, and cluster service information in the service tree in Fig. 1, thereby realizing uniform distribution of containers. After identifying which server node a container is to be allocated to, the container needs to be created on the corresponding server node, so realizing uniform creation of containers is to realize uniform distribution of containers.

[0183] According to an embodiment of the present disclosure, the scheduling policy is as follows: 1. For a multi-availability zone scenario, prioritize allocation of different containers of the same application to different availability zones. 2. On the premise of ensuring the above "1", when an availability zone includes multiple racks and multiple containers of the same application are assigned to an availability zone, prioritize allocation of containers in the same availability zone to different racks. On the premise of ensuring the above "2", when a rack includes multiple server nodes and multiple containers of the same application are assigned to a rack, prioritize allocation of containers in the same rack to different server nodes. The above scheduling policy realizes uniform distribution of containers of the same application at three levels: availability zone, rack, and server node.

[0184] 6 is a schematic diagram illustrating a flow chart of a computational resource flow according to an embodiment of the present disclosure. FIG 6 illustrates a process of generating an available rack list, which describes operations S502 to S510.

[0185] In FIG. 6, the K8S master is the Master node (i.e., the master node) described above. The node list refers to the server node list. The node resource is the server node resource described above. "Application in which the Pod is located == Application to which resources are allocated" means that if the application in which the Pod is located is an application to which resources are allocated, the Pod count for that application is increased by 1. That is, for each created container, the count for the application to which the created container belongs on the server node corresponding to the created container is increased by 1. "Group in which the Pod is located == Group to which resources are allocated" means that if the group in which the Pod is located is a group to which resources are allocated, the Pod count for that group is increased by 1. That is, for each created container, the count for the group to which the created container belongs on the server node corresponding to the created container is increased by 1.

[0186] After traversing all pod lists, the server node list is processed according to the rack status where the server node is located, and an available rack list is generated. In addition, the racks are prioritized according to a predetermined rack priority rule in operation S510. The server nodes in the rack are prioritized according to a predetermined server node priority rule in operation S508.

[0187] In addition, the number of node bits and the total number of bits are calculated, and the total number of bits is compared with the number of allocation targets calculated in response to the resource request to determine whether or not the resource request can be responded to. In other words, if the total number of bits is equal to or greater than the number of allocation targets, it is returned to the available rack list and the allocated network address list. If the total number of bits is smaller than the number of allocation targets, allocation abnormality information is generated.

[0188] Note that every time a container is created, it is necessary to reorder the available racks in the available rack list, and to reorder the server nodes within the available racks in the available rack list.

[0189] 7 is a schematic diagram showing an application of a container creation method according to an embodiment of the present disclosure. In FIG. 7, a system application includes five layers, which are a product line, a system, an application, a group, and an instance. Currently, there are a creation target instance 1, a creation target instance 2, and a creation target instance 3 in the same application. 3 must be created on the corresponding server node.

[0190] For the instance 1 to be created, the availability zone can be selected randomly because no instances in the application have been scheduled in availability zone 1 and availability zone 2 yet. Currently, availability zone 1 is selected, and the instance 1 to be created is created on server node 1 in rack 1 in availability zone 1 based on operations S501 and S530.

[0191] For the instance 2 to be created, the instance 1 to be created for the same application is already installed in availability zone 1, so in order to ensure even distribution, availability zone 2 is selected, and the instance 2 to be created is created on server node 5 in rack 3 in availability zone 2 based on operations S501 and S530.

[0192] For the instance 3 to be created, the instance 3 to be created is created on the server node 3 in the rack 2 in the availability zone 1.

[0193] As described above, the uniform distribution of instances (i.e., containers) is realized at three levels: availability zone, rack, and server node. Because the uniform distribution of containers is realized, even if a failure such as a large-area power outage occurs in availability zone 1 or availability zone 2, by adopting the technical solution of the embodiment of the present disclosure, it can be ensured that there are still operational instances.

[0194] According to the technical solution of the embodiment of the present disclosure, the available rack list includes available racks of different availability zones, and the available racks in the available rack list and the server nodes in the available racks are all ordered by priority, so that the positioned free server node becomes a server node that meets the requirement of uniform distribution of containers, and based on this, the containers can be created uniformly at three levels of availability zones, racks and server nodes, that is, the containers can be distributed uniformly at three levels of availability zones, racks and server nodes. Therefore, the technical problem that the related art is difficult to realize the uniform distribution of containers is at least partially overcome. In addition, the uniform distribution of containers meets the service requirements of cross-availability zones, cross-racks and high availability of server nodes, and effectively avoids the occurrence of system down situations.

[0195] FIG. 8 is a schematic block diagram of a container production device according to an embodiment of the present disclosure.

[0196] As shown in FIG. 8, the container creation apparatus 800 includes an acquisition module 810, a positioning module 820, a first creation module 830, an update module 840, a first ordering module 850, and a second creation module 860.

[0197] The acquisition module 810 is provided for acquiring an available rack list and an available network address list, where the available rack list includes multiple available racks in different availability zones, each available rack includes at least one server node, and the available network address list includes at least one available network address.

[0198] A locating module 820 is provided for locating a free server node in an available rack in the available rack list.

[0199] A first creation module 830 is provided for creating a current container on a free server node, which corresponds to an available network address.

[0200] An update module 840 is provided for updating the available network address list.

[0201] A first ordering module 850 is provided for reordering the available racks in the available rack list based on resource occupancy information of the available racks in the available rack list.

[0202] A second creation module 860 is provided for creating another container based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list.

[0203] According to the technical proposal of an embodiment of the present disclosure, an available rack list and an available network address list are obtained, where the available rack list includes multiple available racks in different availability zones, each available rack includes at least one server node, and the available network address list includes at least one available network address, thereby locating free server nodes in the available racks in the available rack list, creating current containers corresponding to the available network addresses for the free server nodes, updating the available network address list, reordering the available racks in the available rack list based on the resource occupancy information of the available racks in the available rack list, and creating other containers based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list. Each time a container is created for a free server node, the available racks in the available rack list are reordered based on the resource occupancy information of the available racks in the available rack list, and the next container is created based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list, where the free server nodes are from available racks in different availability zones. Therefore, the containers can be distributed evenly, which at least partially overcomes the technical problem that it is difficult to realize even distribution of containers in related technologies. In addition, the containers can be distributed evenly, which satisfies the service requirements of cross-availability zones, cross-racks, and high availability of server nodes, and effectively avoids the occurrence of system down situations.

[0204] According to an embodiment of the present disclosure, obtaining an available rack list may include obtaining total resources of each server node in each rack; obtaining used resources of each server node, where the used resources are resources used for created containers; identifying available racks based on the total resources of each server node and the used resources of each server node; and generating an available rack list based on the available racks.

[0205] According to an embodiment of the present disclosure, the available racks in the available rack list are ordered in priority order.

[0206] According to an embodiment of the present disclosure, the following method is used to realize prioritization of multiple available racks in the available rack list: Obtain a created container list, where the created container list includes multiple created containers, and each created container has a corresponding server node, an associated application, and an associated group; Identify creation count information corresponding to each server node, where the creation count information includes the number of created containers belonging to the same application and the number of created containers belonging to the same group; Based on the creation count information corresponding to each server node, prioritize the multiple available racks in the available rack list.

[0207] According to an embodiment of the present disclosure, the positioning module 820 may include a first identifying sub-module, a second identifying sub-module, a first positioning sub-module, a second positioning sub-module, and a return sub-module.

[0208] The first identification sub-module is provided for identifying an available rack with the highest priority in the available rack list as a current rack.

[0209] The second determining sub-module is provided for determining whether the number of free server nodes in the current track is greater than a predetermined threshold.

[0210] The first locating submodule is provided for locating an empty server node in the current track when the number of empty server nodes in the current track is greater than a predetermined threshold.

[0211] The second positioning submodule is provided for identifying an available rack with a next priority in the available rack list as the current rack when the number of free server nodes in the current rack is equal to or less than a predetermined threshold.

[0212] A return submodule is provided for returning to and executing the operation of determining whether the number of free server nodes in the current track is greater than a predetermined threshold until locating a free server node in the current track.

[0213] According to an embodiment of the present disclosure, the first ordering module 840 may include a first acquisition sub-module, a second acquisition sub-module, a third acquisition sub-module, and an ordering sub-module.

[0214] The first acquisition sub-module is provided for acquiring the application and group to which the current container belongs.

[0215] The second acquisition sub-module is provided for acquiring resource occupancy information immediately before the current rack in the available rack list.

[0216] The third acquisition sub-module is provided for acquiring the previous resource occupancy information of other racks in the available rack list.

[0217] A third identifying submodule is provided for identifying current resource occupancy information of the current track based on the application to which the current container belongs, the group to which the current container belongs, and previous resource occupancy information of the current track.

[0218] A first ordering submodule is provided for reordering the available racks in the available rack list based on current resource occupancy information of the current racks in the available rack list and immediately preceding resource occupancy information of other racks in the available rack list.

[0219] According to an embodiment of the present disclosure, the previous resource occupancy information of the current rack and other racks in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and the first pit number, where the first pit number is the ratio of the total resources of the rack to the resources used by all the created containers.

[0220] According to an embodiment of the present disclosure, the first ordering sub-module may include an ordering unit.

[0221] The ordering unit is provided for reordering available racks in the available rack list based on a predetermined rack priority rule, current resource occupancy information of a current rack in the available rack list, and immediately preceding resource occupancy information of other racks in the available rack list, where the predetermined rack priority rule includes:

[0222] An available rack with fewer containers belonging to the same application has a higher corresponding priority.

[0223] If the number of containers belonging to the same application is the same, the available rack with fewer containers belonging to the same group has a higher corresponding priority.

[0224] If the number of containers belonging to the same group is the same, the available rack with a larger number of first pits has a higher corresponding priority.

[0225] According to an embodiment of the present disclosure, the container creation apparatus 800 may further include a second ordering module.

[0226] A second ordering module is provided for reordering the server nodes in the available racks in the available rack list based on resource occupancy information of the server nodes in the available racks in the available rack list.

[0227] The second creation module 850 may include a fourth identification sub-module and a creation sub-module.

[0228] A fourth identification sub-module is provided for identifying a new free server node in the available rack based on the available racks in the reordered available rack list and the server nodes in the available racks.

[0229] A creation sub-module is provided to create other containers based on the new free server nodes and the updated available network address list.

[0230] According to an embodiment of the present disclosure, the resource occupancy information of a server node in an available rack in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and a second pit number, where the second pit number is the ratio between the total resources of the server node and the resources used by all created containers.

[0231] According to an embodiment of the present disclosure, the second ordering module may include a second ordering sub-module.

[0232] The second ordering submodule is provided for re-ranking server nodes in the available racks in the available rack list based on a predetermined server node priority rule and resource occupancy information of the server nodes in the available racks in the available rack list, where the predetermined server node priority rule includes:

[0233] The fewer the number of containers that belong to the same application, the higher the corresponding priority level of the server node.

[0234] If the number of containers belonging to the same application is the same, the server node with fewer containers belonging to the same group has a higher corresponding priority.

[0235] If the number of containers belonging to the same group is the same, the server node with a larger number of second pits has a higher corresponding priority.

[0236] Any of the modules, sub-modules, and units according to the embodiments of the present disclosure, or at least some of the functions of any of the modules, sub-modules, and units according to the embodiments of the present disclosure, may be implemented in one module. Any of the modules, sub-modules, and units according to the embodiments of the present disclosure may be implemented by dividing them into multiple modules. Any of the modules, sub-modules, and units according to the embodiments of the present disclosure may be implemented at least partially in a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a board, a system on a package, an application specific integrated circuit (ASIC), or in any other reasonable manner of integrating or packaging circuits, or in any one of the three implementation manners of software, hardware, and firmware, or in any suitable combination of any of the three implementation manners. Alternatively, any of the modules, sub-modules, and units according to the embodiments of the present disclosure may be implemented at least partially as a computer program module, which can perform a corresponding function when executed.

[0237] For example, any of the acquisition module 810, the positioning module 820, the first creation module 830, the update module 840, the first ordering module 850, and the second creation module 860 may be integrated into one module / sub-module / unit, or any of the modules / sub-modules / units may be divided into multiple modules / sub-modules / units, or at least some of the functions of one or more of these modules / sub-modules / units may be combined with at least some of the functions of other modules / sub-modules / units and implemented in one module / sub-module / unit. According to an embodiment of the present disclosure, at least one of the acquisition module 810, the positioning module 820, the first creation module 830, the update module 840, the first ordering module 850, and the second creation module 860 may be at least partially implemented in a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a board, a system on a package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging circuits, or may be implemented in any one of the three implementation manners of software, hardware, and firmware, or any suitable combination thereof. Alternatively, at least one of the acquisition module 810, the positioning module 820, the first creation module 830, the update module 840, the first ordering module 850, and the second creation module 860 may be at least partially implemented as a computer program module, which can perform a corresponding function when executed.

[0238] It should be noted that the container creation device portion in the embodiment of the present disclosure corresponds to the container creation method portion in the embodiment of the present disclosure, and the explanation of the container creation device portion should specifically refer to the container creation method portion, and the explanation will be omitted here.

[0239] 9 is a schematic block diagram of an electronic device suitable for implementing the above-described method according to an embodiment of the present disclosure. The electronic device shown in FIG. 9 is merely an example and does not limit the functionality and scope of use of the embodiment of the present disclosure.

[0240] As shown in FIG. 9, the electronic device 900 according to the embodiment of the present disclosure includes a processor 901 capable of performing various suitable operations and processes based on a program stored in a read-only memory (ROM) 902 or loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), a command set processor and / or associated chipsets and / or a special purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), etc. The processor 901 may further include an on-board memory for cache purposes. The processor 901 may include a single processing unit or multiple processing units for performing different operations according to the method flow according to the embodiment of the present disclosure.

[0241] The RAM 903 stores various programs and data necessary for the operation of the system 900. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 executes the programs in the ROM 902 and / or the RAM 903 to perform various operations according to the method flow according to the embodiment of the present disclosure. The programs may be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may execute the programs stored in the one or more memories to perform various operations according to the method flow according to the embodiment of the present disclosure.

[0242] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The system 900 may further include one or more of an input section 906 including a keyboard, a mouse, etc., an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc., a storage section 908 including a hard disk, etc., and a communication section 909 including a network interface card such as a LAN card or a modem, which are connected to the I / O interface 905. The communication section 909 performs communication processing via a network such as the Internet. A driver 910 is also connected to the I / O interface 905 as necessary. For example, a removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is installed in the drive 910 as necessary, and a computer program read from the removable medium 906 is installed in the storage section 908 as necessary.

[0243] According to an embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure can be realized as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code configured to execute the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 909 and / or installed from a removable medium 911. When the computer program is executed by the processor 901, it performs the above-mentioned functions limited to the system according to the embodiment of the present disclosure. According to an embodiment of the present disclosure, the above-mentioned system, device, apparatus, module, unit, etc. may be realized by a computer program module.

[0244] The present disclosure further provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be integrated into the device / apparatus / system, and which carries one or more programs, and which, when executed, realizes the method according to the embodiments of the present disclosure.

[0245] According to an embodiment of the present disclosure, the computer readable storage medium may be a non-volatile computer readable storage medium, which may include, but is not limited to, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium may be any tangible medium that contains or stores a program, which may be used in or in combination with a command execution system, apparatus, or device.

[0246] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the above-mentioned ROM 902 and / or RAM 903 and / or one or more memories other than the ROM 902 and RAM 903.

[0247] The flowcharts and block diagrams in the drawings illustrate possible system architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or part of code, which includes executable instructions for implementing one or more defined logical functions. It should be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than the order marked in the drawings. For example, two successively shown blocks may actually be executed essentially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should be noted that each block in the block diagrams or flowcharts, and combinations of blocks in the block diagrams or flowcharts, may be implemented in a dedicated hardware-based system that performs the defined functions or operations, or may be implemented in a combination of dedicated hardware and computer commands. As can be understood by those skilled in the art, the features described in each embodiment and / or in the claims of the present disclosure may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, various combinations and / or combinations of features recited in each embodiment and / or claim of the present disclosure may be made without departing from the spirit and teaching of the present disclosure, and all such combinations and / or combinations are intended to be within the scope of the present invention.

[0248] The above describes the embodiments of the present disclosure. However, these embodiments are for illustrative purposes only and do not limit the scope of the present disclosure. Although each embodiment has been described above, this does not mean that the measures in each embodiment cannot be advantageously combined and used. The scope of the present disclosure is defined by the claims and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and all of these substitutions and modifications should be included in the scope of the present disclosure.

Claims

1. A method for creating a container by an intelligent distribution system, comprising: Obtain an available rack list and an available network address list, where the available rack list includes a plurality of available racks in different availability zones, each of the available racks includes at least one server node, and the available network address list includes at least one available network address; A free server node in an available rack in the available rack list is located, and when the free server node is located, the location is performed according to the priority of the server node, that is, the available rack with the highest priority in the available rack list is identified as a current rack, the server node with the highest priority in the current rack is identified as a current server node, whether the current server node is a free server node is identified, if the current server node is a free server node, the current server node is identified as a free server node, if the current server node is not a free server node, the server node corresponding to the next priority in the current rack is identified as the current server node, and until the free server node is located, the free server node refers to a server node having free resources; creating a current container corresponding to the available network address in the free server node, each of the created containers having a corresponding server node, an application to which it belongs, and a group to which it belongs; updating the available network address list, where updating the available network address list includes deleting the target network address in the available network address list and obtaining an updated available network address list; reordering the available racks in the available rack list based on resource occupancy information of the available racks in the available rack list, the resource occupancy information indicating resources occupied by containers installed in the available racks; creating another container based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list; Obtaining the available rack list includes: Obtaining a total resource of each server node in each rack, and determining the total resource of the server node based on the server node resource and an overbooking factor; Obtaining used resources for each of the server nodes, where the used resources are resources used by created containers; Identifying an available rack based on the total resources of each of the server nodes and the used resources of each of the server nodes; generating the available rack list based on the available racks; reordering the available racks in the available rack list based on resource occupancy information of the available racks in the available rack list, Obtaining an application and a group to which the current container belongs; Obtaining resource occupancy information immediately before the current rack in the available rack list; Obtaining immediately preceding resource occupancy information of other racks in the available rack list; determining current resource occupancy information of the current track based on an application to which the current container belongs, a group to which the current container belongs, and immediately preceding resource occupancy information of the current track; reordering the available racks in the available rack list based on current resource occupancy information of the current racks in the available rack list and immediately preceding resource occupancy information of other racks in the available rack list; How to create a container.

2. The available racks in the available rack list are ordered by priority. The method of claim 1 .

3. Prioritizing the plurality of available racks in the available rack list includes: obtaining a created container list, wherein the created container list includes a plurality of created containers; Identifying creation number information corresponding to each of the server nodes, wherein the creation number information includes a number of created containers belonging to the same application and a number of created containers belonging to the same group; and ordering the available racks in the available rack list in a priority order based on the number of creation information corresponding to each of the server nodes. The method for creating a container according to claim 2 .

4. Locating a free server node in an available rack in the available rack list includes: identifying an available rack with the highest priority in the available rack list as a current rack; determining whether a number of free server nodes in the current track is greater than a predetermined threshold; Locating free server nodes in the current track when the number of free server nodes in the current track is greater than the predetermined threshold; When the number of free server nodes in the current rack is equal to or less than the predetermined threshold, identifying an available rack with a next priority in the available rack list as the current rack; and returning to the step of determining whether the number of free server nodes in the current track is greater than the predetermined threshold value until locating a free server node in the current track. The method for creating a container according to claim 2 .

5. The immediately preceding resource occupancy information of the current rack and other racks in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and the first pit number, where the first pit number is the ratio of the total resource of the rack to the resource used by all the created containers; The method of claim 1 .

6. reordering the available racks in the available rack list based on current resource occupancy information of the current racks in the available rack list and immediately preceding resource occupancy information of other racks in the available rack list, reordering available racks in the available rack list based on predetermined rack priority rules, current resource occupancy information of the current racks in the available rack list, and immediately preceding resource occupancy information of other racks in the available rack list; Here, the predetermined rack priority rule is: The fewer the number of containers belonging to the same application, the higher the corresponding priority of the available rack. If the number of containers belonging to the same application is the same, the available rack with fewer containers belonging to the same group has a higher corresponding priority. If the number of containers belonging to the same group is the same, an available rack having a larger number of first pits has a higher corresponding priority. The method for creating a container according to claim 5 .

7. The method further includes reordering the server nodes in the available racks in the available rack list based on resource occupancy information of the server nodes in the available racks in the available rack list; creating another container based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list; Identifying a new free server node in the available rack based on the available racks and the server nodes in the available racks in the reordered available rack list; and creating another container based on the new free server node and the updated available network address list. The method of claim 1 .

8. The resource occupancy information of the server node in the available rack in the available rack list includes the number of containers belonging to the same application, the number of containers belonging to the same group, and a second pit number, where the second pit number is the ratio between the total resources of the server node and the resources used by all the created containers; The method for creating a container according to claim 7.

9. reordering the server nodes in the available racks in the available rack list based on resource occupancy information of the server nodes in the available racks in the available rack list; reordering the server nodes in the available racks in the available rack list according to a predetermined server node priority rule and resource occupancy information of the server nodes in the available racks in the available rack list; Here, the predetermined server node priority rule is: The fewer the number of containers belonging to the same application, the higher the corresponding priority of the server node; and If the number of containers belonging to the same application is the same, the server node with fewer containers belonging to the same group has a higher corresponding priority. If the number of containers belonging to the same group is the same, a server node having a larger number of second pits has a higher corresponding priority. The method for creating a container according to claim 8.

10. An acquisition module for acquiring an available rack list and an available network address list, the available rack list including a plurality of available racks in different availability zones, each of the available racks including at least one server node, and the available network address list including at least one available network address; a positioning module for positioning a free server node in an available rack in the available rack list, and when positioning a free server node, performs positioning according to the priority of the server node, i.e., identifies the available rack with the highest priority in the available rack list as a current rack, identifies the server node with the highest priority in the current rack as a current server node, determines whether the current server node is a free server node, and if the current server node is a free server node, identifies the current server node as a free server node, and if the current server node is not a free server node, identifies the server node with the next priority in the current rack as the current server node, and returns to the operation of determining whether the current server node is a free server node until a free server node is positioned, and the free server node refers to a server node having free resources; a first creation module for creating a current container in the free server node corresponding to the available network address, each of the created containers having a corresponding server node, an application belonging thereto, and a group belonging thereto; an update module for updating the available network address list, where updating the available network address list includes deleting a target network address in the available network address list and obtaining an updated available network address list; a first ordering module, which is arranged to reorder the available racks in the available rack list based on resource occupancy information of the available racks in the available rack list, the resource occupancy information indicating resources occupied by containers arranged in the available racks; a second creation module for creating another container based on the free server nodes in the available racks in the reordered available rack list and the updated available network address list; The acquiring module acquires an available rack list, Obtaining a total resource of each server node in each rack, and determining the total resource of the server node based on the server node resource and an overbooking factor; Obtaining used resources for each of the server nodes, where the used resources are resources used by created containers; Identifying an available rack based on the total resources of each of the server nodes and the used resources of each of the server nodes; generating the available rack list based on the available racks; The first ordering module reorders the available racks in the available rack list based on resource occupancy information of the available racks in the available rack list, Obtaining an application and a group to which the current container belongs; Obtaining resource occupancy information immediately before the current rack in the available rack list; Obtaining immediately preceding resource occupancy information of other racks in the available rack list; determining current resource occupancy information of the current track based on an application to which the current container belongs, a group to which the current container belongs, and immediately preceding resource occupancy information of the current track; reordering the available racks in the available rack list based on current resource occupancy information of the current racks in the available rack list and immediately preceding resource occupancy information of other racks in the available rack list; Container creation device.

11. one or more processors; A memory for storing one or more programs, said one or more programs, when executed by said one or more processors, causing said one or more processors to implement a method according to any one of claims 1 to 9; electronic equipment.

12. A computer-readable storage medium having executable instructions stored thereon, The instructions, when executed by a processor, cause the processor to implement a method according to any one of claims 1 to 9. storage medium.

13. A computer program which, when executed by a processor, implements the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and device for pre-distributing container IP, computer device and storage medium

    CN110278288A

  • Virtual machine transverse extension method and system based on rack perception

    CN110515693A

  • Information processing system, container management device and container management method

    JP2019117485A

  • Method and system for scheduling virtual machines

    JP2021521520A

  • Information processing system, container management apparatus, and container management method

    US20190196846A1