Serverless Execution Environment Reuse Through Pointer-Based State Swapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Serverless computing in FaaS environments faces performance penalties due to the ephemeral nature of execution environments, which leads to increased latency and monetary losses, as well as reduced isolation and potential vulnerabilities from reusing execution environments without proper state management.

Innovation Solution

Implement a method to reuse execution environments for serverless functions while ensuring isolation by swapping and refreshing memory states, using a pointer to reference different areas of memory for each function execution, thereby maintaining isolation and performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If execution environments are reused without provisioning on demand, then response time and latency are improved, but isolation and stability are compromised

Engineering Contradiction:
Improveresponse timeVSAvoidisolation
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The execution environment is segmented into reusable infrastructure components and isolated state components. The state is separated into function-specific data that must be isolated and general-purpose data that can be reused, allowing the environment to be reused while maintaining isolation through memory segmentation and namespace separation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An intermediary layer (cold storage, ephemeral storage, and namespace management system) is introduced between the execution environment and the function state. This intermediary manages the isolation boundaries, allowing the same execution environment to serve multiple functions while maintaining complete state isolation through controlled access and automated state management.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If execution environments are provisioned on demand to ensure isolation, then stability and isolation are improved, but response time and latency increase

Engineering Contradiction:
ImproveisolationVSAvoidlatency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Execution environments are pre-provisioned and kept in a ready state before functions are invoked. The infrastructure is prepared in advance with all necessary runtime components loaded, so when a function is triggered, the environment is already available and can be activated immediately without provisioning delays.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The state of execution environments is dynamically changed between active and inactive states rather than creating and destroying them. Environments transition to a low-power inactive state after use, preserving their configuration and state while consuming minimal resources, allowing rapid reactivation without full provisioning overhead.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If execution environments are reused across multiple functions, then resource efficiency is improved, but security vulnerabilities and unauthorized access risks increase

Engineering Contradiction:
Improveresource efficiencyVSAvoidsecurity vulnerabilities
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

Different regions of the execution environment have different security and isolation properties. Function-specific state is stored in isolated memory regions with strict access controls, while shared infrastructure resources have appropriate access permissions. This local differentiation of quality allows reuse of secure infrastructure while maintaining isolation of sensitive function data.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

A security intermediary layer manages all access to the execution environment, implementing authentication, authorization, and isolation policies. This intermediary enforces security boundaries between different function executions, preventing unauthorized access and cross-contamination while allowing legitimate resource sharing.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11558462B2Reuse of execution environments while guaranteeing isolation in serverless computing
Publication Date: 2023.01.17 CISCO TECHNOLOGY INC
  • US11558462B2 patent drawing
  • US11558462B2 patent drawing
  • US11558462B2 patent drawing

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.