Pre-triggers for code execution environments
First Claim
1. A system for providing low-latency computational capacity in an on-demand code execution environment, the system comprising:
- a data store including historical data regarding use of the on-demand code execution environment, the historical data correlating pre-trigger notifications previously obtained at the on-demand code execution environment with one or more requests to execute first user-specified code obtained at the on-demand code execution environment subsequent to individual pre-trigger notifications, wherein the pre-trigger notifications are obtained from one or more computing systems associated with the user-specified code and distinct from the on-demand code execution environment, and wherein the pre-trigger notifications are requests to execute second user-specified code that are distinct from the requests to execute the first user-specified code that are obtained subsequent to the individual pre-trigger notifications; and
one or more computing devices in communication with the data store and executing the computer-executable instructions, wherein execution of the computer-executable instructions causes the one or more computing devices to;
maintain a set of virtual machine instances that are pre-initialized with an operating environment and made available for execution of the first user-specified code;
obtain, from the one or more computing systems, an additional pre-trigger notification requesting execution of the second user-specified code;
determine, based at least in part on comparing the additional pre-trigger notification to the historical data correlating pre-trigger notifications previously obtained at the on-demand code execution environment, a number of requests to execute the first user-specified code that are predicted to occur subsequent to obtaining the additional pre-trigger notification;
based on the number of requests to execute the first user-specified code that are predicted to occur subsequent to obtaining the additional pre-trigger notification, increase a number of virtual machine instances within the set of virtual machine instances at least partly by initializing at least one new virtual machine instance with an operating environment and adding the at least one new virtual machine instance to the set of virtual machine instances;
obtain a request to execute the first user-specified code, wherein the request is associated with the pre-trigger notification; and
execute the first user-specified code on the previously initialized operating environment of the at least one new virtual machine instance.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods are described for managing initialization of virtual machine instances within an on-demand code execution environment or other distributed code execution environment. Such environments utilize pre-initialized virtual machine instances to enable execution of user-specified code in a rapid manner, without delays typically caused by initialization of the virtual machine instances. However, because the number of pre-initialized virtual machine instances maintained at an on-demand code execution environment is typically limited, insufficient number of pre-initialized virtual machine instances may be available at the on-demand code execution environment during times of heavy use. Embodiments described herein utilize pre-trigger notifications to indicate to the on-demand code execution environment that subsequent requests to execute user-specified code are likely to occur. The on-demand code execution environment may therefore pre-initialize additional virtual machine instances in preparation for the subsequent requests, reducing delay that would be required to initialize the instances after obtaining to the requests.
-
Citations
24 Claims
-
1. A system for providing low-latency computational capacity in an on-demand code execution environment, the system comprising:
-
a data store including historical data regarding use of the on-demand code execution environment, the historical data correlating pre-trigger notifications previously obtained at the on-demand code execution environment with one or more requests to execute first user-specified code obtained at the on-demand code execution environment subsequent to individual pre-trigger notifications, wherein the pre-trigger notifications are obtained from one or more computing systems associated with the user-specified code and distinct from the on-demand code execution environment, and wherein the pre-trigger notifications are requests to execute second user-specified code that are distinct from the requests to execute the first user-specified code that are obtained subsequent to the individual pre-trigger notifications; and one or more computing devices in communication with the data store and executing the computer-executable instructions, wherein execution of the computer-executable instructions causes the one or more computing devices to; maintain a set of virtual machine instances that are pre-initialized with an operating environment and made available for execution of the first user-specified code; obtain, from the one or more computing systems, an additional pre-trigger notification requesting execution of the second user-specified code; determine, based at least in part on comparing the additional pre-trigger notification to the historical data correlating pre-trigger notifications previously obtained at the on-demand code execution environment, a number of requests to execute the first user-specified code that are predicted to occur subsequent to obtaining the additional pre-trigger notification; based on the number of requests to execute the first user-specified code that are predicted to occur subsequent to obtaining the additional pre-trigger notification, increase a number of virtual machine instances within the set of virtual machine instances at least partly by initializing at least one new virtual machine instance with an operating environment and adding the at least one new virtual machine instance to the set of virtual machine instances; obtain a request to execute the first user-specified code, wherein the request is associated with the pre-trigger notification; and execute the first user-specified code on the previously initialized operating environment of the at least one new virtual machine instance. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer-implemented method of providing low-latency computational capacity in an on-demand code execution environment, the computer-implemented method comprising:
-
maintaining a set of execution environments that are pre-initialized with an operating environment and made available for execution of first user-specified code; obtaining a pre-trigger notification indicating that a likelihood that one or more requests to execute first user-specified code will be obtained at the on-demand code execution environment subsequent to the pre-trigger notification, wherein the pre-trigger notification is obtained from one or more computing systems associated with the first user-specified code and distinct from the on-demand code execution environment, and wherein the pre-trigger notification is a request to execute second user-specified code and is distinct from the one or more requests to execute the first user-specified code; determining, based at least in part on the pre-trigger notification representing the request to execute the second user-specific code, a number of requests to execute the first user-specified code that are predicted to occur subsequent to obtaining the pre-trigger notification; based at least partly on the number of requests that are predicted to occur, managing a number of execution environments within the set of execution environments; obtaining a request to execute the first user-specified code, wherein the request is associated with the pre-trigger notification; and executing the first user-specified code on at least one execution environment of the set of execution environments. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. Non-transitory computer-readable storage media comprising computer-executable instructions executable by a computing system associated with an on-demand code execution environment to cause the computing system to:
-
obtain a pre-trigger notification indicating that a likelihood that one or more requests to execute first user-specified code will be obtained at the on-demand code execution environment subsequent to the pre-trigger notification, wherein the pre-trigger notification is obtained from one or more computing systems associated with the user-specified code and distinct from the on-demand code execution environment, and wherein the pre-trigger notification is a request to execute second user-specified code and is distinct from the one or more requests to execute the first user-specified code; determine, based at least in part on the pre-trigger notification, a number of requests to execute the first user-specified code that are predicted to occur subsequent to obtaining the pre-trigger notification; based at least partly on the number of requests that are predicted to occur, managing a number of execution environments on the on-demand code execution environment that are available to execute the first user-specified code; obtain at least one request to execute the first user-specified code, wherein the request is associated with the pre-trigger notification; and transmit instructions to the set of execution environments to execute the first user-specified code on the previously initialized operating environment. - View Dependent Claims (20, 21, 22, 23, 24)
-
Specification