US 9,811,363 B1
Predictive management of on-demand code execution
Timothy Allen Wagner, Seattle, WA (US)
Assigned to AMAZON TECHNOLOGIES, INC., Seattle, WA (US)
Filed by Amazon Technologies, Inc., Seattle, WA (US)
Filed on Dec. 16, 2015, as Appl. No. 14/971,876.
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 9/455 (2006.01); G06F 9/50 (2006.01)
CPC G06F 9/45516 (2013.01) [G06F 9/5077 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method for predictively managing code execution in an on-demand code execution environment, the on-demand code execution environment comprising at least one virtual machine instance executing an initialized operating system and awaiting requests to execute user-specified code within that operating system, the method comprising:
as implemented by one or more computing devices configured with specific computer-executable instructions,
obtaining a task profile for a first task associated with the on-demand code execution environment, the first task corresponding to a first set of user-defined code executable by the virtual machine instance, wherein the task profile indicates a likelihood that a request to execute the first task on the on-demand code execution environment will be followed by a request to execute a second task corresponding to a second set of user-defined code executable by the virtual machine instance;
obtaining the request to execute the first task on the on-demand code execution environment;
instructing the virtual machine instance to execute the first set of user-defined code;
determining that the likelihood indicated by the task profile satisfies a threshold value;
prior to receiving the request to execute the second task, loading the virtual machine instance with the second set of user-defined code;
receiving the request to execute the second task; and
instructing the virtual machine instance to execute the second set of user-defined code previously loaded on the virtual machine instance.