Container cluster management method and device for multiple-flow single request

CN116302345BActive Publication Date: 2026-10-20SICHUAN ZHONGXINJIA TECH DEV CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310252405.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2026-10-20
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明的目的在于提供一种针对多流量单请求的容器集群管理方法和装置,以缓解现有技术针对多流量单请求的业务运算,HPA水平扩容方法存在POD创建滞后导致的多流量单请求的业务运算失败以及流量倾斜的技术问题

Benefits of technology

[0029]在本发明实施例中,提供了一种针对多流量单请求的容器集群管理方法,应用于容器集群管理系统,该方法包括:接收业务前端发起的POD数量请求;获取容器集群中当前空闲的POD数量;根据POD数量请求中的请求数量和当前空闲的POD数量向容器集群发起POD创建请求,以使容器集群根据POD创建请求创建目标数量的POD,其中,目标数量为POD创建请求中携带的POD创建数量,且目标数量为根据POD数量请求中的请求数量和当前空闲的POD数量计算得到的满足业务需求的POD数;获取容器集群返回的可用POD数,并将可用POD数返回至业务前端,以使业务前端将可用POD数发送至业务后端,进而,业务后端向容器集群中的可用POD发起业务运算请求。通过上述描述可知,本发明的容器集群管理方法中,是先根据POD数量请求中的请求数量和当前空闲的POD数量向容器集群发起POD创建请求的,进而容器集群根据POD创建请求创建满足业务需求的POD数的POD,然后,再将容器集群返回的可用POD数的信息发送至业务后端,进而,业务后端再向容器集群中的可用POD发起业务运算请求,可见,POD创建是在业务运算请求发起之前完成的,这样,可用的POD就能满足业务运算的需求,能保证业务运算请求的顺利完成,另外,由于预先创建了POD,当业务后端向容器集群中的可用POD发起业务运算请求时,业务运算请求的流量能够均衡的分布在各可用POD上,避免了运算时的流量倾斜,缓解了现有技术针对多流量单请求的业务运算,HPA水平扩容方法存在POD创建滞后导致的多流量单请求的业务运算失败以及流量倾斜的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302345B_ABST
    Figure CN116302345B_ABST
Patent Text Reader

Abstract

The application provides a container cluster management method and device for multiple traffic single requests. In the container cluster management method, POD creation is completed before a business operation request is initiated. Thus, available PODs can meet the demand of the business operation, and the smooth completion of the business operation request is ensured. In addition, since the PODs are pre-created, when a business backend initiates a business operation request to the available PODs in the container cluster, the traffic of the business operation request can be evenly distributed on the available PODs, thereby avoiding traffic inclination during operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a container cluster management method and apparatus for multiple traffic single requests. Background Technology

[0002] When a containerized dot (POD) cluster encounters a surge in traffic requests, and a POD reaches its resource limits or a certain threshold (configured by HPA, e.g., CPU utilization reaches 80%), horizontal scaling using HPA (i.e., creating POD nodes) is typically employed to handle this traffic spike. However, in certain situations, horizontal scaling using HPA cannot solve all problems. When a POD only needs to run single-request computations (e.g., AI calculations), horizontal scaling using HPA will not effectively support business operations. This is because PODs performing AI-like computations are generally characterized by long execution times, statelessness, and the need for the POD to be retained after completion. They also have high hardware requirements. When the number of parallel AI computation tasks is high, the container cluster may even experience situations where PODs cannot be scheduled. If horizontal scaling using HPA is then implemented, it will be too late, thus impacting the use of AI computations.

[0003] Specifically, when a business backend initiates an AI business computation request to a POD in the container cluster, the currently running POD resources often haven't reached their resource limits or a certain threshold. In this case, HPA horizontal scaling won't be performed. However, if the running POD resources are detected to have reached their resource limits or a certain threshold, and HPA horizontal scaling is then performed, it may cause the aforementioned AI business computation request to time out and fail, resulting in AI business computation failure. In other words, it can easily cause AI business computation failure due to a lag between POD creation (i.e., POD scaling) and AI business computation requests. In addition, HPA horizontal scaling creates POD nodes one by one. When a sudden AI business computation request is initiated, it may distribute all the AI ​​business computation request traffic to the same POD node that has already been created, while newly created POD nodes will not receive any AI business computation request traffic. This is a traffic imbalance caused by the slow POD creation speed (i.e., POD scaling speed).

[0004] In summary, for business operations involving multiple traffic requests, the existing HPA horizontal scaling method suffers from technical problems such as POD creation delays leading to business operation failures involving multiple traffic requests and traffic skew. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a container cluster management method and apparatus for multiple traffic single requests, so as to alleviate the technical problems of the existing technology for multiple traffic single request business operations, such as the failure of multiple traffic single request business operations due to POD creation lag and traffic skew.

[0006] In a first aspect, embodiments of the present invention provide a container cluster management method for multiple traffic single requests, applied to a container cluster management system, the method comprising:

[0007] Receive POD quantity requests initiated by the business frontend;

[0008] Get the number of currently idle PODs in the container cluster;

[0009] Based on the number of requests in the POD quantity request and the number of currently idle PODs, a POD creation request is initiated to the container cluster, so that the container cluster creates a target number of PODs according to the POD creation request. The target number is the number of PODs to be created carried in the POD creation request, and the target number is the number of PODs that meet the business requirements calculated based on the number of requests in the POD quantity request and the number of currently idle PODs.

[0010] The system obtains the number of available PODs returned by the container cluster and returns the number of available PODs to the business front end, so that the business front end sends the number of available PODs to the business back end. Then, the business back end initiates a business operation request to the available PODs in the container cluster.

[0011] Furthermore, the number of requests in the POD quantity request is determined based on the number of PODs required by the business operation request.

[0012] Furthermore, obtain the number of currently idle PODs in the container cluster, including:

[0013] Call the cluster APIServer to obtain the number of currently idle PODs in the container cluster.

[0014] Furthermore, the target number is the number of PODs that meet the business requirements, calculated based on the number of requests in the POD quantity request and the number of currently idle PODs, including:

[0015] The target number = the number of requests in the POD number request - the number of currently idle PODs.

[0016] Furthermore, the number of available PODs is the sum of the number of currently idle PODs and the number of newly created PODs, wherein the number of newly created PODs is not greater than the target number.

[0017] Furthermore, the method also includes:

[0018] The resource utilization rate of all PODs corresponding to the controller in the container cluster is obtained by polling at a preset period.

[0019] Based on the resource utilization of all PODs, a POD release request is sent to the container cluster so that the container cluster releases the PODs according to the POD release request. The POD release request carries the identifier of the POD to be released, and the resource utilization of the POD to be released is less than a preset threshold.

[0020] Furthermore, when the number of newly created PODs is less than the target number, the method further includes the following when obtaining the number of available PODs returned by the container cluster:

[0021] Obtain the reason why the number of available PODs returned by the container cluster does not meet the business requirements, and return the reason to the business front end.

[0022] Secondly, embodiments of the present invention also provide a container cluster management device for multiple traffic single requests, applied to a container cluster management system, the device comprising:

[0023] The receiving unit is used to receive POD quantity requests initiated by the business front end;

[0024] The acquisition unit is used to obtain the number of currently idle PODs in the container cluster;

[0025] A POD creation request initiation unit is used to initiate a POD creation request to the container cluster based on the number of requests in the POD quantity request and the number of currently idle PODs, so that the container cluster can create a target number of PODs according to the POD creation request. The target number is the number of PODs to be created carried in the POD creation request, and the target number is the number of PODs that meet the business requirements calculated based on the number of requests in the POD quantity request and the number of currently idle PODs.

[0026] The acquisition and sending unit is used to acquire the number of available PODs returned by the container cluster and return the number of available PODs to the service front end, so that the service front end sends the number of available PODs to the service back end, and then the service back end initiates a service operation request to the available PODs in the container cluster.

[0027] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the first aspects above.

[0028] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method described in any of the first aspects above.

[0029] In this embodiment of the invention, a container cluster management method for multiple traffic single requests is provided, applied to a container cluster management system. The method includes: receiving a POD quantity request initiated by a business frontend; obtaining the number of currently idle PODs in the container cluster; initiating a POD creation request to the container cluster based on the request quantity in the POD quantity request and the current number of idle PODs, so that the container cluster creates a target number of PODs according to the POD creation request, wherein the target number is the number of PODs to be created carried in the POD creation request, and the target number is the number of PODs that meet the business requirements calculated based on the request quantity in the POD quantity request and the current number of idle PODs; obtaining the number of available PODs returned by the container cluster, and returning the number of available PODs to the business frontend, so that the business frontend sends the number of available PODs to the business backend, and then the business backend initiates a business operation request to the available PODs in the container cluster. As described above, in the container cluster management method of the present invention, a POD creation request is first initiated to the container cluster based on the number of requests in the POD quantity request and the number of currently idle PODs. Then, the container cluster creates the required number of PODs to meet business needs based on the POD creation request. Next, the information on the number of available PODs returned by the container cluster is sent to the business backend. Then, the business backend initiates a business operation request to the available PODs in the container cluster. It can be seen that POD creation is completed before the business operation request is initiated. In this way, the available PODs can meet the business operation needs and ensure the smooth completion of the business operation request. In addition, since the PODs are created in advance, when the business backend initiates a business operation request to the available PODs in the container cluster, the traffic of the business operation request can be evenly distributed across the available PODs, avoiding traffic skew during operation. This alleviates the technical problems of business operation failure and traffic skew caused by POD creation lag in the existing HPA horizontal scaling method for business operations with multiple traffic single requests. Attached Figure Description

[0030] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0031] Figure 1 A flowchart illustrating a container cluster management method for multiple traffic single requests provided in an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of a container cluster management device for multiple traffic single requests provided in an embodiment of the present invention;

[0033] Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0034] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] For business operations involving multiple traffic requests, existing HPA horizontal scaling methods suffer from technical issues such as POD creation delays leading to failures in business operations involving multiple traffic requests and traffic skew.

[0036] Based on this, in the container cluster management method for multiple traffic single requests of the present invention, a POD creation request is first sent to the container cluster according to the number of requests in the POD quantity request and the number of currently idle PODs. Then, the container cluster creates PODs that meet the business requirements according to the POD creation request. Then, the information on the number of available PODs returned by the container cluster is sent to the business backend. Then, the business backend sends a business operation request to the available PODs in the container cluster. It can be seen that POD creation is completed before the business operation request is sent. In this way, the available PODs can meet the business operation requirements and ensure the smooth completion of the business operation request. In addition, since the PODs are created in advance, when the business backend sends a business operation request to the available PODs in the container cluster, the traffic of the business operation request can be evenly distributed across the available PODs, avoiding traffic skew during operation.

[0037] To facilitate understanding of this embodiment, a detailed description of a container cluster management method for multiple traffic single requests disclosed in this embodiment of the invention will be provided first.

[0038] Example 1:

[0039] According to an embodiment of the present invention, an embodiment of a container cluster management method for multiple traffic single requests is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0040] Figure 1 This is a flowchart of a container cluster management method for multiple traffic single requests according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0041] Step S102: Receive the POD quantity request initiated by the business front-end;

[0042] In an optional embodiment of the present invention, the container cluster management method can be applied to a container cluster management system, which manages the scaling up and down of PODs in the container cluster downwards and provides an interface to the business front-end upwards to receive POD quantity requests initiated by the business front-end.

[0043] Specifically, the number of requests in the POD quantity request is determined based on the number of PODs required for the business operation request.

[0044] Step S104: Obtain the number of currently idle PODs in the container cluster;

[0045] Specifically, the cluster APIServer is called to obtain the number of currently idle PODs in the container cluster.

[0046] Step S106: Initiate a POD creation request to the container cluster based on the number of requests in the POD quantity request and the number of currently idle PODs, so that the container cluster can create a target number of PODs according to the POD creation request. The target number is the number of PODs to be created carried in the POD creation request, and the target number is the number of PODs that meet the business requirements calculated based on the number of requests in the POD quantity request and the number of currently idle PODs.

[0047] Specifically, the target number = the number of requests in the POD number request - the number of currently available PODs.

[0048] After the container cluster management system initiates a POD creation request to the container cluster through the cluster API Server, the actual number of PODs created by the container cluster may be less than the target number. This is because the POD resources in the container cluster are limited. If the sum of the number of currently running PODs and the number of abnormal PODs is large, then the remaining POD resources will be very few. Thus, even after the container cluster management system initiates a POD creation request to the container cluster, the container cluster cannot create all the target number of PODs. In other words, the number of newly created PODs may be less than the target number. When the number of newly created PODs is less than the target number, the number of available PODs will not meet the business requirements. However, business operations can still be guaranteed to proceed smoothly, only at a slower speed.

[0049] Step S108: Obtain the number of available PODs returned by the container cluster and return the number of available PODs to the business front end, so that the business front end can send the number of available PODs to the business back end, and then the business back end can initiate business computing requests to the available PODs in the container cluster.

[0050] In this embodiment of the invention, a container cluster management method for multiple traffic single requests is provided, applied to a container cluster management system. The method includes: receiving a POD quantity request initiated by a business frontend; obtaining the number of currently idle PODs in the container cluster; initiating a POD creation request to the container cluster based on the request quantity in the POD quantity request and the current number of idle PODs, so that the container cluster creates a target number of PODs according to the POD creation request, wherein the target number is the number of PODs to be created carried in the POD creation request, and the target number is the number of PODs that meet the business requirements calculated based on the request quantity in the POD quantity request and the current number of idle PODs; obtaining the number of available PODs returned by the container cluster, and returning the number of available PODs to the business frontend, so that the business frontend sends the number of available PODs to the business backend, and then the business backend initiates a business operation request to the available PODs in the container cluster. As described above, in the container cluster management method of the present invention, a POD creation request is first initiated to the container cluster based on the number of requests in the POD quantity request and the number of currently idle PODs. Then, the container cluster creates the required number of PODs to meet business needs based on the POD creation request. Next, the information on the number of available PODs returned by the container cluster is sent to the business backend. Then, the business backend initiates a business operation request to the available PODs in the container cluster. It can be seen that POD creation is completed before the business operation request is initiated. In this way, the available PODs can meet the business operation needs and ensure the smooth completion of the business operation request. In addition, since the PODs are created in advance, when the business backend initiates a business operation request to the available PODs in the container cluster, the traffic of the business operation request can be evenly distributed across the available PODs, avoiding traffic skew during operation. This alleviates the technical problems of business operation failure and traffic skew caused by POD creation lag in the existing HPA horizontal scaling method for business operations with multiple traffic single requests.

[0051] The above provides a brief overview of the container cluster management method for multiple traffic single requests of the present invention. The specific details involved are described in detail below.

[0052] In an optional embodiment of the present invention, the number of available PODs is the sum of the number of currently idle PODs and the number of newly created PODs, wherein the number of newly created PODs is not greater than the target number.

[0053] Specifically, when the number of newly created PODs is less than the target number, the method also includes the following when obtaining the number of available PODs returned by the container cluster:

[0054] Get the reason why the number of available PODs returned by the container cluster does not meet the business requirements (i.e., the reason why the number of newly created PODs is less than the target number), and return the reason to the business front end.

[0055] In addition, the system will return the reason why the number of available PODs does not meet the business requirements to the container cluster system, so that the system administrator can perform relevant operations (such as building the nodes of the container cluster) after notifying the system administrator of the above reasons.

[0056] In an optional embodiment of the present invention, the method further includes:

[0057] (1) Poll the resource utilization of all PODs corresponding to the controller in the container cluster according to a preset period;

[0058] (2) Send a release POD request to the container cluster based on the resource utilization of all PODs, so that the container cluster releases the PODs according to the release POD request. The release POD request carries the identifier of the POD to be released, and the resource utilization of the POD to be released is less than a preset threshold.

[0059] The container cluster management method for multiple traffic single requests of the present invention can scale up and down the backend POD. The biggest difference between it and the HPA horizontal scaling of container clusters is that it provides the business frontend with information on the number of available PODs, provides users with as many available PODs as possible, the scaling speed is faster than HPA, and the PODs are created in advance, so that the traffic can be evenly distributed to the PODs, and there will be no traffic skew caused by the POD creation lagging behind the business requests (when the PODs are created in advance, the minimum number of connections can be used to balance the traffic).

[0060] Example 2:

[0061] This invention also provides a container cluster management device for multiple traffic single requests. This device is mainly used to execute the container cluster management method for multiple traffic single requests provided in Embodiment 1 of this invention. The following is a detailed description of the container cluster management device for multiple traffic single requests provided in this invention.

[0062] Figure 2 This is a schematic diagram of a container cluster management device for multiple traffic single requests according to an embodiment of the present invention, as shown below. Figure 2 As shown, the device mainly includes: a receiving unit 10, an acquiring unit 20, a POD creation request initiation unit 30, and an acquiring and sending unit 40, wherein:

[0063] The receiving unit is used to receive POD quantity requests initiated by the business front end;

[0064] The acquisition unit is used to obtain the number of currently idle PODs in the container cluster;

[0065] The POD creation request initiation unit is used to initiate a POD creation request to the container cluster based on the number of requests in the POD quantity request and the number of currently idle PODs, so that the container cluster can create a target number of PODs according to the POD creation request. The target number is the number of PODs to be created carried in the POD creation request, and the target number is the number of PODs that meet the business requirements calculated based on the number of requests in the POD quantity request and the number of currently idle PODs.

[0066] The acquisition and sending unit is used to acquire the number of available PODs returned by the container cluster and return the number of available PODs to the business front end, so that the business front end can send the number of available PODs to the business back end, and then the business back end can initiate business computing requests to the available PODs in the container cluster.

[0067] In this embodiment of the invention, a container cluster management device for multiple traffic single requests is provided, applied to a container cluster management system. The device includes: receiving a POD quantity request initiated by a business frontend; obtaining the number of currently idle PODs in the container cluster; initiating a POD creation request to the container cluster based on the request quantity in the POD quantity request and the current number of idle PODs, so that the container cluster creates a target number of PODs according to the POD creation request, wherein the target number is the number of PODs to be created carried in the POD creation request, and the target number is the number of PODs that meet the business requirements calculated based on the request quantity in the POD quantity request and the current number of idle PODs; obtaining the number of available PODs returned by the container cluster, and returning the number of available PODs to the business frontend, so that the business frontend sends the number of available PODs to the business backend, and then the business backend initiates a business operation request to the available PODs in the container cluster. As described above, in the container cluster management device of the present invention, a POD creation request is first initiated to the container cluster based on the number of requests in the POD quantity request and the number of currently idle PODs. Then, the container cluster creates the number of PODs that meet the business requirements according to the POD creation request. Then, the information on the number of available PODs returned by the container cluster is sent to the business backend. Then, the business backend initiates a business operation request to the available PODs in the container cluster. It can be seen that POD creation is completed before the business operation request is initiated. In this way, the available PODs can meet the business operation requirements and ensure the smooth completion of the business operation request. In addition, since the PODs are created in advance, when the business backend initiates a business operation request to the available PODs in the container cluster, the traffic of the business operation request can be evenly distributed across the available PODs, avoiding traffic skew during operation. This alleviates the technical problems of business operation failure and traffic skew caused by POD creation lag in the existing HPA horizontal scaling method for business operations with multiple traffic single requests.

[0068] Optionally, the number of requests in the POD quantity request is determined based on the number of PODs required for the business operation request.

[0069] Optionally, the acquisition unit is also used to: call the cluster ApiServer to obtain the number of currently idle PODs in the container cluster.

[0070] Optionally, the target number = the number of requests in the POD number request - the number of currently available PODs.

[0071] Optionally, the number of available PODs is the sum of the number of currently idle PODs and the number of newly created PODs, wherein the number of newly created PODs is no greater than the target number.

[0072] Optionally, the device is further configured to: poll and obtain the resource utilization rate of all PODs corresponding to the controller in the container cluster at a preset period; send a release POD request to the container cluster according to the resource utilization rate of all PODs, so that the container cluster releases the PODs according to the release POD request, wherein the release POD request carries the identifier of the POD to be released, and the resource utilization rate of the POD to be released is less than a preset threshold.

[0073] Optionally, when the number of newly created PODs is less than the target number, the acquisition unit is also used to: obtain the reason why the number of available PODs returned by the container cluster does not meet the business requirements, and return the reason to the business front end.

[0074] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0075] like Figure 3 As shown in the embodiment of this application, an electronic device 600 includes a processor 601, a memory 602, and a bus. The memory 602 stores machine-readable instructions that can be executed by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 via the bus. The processor 601 executes the machine-readable instructions to perform the steps of the container cluster management method for multiple traffic single requests described above.

[0076] Specifically, the memory 602 and processor 601 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 601 runs the computer program stored in the memory 602, it can execute the container cluster management method for multiple traffic single requests mentioned above.

[0077] The processor 601 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 601 or by instructions in software form. The processor 601 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 602, and processor 601 reads the information from memory 602 and, in conjunction with its hardware, completes the steps of the above method.

[0078] Corresponding to the above-described container cluster management method for multiple traffic single requests, this application embodiment also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to perform the steps of the above-described container cluster management method for multiple traffic single requests.

[0079] The container cluster management device for multiple traffic single requests provided in this application embodiment can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.

[0080] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0081] For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0082] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0083] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0084] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the vehicle marking method described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0085] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0086] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A container cluster management method for multiple traffic single requests, characterized in that, Applied to a container cluster management system, the method includes: Receive POD quantity requests initiated by the business frontend; Get the number of currently idle PODs in the container cluster; Based on the number of requests in the POD quantity request and the number of currently idle PODs, a POD creation request is initiated to the container cluster, so that the container cluster creates a target number of PODs according to the POD creation request. The target number is the number of PODs to be created carried in the POD creation request, and the target number = the number of requests in the POD quantity request - the number of currently idle PODs. The system obtains the number of available PODs returned by the container cluster and returns the number of available PODs to the business front end, so that the business front end sends the number of available PODs to the business back end. Then, the business back end initiates a business operation request to the available PODs in the container cluster. The resource utilization rate of all PODs corresponding to the controller in the container cluster is obtained by polling at a preset period. Based on the resource utilization of all PODs, a POD release request is sent to the container cluster so that the container cluster releases the PODs according to the POD release request. The POD release request carries the identifier of the POD to be released, and the resource utilization of the POD to be released is less than a preset threshold.

2. The container cluster management method according to claim 1, characterized in that, The number of requests in the POD quantity request is determined based on the number of PODs required for the business operation request.

3. The container cluster management method according to claim 1, characterized in that, Get the number of currently idle PODs in the container cluster, including: Call the cluster APIServer to obtain the number of currently idle PODs in the container cluster.

4. The container cluster management method according to claim 1, characterized in that, The number of available PODs is the sum of the number of currently idle PODs and the number of newly created PODs, wherein the number of newly created PODs is not greater than the target number.

5. The container cluster management method according to claim 4, characterized in that, When the number of newly created PODs is less than the target number, the method further includes the following when obtaining the number of available PODs returned by the container cluster: Obtain the reason why the number of available PODs returned by the container cluster does not meet the business requirements, and return the reason to the business front end.

6. A container cluster management device for multiple traffic single requests, characterized in that, The device, used in container cluster management systems, includes: The receiving unit is used to receive POD quantity requests initiated by the business front end; The acquisition unit is used to obtain the number of currently idle PODs in the container cluster; A POD creation request initiation unit is used to initiate a POD creation request to the container cluster based on the number of requests in the POD quantity request and the number of currently idle PODs, so that the container cluster can create a target number of PODs according to the POD creation request. The target number is the number of PODs to be created carried in the POD creation request, and the target number = the number of requests in the POD quantity request - the number of currently idle PODs. The acquisition and sending unit is used to acquire the number of available PODs returned by the container cluster and return the number of available PODs to the service front end, so that the service front end sends the number of available PODs to the service back end, and then the service back end initiates a service operation request to the available PODs in the container cluster; The device is further configured to: poll and obtain the resource utilization rate of all PODs corresponding to the controller in the container cluster at a preset period; send a release POD request to the container cluster according to the resource utilization rate of all PODs, so that the container cluster releases the POD according to the release POD request, wherein the release POD request carries the identifier of the POD to be released, and the resource utilization rate of the POD to be released is less than a preset threshold.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • GPU resource using method and device and storage medium

    CN110888743A