Serverless Runtime Reuse Through Memory Pointer Isolation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Serverless computing in FaaS implementations faces performance penalties due to the ephemeral nature of execution environments, which results in frequent deployment and release of resources, leading to monetary losses and potential vulnerabilities from reuse without proper isolation.
Innovation Solution
Reusing execution environments for serverless functions while ensuring isolation by swapping and refreshing memory states, using different memory locations for each function execution to maintain isolation and prevent tainting or corruption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If execution environments are provisioned on demand for each function execution, then isolation and stability are improved, but response time and latency increase due to provisioning delays
Solution Approach 1:
The system performs preliminary actions by pre-warming execution environments before they are needed. Execution environments are initialized and kept in a ready state in advance, so when a function needs to execute, the environment is already prepared and can be allocated immediately without provisioning delays.
Solution Approach 2:
The system dynamically manages execution environments by transitioning them between different states (initialized, warm, ready, executing). Execution environments can be quickly activated from a warm state to handling requests, providing both fast response times and maintained isolation through state management.
2Productivity
If execution environments are reused without proper isolation measures, then performance improves by avoiding re-provisioning, but security vulnerabilities and corruption risks increase
Solution Approach 1:
The system segments the execution environment into isolated components with distinct memory spaces for each function execution. By dividing the environment into separate, non-overlapping memory regions, the system enables reuse of the overall environment while preventing cross-contamination between different function executions.
Solution Approach 2:
The system introduces memory management intermediaries that act as mediators between function executions. These intermediaries manage memory allocation, ensure proper isolation boundaries, and control access to shared resources, allowing environment reuse while maintaining security and preventing corruption.
3Reliability
If execution environments are frequently deployed and released, then isolation is maintained, but computational expenses and monetary losses increase
Solution Approach 1:
Instead of completely discarding execution environments after each use, the system recovers and retains them in a warm state. The environments are kept available for reuse with minimal additional resource consumption, discarding only the specific memory states that need isolation rather than the entire execution environment.
Data Source
AI summary
Systems, methods, and computer-readable media are provided for reusing execution environments and code of serverless functions while ensuring isolation in serverless computing environments. In some examples, a method can include, in response to a first request to run a serverless function, executing, at an execution environment on a network, computer-readable code configured to perform the serverless function; after the computer-readable code has executed, modifying a pointer to an area of memory used to store a first state of the serverless function to reference a different area of memory; in response to a second request to run the serverless function, reusing, at the execution environment, the computer-readable code to perform the serverless function; and based on the pointer referencing the different area of memory, using the different area of memory to store a second state of the serverless function.


