Virtualized Tasks in On-Demand Code Execution Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing systems face inefficiencies in executing code due to delays in initializing virtual machines and potential security risks from information sharing between multiple callers accessing common tasks.
Innovation Solution
The on-demand code execution system enables rapid execution of code by pre-warming virtual machine instances and allows users to define multiple virtual tasks from a common task, which can be executed independently with different parameters, reducing replication and improving fault tolerance and security through partitioning and colocation of tasks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If virtual machines are initialized on-demand to execute code, then resource utilization is improved, but execution latency increases due to initialization delays
Solution Approach 1:
The system pre-warms virtual machine instances by keeping them in a ready-state with code loaded in memory before actual execution requests arrive. This preliminary action eliminates initialization delays when code needs to be executed, as the virtual machines are already prepared and can start execution immediately upon receiving a request.
2Device complexity
If multiple callers share common tasks to reduce replication, then device complexity is reduced, but security risks increase due to information sharing
Solution Approach 1:
The system segments callers into different groups based on their security contexts and assigns them to different virtual machine instances. Even though multiple callers may execute the same code, they are isolated in separate virtualized environments, preventing information leakage between callers while still allowing the system to share the underlying code base.
Solution Approach 2:
The system introduces a task management layer that acts as an intermediary between callers and virtual machine instances. This intermediary handles task assignment, ensures proper isolation, and manages the mapping between callers and virtualized environments, thereby maintaining security while enabling code sharing.
3Reliability
If code is executed serially on a single virtual machine, then security isolation is improved, but execution speed decreases
Solution Approach 1:
The system merges multiple virtual machine instances into a shared pool that can execute code in parallel. By coordinating multiple isolated virtual machines to work simultaneously on different code executions, the system achieves both security isolation through virtualization and improved execution speed through parallel processing.
Data Source
AI summary
Systems and methods are described for implementing multiple virtual tasks, or task copies, in an on-demand code execution system or other distributed code execution environment, each virtual task or task copy corresponding to a common parent task and sharing executable code. Virtual tasks or task copies may be handled independently at the on-demand code execution system, enabling separated queuing, throttling, or logging, in a manner similar to two unrelated tasks. However, the on-demand code execution system may process calls to execute a first virtual task using knowledge of executions of other, related virtual tasks, in order to reduce or eliminate data duplication between executions of the first virtual task and the related virtual tasks. In this manner, the computational resources required to implement virtual tasks can be minimized or eliminated.


