A cloud-native application expansion method, device, equipment and medium
By analyzing the historical response time and memory resources of cloud-native applications and dynamically calculating the number of POD deployments, we can solve the availability issues of cloud-native applications in high concurrency situations and achieve efficient dynamic expansion and cost optimization.
Patent Information
- Application Number
- CN202310239921.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-03-07
AI Technical Summary
Existing technologies cannot effectively guarantee application availability when cloud-native applications face high concurrent traffic impacts. Traditional capacity expansion methods also have problems such as window periods and unreasonable resource allocation, resulting in increased costs and reduced availability.
By analyzing the historical response time increments and memory resources of cloud-native applications, the expected transaction capacity and deployment quantity of PODs are dynamically calculated, and pre-deployment is implemented to ensure application availability and efficiency.
While ensuring the availability of cloud-native applications, dynamic expansion is achieved, which improves expansion efficiency and reduces labor costs.
Smart Images

Figure CN116248689B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computers, and in particular to a method, apparatus, device, and storage medium for expanding cloud native applications. Background Art
[0002] With the rise of cloud-native technologies, an increasing number of microservice applications are being deployed on cloud-native platforms. To ensure the availability and performance of cloud-native application systems facing high concurrent traffic, when the overall load on a cloud-native application cluster is high, application requests are intercepted to reduce the pressure on the cluster, sacrificing some requests to ensure overall cluster availability. Alternatively, near-real-time vertical or horizontal scaling is performed by monitoring the instantaneous CPU, memory, or network bandwidth of the application pod. This scaling approach can lead to windows of availability for cloud-native applications during the scaling phase. Furthermore, the degree of scaling is determined based on resource availability, which is inconsistent with business capabilities. In some cases, high resource consumption does not necessarily mean low business availability. Therefore, system administrators are often forced to improve system responsiveness by lowering the scaling monitoring threshold. This approach increases application costs, reduces cloud infrastructure availability, and fails to achieve optimal dynamic scaling for cloud-native applications. Therefore, how to achieve dynamic scaling for cloud-native applications while ensuring application availability is a critical issue. Summary of the Invention
[0003] The present invention provides a method, apparatus, device, and storage medium for expanding cloud native applications, which can achieve dynamic expansion of cloud native applications while ensuring the application availability of cloud native applications, thereby saving the labor cost of expanding cloud native applications.
[0004] According to one aspect of the present invention, a method for expanding capacity of a cloud native application is provided, comprising:
[0005] Determine the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases during the cloud native application's historical operation cycle;
[0006] Determining the number of candidate deployments of the POD in the cloud native application in a target operating cycle based on the transaction volume of the historical period and the expected transaction carrying capacity of the POD;
[0007] Determine, based on the total memory of the cloud native application and the running memory of the cloud native application in the historical running cycle, the available memory resources of the cloud native application for deploying the POD in the target running cycle;
[0008] The candidate deployment quantity of the POD is updated according to the candidate deployment quantity and available memory resources of the POD, the target deployment quantity of the POD is determined, and the POD is pre-deployed for the cloud native application according to the target deployment quantity.
[0009] According to another aspect of the present invention, a device for expanding capacity of a cloud native application is provided, the device comprising:
[0010] An expected carrying capacity determination module is used to determine the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases in the historical operation cycle of the cloud native application;
[0011] a candidate deployment quantity determination module, configured to determine the number of candidate deployments of the POD in the cloud native application in a target operation cycle based on the transaction volume of the historical period and the expected transaction carrying capacity of the POD;
[0012] An available memory resource determination module is configured to determine the available memory resources of the cloud native application for deploying the POD in the target operation cycle based on the total memory of the cloud native application and the operating memory of the cloud native application in the historical operation cycle;
[0013] The capacity expansion pre-deployment module is used to update the number of candidate deployments of POD according to the candidate deployment number of POD and available memory resources, determine the target deployment number of POD, and pre-deploy POD for the cloud native application according to the target deployment number.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cloud native application expansion method described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for expanding the capacity of a cloud-native application described in any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention determines the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle according to the increment of the historical response time of the cloud native application when the specified transaction volume is increased in the historical operation cycle of the cloud native application; determines the number of candidate deployments of the POD in the cloud native application in the target operation cycle according to the historical cycle transaction volume and the expected transaction carrying capacity of the POD; determines the available memory resources for deploying the POD in the target operation cycle according to the total memory of the cloud native application and the running memory of the cloud native application in the historical operation cycle; updates the number of candidate deployments according to the number of candidate deployments of the POD and the available memory resources, determines the target number of deployments of the POD, and pre-deploys the POD for the cloud native application according to the target number of deployments. The above solution solves the problem that the application availability of the cloud native application cannot be guaranteed when the cloud native application is automatically expanded. It realizes the dynamic expansion of the cloud native application while ensuring the application availability of the cloud native application, improves the expansion efficiency of the cloud native application, and reduces the labor cost of expanding the application of the cloud native application.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A flowchart of a method for expanding capacity of a cloud-native application provided in Example 1 of the present invention;
[0023] Figure 2 A flowchart of a method for expanding capacity of a cloud-native application provided in Example 2 of the present invention;
[0024] Figure 3 A schematic diagram of the structure of a cloud native application expansion device provided in Example 3 of the present invention;
[0025] Figure 4 This is a structural diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "candidate" and "target" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "etc." and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or apparatus 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 apparatus.
[0028] Example 1
[0029] Figure 1 A flowchart of a method for expanding a cloud native application is provided for the first embodiment of the present invention. This embodiment is applicable to the case of automatically expanding a cloud native application. The method can be executed by an expansion device for a cloud native application. The expansion device for a cloud native application can be implemented in the form of hardware and / or software. The expansion device for a cloud native application can be configured in an electronic device. Figure 1 As shown, the method includes:
[0030] S110. Determine the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases in the historical operation cycle of the cloud native application.
[0031] Cloud native refers to a distributed cloud based on distributed deployment and unified operations management, and is a cloud technology product system built on technologies such as containers, microservices, and DevOps. The specified transaction volume can be set based on actual needs, for example, 200 transactions. The target operating cycle refers to the operating cycle during which the cloud native application may need to be scaled up. The historical operating cycle corresponds to the target operating cycle, and the historical transaction response time of the cloud native application during the historical operating cycle meets the transaction response time response condition. For example, if the target operating cycle is 9:00-11:00 on Tuesday, the historical operating cycle can be 9:00-11:00 on any day before Tuesday where the historical transaction response time met the transaction response time response condition. A POD is a logical abstraction and the smallest unit created and managed in Kubernetes. A POD consists of one or more containers. The response time increment refers to the increase in the cloud native application's response time for each increase in the specified transaction volume. The expected transaction capacity of a POD refers to the number of transactions that a POD needs to handle while ensuring the response speed of the cloud native application.
[0032] Specifically, based on the historical link data of the service call chain, the historical cycle transaction volume and historical transaction response time of the cloud native application in the historical operation cycle are determined. When the system completes a business call, the call information between services is logged, and then all the logged data in the log is connected into a tree chain to generate a service call chain. The link historical data includes all call information between services in the historical process. Based on the historical cycle transaction volume and historical transaction response time of the cloud native application in the historical operation cycle, the historical response time increment of the cloud native application is determined for each increase in the specified transaction volume in the historical operation cycle, and the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle is determined based on the historical response time increment.
[0033] S120. Determine the number of candidate deployments of PODs in the cloud native application in the target operation cycle based on the transaction volume of the historical cycle and the expected transaction carrying capacity of the POD.
[0034] Specifically, the historical transaction volume is divided by the expected transaction capacity of the POD. The result is used to determine the number of candidate POD deployments in the cloud-native application during the target operating cycle. For example, if the historical transaction volume is 5,000 and the expected transaction capacity of the POD is 800, the number of candidate POD deployments in the cloud-native application during the target operating cycle is 7.
[0035] For example, the minimum number of POD deployments in cloud-native applications in the target operating cycle can be determined based on the transaction volume in historical cycles and the expected transaction carrying capacity of POD; based on the minimum number of POD deployments, the candidate number of POD deployments in cloud-native applications in the target operating cycle can be determined.
[0036] Specifically, the minimum number of deployed PODs in the cloud-native application during the target operating cycle is determined by dividing the historical transaction cycle volume by the expected transaction capacity of the POD. The candidate number of PODs for deployment in the cloud-native application during the target operating cycle is determined based on the sum of the minimum number of deployed PODs and the adjusted number of PODs. The adjusted number of deployments can be set as needed, for example, to 1.
[0037] It can be understood that the above solution avoids the problem of low response efficiency of cloud-native applications caused by insufficient number of candidate deployments of POD, and ensures the response efficiency of cloud-native applications.
[0038] S130. Determine available memory resources for deploying PODs for the cloud native application in a target operation cycle based on the total memory of the cloud native application and the operating memory of the cloud native application in a historical operation cycle.
[0039] For example, the difference between the total memory of the cloud native application and the running memory of the cloud native application in the historical running cycle can be used as the available memory resources for deploying PODs of the cloud native application in the target running cycle.
[0040] For example, if the total memory of a cloud-native application is 1024 GB and the running memory of the cloud-native application in the historical running cycle is 1000 GB, the available memory resources for deploying PODs in the target running cycle of the cloud-native application are 24 GB.
[0041] S140. Update the candidate deployment quantity of the POD according to the candidate deployment quantity and available memory resources, determine the target deployment quantity of the POD, and pre-deploy the POD for the cloud native application according to the target deployment quantity.
[0042] Specifically, based on the number of candidate deployment PODs and the memory resources occupied by a POD deployed in a cloud-native application, the memory resources required to deploy the candidate number of PODs in the cloud-native application are determined. If the memory resources required to deploy the candidate number of PODs in the cloud-native application are greater than or equal to the available memory resources, the number of candidate deployment PODs is increased, and the increased number of candidate deployment PODs is used as the target number of deployment PODs. If the memory resources required to deploy the candidate number of PODs in the cloud-native application are less than the available memory resources, the candidate number of PODs is used as the target number of deployment PODs. Based on the target number of deployments, the cloud-native application is pre-deployed with PODs before the start of the target operation cycle.
[0043] For example, the target number of POD deployments can be determined through the following sub-steps:
[0044] S1401. Determine the expected memory resources for deploying the POD in the cloud native application based on the number of candidate deployments of the POD.
[0045] The expected memory resources refer to the memory resources required to deploy the candidate number of PODs in the cloud native application.
[0046] For example, if the memory resources occupied by a POD deployed in a cloud-native application are 2 GB and the number of candidate deployments of the POD is 7, the expected memory resources for deploying the POD in the cloud-native application are 14 GB.
[0047] S1402: If the available memory resources are greater than the expected memory resources, determine the candidate deployment quantity as the target deployment quantity of the POD.
[0048] For example, if the available memory resources are 24 GB and the expected memory resources for deploying a POD in a cloud-native application are 14 GB, the available memory resources are greater than the expected memory resources, and the number of candidate deployments is determined to be the target number of POD deployments.
[0049] S1403. If the available memory resources are less than or equal to the expected memory resources, incrementally adjust the expected transaction carrying capacity based on the available memory resources, and determine the target number of PODs to be deployed based on the historical period transaction volume and the adjusted expected transaction carrying capacity.
[0050] Specifically, if the available memory resources are less than or equal to the expected memory resources, the incremental adjustment quantity for incrementally adjusting the expected transaction carrying capacity is determined based on the available memory resources. For example, a correspondence between the available memory interval and the candidate adjustment quantities for incrementally adjusting the expected transaction carrying capacity can be preset. The available memory interval to which the available memory resources belong is determined as the target memory interval. Based on the target memory interval and the correspondence between memory and adjustment quantity, the target adjustment quantity for incrementally adjusting the expected transaction carrying capacity is determined from the candidate adjustment quantities. The expected transaction carrying capacity is incrementally adjusted based on the target adjustment quantity, and the target deployment quantity of PODs is re-determined based on the historical period transaction volume and the adjusted expected transaction carrying capacity.
[0051] The technical solution provided in this embodiment determines the expected transaction capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases in the historical operation cycle; determines the number of candidate deployments of the POD in the cloud native application in the target operation cycle based on the historical cycle transaction volume and the expected transaction capacity of the POD; determines the available memory resources for deploying the POD in the cloud native application in the target operation cycle based on the total memory of the cloud native application and the running memory of the cloud native application in the historical operation cycle; updates the number of candidate deployments based on the number of candidate deployments of the POD and the available memory resources, determines the target number of deployments of the POD, and pre-deploys the POD for the cloud native application based on the target number of deployments. The above solution solves the problem of being unable to guarantee the application availability of the cloud native application when automatically scaling the cloud native application. It realizes dynamic scaling of the cloud native application while ensuring the application availability of the cloud native application, improves the scaling efficiency of the cloud native application, and reduces the labor cost of scaling the cloud native application.
[0052] Example 2
[0053] Figure 2 This is a flowchart of a method for expanding the capacity of a cloud native application provided in Example 2 of the present invention. This example is optimized based on the above example and provides a preferred implementation method for determining the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume is increased in the historical operation cycle of the cloud native application. Specifically, Figure 2 As shown, the method includes:
[0054] S210. Determine, based on the historical transaction volume and historical transaction response time of the cloud native application in the historical operation cycle, an increment in the historical response time of the cloud native application for each increase in the specified transaction volume in the historical operation cycle.
[0055] For example, Table 1 is an example table of the historical transaction volume, historical transaction response time, and the incremental historical response time of the cloud native application for each increase in the specified transaction volume during the historical operation cycle of the cloud native application.
[0056] Table 1
[0057]
[0058] In Table 1, the transaction volume is set to 100.
[0059] S220. Determine, based on the historical period transaction volume and the historical response time increment, a historical response time increment growth rate for each increase in the specified transaction volume.
[0060] Specifically, the historical response time increment growth rate for each increase in the specified transaction volume can be determined according to formula (1).
[0061]
[0062] Among them, r n is the historical duration increment growth rate. Δt1 and Δt2 are two historical transaction response times corresponding to different historical transaction volumes. Δt2-Δt1 is the historical response time increment. T1 is the historical transaction volume corresponding to Δt1. T2 is the historical transaction volume corresponding to Δt2. T2-T1 is the specified transaction volume.
[0063] S230. Determine the expected transaction carrying capacity of the POD in the cloud native application based on the historical duration incremental growth rate.
[0064] Exemplarily, the response time increment curve of the cloud native application in the historical operation cycle can be determined based on the historical cycle transaction volume and the historical duration increment growth rate of the cloud native application in the historical operation cycle; the horizontal axis of the response time increment curve is the historical cycle transaction volume, and the vertical axis is the historical duration increment growth rate. According to the slope of the response time increment curve, the expected transaction carrying capacity of the POD in the cloud native application is determined. For example, the transaction volume interval corresponding to the duration increment curve with a slope greater than the slope threshold can be used as the target transaction volume interval, and the minimum transaction volume corresponding to the target transaction volume interval can be used as the expected transaction carrying capacity of the POD in the cloud native application. For example, if the target transaction volume interval is [800,1000], the expected transaction carrying capacity of the POD in the cloud native application is 800.
[0065] Exemplarily, the method for determining the expected transaction capacity of a POD in a cloud-native application based on a historical duration incremental growth rate may also be: determining a target duration incremental growth rate that is greater than a growth rate threshold from the historical duration incremental growth rate, and determining a target transaction volume range corresponding to the target duration incremental growth rate; and determining the minimum transaction volume corresponding to the target transaction volume range as the expected transaction capacity of the POD in the cloud-native application.
[0066] S240: Determine the number of candidate deployments of PODs in the cloud native application in the target operation cycle based on the transaction volume of the historical cycle and the expected transaction carrying capacity of the POD.
[0067] S250: Determine available memory resources for deploying PODs for the cloud native application in the target operation cycle based on the total memory of the cloud native application and the operation memory of the cloud native application in the historical operation cycle.
[0068] S260: Update the candidate deployment quantity of the POD according to the candidate deployment quantity and available memory resources, determine the target deployment quantity of the POD, and pre-deploy the POD for the cloud native application according to the target deployment quantity.
[0069] The technical solution of this embodiment determines the historical response time increment of the cloud native application for each increase in the specified transaction volume in the historical operation cycle based on the historical cycle transaction volume and historical transaction response time of the cloud native application in the historical operation cycle; determines the historical time increment growth rate of the historical response time increment for each increase in the specified transaction volume based on the historical cycle transaction volume and the historical response time increment; determines the expected transaction carrying capacity of the POD in the cloud native application based on the historical time increment growth rate; determines the number of candidate deployments of POD in the cloud native application in the target operation cycle based on the historical cycle transaction volume and the expected transaction carrying capacity of the POD; determines the available memory resources of the cloud native application for deploying POD in the target operation cycle based on the total memory of the cloud native application and the running memory of the cloud native application in the historical operation cycle; updates the number of candidate deployments of POD based on the candidate number of POD and the available memory resources, determines the target deployment number of POD, and pre-deploys POD for the cloud native application based on the target deployment number. The above solution can improve the calculation efficiency of the expected transaction carrying capacity of POD, and at the same time improve the accuracy of the obtained expected transaction carrying capacity of POD, thereby ensuring the reliability of the target deployment quantity of POD and ensuring the rationality of POD deployment when pre-deploying POD for cloud-native applications.
[0070] Example 3
[0071] Figure 3This is a schematic diagram of the structure of a cloud native application expansion device provided in the third embodiment of the present invention. This embodiment is applicable to the case of dynamic expansion of cloud native applications. Figure 3 As shown, the capacity expansion device of the cloud native application includes: an expected carrying capacity determination module 310, a candidate deployment quantity determination module 320, an available memory resource determination module 330 and a capacity expansion pre-deployment module 340.
[0072] The expected carrying capacity determination module 310 is configured to determine the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases during the historical operation cycle of the cloud native application.
[0073] A candidate deployment quantity determination module 320 is configured to determine the candidate deployment quantity of the POD in the cloud native application in the target operation cycle based on the transaction volume of the historical cycle and the expected transaction carrying capacity of the POD;
[0074] An available memory resource determination module 330 is configured to determine the available memory resources for deploying PODs of the cloud native application in a target operation cycle based on the total memory of the cloud native application and the operating memory of the cloud native application in historical operation cycles;
[0075] The capacity expansion pre-deployment module 340 is used to update the number of candidate deployments of PODs according to the candidate deployment number of PODs and available memory resources, determine the target deployment number of PODs, and pre-deploy PODs for cloud native applications based on the target deployment number.
[0076] The technical solution provided in this embodiment determines the expected transaction capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases in the historical operation cycle; determines the number of candidate deployments of the POD in the cloud native application in the target operation cycle based on the historical cycle transaction volume and the expected transaction capacity of the POD; determines the available memory resources for deploying the POD in the cloud native application in the target operation cycle based on the total memory of the cloud native application and the running memory of the cloud native application in the historical operation cycle; updates the number of candidate deployments based on the number of candidate deployments of the POD and the available memory resources, determines the target number of deployments of the POD, and pre-deploys the POD for the cloud native application based on the target number of deployments. The above solution solves the problem of being unable to guarantee the application availability of the cloud native application when automatically scaling the cloud native application. It realizes dynamic scaling of the cloud native application while ensuring the application availability of the cloud native application, improves the scaling efficiency of the cloud native application, and reduces the labor cost of scaling the cloud native application.
[0077] Exemplarily, the expected carrying capacity determination module 310 includes:
[0078] a response time increment determination unit, configured to determine, based on the historical transaction volume and historical transaction response time of the cloud native application in the historical operation cycle, the historical response time increment of the cloud native application when the specified transaction volume increases in the historical operation cycle;
[0079] a time growth rate determination unit, for determining, based on the historical period transaction volume and the historical response time increment, a historical response time increment growth rate for each increase in the specified transaction volume;
[0080] The expected carrying capacity determination unit is used to determine the expected transaction carrying capacity of the POD in the cloud native application based on the historical duration incremental growth rate.
[0081] Exemplarily, the expected carrying capacity determining unit is specifically configured to:
[0082] Determine a target duration incremental growth rate that is greater than a growth rate threshold from historical duration incremental growth rates, and determine a target trading volume range corresponding to the target duration incremental growth rate;
[0083] The minimum transaction volume corresponding to the target transaction volume range is determined as the expected transaction capacity of the POD in the cloud native application.
[0084] Exemplarily, the capacity expansion pre-deployment module 340 is specifically configured to:
[0085] Determine the expected memory resources for deploying pods in cloud-native applications based on the number of candidate pod deployments;
[0086] If the available memory resources are greater than the expected memory resources, the number of candidate deployments is determined to be the target number of POD deployments;
[0087] If the available memory resources are less than or equal to the expected memory resources, the expected transaction capacity is incrementally adjusted based on the available memory resources, and the target number of PODs to be deployed is determined based on the historical transaction volume and the adjusted expected transaction capacity.
[0088] Exemplarily, the candidate deployment quantity determination module 320 is specifically configured to:
[0089] Determine the minimum number of pods to deploy in the cloud-native application during the target operating cycle based on historical transaction volumes and the expected transaction capacity of the pod.
[0090] Based on the minimum number of Pod deployments, determine the number of candidate Pod deployments in the cloud native application during the target operating cycle.
[0091] Exemplarily, the available memory resource determination module 330 is specifically configured to:
[0092] The difference between the total memory of the cloud-native application and the running memory of the cloud-native application in the historical running cycle is used as the available memory resource for deploying Pods of the cloud-native application in the target running cycle.
[0093] The cloud-native application expansion device provided in this embodiment can be applied to the cloud-native application expansion method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0094] Example 4
[0095] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0096] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0097] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0098] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processors (DSPs), and any other suitable processors, controllers, microcontrollers, etc. Processor 11 executes the various methods and processes described above, such as the method for scaling cloud-native applications.
[0099] In some embodiments, the method for expanding the capacity of a cloud-native application may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for expanding the capacity of a cloud-native application described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for expanding the capacity of a cloud-native application in any other appropriate manner (e.g., by means of firmware).
[0100] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0101] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0102] In the context of the present invention, computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0105] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0106] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0107] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for expanding cloud native applications, characterized in that: include: Determine the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases during the cloud native application's historical operation cycle; Determining the number of candidate deployments of the POD in the cloud native application in a target operating cycle based on the transaction volume of the historical period and the expected transaction carrying capacity of the POD; Determine, based on the total memory of the cloud native application and the running memory of the cloud native application in the historical running cycle, the available memory resources of the cloud native application for deploying the POD in the target running cycle; The number of candidate deployments of the POD is updated according to the candidate deployment number of the POD and the available memory resources, a target deployment number of the POD is determined, and the POD is pre-deployed for the cloud native application according to the target deployment number; The step of determining the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application each time the specified transaction volume increases in the historical operation cycle of the cloud native application includes: Determine, based on the historical transaction volume and historical transaction response time of the cloud native application in its historical operation cycle, an increment in the historical response time of the cloud native application for each increase in a specified transaction volume during the historical operation cycle; Determining, based on the historical period transaction volume and the historical response time increment, a historical response time increment growth rate for each increase in a specified transaction volume; Determine a target duration incremental growth rate that is greater than a growth rate threshold from the historical duration incremental growth rates, and determine a target transaction volume interval corresponding to the target duration incremental growth rate; Determine the minimum transaction volume corresponding to the target transaction volume range as the expected transaction capacity of the POD in the cloud native application; The target operating cycle refers to the operating cycle during which the cloud native application may need to be expanded.
2. The method according to claim 1, characterized in that The candidate deployment quantity of the POD is updated according to the candidate deployment quantity of the POD and the available memory resources to determine the target deployment quantity of the POD, including: Determining the expected memory resources for deploying the POD in the cloud native application based on the number of candidate deployments of the POD; If the available memory resources are greater than the expected memory resources, determining the candidate deployment quantity as the target deployment quantity of POD; If the available memory resources are less than or equal to the expected memory resources, the expected transaction carrying capacity is incrementally adjusted according to the available memory resources, and the target deployment quantity of PODs is determined according to the historical period transaction volume and the adjusted expected transaction carrying capacity.
3. The method according to claim 1, characterized in that Determining the number of candidate deployments of the POD in the cloud native application in the target operation cycle based on the transaction volume of the historical period and the expected transaction carrying capacity of the POD includes: Determine the minimum number of PODs to be deployed in the cloud-native application during the target operating cycle based on the transaction volume of the historical period and the expected transaction carrying capacity of the POD; According to the minimum deployment quantity of the POD, the candidate deployment quantity of the POD in the cloud native application in the target operation cycle is determined.
4. The method according to claim 1, wherein Determining, based on the total memory of the cloud native application and the running memory of the cloud native application in the historical running cycle, the available memory resources of the cloud native application for deploying the POD in the target running cycle, including: The difference between the total memory of the cloud native application and the running memory of the cloud native application in the historical running cycle is used as the available memory resource of the cloud native application for deploying POD in the target running cycle.
5. A capacity expansion device for cloud native applications, characterized in that: include: An expected carrying capacity determination module is used to determine the expected transaction carrying capacity of the POD of the cloud native application in the target operation cycle based on the historical response time increment of the cloud native application when the specified transaction volume increases in the historical operation cycle of the cloud native application; a candidate deployment quantity determination module, configured to determine the number of candidate deployments of the POD in the cloud native application in a target operation cycle based on the transaction volume of the historical period and the expected transaction carrying capacity of the POD; An available memory resource determination module is configured to determine the available memory resources of the cloud native application for deploying the POD in the target operation cycle based on the total memory of the cloud native application and the operating memory of the cloud native application in the historical operation cycle; The expansion pre-deployment module is used to update the candidate deployment number of PODs according to the candidate deployment number of PODs and available memory resources, determine the target deployment number of PODs, and pre-deploy PODs for the cloud native application according to the target deployment number; The expected carrying capacity determination module includes: a response time increment determining unit, configured to determine, based on a historical transaction volume and a historical transaction response time of the cloud native application in a historical operation cycle, a historical response time increment of the cloud native application for each increase in a specified transaction volume during the historical operation cycle; a duration growth rate determining unit, configured to determine, based on the historical period transaction volume and the historical response duration increment, a historical duration increment growth rate of the historical response duration increment for each increase in a specified transaction volume; an expected carrying capacity determining unit, configured to determine a target duration incremental growth rate greater than a growth rate threshold from the historical duration incremental growth rate, and determine a target transaction volume interval corresponding to the target duration incremental growth rate; and determine a minimum transaction volume corresponding to the target transaction volume interval as the expected transaction carrying capacity of the POD in the cloud native application; The target operating cycle refers to the operating cycle during which the cloud native application may need to be expanded.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for expanding the cloud native application according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement the cloud native application expansion method according to any one of claims 1 to 4 when executed.
Citation Information
Patent Citations
Pod deployment method and apparatus
WO2022267646A1