Adjusting variable limit on concurrent code executions based on communication between frontends
First Claim
1. A system to provide scaling of computational capacity on an on-demand code execution environment, the system comprising:
- a non-transitory data store configured to store one or more program codes associated with a client of the on-demand code execution environment;
one or more hardware computing devices executing a frontend service through specific computer-executable instructions, said frontend service in communication with the non-transitory data store and configured to at least;
receive a request to execute a program code on the on-demand code execution environment, the request including a client ID identifying the client associated with the program code, the client associated with a set of virtual machine instance managers configured to acquire compute capacity on behalf of the client;
calculate a first hash value by applying a hash function on the client ID included in the request;
identify, based on the calculated first hash value, a first virtual machine instance manager on a ring of virtual machine instance managers available on the on-demand code execution environment, the first virtual machine instance manager being in the set of virtual machine instance managers configured to acquire compute capacity on behalf of the client;
request the first virtual machine instance manager to acquire compute capacity for executing the program code on behalf of the client;
receive a throttling response from the first virtual machine instance manager, the throttling response indicating that the first virtual machine instance manager has reached or exceeded a threshold load level;
in response to receiving the throttling response from the first virtual machine instance manager, request current load information associated with the client from one or more other frontend services;
based on the current load information received from the one or more other frontend services, determine that at least one additional virtual machine instance manager should be added to the set of worker managers assigned to the client, the at least one additional virtual machine instance manager including a second virtual machine instance manager; and
execute the program code on behalf of the client on a virtual machine instance acquired by the second virtual machine instance manager.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods are described for adjusting a number of concurrent code executions allowed to be performed for a given user on an on-demand code execution environment or other distributed code execution environments. 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, to improve utilization of computing resources, such environments may temporarily restrict the number of concurrent code executions performed on behalf of the given user to a number less than the maximum number of concurrent code executions allowed for the given user. Such environments may adjust the temporary restriction on the number of concurrent code executions based on the number of incoming code execution requests associated with the given user and based on communication among the frontends processing the incoming code execution requests.
153 Citations
20 Claims
-
1. A system to provide scaling of computational capacity on an on-demand code execution environment, the system comprising:
-
a non-transitory data store configured to store one or more program codes associated with a client of the on-demand code execution environment; one or more hardware computing devices executing a frontend service through specific computer-executable instructions, said frontend service in communication with the non-transitory data store and configured to at least; receive a request to execute a program code on the on-demand code execution environment, the request including a client ID identifying the client associated with the program code, the client associated with a set of virtual machine instance managers configured to acquire compute capacity on behalf of the client; calculate a first hash value by applying a hash function on the client ID included in the request; identify, based on the calculated first hash value, a first virtual machine instance manager on a ring of virtual machine instance managers available on the on-demand code execution environment, the first virtual machine instance manager being in the set of virtual machine instance managers configured to acquire compute capacity on behalf of the client; request the first virtual machine instance manager to acquire compute capacity for executing the program code on behalf of the client; receive a throttling response from the first virtual machine instance manager, the throttling response indicating that the first virtual machine instance manager has reached or exceeded a threshold load level; in response to receiving the throttling response from the first virtual machine instance manager, request current load information associated with the client from one or more other frontend services; based on the current load information received from the one or more other frontend services, determine that at least one additional virtual machine instance manager should be added to the set of worker managers assigned to the client, the at least one additional virtual machine instance manager including a second virtual machine instance manager; and execute the program code on behalf of the client on a virtual machine instance acquired by the second virtual machine instance manager. - View Dependent Claims (2, 3, 4)
-
-
5. A computer-implemented method to provide scaling of computational capacity on an on-demand code execution environment, the computer-implemented method comprising:
-
receiving a request to execute a program code on the on-demand code execution environment, the request including client information identifying the client associated with the program code, the client associated with a set of virtual machine instance managers configured to acquire compute capacity on behalf of the client; requesting, based on the client information, a first virtual machine instance manager in the set of virtual machine instance managers to acquire compute capacity for executing the program code on behalf of the client; receiving a response indicating an inability of the first virtual machine instance manager to acquire compute capacity for executing the program code on behalf of the client; determining, based on load information associated with one or more frontend modules, whether a number of worker managers in the set should be adjusted, wherein the one or more frontend modules are each configured to cause code executions to be performed in response to receiving corresponding incoming code execution requests; in response to a determination that the number of worker managers in the set should be adjusted, causing a second virtual machine instance manager different from the first virtual machine instance manager to be added to the set; and executing at least a portion of the program code on behalf of the client on a virtual machine instance acquired by the second virtual machine instance manager. - View Dependent Claims (6, 7, 8, 9, 10, 11, 12)
-
-
13. Non-transitory physical computer storage including computer-executable instructions that, when executed by a computing system, cause the computing system to:
-
receive a request to execute a program code on an on-demand code execution environment, the request including client information identifying the client associated with the program code, the client associated with a set of virtual machine instance managers configured to acquire compute capacity on behalf of the client; request, based on the client information, a first virtual machine instance manager in the set of virtual machine instance managers to acquire compute capacity for executing the program code on behalf of the client; receive a response indicating an inability of the first virtual machine instance manager to acquire compute capacity for executing the program code on behalf of the client; determine, based on load information associated with one or more frontend modules, whether a number of worker managers in the set should be adjusted, wherein the one or more frontend modules are each configured to cause code executions to be performed in response to receiving corresponding incoming code execution requests; in response to a determination that the number of worker managers in the set should be adjusted, cause a second virtual machine instance manager different from the first virtual machine instance manager to be added to the set; and execute at least a portion of the program code on behalf of the client on a virtual machine instance acquired by the second virtual machine instance manager. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
-
Specification