IP Library › Granted Patent US 10,437,629
Granted Patent B2
US 10,437,629 · App. 16/025,694 · Granted Oct 8, 2019

Pre-triggers for code execution environments

Inventors: Timothy Allen Wagner (Seattle, WA); Marc John Brooker (Seattle, WA)
Assignee: Amazon Technologies, Inc.
G06F9/45558G06F9/445G06F9/50G06F2009/45562G06F2009/45575
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,437,629
App. No.
16/025,694
Filed
Jul 2, 2018
Granted
Oct 8, 2019
Kind
B2
Examiner
KIM, DONG U
Art Unit
2196
USPC
718/1
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.

Claims (49)

1. A computer-implemented method comprising:

obtaining a request to execute first user-specified code at an on-demand code execution environment, wherein the request to execute first user-specified code is obtained from one or more computing systems distinct from the on-demand code execution environment;

obtaining historical data correlating prior requests to execute the first user-specified code with subsequent requests to execute second user-specified code that is distinct from the first user-specified code;

determining, based at least in part on the historical data, that a request to execute the second user-specified code is predicted to occur subsequent to obtaining the request to execute the first user-specified code;

based at least partly on determining that the request to execute the second user-specified code is predicted to occur, and prior to receiving the request to execute the second user-specified code, initializing at least one virtual machine instance with an operating environment configured to enable execution of the second user-specified code;

obtaining the request to execute the second user-specified code; and

executing the second user-specified code within the operating environment.

2. The computer-implemented method of claim 1 , wherein determining that the request to execute the second user-specified code is predicted to occur comprises determining a statistical likelihood that the request to execute the second user-specified code is predicted to occur and that the statistical likelihood satisfies a threshold value.

3. The computer-implemented method of claim 1 further comprising determining, based at least in part on the historical data, a point in time at which the request to execute the second user-specified code is predicted to occur, wherein initializing at least one virtual machine instance comprises initializing the at least one virtual machine instance at a point in time selected based at least partly on the point in time at which the request to execute the second user-specified code is predicted to occur.

4. The computer-implemented method of claim 1 further comprising generating the historical data, wherein generating the historical data comprises:

for individual prior requests to execute the first user-specified code, determining whether a subsequent request to execute the second user-specified code occurred;

generating statistical information indicating a likelihood that an individual request to execute the first user-specified code will result in a subsequent request to execute the second user-specified code; and

storing the statistical information as the historical data.

5. The computer-implemented method of claim 1 , wherein determining that a request to execute the second user-specified code is predicted to occur comprises determining that a plurality of requests to execute the second user-specified code are predicted to occur, and wherein initializing at least one virtual machine instance with the operating environment configured to enable execution of the second user-specified code comprises initializing a plurality of virtual machine instances with the operating environment.

6. The computer-implemented method of claim 1 , wherein the request to execute the first user-specified code comprises at least one of an application programming interface (API) call, a hypertext transport protocol (HTTP) transmission, or a request generated by the on-demand code execution environment in response to data obtained from an external service.

7. A system comprising:

a processor; and

a data store including computer-executable instructions executable by the processor that cause the system to:

obtain a request to execute first user-specified code at an on-demand code execution environment, wherein the request to execute the first user-specified code is obtained from one or more computing systems distinct from the on-demand code execution environment;

obtain historical data correlating prior requests to execute the first user-specified code with subsequent requests to execute second user-specified code that is distinct from the first user-specified code;

determine, based at least in part on the historical data, that a request to execute the second user-specified code is predicted to occur subsequent to obtaining the request to execute the first user-specified code;

based at least partly on determining that the request to execute the second user-specified code is predicted to occur, and prior to receiving the request to execute the second user-specified code, configure at least one virtual machine instance with an operating environment configured to enable execution of the second user-specified code;

obtain the request to execute the second user-specified code; and

execute the second user-specified code within the operating environment.

8. The system of claim 7 , wherein, to determine that the request to execute the second user-specified code is predicted to occur, the computer-executable instructions are further executable by the processor to cause the system to determine a statistical likelihood that the request to execute the second user-specified code is predicted to occur and that the statistical likelihood satisfies a threshold value.

9. The system of claim 8 , wherein the historical data comprises a distribution modeling a frequency of requests to execute the second user-specified code over time subsequent to requests to execute the first user-specified code and wherein, to determine the statistical likelihood that the request to execute the second user-specified code is predicted to occur, the computer-executable instructions are further executable by the processor to reference the distribution.

10. The system of claim 7 , wherein the computer-executable instructions are further executable by the processor to cause the system to determine, based at least in part on the historical data, a point in time at which the request to execute the second user-specified code is predicted to occur, and wherein, to configure the at least one virtual machine instance, the computer-executable instructions are further executable by the processor to cause the system to configure the at least one virtual machine instance at a point in time selected based at least partly on the point in time at which the request to execute the second user-specified code is predicted to occur.

11. The system of claim 7 , wherein the computer-executable instructions are further executable by the processor to cause the system to:

for individual prior requests to execute the first user-specified code, determine whether a subsequent request to execute the second user-specified code occurred;

generate statistical information indicating a likelihood that an individual request to execute the first user-specified code will result in a subsequent request to execute the second user-specified code; and

store the statistical information as the historical data.

12. The system of claim 7 , wherein, to determine that the request to execute the second user-specified code is predicted to occur, the computer-executable instructions are further executable by the processor to determine that a plurality of requests to execute the second user-specified code are predicted to occur, and wherein, to configure the at least one virtual machine instance with the operating environment configured to enable execution of the second user-specified code, the computer-executable instructions are further executable by the processor to configure a plurality of virtual machine instances with the operating environment.

13. The system of claim 7 , wherein, to configure the at least one virtual machine instance with the operating environment, the computer-executable instructions are further executable by the processor to at least one of initialize the at least one virtual machine instance with the operating environment or prevent de-initialization of the at least one virtual machine instance with the operating environment.

14. Non-transitory computer readable media comprising computer-executable instructions that when executed by a computing system cause the computing system to:

obtain a request to execute first user-specified code at an on-demand code execution environment, wherein the request to execute first user-specified code is obtained from one or more computing systems distinct from the on-demand code execution environment;

obtain historical data correlating prior requests to execute the first user-specified code with subsequent requests to execute second user-specified code that is distinct from the first user-specified code;

determine, based at least in part on the historical data, that a request to execute the second user-specified code is predicted to occur subsequent to obtaining the request to execute the first user-specified code;

based at least partly on determining that the request to execute the second user-specified code is predicted to occur, and prior to receiving the request to execute the second user-specified code, configure at least one virtual machine instance with an operating environment configured to enable execution of the second user-specified code;

obtain the request to execute the second user-specified code; and

execute the second user-specified code within the operating environment.

15. The non-transitory computer-readable medium of claim 14 , wherein, to determine that the request to execute the second user-specified code is predicted to occur, the computer-executable instructions are further executable to cause the computing system to determine a statistical likelihood that the request to execute the second user-specified code is predicted to occur and that the statistical likelihood satisfies a threshold value.

16. The non-transitory computer-readable medium of claim 14 , wherein the computer-executable instructions are further executable to cause the computing system to determine, based at least in part on the historical data, a point in time at which the request to execute the second user-specified code is predicted to occur, and wherein, to initialize the at least one virtual machine instance, the computer-executable instructions are further executable to cause the computing system to initialize the at least one virtual machine instance at a point in time selected based at least partly on the point in time at which the request to execute the second user-specified code is predicted to occur.

17. The non-transitory computer-readable medium of claim 14 , wherein the computer-executable instructions are further executable to cause the computing system to:

for individual prior requests to execute the first user-specified code, determine whether a subsequent request to execute the second user-specified code occurred;

generate statistical information indicating a likelihood that an individual request to execute the first user-specified code will result in a subsequent request to execute the second user-specified code; and

store the statistical information as the historical data.

18. The non-transitory computer-readable medium of claim 17 , wherein the statistical information comprises a distribution modeling a frequency of subsequent requests to execute the second user-specified code over time.

19. The non-transitory computer-readable medium of claim 14 , wherein, to determine that the request to execute the second user-specified code is predicted to occur, the computer-executable instructions are further executable to cause the computing system to determine that a plurality of requests to execute the second user-specified code are predicted to occur, and wherein, to initialize the at least one virtual machine instance with the operating environment configured to enable execution of the second user-specified code, the computer-executable instructions are further executable by the computing system to initialize a plurality of virtual machine instances with the operating environment.

20. The non-transitory computer-readable medium of claim 14 , wherein, to configure the at least one virtual machine instance with the operating environment, the computer-executable instructions are further executable to cause the computing system to at least one of initialize the at least one virtual machine instance with the operating environment or prevent de-initialization of the at least one virtual machine instance with the operating environment.

Continuity (2)
Continuation 14971934 · Dec 16, 2015
Related Publication 20190073234A1 · Mar 7, 2019
Cited By (9)
US 12,314,752 US 12,321,766 US 12,327,133 US 12,381,878 US 12,455,803 US 12,476,978 US 12,671,671 US 12,724,647 US 12,726,444