Efficient region selection system for executing request-driven code
First Claim
1. A computer-implemented method of selecting a location at which to execute user-defined code, the method comprising:
- receiving a first set of user-defined code that is generated by a user for execution on a first on-demand code execution environment at a point of presence (POP), wherein the first on-demand code execution environment comprises a plurality of virtual machine instances executing an initialized operating system and awaiting requests to execute user-defined code within that operating system;
replicating the first set of user-defined code to a first set of geographic regions in a plurality of geographic regions;
receiving, from a user device associated with the user that generated the first set of user-defined code, a request to execute a task, wherein execution of the task comprises execution of the first set of user-defined code, and wherein the request comprises an argument for use in execution of the first set of user-defined code;
determining that the task should not be executed by the first on-demand code execution environment;
determining that a current version of the first set of user-defined code is replicated to the first set of geographic regions in the plurality of geographic regions;
selecting a first geographic region in the first set of geographic regions to execute the task based at least in part on requests to execute the task previously received by a second on-demand code execution environment located in the first geographic region;
transmitting the request to execute the task to the first geographic region such that the task is executed by the second on-demand code execution environment, wherein the first on-demand code execution environment is located at a geographic location different than the first geographic region; and
transmitting results of execution of the task to the user device.
1 Assignment
0 Petitions
Accused Products
Abstract
An on-demand code execution environment present in points of presence (POPs) and in regions serviced by the POPs is provided herein. For example, a POP may receive a request to execute a task associated with user-defined code. If the POP determines that the computing resources necessary to execute a received task are not available or that the POP should not execute the received task for another reason (e.g., the task is not commonly received and the computing resources needed to execute the task are therefore best allocated for other requests), the POP can identify a region suitable for executing the task and forward the task to the identified region. An on-demand code execution environment present in the identified region can execute the task and forward the results of the execution to the POP for distribution back to a user device that requested the task execution.
1448 Citations
20 Claims
-
1. A computer-implemented method of selecting a location at which to execute user-defined code, the method comprising:
-
receiving a first set of user-defined code that is generated by a user for execution on a first on-demand code execution environment at a point of presence (POP), wherein the first on-demand code execution environment comprises a plurality of virtual machine instances executing an initialized operating system and awaiting requests to execute user-defined code within that operating system; replicating the first set of user-defined code to a first set of geographic regions in a plurality of geographic regions; receiving, from a user device associated with the user that generated the first set of user-defined code, a request to execute a task, wherein execution of the task comprises execution of the first set of user-defined code, and wherein the request comprises an argument for use in execution of the first set of user-defined code; determining that the task should not be executed by the first on-demand code execution environment; determining that a current version of the first set of user-defined code is replicated to the first set of geographic regions in the plurality of geographic regions; selecting a first geographic region in the first set of geographic regions to execute the task based at least in part on requests to execute the task previously received by a second on-demand code execution environment located in the first geographic region; transmitting the request to execute the task to the first geographic region such that the task is executed by the second on-demand code execution environment, wherein the first on-demand code execution environment is located at a geographic location different than the first geographic region; and transmitting results of execution of the task to the user device. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system for selecting a location at which to execute user-defined code, the system comprising:
-
a first on-demand code execution environment that comprises a first computing device configured to execute code at a point of presence (POP); and a second computing device comprising a processor in communication with the first on-demand code execution environment and configured with specific computer-executable instructions to; receive a first set of user-defined code that is generated by a user for execution on the first on-demand code execution environment; receive, from a user device associated with the user that generated the first set of user-defined code, a request to execute a task, wherein execution of the task comprises execution of the first set of user-defined code; determine that the task should not be executed by the first on-demand code execution environment; receive an indication that a copy of the first set of user-defined code is replicated to a first set of geographic regions in a plurality of geographic regions; select a first geographic region in the first set of geographic regions to execute the task based at least in part on the first geographic region having a current version of the first set of user-defined code, wherein a second on-demand code execution environment is located in the first geographic region; transmit the request to execute the task to the first geographic region such that the task is executed by the second on-demand code execution environment; and transmit results of execution of the task to the user device. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. Non-transitory, computer-readable storage media comprising computer-executable instructions for selecting a location at which to execute code, wherein the computer-executable instructions, when executed by a computer system at a point of presence (POP), cause the computer system to:
-
receive a first set of user-defined code that is generated by a user for execution on a first on-demand code execution environment, wherein the first on-demand code execution environment comprises a first computing device configured to execute code; receive a request to execute a task, wherein execution of the task comprises execution of the first set of user-defined code; determine that the task should not be executed by the first on-demand code execution environment; receive an indication that a copy of the first set of user-defined code is replicated to a first set of geographic regions in a plurality of geographic regions; select a first geographic region in the first set of geographic regions to execute the task based at least in part on the first geographic region having a current version of the first set of user-defined code, wherein a second on-demand code execution environment is located in the first geographic region; and transmit the request to execute the task to the first geographic region such that the task is executed by the second on-demand code execution environment. - View Dependent Claims (17, 18, 19, 20)
-
Specification