CN-122003667-A - On-demand code execution computing resource management
Abstract
Systems and methods are provided for an on-demand code execution service that includes a set of computing devices for executing function code on demand while continuing to support execution of long-running background processes. The subset of resources may be initialized based at least in part on the application configuration data, including a request-response process, a background process, and a smaller set of computing resources for the background process. After execution of the background process has begun, a first request may be received. The on-demand code execution service may add computing resources to a larger set of computing resources to generate a first response to the first request. The first response may then be provided to an external set of computing resources. Upon determining that the queue does not contain additional requests, the on-demand code execution service may reduce the computing resource level to the smaller set of computing resources.
Inventors
- Harry Om Prasat Rajagopal
- Xiwendela Pannick
- Prasat Kumar Singh
- AMIT GUPTA
Assignees
- 亚马逊技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20240924
- Priority Date
- 20230929
Claims (15)
- 1. A system comprising a computer-readable memory and one or more processors, wherein the system is configured to: Configuring a host computing device of a code execution system with application program code, the application program code configured to execute a first process according to a request-response protocol and a second process executing outside of the request-response protocol, wherein configuring the code execution system comprises allocating a first amount of computing resources of the host computing device to execute the second process, wherein the first amount of computing resources is a non-zero level specified in configuration data associated with the application program code; receiving a first request from a second computing system; generating a first response to the first request based at least in part on execution of the first process, wherein the code execution system provides on-demand execution of the first process by allocating a second amount of computing resources of the host computing device, wherein the second amount of computing resources is greater than the first amount of computing resources; Reducing computing resource allocation to the first amount of computing resources based at least in part on the generation of the first response to the first request, wherein the second process is performed using the first amount of computing resources, and The first response is provided to the second computing system.
- 2. The system of claim 1, wherein the first number of computing resources of the host computing device comprises a first number of vcpus and the second number of computing resources of the host computing device comprises a second number of vcpus, wherein each vCPU represents processing power allocated to a virtual execution environment of the host computing device.
- 3. The system of claim 1, wherein the first amount of computing resources of the host computing device comprises a first amount of network bandwidth and the second amount of computing resources of the host computing device comprises a second amount of network bandwidth.
- 4. The system of claim 1, wherein the first amount of computing resources of the host computing device is sufficient to allow at least one background process to execute.
- 5. The system of claim 1, wherein the system configures the code execution system based at least in part on the configuration data, wherein the configuration data is provided by a customer associated with the application code.
- 6. The system of claim 5, wherein the configuration data comprises a baseline set of computing resources, indicating the first number of computing resources.
- 7. The system of claim 6, wherein the configuration data further comprises a larger set of computing resources, indicating the second number of computing resources.
- 8. The system of claim 5, wherein the configuration data comprises an intermediate set of computing resources indicating a third number of computing resources, wherein the third number of computing resources is greater than the first number of computing resources and less than the second number of computing resources.
- 9. A computer-implemented method, the computer-implemented method comprising: Configuring a virtual execution environment of a host computing device to execute an application, wherein the application comprises a synchronous component and an asynchronous component, wherein the synchronous component is to be executed using a first amount of computing resources of the host computing device, wherein the asynchronous component is to be executed using a second amount of the computing resources, wherein the second amount is a non-zero amount less than the first amount, and wherein the second amount is specified in application configuration data associated with the application; Provisioning the virtual execution environment with the first number of the computing resources, wherein the synchronization component generates a response to a request using at least a portion of the first number of the computing resources; Determining that the synchronization component has generated the response and has not awaited an outstanding request for a response, and Reducing the computing resources provisioned to the virtual execution environment to the second amount, wherein the asynchronous component executes using at least a portion of the second amount of the computing resources.
- 10. The computer-implemented method of claim 9, further comprising determining the second amount of the computing resource based at least in part on the application configuration data, wherein the application configuration data is provided by an application owner.
- 11. The computer-implemented method of claim 10, the computer-implemented method further comprising: Determining a container image of a plurality of container images to be used to instantiate the virtual execution environment based at least in part on the application configuration data; Obtaining a container image from a container image data storage area, and The virtual execution environment is instantiated using the container image.
- 12. The computer-implemented method of claim 9, further comprising configuring a second virtual execution environment of the host computing device to execute a second application different from the application, wherein the second application comprises a second synchronous component and a second asynchronous component, wherein the second asynchronous component is to be executed using at least a third number of the computing resources, wherein the third number is a non-zero number different from the second number.
- 13. The computer-implemented method of claim 9, the computer-implemented method further comprising: Receiving the request from a second computing system, wherein the virtual execution environment is provisioned with the first amount of the computing resources in response to receiving the request; Sending the request to the application program, and The response is received from the application, wherein determining that the synchronization component has generated the response is based on receiving the response from the application.
- 14. The computer-implemented method of claim 13, the computer-implemented method further comprising: receiving a second request from a third computer system; Determining that the virtual execution environment is provided with the first amount of the computing resources, and The second request is sent to the application without provisioning the virtual execution environment with an additional amount of the computing resource.
- 15. The computer-implemented method of claim 9, further comprising determining that a request queue associated with the application is empty, wherein determining that the synchronization component has not pending a request to respond is based on determining that the request queue associated with the application is empty.
Description
On-demand code execution computing resource management Incorporated by reference U.S. patent application Ser. No. 18/478,476, filed ON 9/29 of 2023, entitled "ON demand code execution computing resource management (ON-DEMAND CODE EXECUTION COMPUTING RESOURCE MANAGEMENT"), incorporated herein by reference and made a part of this specification. Background Computing systems may utilize communication networks to exchange data. In some implementations, a computing system may receive and process data provided by another computing system. For example, a computing system receives data entered using another computing system, stores the data, processes the data, and so on. Drawings Embodiments of various inventive features will now be described with reference to the following figures. Throughout the drawings, reference numbers may be re-used to indicate correspondence between referenced elements. The drawings are provided to illustrate example embodiments described herein and are not intended to limit the scope of the disclosure. For ease of identifying discussions of any particular element or act, the most significant digit(s) in a reference number generally refers to the figure number in which that element is first introduced. FIG. 1 is a block diagram of an illustrative computing environment in which an on-demand code execution system may operate in conjunction with a data storage system, in accordance with some embodiments. FIG. 2 is a block diagram of an illustrative computing system configured to provide data management across function calls in an on-demand code execution system, according to some embodiments. FIG. 3 illustrates an example routine of request/response cycles performed by an on-demand code execution system on a virtual execution environment (e.g., virtual machine instance, container, etc.). FIG. 4 illustrates a diagram depicting interactions between a client device and components of an on-demand code execution system during execution of a first request. FIG. 5A illustrates an example set of interactions between components in which a queue 502 is used to handle multiple requests received from client devices. Fig. 5B illustrates another set of example interactions between components, in which a queue 502 is used to handle multiple requests received from a client device 402. Detailed Description The present disclosure relates to managing application instances with code executing in an on-demand ("serverless") manner, including code that executes synchronously (e.g., according to a request-response model) and additional code that executes continuously or asynchronously (e.g., as a background process outside of the request-response model). To provide computing resources to continuous or asynchronous components of such application program instances even without execution of the synchronization process, a baseline number or set of computing resources (e.g., a number or set of computing resources less than the number or set of computing resources provided for the synchronization process) may be provided. When a synchronization process is to be performed, the amount or set of computing resources provisioned for the application may be increased to provide a desired level of performance when the synchronization process is performed. In this way, application developers can obtain the benefits of an on-demand or "serverless" platform while ensuring that longer running background processes or other asynchronous tasks can also be executed on the same platform. Introduction to the invention Some data centers may include multiple interconnected computing systems to provide computing resources to users of the data centers. To facilitate increasing utilization of data center resources, virtualization techniques allow a single physical computing device to host one or more instances of a virtual execution environment that is presented and operated as a stand-alone computing device to a user of a data center. Through virtualization, a single physical computing device may dynamically create, maintain, delete, or otherwise manage a virtual execution environment, such as a Virtual Machine (VM), micro-VM, container, or other virtual computing component. In turn, the user may request computer resources from the data center, including configurations of individual computing devices or networked computing devices, and may be provided with different numbers of virtual resources. In addition to computing resources, data centers provide a variety of other beneficial services to client devices. For example, a data center may provide data storage services configured to store data submitted by client devices and enable retrieval of such data over a network. Various types of data storage services may be provided, which typically vary according to their input/output (I/O) mechanisms. Some data centers include on-demand code execution systems, sometimes also referred to as serverless function execution systems. As generally described,