Multi-region Code Execution via Task Forwarding

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Data centers face challenges in efficiently managing computing resources, particularly when POPs lack sufficient capacity to execute tasks due to limited resources, leading to potential bottlenecks and reduced flexibility in allocating resources across users.

Innovation Solution

Implementing a multi-region on-demand code execution environment that allows tasks to be forwarded from resource-constrained POPs to geographically diverse regions with available computing resources, utilizing a replication system to store and execute user-defined code across multiple regions, and managing virtual machine instances to optimize resource utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If tasks are executed locally at POPs, then execution speed is improved, but resource capacity is exceeded when POPs lack sufficient computing resources

Engineering Contradiction:
Improvetask execution speedVSAvoidcomputing resource capacity
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The system segments the code execution functionality across multiple geographic regions. Each POP can execute tasks locally when resources are available, but can also forward tasks to other regions with available capacity. This segmentation allows the system to maintain fast local execution while distributing the computational load across multiple locations, resolving the contradiction between execution speed and resource capacity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system introduces a task forwarding mechanism as an intermediary between POPs and execution environments. When a POP lacks sufficient resources, it can forward tasks to other regions through this intermediary mechanism. This allows the system to maintain local execution preference for speed while providing a pathway to external resources when capacity is exceeded.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Device complexity

If computing resources are concentrated at centralized data centers, then resource management is simplified, but execution latency increases for geographically distributed users

Engineering Contradiction:
Improveresource management complexityVSAvoidexecution latency
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The system implements local quality by enabling each POP to function as an independent execution environment with its own computing resources. This allows geographically distributed users to execute tasks at nearby POPs, reducing execution latency. The multi-region architecture maintains manageable complexity through standardized resource management across all locations.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system transitions from a single centralized data center to a multi-dimensional distributed architecture across multiple geographic regions. This dimensional expansion allows the system to simultaneously provide low-latency local execution and maintain centralized coordination through the task forwarding mechanism, resolving the trade-off between latency and management complexity.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Speed

If virtual machine instances are pre-configured at POPs, then task execution is accelerated, but resource utilization efficiency decreases when resources are underutilized

Engineering Contradiction:
Improvetask execution speedVSAvoidresource utilization efficiency
Core Design Contradiction:
SpeedVSProductivity

Solution Approach 1:

The system implements universality by creating virtual machine instances that can execute multiple different user-defined codes. Rather than dedicating specific VM instances to specific tasks, the same VM infrastructure can be dynamically allocated to execute any code that is replicated to that region. This multi-functionality allows rapid task execution while improving resource utilization efficiency through shared infrastructure.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system uses copying by replicating user-defined code to multiple regional POPs rather than copying heavy virtual machine instances. This allows the lightweight code to be distributed across multiple locations for fast local execution, while the underlying VM infrastructure remains shared and can be efficiently utilized across different code executions.

Inventive Principle:
Principle #26Copying

4Adaptability or versatility

If code is replicated across multiple regions, then task execution flexibility is improved, but system complexity increases due to replication management

Engineering Contradiction:
Improvetask execution flexibilityVSAvoidreplication management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system applies preliminary action by pre-replicating user-defined code to multiple regional POPs before tasks need to be executed. This advance replication ensures that code is available at all locations for immediate execution, providing flexibility without adding complexity during task execution. The replication management is handled as a preliminary setup step rather than a continuous complexity burden.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11762703B2Multi-region request-driven code execution system
Publication Date: 2023.09.19 AMAZON TECH INC
  • US11762703B2 patent drawing
  • US11762703B2 patent drawing
  • US11762703B2 patent drawing

AI summary

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 forward the task to a region that the POP services for execution by an on-demand code execution environment present in the region. The on-demand code execution environment present in the 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.