Resource allocation method and device, computer equipment and storage medium

By obtaining and matching the specification configuration information of container groups, the problem of low flexibility in container group specification configuration in traditional technology is solved, and efficient resource utilization is achieved.

CN119276926APending Publication Date: 2025-01-07TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310830738.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-06
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In traditional technology, when creating business services, the specifications and configuration of container groups are relatively flexible, resulting in low resource utilization.

Method used

By obtaining the specification configuration information of each container group in the container group collection, resource configuration matching is performed based on service demand data, ensuring that at least two container groups in the container group collection have different resource service capabilities, thereby providing target services to the service demander. The service type of service to which the instance belongs.

Benefits of technology

It improves the flexibility of container group specification configuration, meets the various configuration needs of service demanders, and greatly improves the utilization rate of service resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276926A_ABST
    Figure CN119276926A_ABST
Patent Text Reader

Abstract

The invention relates to a resource allocation method and device, computer equipment, a storage medium and a computer program product. The method can be applied to a data calculation scene of big data, and comprises the steps that specification configuration information corresponding to each container group in a container group set is acquired, and the container group set is created based on a service component corresponding to a target service instance; the specification configuration information is determined based on service demand data of a service demand side corresponding to the target service instance; performing matched resource configuration for each container group based on the specification configuration information, wherein at least two container groups in the container group set completing the resource configuration have different resource service capabilities; and providing a service corresponding to the service type to which the target service instance belongs for the service demander through the container group set of which the resource configuration is completed. And the resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource configuration method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of computer technology, various business services have emerged. A business service is a service that implements a certain business, such as database service, Web service, proxy service, etc.

[0003] In traditional technology, when creating service resources corresponding to a certain business service, a container group with equivalent specification configuration is created. The specification configuration has low flexibility, resulting in low resource utilization. Summary of the invention

[0004] Based on this, it is necessary to provide a resource configuration method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve resource utilization in response to the above technical problems.

[0005] In a first aspect, the present application provides a resource configuration method. The method comprises:

[0006] Obtaining specification configuration information corresponding to each container group in the container group set, where the container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demander corresponding to the target service instance;

[0007] Matching resource configuration for each container group based on the specification configuration information, wherein at least two container groups in the set of container groups that have completed resource configuration have different resource service capabilities;

[0008] The container group set that completes resource configuration provides the service demander with the service corresponding to the service type to which the target service instance belongs.

[0009] On the other hand, the present application also provides a resource configuration device. The device includes:

[0010] An acquisition module is used to acquire specification configuration information corresponding to each container group in the container group set, where the container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demander corresponding to the target service instance;

[0011] A configuration module, used to perform matching resource configuration for each container group based on the specification configuration information, wherein at least two container groups in the set of container groups that have completed resource configuration have different resource service capabilities;

[0012] The service module is used to provide the service demander with the service corresponding to the service type of the target service instance by completing the container group set of resource configuration.

[0013] On the other hand, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the resource configuration method provided in the first aspect when executing the computer program.

[0014] On the other hand, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the resource configuration method provided in the first aspect is implemented.

[0015] On the other hand, the present application further provides a computer program product, including a computer program, which implements the resource configuration method provided in the first aspect when executed by a processor.

[0016] The resource configuration method, device, computer equipment, storage medium and computer program product described above first obtain the specification configuration information corresponding to each container group in the container group set, the container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demander corresponding to the target service instance; then, resource configuration is matched for each container group based on the specification configuration information, and at least two container groups with different resource service capabilities exist in the container group set that completes the resource configuration; the service demander is provided with the service corresponding to the service type to which the target service instance belongs by the container group set that completes the resource configuration. The resource service capabilities of each container group in the container group set corresponding to the service component are not exactly the same. The above method opens the capability of non-equivalent configuration of container group specifications to the service demander, improves the flexibility of container group specification configuration, and greatly improves the utilization rate of service resources while meeting the various configuration requirements of the service demander.

[0017] In a second aspect, the present application provides a resource configuration method. The method includes:

[0018] In response to a resource configuration operation, a resource configuration request is generated. The resource configuration operation is performed by a service demander corresponding to the target service instance based on the service demand data. The resource configuration request carries specification configuration information corresponding to each container group in the container group set. The container group set is created based on the service component corresponding to the target service instance.

[0019] A resource configuration request is sent to the server, where the resource configuration request is used to instruct the server to parse the resource configuration request, obtain the specification configuration information corresponding to each container group in the container group set based on the parsing result, and perform matching resource configuration for each container group based on the specification configuration information. There are at least two container groups with different resource service capabilities in the container group set that has completed resource configuration, and the service demander is provided with a service corresponding to the service type to which the target service instance belongs through the container group set that has completed resource configuration.

[0020] On the other hand, the present application also provides a resource configuration device. The device includes:

[0021] A generation module, configured to generate a resource configuration request in response to a resource configuration operation, wherein the resource configuration operation is performed by a service demander corresponding to a target service instance based on service demand data, and the resource configuration request carries specification configuration information corresponding to each container group in a container group set, and the container group set is created based on a service component corresponding to the target service instance;

[0022] A sending module is used to send a resource configuration request to a server, where the resource configuration request is used to instruct the server to parse the resource configuration request, obtain the specification configuration information corresponding to each container group in the container group set based on the parsing result, and perform matching resource configuration for each container group based on the specification configuration information. At least two container groups in the container group set that have completed resource configuration have different resource service capabilities. The container group set that has completed resource configuration is used to provide a service demander with a service corresponding to the service type to which the target service instance belongs.

[0023] On the other hand, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the resource configuration method provided in the second aspect when executing the computer program.

[0024] On the other hand, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the resource configuration method provided in the second aspect is implemented.

[0025] On the other hand, the present application further provides a computer program product, including a computer program, which implements the resource configuration method provided in the second aspect when executed by a processor.

[0026] The resource configuration method, device, computer equipment, storage medium and computer program product generate a resource configuration request in response to a resource configuration operation, the resource configuration operation is performed by the service demand party corresponding to the target service instance based on the service demand data, the resource configuration request carries the specification configuration information corresponding to each container group in the container group set, and the container group set is created based on the service component corresponding to the target service instance; the resource configuration request is sent to the server, the resource configuration request is used to instruct the server to parse the resource configuration request, obtain the specification configuration information corresponding to each container group in the container group set based on the parsing result, and match the resource configuration for each container group based on the specification configuration information. At least two container groups in the container group set that completes the resource configuration have different resource service capabilities, and the container group set that completes the resource configuration provides the service demand party with the service type corresponding to the target service instance. The resource service capabilities of each container group in the container group set corresponding to the service component are not exactly the same. The method opens the ability of non-equivalent configuration of container group specifications to the service demand party, improves the flexibility of container group specification configuration, and greatly improves the utilization rate of service resources while meeting the various configuration requirements of the service demand party. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 An application environment diagram of a resource configuration method in an embodiment;

[0028] Figure 2 A schematic diagram of a resource configuration method in one embodiment;

[0029] Figure 3 A schematic diagram of non-equivalent configuration of container group specifications in one embodiment;

[0030] Figure 4 A schematic diagram of creating an example page in an embodiment;

[0031] Figure 5 A schematic diagram of a three-layer resource structure in an embodiment;

[0032] Figure 6 A schematic diagram of an example creation result in one embodiment;

[0033] Figure 7 A schematic diagram of fields involved in non-equivalent settings in one embodiment;

[0034] Figure 8 A schematic diagram of a horizontal expansion result in one embodiment;

[0035] Fig. 9 A schematic diagram of a vertical upgrade result in one embodiment;

[0036] Fig.10A schematic diagram of a rolling upgrade result in one embodiment;

[0037] Fig.11 A schematic diagram of the relationship between a persistent volume declaration, a persistent volume, and an underlying hard disk in one embodiment;

[0038] Fig.12 A schematic diagram of a flow chart of a resource configuration method in another embodiment;

[0039] Fig.13 A structural block diagram of a resource configuration device in an embodiment;

[0040] Fig.14 It is a structural block diagram of a resource configuration device in another embodiment;

[0041] Fig.15 is an internal structure diagram of a computer device in one embodiment;

[0042] Fig.16 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] The resource configuration method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. The resource configuration method provided in the embodiment of the present application can be executed by the terminal 102 or the server 104 alone, or it can be executed by the terminal 102 and the server 104 in collaboration. Taking the execution by the server 104 alone as an example, the server 104 can first obtain the specification configuration information corresponding to each container group in the container group set. The container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demand party corresponding to the target service instance; then, based on the specification configuration information, matching resource configuration is performed for each container group, and at least two container groups in the container group set that completes the resource configuration have different resource service capabilities; finally, the container group set that completes the resource configuration provides the service demand party with the service corresponding to the service type to which the target service instance belongs.

[0045] Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.

[0046] The resource configuration method provided in the embodiment of the present application can be applied in the big data computing scenario in cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing, and sharing of data. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. applied based on the cloud computing business model, which can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0047] Big data refers to a collection of data that cannot be captured, managed, and processed by conventional software tools within a certain time frame. It is a massive, high-growth, and diverse information asset that requires new processing models to have stronger decision-making power, insight discovery, and process optimization capabilities. With the advent of the cloud era, big data has also attracted more and more attention. Big data requires special technologies to effectively process large amounts of data within a tolerable time frame. Technologies applicable to big data include large-scale parallel processing databases, data mining, distributed file systems, distributed databases, cloud computing platforms, the Internet, and scalable storage systems.

[0048] In some embodiments, Figure 2 As shown, a resource configuration method is provided, which is applied to Figure 1The server in the example is used to illustrate the following steps:

[0049] Step 202, obtaining specification configuration information corresponding to each container group in the container group set, the container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demander corresponding to the target service instance.

[0050] Among them, a container orchestration system (Kubernetes, abbreviated as K8s) is deployed on the server, and the resource configuration method provided in the embodiment of the present application can be a function of K8s.

[0051] The container group set is a set of container groups included in the service component corresponding to the target service instance. The service component corresponding to the target service instance can be one or more, and for each service component, the resource configuration method provided in the embodiment of the present application can be used for resource configuration.

[0052] A container group includes a group of related containers, also called a pod. A container is an isolated unit that packages the related resources required to run an application. A container introduces application code, its libraries and dependencies, any configuration files, and other system tools it depends on. Containers enable cross-platform portability of applications, isolation between processes, and high efficiency of development and deployment.

[0053] Among them, the specification configuration information corresponding to the container group includes information used to characterize the processing capability of the container group. Exemplarily, the information used to characterize the processing capability of the container group may include: central processing unit (CPU) specifications, memory (Mem) specifications, persistent volume declarations, container image versions, parameter configurations required for container operation, etc.

[0054] The server may obtain the specification configuration information corresponding to each container group in the container group set by interacting with the client, or may directly determine the specification configuration information corresponding to each container group in the container group set according to the service demand data. The client may be an application installed on the terminal or a web page provided by the terminal, which is not limited in the embodiments of the present application.

[0055] Among them, the service demander can perform an instance creation operation on the client. In response to the instance creation operation, the client can generate an instance creation request and send the instance creation request to the server. The server can create a matching target service instance based on the received instance creation request and the pre-set resource model structure, and create a service component corresponding to the target service instance according to the service type to which the target service instance belongs, and further create a container group set according to the service component corresponding to the target service instance.

[0056] Among them, the service demand data may include reference data for guiding the configuration of container group specifications. Exemplarily, the service demand data may include expected business concurrency, container group specification lower limit value, container group specification upper limit value, etc., which is not limited in this embodiment of the present application.

[0057] The resource configuration method provided in the embodiment of the present application can be applied in the scenario of instance creation, and can also be applied in the scenario of updating resources based on changes in business volume after the instance is created.

[0058] Step 204: matching resource configuration for each container group based on the specification configuration information, and at least two container groups in the set of container groups that have completed resource configuration have different resource service capabilities.

[0059] After obtaining the specification configuration information of each container group in the container group set corresponding to each service component corresponding to the target service instance, the server can perform resource configuration for the corresponding container group based on the specification configuration information.

[0060] Exemplarily, the target service instance is ClickHouse-instance 1, and the service components corresponding to the target service instance include zookeeper and clickhouse. The container group set corresponding to zookeeper includes 2 shards, each shard includes 3 container groups, that is, the container group set corresponding to zookeeper includes 6 container groups; the container group set corresponding to clickhouse includes 3 shards, each shard includes 3 container groups, that is, the container group set corresponding to clickhouse includes 9 container groups; after obtaining the specification configuration information corresponding to the above 15 container groups, the server performs resource configuration for each container group based on the specification configuration information corresponding to the container group. Taking the second container group in the second shard in the container group set corresponding to zookeeper as an example, assuming that the specification configuration information corresponding to the container group includes a CPU specification of 2 cores, a Mem specification of 2G, a persistent volume declaration of 20G, a container image version of V2, and the parameter configuration required for container operation includes the parameter configuration corresponding to the container image version V2, then the second container group in the second shard can be configured with: 2-core CPU, 2G Mem, 20G persistent volume declaration, and a container image version of V2, and the parameters required for the container image version V2 to run can be configured for it.

[0061] It should be noted that the container group set corresponding to each service component may contain one or more shards, and each shard may contain one or more replicas. In other words, there may be a special case where a service component contains only one shard, and the shard contains only one container group (pod). The specific situation is determined by the component configuration information entered by the service demander.

[0062] Among them, after completing the configuration operation, for each service component corresponding to the target service instance, the resource service capabilities of each container group in the container group set corresponding to the service component may be different, or may be partially the same, which is determined by the specification configuration information of each container group.

[0063] Here are some examples:

[0064] The target service instance is cluster1. The service components corresponding to the target service instance include set1 and set2. Taking set1 as an example, assume that the container group set corresponding to set1 includes three container groups, namely pod1, pod2, and pod3. After the above configuration, Figure 3 As shown in the figure, the specification configuration information of these three container groups is different.

[0065] Step 206: Provide the service demander with a service corresponding to the service type to which the target service instance belongs by using the container group set that has completed resource configuration.

[0066] Among them, after the business end deployed by the service demander receives the business processing request, it can send the business processing request to the load balancing module. The load balancing module can determine the load situation of each container group in the container group set based on the resource utilization rate of each container group in the container group set that has completed the resource configuration, distribute the business processing request based on the load situation, and the container group that receives the business processing request executes the corresponding business processing.

[0067] The load conditions may include load levels such as overload, heavy load, and light load. The load balancing module may determine the load level of each container group in the container group set based on the resource utilization of each container group in the container group set, and may send a business processing request to any container group with a light load level, so that the container group performs the corresponding business processing.

[0068] Among them, the service type to which the target service instance belongs may include stateful services, such as database services, and may also include stateless services, such as World Wide Web (Web) services, proxy agents, etc. Database services may include MySQL services, MariaDB services, PostgreSQL services, SQL services, ClickHouse services, MongoDB services, Redis services, etc., which are not limited to the embodiments of the present application.

[0069] Here are some examples:

[0070] Assume that the service type of the target service instance is ClickHouse service, the target service instance is ClickHouse-instance 1, and the service components corresponding to the target service instance include zookeeper and clickhouse. The container group set corresponding to zookeeper includes 2 shards, each shard includes 3 container groups; the container group set corresponding to clickhouse includes 3 shards, each shard includes 3 container groups; after receiving the business processing request, the load balancing module can search for all container groups used to process the business processing request in all the above container groups, and send the business processing request to the lightly loaded container group among these container groups, which will process the business processing request.

[0071] In the above embodiment, firstly, the specification configuration information corresponding to each container group in the container group set is obtained. The container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demander corresponding to the target service instance; then, resource configuration is matched for each container group based on the specification configuration information, and at least two container groups with different resource service capabilities exist in the container group set that completes the resource configuration; the service demander is provided with the service corresponding to the service type to which the target service instance belongs by the container group set that completes the resource configuration. The resource service capabilities of each container group in the container group set corresponding to the service component are not exactly the same. The above method opens the capability of non-equivalent configuration of container group specifications to the service demander, improves the flexibility of container group specification configuration, and greatly improves the utilization rate of service resources while meeting the various configuration requirements of the service demander.

[0072] In some embodiments, before obtaining the specification configuration information corresponding to each container group in the container group set, it also includes: receiving an instance creation request sent by a client, the instance creation request carrying service type information and component configuration information; based on a preset resource model structure, creating a target service instance matching the service type information, and creating a service component corresponding to the target service instance; creating a container group set corresponding to the service component according to the component configuration information and the service component corresponding to the target service instance; sending each container group in the created container group set to the client to instruct the client to display each container group; obtaining the specification configuration information corresponding to each container group in the container group set, including: receiving the specification configuration information corresponding to each container group in the container group set sent by the client, each specification configuration information is configured for each container group by the service demander based on the service demand data.

[0073] Among them, the resource configuration method provided in the embodiment of the present application can be applied in the instance creation scenario. In the instance creation scenario, the service demander can perform an instance creation operation on the client. The client responds to the instance creation operation and generates an instance creation request. The instance creation request carries service type information and component configuration information. The client further sends the instance creation request to the server. After receiving the instance creation request, the server parses the instance creation request to obtain the service type information and component configuration information. Based on the pre-set resource model structure, a target service instance matching the service type information is created, and a service component corresponding to the target service instance is created; according to the component configuration information and the service component corresponding to the target service instance, a container group set corresponding to the service component is created.

[0074] Among them, the server can send each container group in the created container group set to the client, the client can display each container group in the container group set, the service demander can configure corresponding specification configuration information for each container group based on the service demand data, and the client can send the specification configuration information configured by the service demander for each container group to the server.

[0075] Among them, the service demander can open the instance creation page corresponding to the target service type on the client. The target service type can be determined by the service demander according to its own business processing requirements. The instance creation page includes a component configuration area. The service demander can enter component configuration information in the component configuration area. The client can generate an instance creation request based on the service type information and component configuration information of the target service type. The service type information of the target service type includes information such as the service identifier and service capability of the target service type.

[0076] The component configuration information may include the number of shards and the number of replicas. Figure 4As shown, the service demander can open the instance creation page of the target service type on the client, and the instance creation page includes the service components corresponding to the target service type. Figure 4 Component 1 and component 2 are used as examples. The service demander can configure the corresponding parameters for each service component. Figure 4 The service demander can configure the number of shards and replicas for component 1, and also configure the number of shards and replicas for component 2. After completing the configuration on the instance creation page, the service demander can trigger the submit control. After detecting the trigger operation, the client can obtain the service type information corresponding to the target service type; it can also obtain the number of shards and replicas corresponding to component 1, and the number of shards and replicas corresponding to component 2, and use this information as component configuration information. The client can generate an instance creation request based on the above service type information and component configuration information, and send the instance creation request to the server.

[0077] It should be noted that: Figure 4 The ability to specify the number of general replicas is provided. For example, if the service demander specifies that the number of shards is 2 and the number of replicas is 3, the server needs to create 3 replicas in each shard. Figure 4 This is just an example. The client can also provide independent replica configuration controls for each shard. The service demander can set the number of replicas for each shard separately. The embodiment of this application does not limit the interface design of the client. In addition, in addition to customizing the number of shards and replicas, the service demander can also customize the parameters such as the startup order of each component. The embodiment of this application does not limit this.

[0078] Among them, the pre-set resource model structure is a three-layer structure, the first layer is the service instance, the second layer is the service component, and the third layer is the container group. After the server obtains the service type information and component configuration information, based on the above three-layer structure, it first creates a target service instance that matches the service type information, and then determines the service component type according to the service type information. Based on the component type, it creates a service component corresponding to the target service instance, and creates a corresponding container group set for each component according to the component configuration information of each service component returned by the client. The service type to which the target service instance belongs can be a database service. The embodiment of the present application abstracts the database service into a three-layer resource model, which meets the common management requirements of multiple database services and can support the containerization of multiple database services.

[0079] For example, see Figure 5 As shown, the target service instance created by the server is cluster1, the service components corresponding to the target service instance include set1 and set2, the container group set corresponding to set1 includes pod1, pod2 and pod3, and the container group set corresponding to set2 includes pod1, pod2 and pod3.

[0080] In the above embodiment, a method for configuring non-equivalent specifications for each container group in a container group set in an instance creation scenario is provided, which opens the capability of non-equivalent configuration of container group specifications to the service demander and improves the flexibility of container group specification configuration.

[0081] In some embodiments, component configuration information includes data shard information and data replica information; based on the component configuration information and the service component corresponding to the target service instance, a container group set corresponding to the service component is created, including: based on the data shard information and the service component corresponding to the target service instance, multiple data shards corresponding to the service component are created; based on the data replica information, a container group corresponding to each data shard is created, and based on the container groups corresponding to each data shard, a container group set corresponding to the service component is determined.

[0082] The data shard information includes the number of shards configured by the service demander for each component on the instance creation page, and the data replica information includes the number of replicas configured by the service demander for each shard.

[0083] Among them, after receiving the component configuration information corresponding to each service component configured by the service demander, the server obtains the component configuration information corresponding to each created service component, creates multiple data shards corresponding to the service component based on the data shard information in the component configuration information, creates a container group corresponding to each data shard based on the data copy information in the component configuration information, and determines the container group set corresponding to the service component based on the container groups corresponding to each data shard.

[0084] The following is an example of ClickHouse database:

[0085] Assuming that the target service type is ClickHouse database, the service demander can open the instance creation page of ClickHouse database on the client. The instance creation page contains the service components of ClickHouse database: zookeeper and clickhouse. The service demander can configure the corresponding parameters for each service component respectively. The service demander configures 2 shards for zookeeper and 2 copies for each shard; 1 shard for clickhouse and 3 copies for the shard. The client generates an instance creation request based on the service type information and component configuration information of the target service type and sends it to the server. The server creates the target service instance (ch-instance 1) corresponding to the ClickHouse database based on the service type information. Since the components of ClickHouse database are zookeeper and clickhouse, zookeeper and clickhouse are created under ch-instance 1. The server creates shard 1 and shard 2 for zookeeper according to the number of shards corresponding to zookeeper, and creates 2 pods for shard 1, 2 pods for shard 2, shard 1 for clickhouse, and 3 pods for shard 1. The creation result is as follows: Figure 6 shown.

[0086] In the above embodiment, during the instance creation process, the service demander can specify the number of shards and replicas for each service component. The server creates a container group set for the corresponding service component based on the number of shards and replicas, thereby improving the flexibility of component configuration and meeting the personalized configuration needs of the service demander.

[0087] In some embodiments, obtaining specification configuration information corresponding to each container group in the container group set includes: receiving a capacity update request sent by a client, where the capacity update request is generated by the client for a capacity update operation performed on a container group included in the container group set to be updated based on a service demand policy, and the capacity update request carries the specification configuration information corresponding to each container group included in the updated container group set; parsing the capacity update request, and determining the specification configuration information corresponding to each container group in the container group set based on the parsed result.

[0088] Among them, the resource configuration method provided in the embodiment of the present application can be applied to the scenario where resources are updated based on changes in business volume after instance creation. The client provides a capacity update page. The service demander can perform a capacity update operation on the capacity update page for the container group included in the container group set to be updated. The client can determine the specification configuration information corresponding to each container group included in the updated container group set based on the capacity update operation performed by the service demander, generate a capacity update request based on the specification configuration information corresponding to each container group included in the updated container group set, and send the capacity update request to the server.

[0089] In some embodiments, the service demander corresponding to the target service instance may perform a capacity update operation in combination with the service demand data. The service demand data may include business volume records for each month of previous years. The service demander may analyze and count the business volume records. If it is found that the business volume will surge in a certain time period, the service demander may perform a horizontal capacity expansion operation on the capacity update page before the time period. If the business volume will drop sharply in a certain time period, the service demander may perform a capacity reduction operation on the capacity update page before the time period.

[0090] Among them, when the service demander performs a horizontal expansion operation on the container group included in the container group set to be updated on the capacity update page, the client can determine the specification configuration information corresponding to each container group included in the expanded container group set based on the horizontal expansion operation performed by the service demander, generate a horizontal expansion request based on the specification configuration information corresponding to each container group included in the expanded container group set, and send the horizontal expansion request to the server.

[0091] In which, when the service demander performs a capacity reduction operation on the container group included in the container group set to be updated on the capacity update page, the client can determine the specification configuration information corresponding to each container group included in the reduced container group set based on the capacity reduction operation performed by the service demander, generate a capacity reduction request based on the specification configuration information corresponding to each container group included in the reduced container group set, and send the capacity reduction request to the server.

[0092] Among them, see Figure 7As shown, during the instance creation process, the instance creation page provides input boxes corresponding to the two fields of shard number (shards) and replica number (replicas). The service demander can configure corresponding values ​​for the two fields through the input box. After receiving the values ​​of the two fields sent by the client, the server can create a container group set for the corresponding service component based on the values ​​of the two fields, the value of the replica interval field (interval) and the value of the replica upper limit field in the shard. The value of the replica slot field (interval) and the value of the slot upper limit field can be the default value. The capacity update page includes the created target service instance, the service component corresponding to the target service instance, the container group set corresponding to the service component, the container groups included in the container group set, and the specification configuration information of each container group. When the service demander decides to expand the capacity of a service component, he can combine the numbers of each container group included in the container group set corresponding to the service component on the capacity update page, and specify the number of the container group to be added in the expansion number designation field (extras) corresponding to the service component; when the service demander decides to reduce the capacity of a service component, he can combine the numbers of each container group included in the container group set corresponding to the service component on the capacity update page, and specify the number of the container group to be deleted in the reduction number designation field (suppressions) corresponding to the service component; when the service demander decides to upgrade a container group in a service component, he can combine the numbers of each container group included in the container group set corresponding to the service component on the capacity update page, determine the slot number of the container group, and specify the slot number in the upgrade number designation field (primed) corresponding to the service component. Ordinals) input the above slot number, which is the number of the container group to be upgraded; if the service demander decides to delete a shard in a service component, he can enter the number of the above shard in the shard deletion field (erased Shards) corresponding to the service component. Whether in the instance creation phase or the capacity update phase, the server can store the specification configuration information configured by the service demander for each container group in a persistent manner in the form of a map, which can prevent the loss of differentiated specification configurations of each container group in operations such as component exceptions and restarts.

[0093] In the above embodiment, after the instance is created, during the normal operation of the service, the service demander can perform capacity update operations based on the service demand data. If the business volume is expected to surge, horizontal capacity expansion can be performed in advance to ensure business response speed. If the business volume is expected to decrease, capacity can be reduced to improve resource utilization.

[0094] In some embodiments, receiving a capacity update request sent by a client includes: receiving a horizontal capacity expansion request sent by the client, where the horizontal capacity expansion request is generated by a horizontal capacity expansion operation performed by the client on a container group included in a container group set to be updated based on a service demand policy, where the horizontal capacity expansion operation includes a container group adding operation and a specification configuration operation for the newly added container group, where specification configuration information specified by the specification configuration operation is different from specification configuration information of an original container group, and the horizontal capacity expansion request carries specification configuration information corresponding to each container group included in the expanded container group set.

[0095] Among them, the client provides a capacity update page. When the service demander predicts that the business volume will surge, the service demander can perform a container group addition operation and a specification configuration operation on the newly added container group for the container groups included in the container group set to be updated on the capacity update page. The specification configuration information specified by the specification configuration operation is different from the specification configuration information of the original container group. Based on the container group addition operation and specification configuration operation performed by the service demander, the client can determine the specification configuration information corresponding to each container group included in the expanded container group set, generate a horizontal capacity expansion request based on the specification configuration information corresponding to each container group included in the expanded container group set, and send the horizontal capacity expansion request to the server.

[0096] The service demander may perform a container group adding operation and a specification configuration operation for the newly added container group in combination with the service demand data. The service demand data may include an expected increase in business volume. Exemplarily, when the service demander decides to expand the service component set1 corresponding to the cluster1 instance, since the existing container groups in the container group set corresponding to set1 are numbered pod1, pod2, and pod3 respectively, the service demander can enter the number of the container group to be added in the extras field corresponding to set1. Assuming that the service demander enters the container group numbers to be added as 4 and 5, the service demander can select specification configuration information for the container groups numbered 4 and 5 respectively. Assuming that the specification configuration information selected for the container group numbered 4 is 8 cores and 16G, and the specification configuration information selected for the container group numbered 5 is 16 cores and 32G, the client can generate a horizontal expansion request based on the specification configuration information of the original three container groups and the specification configuration information of the newly added container group, and send the horizontal expansion request to the server. The server can store the specification configuration information of the newly added container group in the map, and add container groups numbered 4 and 5 to set1, and match resource configurations for the container groups numbered 4 and 5 according to the specification configuration information corresponding to the container groups numbered 4 and 5 respectively. The configurations of other container groups remain unchanged, thereby completing the horizontal expansion process. See also Figure 8It can be seen that the resource service capacity of the expanded container group numbered 4 (8 cores and 16 GB) is different from the resource service capacity of the original three container groups (4 cores and 8 GB), the resource service capacity of the expanded container group numbered 5 (16 cores and 32 GB) is also different from the resource service capacity of the original three container groups, and the resource service capacity of the container group numbered 4 is also different from the resource service capacity of the container group numbered 5.

[0097] In the above embodiment, when the service demander determines that horizontal expansion is required, the service demander can execute a container group adding operation and a specification configuration operation for the newly added container group. The specification configuration information specified by the specification configuration operation can be different from the specification configuration information of the original container group. This capability of non-equivalent configuration of container group specifications improves the flexibility of container group specification configuration and meets the various configuration requirements of the service demander.

[0098] In some embodiments, obtaining specification configuration information corresponding to each container group in the container group set includes: receiving a configuration change update request sent by a client, where the configuration change update request is generated by the client for a configuration change update operation performed on a container group included in the container group set to be updated based on a service requirement policy, and the configuration change update request carries specification configuration information corresponding to each container group included in the updated container group set; parsing the configuration change update request, and determining the specification configuration information corresponding to each container group in the container group set based on the parsing result.

[0099] Among them, the configuration change update request is used to request the server to update the configuration of the container group. The configuration change update request can be a vertical upgrade request, which is used to request the server to vertically upgrade the configuration of the container group. The configuration change update request can also be a vertical downgrade request, which is used to request the server to vertically downgrade the configuration of the container group. The specific implementation process can be seen in the description below.

[0100] Among them, the resource configuration method provided in the embodiment of the present application can be applied to the scenario where resources are updated based on changes in business volume after instance creation. The client provides a configuration change update page. The service demander can perform a configuration change update operation on the configuration change update page for the container group included in the container group set to be updated. The client can determine the specification configuration information corresponding to each container group included in the updated container group set based on the configuration change update operation performed by the service demander, generate a configuration change update request based on the specification configuration information corresponding to each container group included in the updated container group set, and send the configuration change update request to the server.

[0101] In some embodiments, the service demander corresponding to the target service instance may perform a configuration change update operation in combination with the service demand data. If an upgrade is required, the service demander may perform a vertical upgrade operation on the configuration change update page. If a downgrade is required, the service demander may perform a vertical downgrade operation on the configuration change update page.

[0102] Among them, when the service demander performs a vertical upgrade operation on the container group included in the container group set to be updated on the capacity update page, the client can determine the specification configuration information corresponding to each container group included in the upgraded container group set based on the vertical upgrade operation performed by the service demander, generate a vertical upgrade request based on the specification configuration information corresponding to each container group included in the upgraded container group set, and send the vertical upgrade request to the server.

[0103] Among them, when the service demander performs a vertical downgrade operation on the container group included in the container group set to be updated on the capacity update page, the client can determine the specification configuration information corresponding to each container group included in the downgraded container group set based on the vertical downgrade operation performed by the service demander, generate a vertical downgrade request based on the specification configuration information corresponding to each container group included in the downgraded container group set, and send the vertical downgrade request to the server.

[0104] In the above embodiment, after the instance is created, during the normal operation of the service, the service demander can perform configuration change update operations based on the service demand data. When the business volume is expected to surge, vertical upgrade can be performed in advance to ensure the business response speed. When the business volume is expected to decrease, vertical downgrade can be performed to improve resource utilization.

[0105] In some embodiments, receiving a configuration change update request sent by a client includes: receiving a vertical upgrade request sent by the client, where the vertical upgrade request is generated by the client for a vertical upgrade operation performed on a container group included in a container group set to be updated based on a service requirement policy, where the vertical upgrade operation includes a specified operation for the container group to be upgraded and a specification configuration operation for the container group to be upgraded, where specification configuration information specified by specification configuration operations corresponding to different container groups to be upgraded are different, and the vertical upgrade request carries specification configuration information corresponding to each container group included in the updated container group set.

[0106] Among them, the client provides a configuration change update page. When the service demander predicts that the business volume will surge, the service demander can perform specified operations on the container groups to be upgraded and specification configuration operations on the container groups to be upgraded for the container groups included in the container group set to be updated on the configuration change update page. The specification configuration information specified by the specification configuration operations corresponding to different container groups to be upgraded is different. The client can determine the specification configuration information corresponding to each container group included in the container group set after the vertical upgrade based on the specified operations on the container groups to be upgraded and the specification configuration operations on the container groups to be upgraded performed by the service demander, generate a vertical upgrade request based on the specification configuration information corresponding to each container group included in the container group set after the vertical upgrade, and send the vertical upgrade request to the server.

[0107] In the process of vertically upgrading or vertically downgrading a container group, the service traffic on the container group can be removed. When the upgrade or downgrading is detected to be successful, the service traffic can be connected again, thereby ensuring that the service quality is not affected.

[0108] The service demander can perform designated operations on the container group to be upgraded and specification configuration operations on the container group to be upgraded in combination with the service demand data. For example, assume that during the instance creation phase, the server creates cluster1, creates set1 and set2 for cluster1, and creates one shard for the container group set corresponding to set1 according to the values ​​of shards, replicas, and interval in set1. Three container groups are created for the shard, namely pod1, pod2, and pod3. When the service demander decides to vertically upgrade pod1 and pod2 in set1, it can designate pod1 and pod2 as the container group to be upgraded and reselect specification configuration information for pod1 and pod2. Assuming that the specification configuration information selected for pod1 is 8 cores and 16G, and the specification configuration information selected for pod2 is 16 cores and 32G, the client can generate a vertical upgrade request based on the latest specification configuration information of pod1 and pod2, and send the vertical upgrade request to the server. The server can vertically upgrade pod1 and pod2 by in-place upgrade or reconstruction upgrade. See . Fig. 9 It can be seen that the resource service capabilities of pod1 obtained by vertical upgrade and pod2 obtained by vertical upgrade are different.

[0109] In the above embodiment, when the service demander determines that vertical upgrade is required, the service demander can execute the specified operation of the container group to be upgraded and the specification configuration operation for the container group to be upgraded. The specification configuration information specified by the specification configuration operations corresponding to different container groups to be upgraded is different. This capability of non-equivalent configuration of container group specifications improves the flexibility of container group specification configuration and meets various configuration requirements of the service demander.

[0110] In some embodiments, the service demand data includes a preset specification update strategy, and obtaining specification configuration information corresponding to each container group in the container group set includes: detecting resource utilization of each container group included in the to-be-updated container group set at each preset detection moment, and determining, based on the detection result, an average resource utilization of each container group included in the to-be-updated container group set at each preset detection moment; determining, based on the average resource utilization at each preset detection moment, a target time period in which the average resource utilization meets a preset condition; and updating the to-be-updated container group set using the specification update strategy in the target time period to obtain specification configuration information corresponding to each container group in the container group set.

[0111] Among them, the preset detection time can be a pre-set time for detecting resource utilization. The preset detection time can include multiple times. For example, the preset detection time can include a time corresponding to every 5 minutes starting from zero o'clock. This is only an example and this application is not limited to this.

[0112] Among them, after the server completes the instance creation, each created container group set can be used as the container group set to be updated. For each container group in the container group set to be updated, the resource utilization of the container group at each preset detection moment within a preset time period can be detected. The preset time period can be one year or half a year, and the average utilization of the container group at each preset detection moment within the preset time period is calculated. For each preset detection moment, the average of the utilization means of each container group at the preset detection moment is further calculated to obtain the average resource utilization at the preset detection moment.

[0113] After obtaining the average resource utilization rate at each preset detection moment, the server may compare the average resource utilization rate at the preset detection moment with a preset threshold value for each preset detection moment. If the average resource utilization rate at the preset detection moment is greater than the preset threshold value, it is determined that the average resource utilization rate at the preset detection moment meets the preset condition. If there are N consecutive preset detection moments whose average resource utilization rates meet the preset condition, the time period consisting of the N consecutive preset detection moments may be used as the target time period.

[0114] After determining the target time period, the server may use the specification update policy to update the container group set to be updated during the target time period, and obtain the specification configuration information corresponding to each container group in the container group set.

[0115] In the above embodiment, a method is provided in which the server automatically updates the specifications of the container group based on the statistical data of resource utilization, thereby preventing the problem of slow response speed caused by a sudden increase in business volume.

[0116] In some embodiments, the specification update strategy includes horizontal expansion information and vertical upgrade information, and the specification update strategy is used to update the set of container groups to be updated, including: detecting the service traffic between the start time and the preset end time of the target time period; when the detected service traffic is greater than a preset threshold, updating the set of container groups to be updated based on the horizontal expansion information; when the detected service traffic is less than or equal to the preset threshold, updating the set of container groups to be updated based on the vertical upgrade information.

[0117] Among them, horizontal expansion refers to adding several container groups to the container group set. During the horizontal expansion process, the original container groups can work normally, that is, there is no need to remove the business traffic of the original container groups; vertical upgrade refers to upgrading the resources of a container group. During the vertical upgrade of the container group, the container group cannot work normally, that is, the business traffic of the container group needs to be removed.

[0118] Among them, the preset deadline can be a moment pre-set for detecting business traffic. The server can detect the business traffic between the start time and the preset deadline of the target time period. When the detected business traffic is greater than the preset threshold, it means that it is not suitable to extract the business traffic, and then choose to use the horizontal expansion method for updating; when the detected business traffic is less than or equal to the preset threshold, it means that the business traffic can be extracted, and then choose to use the vertical upgrade method for updating.

[0119] Among them, the horizontal expansion information includes the service components that need to be expanded, the number of container groups that need to be expanded, the specification configuration information of the expanded container groups, etc. The server can add a corresponding number of container groups to the container group set corresponding to the service components that need to be expanded, and perform resource configuration for the newly added container groups based on the specification configuration information in the horizontal expansion information.

[0120] The vertical upgrade information includes the service components that need to be upgraded, the container group identifiers that need to be upgraded, the upgraded specification configuration information, etc. The server can search for the container group that matches the above identifiers in the service components that need to be upgraded, and perform resource upgrades on the container group based on the specification configuration information in the vertical upgrade information.

[0121] In the above embodiment, a method is provided for the server to automatically update the specifications of the container group based on the statistical data of resource utilization, and a suitable method is selected to update the resources in combination with the actual business traffic, thereby ensuring the normal operation of the business.

[0122] In some embodiments, performing resource configuration matching for each container group based on the specification configuration information includes: for a container group to be upgraded in the container group set, obtaining specification configuration information corresponding to the container group to be upgraded; determining upgrade identification information corresponding to the container group to be upgraded according to identification information of the container group to be upgraded and preset identification interval information; creating a target container group matching the upgrade identification information, and performing resource configuration matching for the target container group based on the specification configuration information corresponding to the container group to be upgraded; the method further includes: detecting whether an operation abnormality occurs in the target container group that completes resource configuration during the service provision process; if an operation abnormality occurs, deleting the target container group that completes resource configuration; if no operation abnormality occurs, retaining the target container group that completes resource configuration and deleting the container group to be upgraded.

[0123] Among them, the client provides a configuration change update page. When the service demander predicts that the business volume will surge, the service demander can perform the specified operation of the container group to be upgraded and the specification configuration operation for the container group to be upgraded on the configuration change update page for the container group included in the container group set to be updated. The client can determine the identification information of the container group to be upgraded based on the specified operation of the container group to be upgraded, and determine the specification configuration information of the container group to be upgraded based on the specification configuration operation. The client can generate a vertical upgrade request based on the identification information and specification configuration information of the container group to be upgraded, and send the vertical upgrade request to the server. The server parses the vertical upgrade request to obtain the identification information and specification configuration information of the container group to be upgraded.

[0124] The server may obtain identification information of the container group to be upgraded, and determine upgrade identification information corresponding to the container group to be upgraded according to the identification information of the container group to be upgraded and preset identification interval information. The preset identification interval information may be a default value of the interval field.

[0125] Among them, after determining the upgrade identification information corresponding to the container group to be upgraded, the server can create a target container group that matches the upgrade identification information, and perform resource configuration matching the target container group based on the specification configuration information corresponding to the container group to be upgraded. The configured target container group can be detected. If it can operate normally, the target container group with completed resource configuration is retained, and the container group to be upgraded is deleted.

[0126] For example, assume that during the instance creation phase, the server creates cluster1, creates set1 and set2 for cluster1, the value of the shards field corresponding to set1 is 1, the value of the replicas field is 3, and the value of the interval field is the default value 2. According to the values ​​of shards, replicas, and interval in set1, a shard is created for the container group set corresponding to set1, and three container groups are created for the shard, namely pod0, pod2, and pod4. Assuming that the identification information of the container group to be upgraded includes pod0 and pod2, it can be determined that the upgrade identification information corresponding to the container group to be upgraded is pod1 and pod3. The server can create pod1 and pod3 in the container group set corresponding to set1, and based on the specification configuration information carried in the vertical upgrade request, perform matching resource configuration for pod1 and pod3, and detect the operation status of the configured pod1 and pod3, see Fig.10 As shown in the figure, assuming that pod1 can run normally, pod3 runs abnormally, pod1 is retained, pod0 is deleted, and pod3 is rolled back to pod2, that is, pod3 is deleted and pod2 is retained.

[0127] In the above embodiment, during the vertical upgrade process, the slots are used for rolling upgrade. When the container group after the rolling upgrade runs abnormally, it is rolled back to the original container group, thereby reducing the impact of the upgrade process on business processing.

[0128] In some embodiments, matching resource configuration for each container group based on the specification configuration information includes: for a container group to be upgraded in the container group set, acquiring specification configuration information corresponding to the container group to be upgraded; deleting the container group to be upgraded and recreating a target container group that matches identification information of the container group to be upgraded; and matching resource configuration for the target container group based on the specification configuration information corresponding to the container group to be upgraded.

[0129] Among them, the server can parse the vertical upgrade request to obtain the identification information and specification configuration information of the container group to be upgraded. The server can search for the container group to be upgraded based on the identification information of the container group to be upgraded, and use the specification configuration information obtained by the analysis as the specification configuration information corresponding to the container group to be upgraded. The server can delete the found container group to be upgraded, and re-create a target container group that matches the identification information of the container group to be upgraded, and perform matching resource configuration for the target container group based on the specification configuration information corresponding to the container group to be upgraded.

[0130] For example, assume that during the instance creation phase, the server created cluster1, created set1 and set2 for cluster1, created one shard for the container group set corresponding to set1, and created three container groups for the shard, namely pod1, pod2, and pod3. Assuming that the identification information of the container group to be upgraded includes pod1, the server can delete pod1 in the container group set corresponding to set1, and re-create pod1, and perform resource configuration for the re-created pod1 based on the specification configuration information selected by the service demander for pod1.

[0131] In the above embodiment, during the vertical upgrade process, the resource capacity is upgraded by means of reconstruction upgrade. This process provides a non-equivalent configuration function of container group specifications for the service demander, making the resource upgrade more flexible.

[0132] In some embodiments, performing matching resource configuration for each container group based on the specification configuration information includes: for a container group to be upgraded in the container group set, obtaining specification configuration information corresponding to the container group to be upgraded; obtaining each container included in the container group to be upgraded, and performing matching resource configuration for each container based on the specification configuration information corresponding to the container group to be upgraded.

[0133] The server may parse the vertical upgrade request to obtain identification information and specification configuration information of the container group to be upgraded. The server may search for the container group to be upgraded based on the identification information of the container group to be upgraded, and use the specification configuration information obtained by the analysis as the specification configuration information corresponding to the container group to be upgraded. The server may search for each container included in the container group to be upgraded, and perform matching resource configuration for each container based on the specification configuration information corresponding to the container group to be upgraded.

[0134] For example, assume that during the instance creation phase, the server created cluster1, created set1 and set2 for cluster1, created one shard for the container group set corresponding to set1, and created three container groups for the shard, namely pod1, pod2, and pod3. Assuming that the identification information of the container group to be upgraded includes pod1, the server can search for pod1 in the container group set corresponding to set1, and obtain the containers contained in pod1. Based on the specification configuration information selected by the service demander for pod1, the server can perform resource configuration for the containers contained in pod1.

[0135] In the above embodiment, during the vertical upgrade process, the resource capacity is upgraded by an in-place upgrade method, which does not require the creation of a new container group. The process provides a non-peer configuration function of the container group specification for the service demander, making the resource upgrade more flexible.

[0136] In some embodiments, the specification configuration information includes a persistent volume declaration, and resource configuration is matched for each container group based on the specification configuration information, including: for each container group, extracting the storage space specification from the persistent volume declaration corresponding to the current container group, creating a persistent volume based on the storage space specification, binding the persistent volume and the persistent volume declaration, and the current container group is used to access the storage area associated with the persistent volume.

[0137] Among them, for each container group in the container group set, the specification configuration information of the container group includes a persistent volume claim (PVC), which includes storage space specifications (storage), storage mode (volumeMode), etc. The server can extract storage from the persistent volume claim PVC and create a persistent volume (PV) based on the storage. The properties of PV include storage, storage class name (storageClassName), reclaim policy (reclaimPolicy), etc. The PV is associated with the real storage area at the bottom layer, which can be a hard disk (Disk) system. The properties of the Disk system include hard disk type (type), region (region), available zone (zone), disk capacity (capacity), etc. The server can bind the created PV to the PVC of the container group. The subsequent container group can be used to access the storage area associated with the PV, and the persistent storage of the specific PV can be realized through the underlying CSI plug-in.

[0138] For example, see Fig.11 As shown in the figure, assuming that the storage in the persistent volume declaration PVC of a pod is 20Gi and the volumeMode is the file system, the server can create a persistent volume PV with storage of 20Gi, storageClassName of cloud hard disk-solid state disk (cbs-ssd), and reclaimPolicy of deletion retention policy (Retain). The persistent volume is associated with a Disk system, and the type of the Disk system is solid state disk SSD, the region is region A, and the available zone is sub-region a in region A. The server can bind the created PV to the PVC of the above pod, and the subsequent container group can be used to access the Disk system associated with the PV.

[0139] In some embodiments, a resource configuration method is provided, which can be Figure 1 Terminal execution in , see Fig.12 As shown, the method includes:

[0140] Step 1202, in response to the resource configuration operation, a resource configuration request is generated. The resource configuration operation is performed by the service demander corresponding to the target service instance based on the service demand data. The resource configuration request carries the specification configuration information corresponding to each container group in the container group set. The container group set is created based on the service component corresponding to the target service instance.

[0141] Among them, the resource configuration method provided in the embodiment of the present application can be applied in the instance creation scenario. The service demander can open the instance creation page corresponding to the target service type on the client provided by the terminal. The service demander can perform the instance creation operation on the instance creation page. The client can generate an instance creation request in response to the instance creation operation and send the instance creation request to the server. The server creates the target service instance corresponding to the target service type, the service component corresponding to the target service instance, and the container group set corresponding to the service component based on the instance creation request.

[0142] In the instance creation scenario, the server may send each container group in the created container group set to the client, and the client may display each container group in the container group set. The service demander may perform resource configuration operations on each container group based on the service demand data. The client generates a resource configuration request based on the resource configuration operation of the service demander. The resource configuration request carries the specification configuration information specified by the service demander for each container group. The specific implementation process of the instance creation scenario may refer to the aforementioned embodiment.

[0143] Among them, the resource configuration method provided in the embodiment of the present application can be applied in a horizontal expansion scenario. The client provides a capacity update page. When the service demander estimates that the business volume will surge, all existing container group sets are used as container group sets to be updated. On the capacity update page, for the container groups included in the container group set to be updated, a container group addition operation and a specification configuration operation for the newly added container group are performed. The client can determine the specification configuration information corresponding to each container group included in the expanded container group set based on the container group addition operation and specification configuration operation performed by the service demander, and generate a horizontal expansion request based on the specification configuration information corresponding to each container group included in the expanded container group set, and send the horizontal expansion request to the server. That is, in the horizontal expansion scenario, the resource configuration operation includes a container group addition operation and a specification configuration operation for the newly added container group, and the resource configuration request is a horizontal expansion request. The specific implementation process of the horizontal expansion scenario can refer to the aforementioned embodiment.

[0144] Among them, the resource configuration method provided in the embodiment of the present application can be applied in a vertical upgrade scenario. The client provides a configuration change update page. When the service demander predicts that the business volume will surge, all existing container group sets are used as container group sets to be updated. On the configuration change update page, for the container groups included in the container group set to be updated, the specified operation of the container group to be upgraded and the specification configuration operation for the container group to be upgraded are performed. The client can determine the specification configuration information corresponding to each container group included in the container group set after the vertical upgrade based on the specified operation of the container group to be upgraded and the specification configuration operation for the container group to be upgraded performed by the service demander. Based on the specification configuration information corresponding to each container group included in the container group set after the vertical upgrade, a vertical upgrade request is generated, and the vertical upgrade request is sent to the server. That is, in the vertical upgrade scenario, the resource configuration operation includes the specified operation of the container group to be upgraded and the specification configuration operation for the container group to be upgraded. The resource configuration request is a vertical upgrade request. The specific implementation process of the vertical upgrade scenario can refer to the aforementioned embodiment.

[0145] The resource configuration method provided in the embodiments of the present application can also be applied in capacity reduction scenarios and vertical degradation scenarios. The specific implementation process in these scenarios can be derived based on the real-time steps in the above-mentioned horizontal expansion scenarios and vertical lifting scenarios.

[0146] Step 1204, sending a resource configuration request to the server, the resource configuration request is used to instruct the server to parse the resource configuration request, obtain the specification configuration information corresponding to each container group in the container group set based on the parsing result, and perform matching resource configuration for each container group based on the specification configuration information. There are at least two container groups with different resource service capabilities in the container group set that has completed resource configuration, and the container group set that has completed resource configuration is used to provide the service demander with a service corresponding to the service type to which the target service instance belongs.

[0147] Corresponding to the instance creation scenario in step 1202, after receiving the specification configuration request, the server parses the specification configuration request to obtain specification configuration information of each container group in the container group set. For each container group, based on the specification configuration information of the container group, matching resource configuration is performed for the container group. When the specification configuration information of each container group in the container group set is different, the resource service capabilities of each container group that completes the resource configuration are also different. When some of the specification configuration information are the same, correspondingly, the resource service capabilities of some of the container groups that complete the resource configuration are the same. For the specific implementation process, refer to the aforementioned embodiment.

[0148] Corresponding to the horizontal expansion scenario in step 1202, after receiving the horizontal expansion request, the server parses the horizontal expansion request, obtains the number of the newly added container group, creates a container group corresponding to the number, and performs resource configuration on the created container group based on the specification configuration information specified by the service demander for the newly added container group. The configuration of the original container group remains unchanged. For the specific implementation process, refer to the aforementioned embodiment.

[0149] Corresponding to the vertical upgrade scenario in step 1202, after receiving the vertical upgrade request, the server parses the vertical upgrade to obtain the number of the container group to be upgraded, determines the upgrade number corresponding to the container group to be upgraded according to the number of the container group to be upgraded and the preset identification interval information, creates a container group corresponding to the number, and performs resource configuration on the created container group based on the specification configuration information specified for the container group to be upgraded according to the service requirement policy, while the configuration of the original container group remains unchanged. For the specific implementation process, refer to the aforementioned embodiment.

[0150] In the above embodiment, in response to a resource configuration operation, a resource configuration request is generated. The resource configuration operation is performed by the service demand party corresponding to the target service instance based on the service demand data. The resource configuration request carries the specification configuration information corresponding to each container group in the container group set. The container group set is created based on the service component corresponding to the target service instance. The resource configuration request is sent to the server. The resource configuration request is used to instruct the server to parse the resource configuration request, obtain the specification configuration information corresponding to each container group in the container group set based on the parsing result, and match the resource configuration for each container group based on the specification configuration information. At least two container groups in the container group set that completes the resource configuration have different resource service capabilities. The container group set that completes the resource configuration provides the service demand party with the service type corresponding to the target service instance. The resource service capabilities of each container group in the container group set corresponding to the service component are not exactly the same. The above method opens the ability of non-equivalent configuration of container group specifications to the service demand party, improves the flexibility of container group specification configuration, and greatly improves the utilization rate of service resources while meeting the various configuration requirements of the service demand party.

[0151] In some embodiments, the service demand data includes a resource utilization threshold, and in response to a resource configuration operation, a resource configuration request is generated, including: displaying the resource utilization data sent by the server, the resource utilization data including the average resource utilization of each container group included in the set of container groups to be updated at each preset detection time; after receiving an expansion instruction of the resource configuration page from the service demander, displaying the resource configuration page; and generating a resource configuration request in response to a resource configuration operation occurring on the resource configuration page.

[0152] Among them, after the server completes resource configuration for each container group in each container group set, it provides the service demander with the service corresponding to the service type of the target service instance through the container group set that has completed the resource configuration. During the service process, the server can use each container group set as a container group set to be updated. The server can send the average resource utilization of each container group included in the container group set to be updated at each preset detection time to the client, and the client will display the average resource utilization at each preset detection time.

[0153] Among them, the service demander can combine the actual business needs and the resource utilization data displayed by the client. When resources need to be updated, after the client triggers the expansion instruction of the resource configuration page, the client will display the resource configuration page after receiving the instruction and perform resource configuration operations on the resource configuration page. The client can generate a resource configuration request based on the resource configuration operation.

[0154] In the above embodiment, after the server completes the instance creation, the average resource utilization of each container at each preset detection time can be sent to the client. The service demander can open the resource configuration page and complete the resource configuration operation on the resource configuration page to achieve resource update.

[0155] In some embodiments, a resource configuration page includes a horizontal expansion area and a vertical upgrade area. In response to a resource configuration operation sent on the resource configuration page, a resource configuration request is generated, including: in response to a container group addition operation and a specification configuration operation for the newly added container group occurring in the horizontal expansion area, a horizontal expansion request is generated, the specification configuration information specified by the specification configuration operation is different from the specification configuration information of the original container group, and the horizontal expansion request carries the specification configuration information corresponding to each container group included in the expanded container group set; or, in response to a specified operation of a container group to be upgraded occurring in the vertical upgrade area and a specification configuration operation for the container group to be upgraded, a vertical upgrade request is generated, the specification configuration information specified by the specification configuration operation corresponding to different container groups to be upgraded is different, and the vertical upgrade request carries the specification configuration information corresponding to each container group included in the updated container group set.

[0156] Among them, the resource configuration page includes a horizontal expansion area and a vertical upgrade area. The service demander can choose the resource update method based on the actual situation. If the service demander determines to use the horizontal expansion method, the container group addition operation and the specification configuration operation for the newly added container group can be performed in the horizontal expansion area. The specification configuration information specified by the specification configuration operation can be different from the specification configuration information of the original container group. The client can generate a horizontal expansion request based on these two operations and send the horizontal expansion request to the server. The detailed implementation process can be found in the above embodiment.

[0157] In the case where the service demander determines to use the vertical upgrade method, the specified operation of the container group to be upgraded and the specification configuration operation for the container group to be upgraded can be performed in the vertical upgrade area. The specification configuration information specified by the specification configuration operations corresponding to different container groups to be upgraded can be different. The client can generate a vertical upgrade request based on these two operations and send the vertical upgrade request to the server. The detailed implementation process can be referred to the above embodiment.

[0158] In the above embodiment, the resource configuration page includes a horizontal expansion area and a vertical upgrade area. When the service demander determines to use the horizontal expansion method to update the resources, the corresponding operations can be performed in the horizontal expansion area. When it is determined to use the vertical upgrade method to update the resources, the corresponding operations can be performed in the vertical upgrade area, thereby meeting the personalized configuration needs of the service demander.

[0159] In some embodiments, a resource configuration request is generated in response to a resource configuration operation, including: generating an instance creation request in response to an instance creation operation occurring on an instance creation page, the instance creation request carrying service type information and component configuration information; sending the instance creation request to a server to instruct the server to create a target service instance matching the service type information based on a preset resource model structure, and to create a service component corresponding to the target service instance, and to create a container group set corresponding to the service component according to the component configuration information and the service component corresponding to the target service instance; displaying each container group in the container group set created by the server, and generating a resource configuration request in response to a resource configuration operation of the service demander on each container group.

[0160] Among them, the service demander can open the instance creation page corresponding to the target service type on the client provided by the terminal, and the service demander can perform the instance creation operation on the instance creation page. The client generates an instance creation request in response to the instance creation operation and sends the instance creation request to the server. The instance creation request carries service type information and component configuration information; the server creates a target service instance matching the service type information based on a pre-set resource model structure, and creates a service component corresponding to the target service instance. According to the component configuration information and the service component corresponding to the target service instance, a container group set corresponding to the service component is created, and each container group in the created container group set is sent to the client. The client can display each container group in the container group set. The service demander can perform resource configuration operations for each container group based on the service demand data. The client generates a resource configuration request in response to the resource configuration operation of the service demander for each container group. The specific implementation process can be referred to the description of the aforementioned embodiment.

[0161] In the above embodiment, a method for configuring non-equivalent specifications for each container group in a container group set in an instance creation scenario is provided. During the instance creation process, the ability to configure non-equivalent container group specifications is opened to the service demander, thereby improving the flexibility of container group specification configuration.

[0162] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0163] Based on the same inventive concept, the embodiment of the present application also provides a resource configuration device for implementing the resource configuration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more resource configuration device embodiments provided below can refer to the limitations on the resource configuration method above, and will not be repeated here.

[0164] In one embodiment, Fig.13 As shown, a resource configuration device is provided, comprising:

[0165] The acquisition module 1301 is used to acquire specification configuration information corresponding to each container group in the container group set, where the container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demander corresponding to the target service instance;

[0166] Configuration module 1302, used to perform matching resource configuration for each container group based on the specification configuration information, and at least two container groups in the set of container groups that have completed resource configuration have different resource service capabilities;

[0167] The service module 1303 is used to provide the service demander with a service corresponding to the service type to which the target service instance belongs by completing the container group set of resource configuration.

[0168] In some embodiments, the acquisition module 1301 is also used to: receive an instance creation request sent by a client, the instance creation request carries service type information and component configuration information; based on a preset resource model structure, create a target service instance that matches the service type information, and create a service component corresponding to the target service instance; create a container group set corresponding to the service component according to the component configuration information and the service component corresponding to the target service instance; send each container group in the created container group set to the client to instruct the client to display each container group; the acquisition module is also used to: receive specification configuration information corresponding to each container group in the container group set sent by the client, each specification configuration information is configured by the service demander for each container group based on the service demand data.

[0169] In some embodiments, component configuration information includes data shard information and data copy information; the acquisition module 1301 is also used to: create multiple data shards corresponding to the service components according to the data shard information and the service components corresponding to the target service instance; create a container group corresponding to each data shard according to the data copy information, and determine the container group set corresponding to the service component based on the container groups corresponding to each data shard.

[0170] In some embodiments, the acquisition module 1301 is further used to: receive a capacity update request sent by a client, where the capacity update request is generated by the client for a capacity update operation performed on a container group included in a container group set to be updated based on a service requirement policy, and the capacity update request carries specification configuration information corresponding to each container group included in the updated container group set; parse the capacity update request, and determine specification configuration information corresponding to each container group in the container group set based on the parsing result.

[0171] In some embodiments, the acquisition module 1301 is further used to: receive a horizontal expansion request sent by a client, where the horizontal expansion request is generated by the client for a horizontal expansion operation performed on a container group included in the container group set to be updated based on a service demand policy, where the horizontal expansion operation includes a container group addition operation and a specification configuration operation for the newly added container group, where the specification configuration information specified by the specification configuration operation is different from the specification configuration information of the original container group, and the horizontal expansion request carries the specification configuration information corresponding to each container group included in the expanded container group set.

[0172] In some embodiments, the acquisition module 1301 is further used to: receive a configuration change update request sent by a client, where the configuration change update request is generated by the client for a configuration change update operation performed on a container group included in a container group set to be updated based on a service requirement policy, and the configuration change update request carries specification configuration information corresponding to each container group included in the updated container group set; parse the configuration change update request, and determine specification configuration information corresponding to each container group in the container group set based on the parsing result.

[0173] In some embodiments, the acquisition module 1301 is further used to: receive a vertical upgrade request sent by a client, where the vertical upgrade request is generated by the client for a vertical upgrade operation performed on a container group included in the container group set to be updated based on a service requirement policy, where the vertical upgrade operation includes a specified operation on the container group to be upgraded and a specification configuration operation on the container group to be upgraded, where the specification configuration information specified by the specification configuration operations corresponding to different container groups to be upgraded is different, and the vertical upgrade request carries the specification configuration information corresponding to each container group included in the updated container group set.

[0174] In some embodiments, the service demand data includes a preset specification update strategy, and the acquisition module 1301 is further used to: detect the resource utilization of each container group included in the to-be-updated container group set at each preset detection time, and determine the average resource utilization of each container group included in the to-be-updated container group set at each preset detection time based on the detection result; determine a target time period in which the average resource utilization meets a preset condition based on the average resource utilization at each preset detection time; and update the to-be-updated container group set using the specification update strategy in the target time period to obtain specification configuration information corresponding to each container group in the container group set.

[0175] In some embodiments, the specification update strategy includes horizontal expansion information and vertical upgrade information, and the acquisition module 1301 is further used to: detect the business traffic between the start time and the preset end time of the target time period; when the detected business traffic is greater than a preset threshold, update the set of container groups to be updated based on the horizontal expansion information; when the detected business traffic is less than or equal to the preset threshold, update the set of container groups to be updated based on the vertical upgrade information.

[0176] In some embodiments, the configuration module 1302 is specifically used to: for a container group to be upgraded in the container group set, obtain specification configuration information corresponding to the container group to be upgraded; determine the upgrade identification information corresponding to the container group to be upgraded according to the identification information of the container group to be upgraded and the preset identification interval information; create a target container group matching the upgrade identification information, and perform matching resource configuration for the target container group based on the specification configuration information corresponding to the container group to be upgraded; the service module is also used to detect whether an operation abnormality occurs in the target container group that completes resource configuration during the service provision process; if an operation abnormality occurs, delete the target container group that completes resource configuration; if no operation abnormality occurs, retain the target container group that completes resource configuration and delete the container group to be upgraded.

[0177] In some embodiments, the configuration module 1302 is specifically used to: for a container group to be upgraded in the container group set, obtain specification configuration information corresponding to the container group to be upgraded; delete the container group to be upgraded and recreate a target container group that matches the identification information of the container group to be upgraded; and perform matching resource configuration for the target container group based on the specification configuration information corresponding to the container group to be upgraded.

[0178] In some embodiments, the configuration module 1302 is specifically used to: for a container group to be upgraded in the container group set, obtain specification configuration information corresponding to the container group to be upgraded; obtain each container included in the container group to be upgraded, and perform matching resource configuration for each container based on the specification configuration information corresponding to the container group to be upgraded.

[0179] In some embodiments, the specification configuration information includes a persistent volume declaration, and the configuration module 1302 is specifically used to: for each container group, extract the storage space specification from the persistent volume declaration corresponding to the current container group, create a persistent volume based on the storage space specification, bind the persistent volume and the persistent volume declaration, and the current container group is used to access the storage area associated with the persistent volume.

[0180] In some embodiments, Fig.14 As shown, a resource configuration device is provided, comprising:

[0181] A generating module 1401 is used to generate a resource configuration request in response to a resource configuration operation, where the resource configuration operation is performed by a service demander corresponding to a target service instance based on service demand data, and the resource configuration request carries specification configuration information corresponding to each container group in a container group set, where the container group set is created based on a service component corresponding to the target service instance;

[0182] The sending module 1402 is used to send a resource configuration request to the server. The resource configuration request is used to instruct the server to parse the resource configuration request, obtain the specification configuration information corresponding to each container group in the container group set based on the parsing result, and match the resource configuration for each container group based on the specification configuration information. There are at least two container groups with different resource service capabilities in the container group set that completes the resource configuration. The container group set that completes the resource configuration is used to provide the service demander with a service corresponding to the service type to which the target service instance belongs.

[0183] In some embodiments, the generation module 1401 is specifically used to: display resource utilization data sent by the server, the resource utilization data including the average resource utilization rate of each container group included in the set of container groups to be updated at each preset detection time; after receiving an expansion instruction for the resource configuration page from the service demander, display the resource configuration page; and generate a resource configuration request in response to a resource configuration operation occurring on the resource configuration page.

[0184] In some embodiments, the resource configuration page includes a horizontal expansion area and a vertical upgrade area, and the generation module 1401 is specifically used to: generate a horizontal expansion request in response to a container group addition operation and a specification configuration operation for the newly added container group occurring in the horizontal expansion area, the specification configuration information specified by the specification configuration operation is different from the specification configuration information of the original container group, and the horizontal expansion request carries the specification configuration information corresponding to each container group included in the expanded container group set; or generate a vertical upgrade request in response to a specified operation of a container group to be upgraded and a specification configuration operation for the container group to be upgraded occurring in the vertical upgrade area, the specification configuration information specified by the specification configuration operation corresponding to different container groups to be upgraded is different, and the vertical upgrade request carries the specification configuration information corresponding to each container group included in the updated container group set.

[0185] In some embodiments, the generation module 1401 is specifically used to: generate an instance creation request in response to an instance creation operation occurring on an instance creation page, the instance creation request carrying service type information and component configuration information; send the instance creation request to the server to instruct the server to create a target service instance matching the service type information based on a preset resource model structure, and create a service component corresponding to the target service instance, and create a container group set corresponding to the service component according to the component configuration information and the service component corresponding to the target service instance; display each container group in the container group set created by the server, and generate a resource configuration request in response to the service demander's resource configuration operation for each container group.

[0186] Each module in the resource configuration device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0187] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.15As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store specification configuration information, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource configuration method is implemented.

[0188] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.16 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a resource configuration method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0189] Those skilled in the art will understand that Fig.15 and Fig.16The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0190] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0191] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0192] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0193] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0194] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0195] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0196] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A resource configuration method, characterized in that: The method comprises: Acquire specification configuration information corresponding to each container group in the container group set, wherein the container group set is created based on the service component corresponding to the target service instance, and the specification configuration information is determined based on the service demand data of the service demander corresponding to the target service instance; Performing resource configuration matching for each container group based on the specification configuration information, wherein at least two container groups in the set of container groups that have completed the resource configuration have different resource service capabilities; The service demander is provided with a service corresponding to the service type to which the target service instance belongs through the container group set that has completed resource configuration.

2. The method according to claim 1, characterized in that Before obtaining the specification configuration information corresponding to each container group in the container group set, the method further includes: Receive an instance creation request sent by a client, wherein the instance creation request carries service type information and component configuration information; Based on the preset resource model structure, create a target service instance matching the service type information, and create a service component corresponding to the target service instance; create a container group set corresponding to the service component according to the component configuration information and the service component corresponding to the target service instance; Sending each container group in the created container group set to the client to instruct the client to display each container group; The obtaining of specification configuration information corresponding to each container group in the container group set includes: Receive specification configuration information corresponding to each container group in the container group set sent by the client, where each specification configuration information is configured by the service demander for each container group based on the service demand data.

3. The method according to claim 2, characterized in that The component configuration information includes data sharding information and data replica information; the step of creating a container group set corresponding to the service component according to the component configuration information and the service component corresponding to the target service instance includes: According to the data shard information and the service component corresponding to the target service instance, create multiple data shards corresponding to the service component; According to the data replica information, a container group corresponding to each data shard is created, and based on the container groups corresponding to each data shard, a container group set corresponding to the service component is determined.

4. The method according to claim 1, characterized in that: The obtaining of specification configuration information corresponding to each container group in the container group set includes: receiving a capacity update request sent by a client, wherein the capacity update request is generated by the client for a capacity update operation performed on a container group included in the container group set to be updated based on the service requirement policy, and the capacity update request carries specification configuration information corresponding to each container group included in the updated container group set; The capacity update request is parsed, and specification configuration information corresponding to each container group in the container group set is determined based on the parsing result.

5. The method according to claim 4, characterized in that The receiving a capacity update request sent by the client includes: A horizontal expansion request is received from a client, where the horizontal expansion request is generated by the client for a horizontal expansion operation performed on a container group included in the container group set to be updated based on the service demand policy, where the horizontal expansion operation includes a container group adding operation and a specification configuration operation for the newly added container group, where specification configuration information specified by the specification configuration operation is different from the specification configuration information of the original container group, and the horizontal expansion request carries specification configuration information corresponding to each container group included in the expanded container group set.

6. The method according to claim 1, characterized in that The obtaining of specification configuration information corresponding to each container group in the container group set includes: receiving a configuration change update request sent by a client, wherein the configuration change update request is generated by the client for performing a configuration change update operation on a container group included in the container group set to be updated based on the service requirement policy, and the configuration change update request carries specification configuration information corresponding to each container group included in the updated container group set; The configuration change update request is parsed, and specification configuration information corresponding to each container group in the container group set is determined based on the parsing result.

7. The method according to claim 6, characterized in that The receiving a configuration change update request sent by the client includes: A vertical upgrade request sent by a client is received, where the vertical upgrade request is generated by the client for a vertical upgrade operation performed on a container group included in the container group set to be updated based on the service requirement policy, where the vertical upgrade operation includes a specified operation for the container group to be upgraded and a specification configuration operation for the container group to be upgraded, where specification configuration information specified by the specification configuration operations corresponding to different container groups to be upgraded are different, and the vertical upgrade request carries specification configuration information corresponding to each container group included in the updated container group set.

8. The method according to claim 1, characterized in that The service demand data includes a preset specification update strategy, and the obtaining of specification configuration information corresponding to each container group in the container group set includes: Detecting resource utilization rates of each container group included in the set of container groups to be updated at each preset detection time, and determining an average resource utilization rate of each container group included in the set of container groups to be updated at each preset detection time based on the detection result; Based on the average resource utilization at each preset detection moment, determine a target time period in which the average resource utilization meets a preset condition; In the target time period, the set of container groups to be updated is updated using the specification update strategy to obtain specification configuration information corresponding to each container group in the set of container groups.

9. The method according to claim 8, characterized in that The specification update strategy includes horizontal expansion information and vertical upgrade information, and using the specification update strategy to update the set of container groups to be updated includes: Detecting the service flow between the start time and the preset end time of the target time period; When the detected service flow is greater than a preset threshold, updating the to-be-updated container group set based on the horizontal expansion information; When the detected service flow is less than or equal to the preset threshold, the to-be-updated container group set is updated based on the vertical upgrade information.

10. The method according to claim 1, characterized in that The resource configuration for matching each container group based on the specification configuration information includes: For the container group to be upgraded in the container group set, obtain the specification configuration information corresponding to the container group to be upgraded; Determine upgrade identification information corresponding to the container group to be upgraded according to the identification information of the container group to be upgraded and the preset identification interval information; Creating a target container group that matches the upgrade identification information, and performing matching resource configuration for the target container group based on the specification configuration information corresponding to the container group to be upgraded; The method further comprises: Check whether the target container group that has completed resource configuration during service provisioning has any operational abnormalities; In the case of an operational abnormality, the target container group that has completed resource configuration is deleted; in the case of no operational abnormality, the target container group that has completed resource configuration is retained, and the container group to be upgraded is deleted.

11. The method according to any one of claims 1 to 10, characterized in that: The specification configuration information includes a persistent volume declaration, and the resource configuration matched for each container group based on the specification configuration information includes: For each container group, the storage space specification is extracted from the persistent volume declaration corresponding to the current container group, a persistent volume is created based on the storage space specification, the persistent volume and the persistent volume declaration are bound, and the current container group is used to access the storage area associated with the persistent volume.

12. A resource configuration method, characterized in that: The method comprises: In response to a resource configuration operation, generating a resource configuration request, the resource configuration operation being performed by a service demander corresponding to the target service instance based on the service demand data, the resource configuration request carrying specification configuration information corresponding to each container group in a container group set, the container group set being created based on a service component corresponding to the target service instance; The resource configuration request is sent to a server, where the resource configuration request is used to instruct the server to parse the resource configuration request, obtain specification configuration information corresponding to each container group in the container group set based on the parsing result, perform matching resource configuration for each container group based on the specification configuration information, at least two container groups in the container group set that completes resource configuration have different resource service capabilities, and provide the service demander with a service corresponding to the service type to which the target service instance belongs through the container group set that completes resource configuration.

13. The method according to claim 12, characterized in that The service demand data includes a resource utilization threshold, and the generating of a resource configuration request in response to the resource configuration operation includes: Displaying resource utilization data sent by the server, the resource utilization data including an average resource utilization rate of each container group included in the container group set to be updated at each preset detection time; After receiving an instruction from the service demander to expand the resource configuration page, display the resource configuration page; In response to a resource configuration operation occurring on the resource configuration page, a resource configuration request is generated.

14. The method according to claim 13, characterized in that The resource configuration page includes a horizontal expansion area and a vertical upgrade area, and the generating of a resource configuration request in response to a resource configuration operation sent on the resource configuration page includes: In response to a container group addition operation and a specification configuration operation for the newly added container group occurring in the horizontal expansion area, a horizontal expansion request is generated, the specification configuration information specified by the specification configuration operation is different from the specification configuration information of the original container group, and the horizontal expansion request carries the specification configuration information corresponding to each container group included in the expanded container group set; or In response to a specified operation of a container group to be upgraded occurring in the vertical upgrade area and a specification configuration operation for the container group to be upgraded, a vertical upgrade request is generated, the specification configuration information specified by the specification configuration operations corresponding to different container groups to be upgraded is different, and the vertical upgrade request carries the specification configuration information corresponding to each container group included in the updated container group set.

15. The method according to claim 12, characterized in that The generating of a resource configuration request in response to the resource configuration operation includes: In response to an instance creation operation occurring on an instance creation page, generating an instance creation request, wherein the instance creation request carries service type information and component configuration information; Sending the instance creation request to the server to instruct the server to create a target service instance matching the service type information based on a preset resource model structure, and to create a service component corresponding to the target service instance, and to create a container group set corresponding to the service component according to the component configuration information and the service component corresponding to the target service instance; Each container group in the container group set created by the server is displayed, and a resource configuration request is generated in response to the resource configuration operation of the service demander on each container group.

16. A resource allocation device, characterized in that: The device comprises: An acquisition module, used to acquire specification configuration information corresponding to each container group in a container group set, wherein the container group set is created based on a service component corresponding to a target service instance, and the specification configuration information is determined based on service demand data of a service demander corresponding to the target service instance; A configuration module, configured to perform matching resource configuration for each container group based on the specification configuration information, wherein at least two container groups in the set of container groups that have completed resource configuration have different resource service capabilities; The service module is used to provide the service demander with the service corresponding to the service type to which the target service instance belongs through the container group set that completes the resource configuration.

17. A resource allocation device, characterized in that: The device comprises: A generating module, configured to generate a resource configuration request in response to a resource configuration operation, wherein the resource configuration operation is performed by a service demander corresponding to a target service instance based on service demand data, and the resource configuration request carries specification configuration information corresponding to each container group in a container group set, wherein the container group set is created based on a service component corresponding to the target service instance; A sending module is used to send the resource configuration request to a server, wherein the resource configuration request is used to instruct the server to parse the resource configuration request, obtain specification configuration information corresponding to each container group in the container group set based on the parsing result, perform matching resource configuration for each container group based on the specification configuration information, at least two container groups in the container group set that completes resource configuration have different resource service capabilities, and provide the service demander with a service corresponding to the service type to which the target service instance belongs through the container group set that completes resource configuration.

18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 15 are implemented.

19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Resource configuration method, data processing method and device, equipment and storage medium

    CN114924888A

  • Storage resource management method, device and system of container cluster

    CN115562796A

  • Container cluster construction method and system

    CN116048825A

  • Resource scheduling method and device, computing cluster and database

    CN116339985A

  • Efficient adaptive allocation of resources for container-based computation via markov decision processes

    US20230032853A1