Sandbox Reuse Management in On-Demand Code Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

On-demand code execution systems face inefficiencies in resource utilization due to the overhead of tracking sandbox availability, particularly in environments where sandbox states change rapidly, leading to increased time and resource costs in provisioning and reusing sandboxes.

Innovation Solution

Implementing a sandbox reuse management system that allows for the reuse of provisioned sandboxes without tracking individual availability states, using worker managers to pre-configure sandboxes and allocate them based on configuration information, thereby reducing overhead costs and improving efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If sandbox availability is tracked in real-time to enable reuse, then resource utilization improves, but system complexity and overhead increase

Engineering Contradiction:
Improveresource utilizationVSAvoidsystem overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the availability tracking function from the sandbox management system and implements it through a separate notification mechanism where sandboxes autonomously notify the worker manager of their availability. This separates the concerns of sandbox lifecycle management from task allocation, reducing system overhead while maintaining effective resource utilization.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The sandbox instances autonomously determine their own availability status and notify the worker manager when they become available for reuse. This self-service approach eliminates the need for continuous polling or centralized tracking, reducing system complexity while enabling efficient resource utilization through on-demand notifications.

Inventive Principle:
Principle #25Self-service

2Speed

If sandboxes are provisioned quickly for each task, then task execution speed improves, but resource waste increases

Engineering Contradiction:
Improvetask execution speedVSAvoidresource waste
Core Design Contradiction:
SpeedVSLoss of substance

Solution Approach 1:

The system performs preliminary configuration of sandboxes in advance, preparing them with necessary dependencies and runtime environments before tasks are assigned. This preliminary action enables rapid task execution while avoiding resource waste by ensuring sandboxes are ready-to-use and can be quickly allocated to new tasks without re-provisioning.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a mechanism where sandboxes are recovered and reused after task completion instead of being discarded. The worker manager maintains a pool of available sandboxes that can be quickly allocated to new tasks, reducing resource waste while maintaining fast execution speeds through efficient resource recovery and reuse.

Inventive Principle:
Principle #34Discarding and recovering

3Device complexity

If sandbox reuse is implemented without tracking availability, then overhead is reduced, but sandbox allocation efficiency decreases

Engineering Contradiction:
Improveoverhead costVSAvoidsandbox allocation efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The system implements a feedback mechanism where sandbox instances autonomously notify the worker manager of their availability status. This feedback loop enables efficient sandbox allocation without requiring continuous tracking or polling, reducing overhead while maintaining allocation efficiency through event-driven notifications that trigger immediate task assignment when sandboxes become available.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11144359B1Managing sandbox reuse in an on-demand code execution system
Publication Date: 2021.10.12 AMAZON TECH INC
  • US11144359B1 patent drawing
  • US11144359B1 patent drawing
  • US11144359B1 patent drawing

AI summary

Systems and methods are described for managing reuse of sandboxed computing environments in a network-based on-demand code execution system. Users may generate tasks on the system by submitting code to a frontend, which may interact with multiple worker managers that manage task execution in sandboxed computing environments such as containers or virtual machine instances. A sandbox may be reusable once provisioned, but the resources required to definitively locate an idle sandbox may be significant relative to the cost of provisioning a new sandbox. The system may therefore manage reuse by randomly or semi-randomly selecting a worker manager and requesting that it provide an existing sandbox if one is available. If not, then the system may select a different worker manager and repeat the request, or after consuming a threshold amount of resources may request that the next worker manager provision a new sandbox if an existing one is not available.