Service deployment method and device, electronic device and storage medium
By using container groups in cloud services for dynamic resource management and migration, the problem of low cloud service resource utilization is solved, and efficient resource reuse and cost reduction are achieved.
Patent Information
- Application Number
- CN202110541989.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-18
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-05-18
AI Technical Summary
The configuration method of existing cloud services results in low utilization of cloud service resources, resulting in high usage costs for users and high expenditure costs for providers.
By receiving the service deployment request, determine the initial amount of resources required to create the target container group, and create the target container group in the container resource pool. The target service is deployed on the container group. The container resource pool contains available service resources on multiple target hosts. Allows the creation of multiple container groups on each host, dynamically adjusts the amount of resources to match the service load, and migrates the container group to other hosts when necessary to fully utilize resources.
It improves the utilization rate of cloud service resources, reduces the costs for users and providers, and achieves efficient reuse of resources.
Smart Images

Figure CN113254152B
Abstract
Description
Technical Field
[0001] The present application relates to the field of the Internet, and in particular to a service deployment method and device, an electronic device, and a storage medium. Background Art
[0002] With the development of big data and AI (Artificial Intelligence) technologies, big data applications and big data platforms have gradually become the core technologies of various IT (Information Technology) companies and Internet companies. Many cloud companies have launched big data platforms built on the cloud service IAAS (Infrastructure as a Service) layer.
[0003] At present, the deployment method of the underlying architecture service of the manufacturer is mostly to use the cloud host of the cloud service, that is, the big data service is deployed on one or more cloud host clusters and sold to the outside according to the amount of resources used by the user, such as read and write traffic, host package ([CPU (Central Processing Unit) configuration, memory configuration]). Through the above-mentioned big data service deployment plus cloud host package bundled sales, the user's purchase of the big data service is equivalent to purchasing the cloud host deployed by the service, and the user has exclusive use of resources and complete performance.
[0004] However, the above-mentioned cloud service usage method has a high cost for users, a high expenditure cost for cloud service (e.g., big data cloud service) providers, and a low utilization rate of cloud service resources. It can be seen that the configuration method of cloud services in the related art has the problem of low utilization rate of cloud service resources. Summary of the invention
[0005] The present application provides a service deployment method and device, an electronic device and a storage medium, so as to at least solve the problem of low utilization rate of cloud service resources in the configuration mode of cloud services in the related art.
[0006] According to one aspect of an embodiment of the present application, a service deployment method is provided, comprising: receiving a service deployment request sent by a target object, wherein the service deployment request is used to request deployment of a target service for the target object through service resources of at most a target resource amount; determining an initial resource amount of service resources required to create a target container group, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount; creating the target container group using service resources of the initial resource amount in a container resource pool, wherein the target service is deployed on the target container group, the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each of the target hosts.
[0007] Optionally, determining an initial resource amount of service resources required to create a target container group includes: configuring a target resource parameter for the target container group, wherein the target resource parameter is used to control the resource amount of service resources used by the target container group, and the initial resource amount is determined according to the target resource parameter.
[0008] Optionally, configuring a target resource parameter for the target container group includes: configuring a first resource parameter for the target container group, wherein the first resource parameter is used to control a maximum resource amount of a service resource used by the target container group, and the maximum resource amount is less than or equal to the target resource amount; configuring a second resource parameter for the target container group, wherein the second resource parameter is used to control a minimum resource amount of a service resource used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount; wherein the target resource parameter includes the first resource parameter and the second resource parameter.
[0009] Optionally, the service deployment request carries a target time range, and the target time range is a preset usage time of the target container group; and the creating the target container group using the service resources of the initial resource amount in the container resource pool includes: creating the target container group using the service resources on a first target host in the container resource pool according to the initial resource amount and the target time range, wherein the resource amount of the remaining available service resources on the first target host is greater than or equal to the initial resource amount, and no container group whose preset usage time overlaps with the target time range is created on the first target host.
[0010] Optionally, after creating the target container group using the service resources of the initial resource amount in the container resource pool, the method further includes: in a process of processing the business data associated with the target object and the target service through the target container group, adjusting the resource amount of the service resources used by the target container group according to the load amount of the service load of the target service, wherein the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
[0011] Optionally, adjusting the amount of service resources used by the target container group according to the load amount of the service load of the target service includes: when the load amount of the service load of the target service is greater than or equal to a first load amount threshold and the amount of service resources used by the target container group is less than the target resource amount, adjusting the amount of service resources used by the target container group to be greater than the amount of service resources currently used by the target container group; and when the load amount of the service load of the target service is less than or equal to the first load amount threshold and the amount of service resources used by the target container group is greater than a minimum amount of resources allowed to be used by the target container group, adjusting the amount of service resources used by the target container group to be less than the amount of service resources currently used by the target container group.
[0012] Optionally, after the target container group is created by using the service resources of the initial resource amount in the container resource pool, the method further includes: in a process of processing the business data associated with the target object and the target service through the target container group, determining to adjust the resource amount of the service resources used by the target container group from the first resource amount to a second resource amount, wherein the second resource amount is greater than the first resource amount; and when the resource amount of the available service resources remaining on the target host where the target container group is located is less than the difference between the second resource amount and the first resource amount, migrating the target container group to a second target host, wherein the resource amount of the available service resources remaining on the second target host is greater than or equal to the second resource amount.
[0013] According to another aspect of an embodiment of the present application, a service deployment device is also provided, including: a receiving unit, configured to receive a service deployment request sent by a target object, wherein the service deployment request is used to request deployment of a target service for the target object through service resources of at most the target resource amount; a first determining unit, configured to determine an initial resource amount of service resources required to create a target container group, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount; a creating unit, configured to create the target container group using service resources of the initial resource amount in a container resource pool, wherein the target service is deployed on the target container group, the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each of the target hosts.
[0014] Optionally, the first determination unit includes: a configuration module, configured to configure a target resource parameter for the target container group, wherein the target resource parameter is used to control the resource amount of the service resource used by the target container group, and the initial resource amount is determined according to the target resource parameter.
[0015] Optionally, the configuration module includes: a first configuration submodule, configured to configure a first resource parameter for the target container group, wherein the first resource parameter is used to control a maximum resource amount of a service resource used by the target container group, and the maximum resource amount is less than or equal to the target resource amount; a second configuration submodule, configured to configure a second resource parameter for the target container group, wherein the second resource parameter is used to control a minimum resource amount of a service resource used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount; wherein the target resource parameter includes the first resource parameter and the second resource parameter.
[0016] Optionally, the service deployment request carries a target time range, and the target time range is a preset usage time of the target container group; the creation unit includes: a creation module, configured to create the target container group using service resources on a first target host in the container resource pool according to the initial resource amount and the target time range, wherein the resource amount of the remaining available service resources on the first target host is greater than or equal to the initial resource amount, and no container group whose preset usage time overlaps with the target time range is created on the first target host.
[0017] Optionally, the device further includes: an adjusting unit, configured to adjust the resource amount of the service resources used by the target container group according to the load amount of the service load of the target service in a process of processing the business data associated with the target object and the target service through the target container group after the target container group is created using the service resources of the initial resource amount in the container resource pool, wherein the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
[0018] Optionally, the adjustment unit includes: a first adjustment module, configured to adjust the resource amount of the service resources used by the target container group to be greater than the resource amount of the service resources currently used by the target container group when the load amount of the service load of the target service is greater than or equal to a first load amount threshold and the resource amount of the service resources used by the target container group is less than the target resource amount; and a second adjustment module, configured to adjust the resource amount of the service resources used by the target container group to be less than the resource amount of the service resources currently used by the target container group when the load amount of the service load of the target service is less than or equal to the first load amount threshold and the resource amount of the service resources used by the target container group is greater than the minimum resource amount allowed to be used by the target container group.
[0019] Optionally, the device further includes: a second determining unit, configured to determine, after creating the target container group using the service resources of the initial resource amount in the container resource pool, to adjust the resource amount of the service resources used by the target container group from the first resource amount to the second resource amount in a process of processing the business data associated with the target object and the target service through the target container group, wherein the second resource amount is greater than the first resource amount; and a migrating unit, configured to migrate the target container group to a second target host if the resource amount of the available service resources remaining on the target host where the target container group is located is less than the difference between the second resource amount and the first resource amount, wherein the resource amount of the available service resources remaining on the second target host is greater than or equal to the second resource amount.
[0020] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps in any of the above embodiments by running the computer program stored in the memory.
[0021] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method steps in any of the above embodiments when executed.
[0022] In an embodiment of the present application, a method of cloud service deployment based on container groups is adopted, by receiving a service deployment request sent by a target object, wherein the service deployment request is used to request to deploy a target service for the target object through service resources of at most the target resource amount; determining the initial resource amount of service resources required to create a target container group, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount; using the service resources of the initial resource amount in the container resource pool to create a target container group, wherein the target container group is deployed with a target service, the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each target host. Since cloud service deployment is based on container groups, service resources are changed from cloud hosts to container groups, and container groups of different objects can be created on the same cloud host, thereby achieving the purpose of fully utilizing cloud host resources, achieving the technical effect of improving service resource utilization, and further solving the problem of low cloud service resource utilization in the configuration method of cloud services in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] Figure 1 is a schematic diagram of a hardware environment of an optional service deployment method according to an embodiment of the present application;
[0026] Figure 2 It is a flowchart of an optional service deployment method according to an embodiment of the present application;
[0027] Figure 3 is a schematic diagram of an optional service deployment method according to an embodiment of the present application;
[0028] Figure 4 is a schematic diagram of another optional service deployment method according to an embodiment of the present application;
[0029] Figure 5 is a schematic diagram of another optional service deployment method according to an embodiment of the present application;
[0030] Figure 6 is a flowchart of another optional service deployment method according to an embodiment of the present application;
[0031] Figure 7 is a structural block diagram of an optional service deployment device according to an embodiment of the present application;
[0032] Figure 8 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0036] 1. Big Data Components
[0037] Big data components are tools and systems commonly used in the production of the Internet big data ecosystem, such as Hadoop, HBase, Elasticsearch, etc.
[0038] 2. Big Data Cloud Platform
[0039] Big data cloud platform refers to big data services on the cloud, that is, big data platform services built on the public cloud IaaS infrastructure.
[0040] 3. Container
[0041] Container is an operating system-level virtualization technology that can run applications and their dependent programs in a resource isolation process. Container is a lightweight technology that packages the components required for the application to run into a single, reusable image file, runs the image file in an independent environment, and achieves isolation from other applications in terms of memory, CPU, disk, network, etc.
[0042] 4. Resource reuse
[0043] Resource reuse means allocating limited resources to as many users as possible while ensuring service.
[0044] According to one aspect of an embodiment of the present application, a service deployment method is provided. Optionally, in this embodiment, the service deployment method can be applied to Figure 1 In the hardware environment composed of the terminal 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal 102 via a network, and can be used to provide services (such as game services, application services, etc.) for the terminal or a client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104.
[0045] The network may include but is not limited to at least one of the following: a wired network, a wireless network. The wired network may include but is not limited to at least one of the following: a wide area network, a metropolitan area network, a local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal 102 may not be limited to a PC, a mobile phone, a tablet computer, etc.
[0046] The service deployment method of the embodiment of the present application can be executed by the server 104, or by the terminal 102, or by both the server 104 and the terminal 102. The terminal 102 can also execute the service deployment method of the embodiment of the present application by a client installed thereon.
[0047] Taking the deployment method of the service in this embodiment executed by the server 104 as an example, Figure 2 is a flow chart of an optional service deployment method according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0048] Step S202: receiving a service deployment request sent by a target object, wherein the service deployment request is used to request deployment of a target service for the target object through service resources up to the target resource amount.
[0049] The service deployment method of this embodiment can be applied to the scenario of deploying big data services in the cloud, for example, the scenario of deploying big data services through a container cluster. The above container cluster can be a container cluster based on a container cluster management system, for example, a Kubernetes (a container group management system, referred to as K8s) cluster.
[0050] When the target object has a demand for using the big data service on the cloud, the target user can use the target client running on the terminal device to apply to the target server for deploying the big data service on the cloud, that is, the target service. The target client can connect to the above-mentioned target server for deploying the big data service on the cloud through the network, and log in to the target client using the target account. The target object can be the object identified by the target account. Optionally, the target object can also be the object executed when applying for the deployment of the target service.
[0051] It should be noted that the target object may correspond to an enterprise user, and the target service applied for may be used by multiple users associated with the enterprise user; the target object may also be an individual user, and the target service applied for may be used by the individual user, and optionally, may also be temporarily used by other users authenticated by the individual user. This is not limited in this embodiment.
[0052] It should also be noted that in addition to identifying the target object through the target account, the target object can also be identified by terminal identification, user name, domain name, etc. of the terminal device. As long as the target server can recognize the identification information of the object targeted by the cloud big data service requested to be deployed, it can be used in this embodiment.
[0053] When applying for deployment of a target service, a target user may send a service deployment request to a target server through a target client, wherein the service deployment request is used to request deployment of the target service for a target object through service resources up to the target resource amount.
[0054] The service deployment request may carry at least one of the following information: indication information of target resource quantity, indication information of service resources, identification information of target object, identification information of target service. The above service resources may be resources required to run the target service, and may include but are not limited to at least one of the following: CPU, memory.
[0055] The target server may receive the service deployment request sent by the target client, and extract required information from the service deployment request, thereby determining the service type of the target service to be deployed and the resource amount of the service resources corresponding to the deployed target service.
[0056] In addition, in order to apply for the deployment of cloud big data services for the target object, the target user needs to pay a certain fee in exchange. The payment method, the type of cloud big data services, and the fees required to pay for different types of cloud big data services can be configured as needed, and this embodiment does not limit this.
[0057] Step S204, determining the initial resource amount of service resources required to create the target container group, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount.
[0058] After receiving the service deployment request, the target server can deploy the target service for the target object. In the related art, the cloud big data service is deployed based on the cloud host. Figure 3 As shown, the cloud big data service can be deployed in the cloud host cluster, where user A's big data service A is deployed on cloud host 1 and cloud host 3, and user B's big data service B is deployed on cloud host 2, cloud host 4 and cloud host 6, and users have exclusive use of cloud host resources. Resources that users of the cloud host resource pool have not purchased (for example, host 5) cannot be reused and can only be idle for purchase.
[0059] In this embodiment, the service resources are changed from cloud hosts to container groups, for example, K8s pods. The function of a container group is equivalent to that of a cloud host, and big data services are deployed in the container group. Taking pod as an example, pod is the smallest unit of K8s. Pod is a group of containers, which can have a pause container (i.e., a basic container) and several business containers. When users purchase resources, they change from deploying services on some hosts in the cloud host cluster to creating a batch of pods from the container resource pool.
[0060] The operation of the container group requires the use of certain service resources (e.g., CPU, memory, etc.), and the number of service resources used by the container group can be flexibly configured. For the target service, the target server can determine the initial resource amount of service resources required to create a target container group for deploying the target service. Since the target object uses at most the service resources of the target resource amount to provide the target service, the determined initial resource amount is less than or equal to the target resource amount, for example, it can be half of the target resource amount, and the target container group is allowed to use at most the service resources of the target resource amount.
[0061] Step S206: Create a target container group using service resources of an initial amount of resources in the container resource pool, wherein a target service is deployed on the target container group, the container resource pool includes available service resources on multiple target hosts, and multiple container groups are allowed to be created on each target host.
[0062] In this embodiment, the container cluster can create containers in the container resource pool according to user purchases, and the container resource pool contains available service resources on multiple cloud hosts (for example, multiple target hosts). The container resource pool is equivalent to realizing resource reuse of the same cloud host. Container groups (for example, pods) of different users can be created on the same cloud host, so that cloud host resources can be fully utilized. And by performing resource reuse, limited resources can be used to provide services to more users.
[0063] For the target service, the target server can use the service resources of the initial resource amount in the above container resource pool to create a target container group, and the target service is deployed on the created target container group. If the service resources used to create the target container group are located on one cloud host, the number of target container groups created can be 1. If the service resources used to create the target container group are located on multiple cloud hosts, the number of target container groups created can be multiple, and one target container group is located on one cloud host. In addition, multiple container groups of the same big data service of the same user can also be created on one cloud host. The method for creating container groups is not limited in this embodiment.
[0064] For example, Figure 3 As shown, the big data service on the cloud can be deployed in a container cluster, wherein three pods are deployed for the big data service A of user A, and a pod is deployed for the big data service B of user B.
[0065] The created target container group can provide a target service for the target object. For example, the target container group uses at most a target amount of service resources to process business data associated with the target object and the target service.
[0066] Through the above steps S202 to S206, a service deployment request sent by the target object is received, wherein the service deployment request is used to request to deploy a target service for the target object through service resources of at most the target resource amount; an initial resource amount of service resources required to create a target container group is determined, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount; a target container group is created using service resources of the initial resource amount in a container resource pool, wherein the target container group has a target service deployed thereon, the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each target host, thereby solving the problem of low utilization of cloud service resources in the configuration method of cloud services in the related art and improving utilization of service resources.
[0067] As an optional embodiment, determining the initial resource amount of service resources required to create the target container group includes:
[0068] S11, configuring target resource parameters for the target container group, wherein the target resource parameters are used to control the resource amount of the service resources used by the target container group, and the initial resource amount is determined according to the target resource parameters.
[0069] For the target container group, the target server can configure the target resource parameter for the target container, and the target resource parameter can be used to control the resource amount of the service resource used by the target container group. The target resource parameter can be configured according to the target resource amount, or can be configured with the target resource amount combined with other object information of the target object (for example, object level, etc.).
[0070] The amount of service resources used by the target container group may be dynamically controlled, that is, the amount of service resources used by the target container group may be dynamically adjusted as needed. The target server may limit the amount of service resources used by the target container group through target resource parameters, for example, limiting at least one of the following parameters of the service resources used by the target container group: maximum resource amount, minimum resource amount, average resource amount, resource amount allowed for use in different time periods, etc. The above-mentioned initial resource amount may be determined according to the target resource parameters.
[0071] Through this embodiment, by configuring resource parameters for controlling the resource amount of service resources used by the container group for the container group, it is possible to control the resource amount of service resources used by the container and improve the rationality of service resource utilization.
[0072] As an optional embodiment, configuring target resource parameters for the target container group includes:
[0073] S21, configuring a first resource parameter for the target container group, wherein the first resource parameter is used to control a maximum resource amount of service resources used by the target container group, and the maximum resource amount is less than or equal to a target resource amount;
[0074] S22, configuring a second resource parameter for the target container group, wherein the second resource parameter is used to control a minimum resource amount of service resources used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount;
[0075] The target resource parameters include a first resource parameter and a second resource parameter.
[0076] After resource reuse is achieved, the container's own compression mechanism can be used to provide services to more users using limited resources. For the target container group, the target server can configure a first resource parameter for it, which is used to control the maximum resource amount of the service resources used by the target container group, and the maximum resource amount is less than or equal to the target resource amount. In order to ensure the user's service experience, the maximum resource amount can be configured as the target resource amount.
[0077] The target server may also configure a second resource parameter for the target container group, which is used to control the minimum resource amount of the service resources used by the target container group. The minimum resource amount may be determined based on the target resource amount, for example, it may be half, 60%, 80%, etc. of the target resource amount. The minimum resource amount may also be determined based on the target resource amount and the resource amount of the available service resources currently remaining in the container resource pool. For example, if the available service resources currently remaining in the container resource pool are sufficient, the minimum resource amount may be configured to be the target resource amount, 60% of the target resource amount, 80% of the target resource amount, etc. If the available service resources currently remaining in the container resource pool are insufficient, the minimum resource amount may be configured to be half of the target resource amount, one third of the target resource amount, etc. This is not limited in this embodiment.
[0078] The initial resource amount may be determined based on the minimum resource amount and the maximum resource amount. For example, the initial resource amount may be the minimum resource amount, the maximum resource amount, or between the minimum resource amount and the maximum resource amount. For example, in order to ensure resource reuse, the initial resource amount may be set to the minimum resource amount.
[0079] It should be noted that the target resource parameters configured for the target container group can be flexibly adjusted as needed, that is, the maximum resource amount and the minimum resource amount are not fixed, but can be increased or decreased as needed, which is not specifically limited in this embodiment. For example, when the remaining available service resources in the container resource pool increase, in order to improve the service quality, the minimum resource amount can be increased.
[0080] For example, Figure 4 As shown in the figure, K8s (Container Service) itself provides a service compression mechanism, which can control resource usage through the two parameters of requests and limits. Limits indicates the maximum number of resources that a single container can use, and requests indicates the minimum number of resources required by a single container.
[0081] If the value of requests is equal to the value of limits, it means no compression, and the limit number of resources is used when creating the container. If the value of requests is less than the limit value, it means that the minimum resources can be used to provide services when the container is created. If the service load increases, the container will automatically add resources until the limit is reached.
[0082] For example, in combination Figure 5 , if 5 users demand 50 CPUs (an example of service resources), and the current resource pool only uses 30 CPUs, each user can be given a minimum of 5 CPUs, for a total of 25 CPUs. Peak usage is staggered according to user usage. Although the maximum user demand is 50 CPUs, 30 CPUs can meet the demand considering the different peaks and lows of user usage, thus achieving efficient resource reuse.
[0083] Through this embodiment, by configuring the maximum resource amount and the minimum resource amount of the container group, it is possible to use limited resources to provide services to more users, thereby improving the utilization rate of service resources.
[0084] As an optional embodiment, the service deployment request may also carry a target time range, which is the preset usage time of the target container group, that is, the estimated time range for the target object to use the target service. Here, the target time range is an estimated time range, but not necessarily the time range actually used by the target container group, that is, the target container group can also be used outside the target time range.
[0085] Optionally, in this embodiment, using the service resources of the initial resource amount in the container resource pool to create the target container group includes:
[0086] S31, creating a target container group using service resources on a first target host in a container resource pool according to an initial resource amount and a target time range, wherein the resource amount of available service resources remaining on the first target host is greater than or equal to the initial resource amount, and no container group having a preset usage time overlapping with the target time range is created on the first target host.
[0087] When creating a target container group, the target server may select a target host, i.e., a first target host, from among multiple target hosts based on the initial resource amount and / or the target time range, where the target container group is created. The selection rule for the first target host may be configured as required. For example, the first target host may be selected by first selecting a candidate host whose remaining available service resource amount is greater than the initial resource amount from among multiple target hosts based on the initial resource amount, and then determining whether to select the candidate host to create the target container group based on the target time range.
[0088] When selecting candidate hosts, the target service can obtain the remaining amount of available service resources on each target cloud host, and select the target cloud hosts whose remaining amount of available service resources is greater than the initial amount of resources as candidate hosts in sequence (for example, in order of the remaining amount of available service resources from large to small, or from small to large).
[0089] When making further judgments on the candidate host, the target server can determine whether there is a container group that has been created on the candidate host. If not, the candidate host can be determined as the first target host. If so, it can be further determined whether the preset usage time of the existing container group overlaps with the target time range. If there is no overlap, the candidate host can be determined as the first target host. If there is an overlap, in order to avoid the migration of the container group due to the increase in the amount of service resources used by the container group and the insufficient amount of service resources remaining on the cloud host, the next target cloud host with a remaining amount of available service resources greater than the initial amount can be selected as the candidate host and the judgment can be made again.
[0090] Optionally, if there is overlap, it is also possible to determine whether the total amount of available service resources on the candidate host is greater than or equal to the sum of the maximum amount of service resources used by the target container group and the maximum amount of service resources used by the existing container group; if so, the candidate host is determined as the first target host; otherwise, the next target cloud host with the remaining amount of available service resources greater than the initial amount of resources can be selected as the candidate host and re-judged. The selection rule of the first target host can be configured as needed, and this is not specifically limited in this embodiment.
[0091] Through this embodiment, a cloud host is selected to create a container group according to the initial resource amount and the preset usage time of the container group, which can improve the rationality of cloud host selection and improve the utilization rate of service resources.
[0092] As an optional embodiment, after creating the target container group using the service resources of the initial resource amount in the container resource pool, the method further includes:
[0093] S41, in the process of processing the business data associated with the target object and the target service through the target container group, adjusting the resource amount of the service resources used by the target container group according to the load amount of the service load of the target service, wherein the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
[0094] In the process of processing the business data associated with the target object and the target service through the target container group, the target server (or other server, the target server is taken as an example in this embodiment) can adjust the resource amount of the service resources used by the target container group. For example, the resource amount of the service resources used by the target container group can be adjusted according to the load amount of the service load of the target service. The restriction condition of the adjustment may include: after the adjustment, the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
[0095] The amount of service resources used by the target container group is positively correlated with the load of the service load of the target service. For example, the amount of service resources used by the target container group increases as the load of the service load of the target service increases, and decreases as the load of the service load of the target service decreases. The service load of the target service may include but is not limited to at least one of the following: the number of objects using the target service, the business volume of the target service, etc., which is not limited in this embodiment.
[0096] Through this embodiment, the resource amount of the service resources used by the target container group is adjusted according to the load amount of the service load of the target service, so that the utilization rate of the service resources can be improved.
[0097] As an optional embodiment, adjusting the amount of service resources used by the target container group according to the load amount of the service load of the target service includes:
[0098] S51, when the load amount of the service load of the target service is greater than or equal to the first load amount threshold and the resource amount of the service resources used by the target container group is less than the target resource amount, adjusting the resource amount of the service resources used by the target container group to be greater than the resource amount of the service resources currently used by the target container group;
[0099] S52: When the load amount of the service load of the target service is less than or equal to the first load amount threshold and the resource amount of the service resources used by the target container group is greater than the minimum resource amount allowed to be used by the target container group, adjust the resource amount of the service resources used by the target container group to be less than the resource amount of the service resources currently used by the target container group.
[0100] The target server may pre-configure a load threshold corresponding to the resource amount of the service resource used by the target container group. The larger the resource amount, the larger the load threshold, and the two are positively correlated. The adjustment operation of the resource amount of the service resource used by the target container group may be performed based on the load threshold, the maximum resource amount (i.e., the target resource amount), and the minimum resource amount allowed to be used by the target container group.
[0101] If the load amount of the service load of the target service is greater than or equal to the first load amount threshold, and the resource amount of the service resources used by the target container group is less than the target resource amount, resources can be automatically supplemented to adjust the resource amount of the service resources used by the target container group to be greater than the resource amount of the service resources currently used by the target container group. If the load amount of the service load of the target service is greater than or equal to the first load amount threshold, and the resource amount of the service resources used by the target container group is equal to the target resource amount, a prompt message can be sent to the terminal device of the target object, prompting to increase the resource amount of the service resources used by the deployed target service.
[0102] If the load amount of the service load of the target service is less than or equal to the first load amount threshold, and the resource amount of the service resources used by the target container group is greater than the minimum resource amount allowed to be used by the target container group, the service resources used by the container group can be automatically reduced, and the resource amount of the service resources used by the target container group is adjusted to be less than the resource amount of the service resources currently used by the target container group. If the load amount of the service load of the target service is less than or equal to the first load amount threshold, and the resource amount of the service resources used by the target container group is equal to the minimum resource amount allowed to be used by the target container group, no adjustment may be performed.
[0103] For example, for a K8s cluster, the aforementioned requests and limits parameters can be used to control the use of service resources. When the service load increases, the pod can automatically replenish resources until the limit is reached.
[0104] Through this embodiment, the resource amount of the service resources used by the container group is automatically adjusted based on the load threshold, the maximum resource amount and the minimum resource amount, which can improve the rationality of service resource scheduling and the utilization rate of service resources.
[0105] As an optional embodiment, after creating the target container group using the service resources of the initial resource amount in the container resource pool, the method further includes:
[0106] S61, in the process of processing the business data associated with the target object and the target service through the target container group, determining to adjust the resource amount of the service resource used by the target container group from the first resource amount to the second resource amount, wherein the second resource amount is greater than the first resource amount;
[0107] S62: When the amount of available service resources remaining on the target host where the target container group is located is less than the difference between the second resource amount and the first resource amount, migrate the target container group to a second target host, wherein the amount of available service resources remaining on the second target host is greater than or equal to the second resource amount.
[0108] In the process of processing the business data associated with the target object and the target service through the target container group, due to the increase in the load of the service load of the target service, the user's application to increase the amount of service resources used by the target service, or other reasons, it is necessary to increase the amount of service resources used by the target container group. For example, the target server determines to adjust the amount of service resources used by the target container group from the first amount to the second amount, and the second amount is greater than the first amount.
[0109] If the amount of available service resources remaining on the target host where the target container group is located is less than the difference between the second resource amount and the first resource amount, then the amount of service resources used by the target container group cannot be increased to the second resource amount on the current cloud host. In this case, the amount of service resources used by the target container group can be adjusted from the first resource amount to the second resource amount by deploying an associated container group of the target container group on another cloud host (the amount of service resources used by the associated container group can be the difference between the second resource amount and the first resource amount).
[0110] Optionally, the target server may also migrate the target container group to a new cloud host (i.e., the second target host), and the amount of available service resources remaining on the migrated cloud host is greater than or equal to the second amount of resources. The process of container group migration is unaware of the target object, and the migration is performed without affecting the use of the target object.
[0111] Through this embodiment, by migrating container groups between different cloud hosts, the compatibility of container group migration can be improved.
[0112] The following is an explanation of the deployment method of the service in the embodiment of the present application in conjunction with an optional example. In this example, the target service is a cloud big data service, the container group is a pod, the service resource is a CPU, the target resource amount is the peak amount of resource usage provided by the user, and the target time range is the resource usage time provided by the user.
[0113] This example provides a container-based cloud big data service resource reuse mechanism, which relies on container basic services. The big data service is deployed on a container cluster. The container cluster here adopts the K8s solution, that is, it is deployed in a K8s cluster.
[0114] like Figure 6As shown, the process of the service deployment method in this optional example may include the following steps:
[0115] Step S602, the user purchases the service;
[0116] Step S604, the user provides the peak amount and time of resource usage;
[0117] Step S606, configuring resource compression value;
[0118] Step S608: Create a container resource pool based on the service selected by the user.
[0119] Through this example, resource reuse of big data cloud services is realized based on container technology. Under the premise of ensuring user services, resource reuse of users with different attributes is achieved. With the help of the container's own resource isolation mechanism, multi-user shared resource pool is realized, and resource reuse on the cloud host is realized; resource supply can be dynamically adjusted according to actual user use, and users are unaware of the subsequent expansion of the resource pool; at the same time, it can greatly reduce the cost of users using big data services on the cloud, and big data cloud service providers can make full use of resources to serve more users.
[0120] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0122] According to another aspect of an embodiment of the present application, a service deployment device for implementing the above-mentioned service deployment method is also provided. Figure 7is a structural block diagram of an optional service deployment device according to an embodiment of the present application, such as Figure 7 As shown, the device may include:
[0123] A receiving unit 702 is configured to receive a service deployment request sent by a target object, wherein the service deployment request is used to request to deploy a target service for the target object through service resources up to the target resource amount;
[0124] A first determining unit 704 is connected to the receiving unit 702 and is used to determine an initial resource amount of service resources required to create a target container group, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount;
[0125] The creation unit 706 is connected to the first determination unit 704, and is used to create a target container group using the service resources of the initial resource amount in the container resource pool, wherein the target container group has a target service deployed thereon, and the container resource pool includes available service resources on multiple target hosts, and multiple container groups are allowed to be created on each target host.
[0126] It should be noted that the receiving unit 702 in this embodiment can be used to execute the above step S202, the first determining unit 704 in this embodiment can be used to execute the above step S204, and the creating unit 706 in this embodiment can be used to execute the above step S206.
[0127] Through the above module, a service deployment request sent by a target object is received, wherein the service deployment request is used to request to deploy a target service for the target object through service resources of at most the target resource amount; an initial resource amount of service resources required to create a target container group is determined, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount; a target container group is created using service resources of the initial resource amount in a container resource pool, wherein the target container group is deployed with a target service, the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each target host, thereby solving the problem of low utilization of cloud service resources in the configuration method of cloud services in related technologies and improving the utilization of service resources.
[0128] As an optional embodiment, the first determining unit 704 includes:
[0129] The configuration module is used to configure target resource parameters for the target container group, wherein the target resource parameters are used to control the resource amount of the service resources used by the target container group, and the initial resource amount is determined according to the target resource parameters.
[0130] As an optional embodiment, the configuration module includes:
[0131] A first configuration submodule, configured to configure a first resource parameter for the target container group, wherein the first resource parameter is used to control a maximum resource amount of service resources used by the target container group, and the maximum resource amount is less than or equal to a target resource amount;
[0132] A second configuration submodule, configured to configure a second resource parameter for the target container group, wherein the second resource parameter is used to control a minimum resource amount of service resources used by the target container group, and the initial resource amount is greater than or equal to the minimum resource amount;
[0133] The target resource parameters include a first resource parameter and a second resource parameter.
[0134] As an optional embodiment, the service deployment request carries a target time range, and the target time range is a preset usage time of the target container group; the creation unit 706 includes:
[0135] A creation module is used to create a target container group using service resources on a first target host in a container resource pool according to an initial resource amount and a target time range, wherein the resource amount of the remaining available service resources on the first target host is greater than or equal to the initial resource amount, and no container group whose preset usage time overlaps with the target time range is created on the first target host.
[0136] As an optional embodiment, the above device also includes:
[0137] The adjustment unit is used to adjust the resource amount of the service resources used by the target container group according to the load amount of the service load of the target service in the process of processing the business data associated with the target object and the target service through the target container group after creating the target container group using the service resources of the initial resource amount in the container resource pool, wherein the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
[0138] As an optional embodiment, the adjusting unit includes:
[0139] A first adjustment module, configured to adjust the resource amount of the service resources used by the target container group to be greater than the resource amount of the service resources currently used by the target container group when the load amount of the service load of the target service is greater than or equal to the first load amount threshold and the resource amount of the service resources used by the target container group is less than the target resource amount;
[0140] The second adjustment module is used to adjust the resource amount of the service resources used by the target container group to be smaller than the resource amount of the service resources currently used by the target container group when the load amount of the service load of the target service is less than or equal to the first load amount threshold and the resource amount of the service resources used by the target container group is greater than the minimum resource amount allowed to be used by the target container group.
[0141] As an optional embodiment, the above device also includes:
[0142] a second determining unit, configured to, after creating a target container group using service resources of an initial resource amount in the container resource pool, determine to adjust the resource amount of the service resources used by the target container group from a first resource amount to a second resource amount in a process of processing business data associated with a target object and a target service through the target container group, wherein the second resource amount is greater than the first resource amount;
[0143] A migration unit is used to migrate the target container group to a second target host when the amount of available service resources remaining on the target host where the target container group is located is less than the difference between the second resource amount and the first resource amount, wherein the amount of available service resources remaining on the second target host is greater than or equal to the second resource amount.
[0144] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0145] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned service deployment method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0146] Figure 8 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 8 As shown, it includes a processor 802, a communication interface 804, a memory 806 and a communication bus 808, wherein the processor 802, the communication interface 804 and the memory 806 communicate with each other through the communication bus 808, wherein,
[0147] Memory 806, used for storing computer programs;
[0148] The processor 802 is used to implement the following steps when executing the computer program stored in the memory 806:
[0149] S1, receiving a service deployment request sent by a target object, wherein the service deployment request is used to request to deploy a target service for the target object through service resources of at most the target resource amount;
[0150] S2, determining an initial resource amount of service resources required to create a target container group, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount;
[0151] S3, using the service resources of the initial resource amount in the container resource pool to create a target container group, wherein the target container group is deployed with a target service, and the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each target host.
[0152] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 The communication interface is used for communication between the above electronic device and other devices.
[0153] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0154] As an example, the memory 806 may include but is not limited to the receiving unit 702, the first determining unit 704 and the creating unit 706 in the service deployment device. In addition, it may also include but is not limited to other module units in the service deployment device, which will not be repeated in this example.
[0155] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU, NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0156] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0157] It can be understood by those skilled in the art that Figure 8 The structure shown is for illustration only. The device for implementing the deployment method of the above service may also be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 8 The structure of the electronic device is not limited. Figure 8 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 8 Different configurations shown.
[0158] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0159] According to another aspect of the embodiments of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the above service deployment methods in the embodiments of the present application.
[0160] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0161] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0162] S1, receiving a service deployment request sent by a target object, wherein the service deployment request is used to request to deploy a target service for the target object through service resources of at most the target resource amount;
[0163] S2, determining an initial resource amount of service resources required to create a target container group, wherein the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount, and the target container group is allowed to use service resources of at most the target resource amount;
[0164] S3, using the service resources of the initial resource amount in the container resource pool to create a target container group, wherein the target container group is deployed with a target service, and the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each target host.
[0165] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0166] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0167] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0168] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0169] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0170] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0171] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0172] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist physically separately, or at least two units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0173] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for deploying a service, It is characterized in that include: Receiving a service deployment request sent by a target object, wherein the service deployment request is used to request to deploy a target service for the target object through service resources of at most the target resource amount; Determining the initial resource amount of the service resources required to create the target container group includes configuring the target resource parameter for the target container group in the following manner: configuring a first resource parameter for the target container group, the first resource parameter being used to control the maximum resource amount of the service resources used by the target container group, the maximum resource amount being less than or equal to the target resource amount; configuring a second resource parameter for the target container group, the second resource parameter being used to control the minimum resource amount of the service resources used by the target container group, the initial resource amount being greater than or equal to the minimum resource amount, the target resource parameter including the first resource parameter and the second resource parameter, the target container group being used to deploy the target service, the initial resource amount being less than or equal to the target resource amount and being determined according to the target resource parameter, the target resource parameter being used to control the resource amount of the service resources used by the target container group, and the target container group being allowed to use service resources of at most the target resource amount; The target container group is created using the service resources of the initial resource amount in the container resource pool, wherein the target service is deployed on the target container group, the container resource pool includes available service resources on multiple target hosts, and multiple container groups are allowed to be created on each of the target hosts.
2. The method according to claim 1, It is characterized in that The service deployment request carries a target time range, where the target time range is the preset usage time of the target container group; The creating the target container group by using the service resources of the initial resource amount in the container resource pool comprises: The target container group is created using service resources on a first target host in the container resource pool according to the initial resource amount and the target time range, wherein the resource amount of the available service resources remaining on the first target host is greater than or equal to the initial resource amount, and no container group whose preset usage time overlaps with the target time range is created on the first target host.
3. The method according to claim 1, It is characterized in that After creating the target container group using the service resources of the initial resource amount in the container resource pool, the method further includes: In the process of processing the business data associated with the target object and the target service through the target container group, the resource amount of the service resources used by the target container group is adjusted according to the load amount of the service load of the target service, wherein the resource amount of the service resources used by the target container group is positively correlated with the load amount of the service load of the target service, and the resource amount of the service resources used by the target container group is less than or equal to the target resource amount.
4. The method according to claim 3, It is characterized in that The adjusting the amount of service resources used by the target container group according to the load amount of the service load of the target service includes: When the load amount of the service load of the target service is greater than or equal to the first load amount threshold and the resource amount of the service resources used by the target container group is less than the target resource amount, adjusting the resource amount of the service resources used by the target container group to be greater than the resource amount of the service resources currently used by the target container group; When the load amount of the service load of the target service is less than or equal to the first load amount threshold and the resource amount of the service resources used by the target container group is greater than the minimum resource amount allowed to be used by the target container group, the resource amount of the service resources used by the target container group is adjusted to be less than the resource amount of the service resources currently used by the target container group.
5. The method according to any one of claims 1 to 4, It is characterized in that After creating the target container group using the service resources of the initial resource amount in the container resource pool, the method further includes: In the process of processing the business data associated with the target object and the target service through the target container group, determining to adjust the resource amount of the service resource used by the target container group from a first resource amount to a second resource amount, wherein the second resource amount is greater than the first resource amount; When the amount of available service resources remaining on the target host where the target container group is located is less than the difference between the second resource amount and the first resource amount, the target container group is migrated to a second target host, wherein the amount of available service resources remaining on the second target host is greater than or equal to the second resource amount.
6. A service deployment device, It is characterized in that include: A receiving unit, configured to receive a service deployment request sent by a target object, wherein the service deployment request is used to request to deploy a target service for the target object through service resources of at most a target amount of resources; The first determination unit is used to determine the initial resource amount of the service resources required to create the target container group, including configuring the target resource parameter for the target container group in the following manner: configuring a first resource parameter for the target container group, the first resource parameter is used to control the maximum resource amount of the service resources used by the target container group, the maximum resource amount is less than or equal to the target resource amount; configuring a second resource parameter for the target container group, the second resource parameter is used to control the minimum resource amount of the service resources used by the target container group, the initial resource amount is greater than or equal to the minimum resource amount, the target resource parameter includes the first resource parameter and the second resource parameter, the target container group is used to deploy the target service, the initial resource amount is less than or equal to the target resource amount and is determined according to the target resource parameter, the target resource parameter is used to control the resource amount of the service resources used by the target container group, and the target container group is allowed to use the service resources of the target resource amount at most; A creating unit is used to create the target container group using the service resources of the initial resource amount in the container resource pool, wherein the target service is deployed on the target container group, the container resource pool contains available service resources on multiple target hosts, and multiple container groups are allowed to be created on each of the target hosts.
7. An electronic device comprising a processor, a communication interface, a memory and a communication bus, in, The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is configured to execute the method steps of any one of claims 1 to 5 by running the computer program stored in the memory.
8. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method steps described in any one of claims 1 to 5 when executed.
