Patent attributes
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.