Stateful Serverless Workloads via eBPF kprobe Interception
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current serverless computing environments in cloud-based settings are primarily stateless, which is insufficient for workloads requiring state, such as shopping cart applications, and existing stateful solutions like Akka are limited to specific languages, not supporting multi-language implementations efficiently.
Innovation Solution
Implementing an extended Berkeley Packet Filter (eBPF) program via a kprobe to intercept and capture state data during workload evictions and restorations, using a userspace program in conjunction with clustered memory-based storage to manage state across different languages and environments.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If serverless workloads are implemented in a stateless fashion, then the system achieves simplicity and ease of management, but it cannot maintain state data when workloads are evicted and restored
Solution Approach 1:
The patent extracts state data from the serverless workload process and stores it externally in a state storage system. When a workload is evicted, its state is captured and stored separately. When restored, the state is retrieved and reassociated with the workload, enabling stateful behavior without complicating the core serverless execution model.
Solution Approach 2:
The patent introduces an intermediary component (state storage system and state management mechanism) that sits between the serverless workload and persistent storage. This intermediary captures, stores, and restores state data, mediating between the stateless execution model and the need for state persistence across evictions and restorations.
2Reliability
If stateful serverless solutions are implemented using Akka runtime, then state capture and restoration is achieved, but the solution becomes restricted to Akka-only and cannot support other programming languages
Solution Approach 1:
The patent creates a universal state management system that can intercept and capture state data from serverless workloads regardless of their programming language. The mechanism uses language-agnostic approaches (process interception, memory capture, serialization) to achieve state persistence across multiple languages including but not limited to Akka, making the solution broadly applicable to diverse serverless environments.
3Adaptability or versatility
If workload state data is captured and stored during eviction, then stateful functionality is enabled, but additional complexity is introduced to the serverless execution model
Solution Approach 1:
The patent implements a self-service state management approach where the state capture, storage, and restoration mechanisms are automatically triggered by workload lifecycle events (eviction and restoration). The system monitors and manages its own state without requiring external intervention or complex manual configuration, reducing operational complexity despite the enhanced functionality.
Data Source
AI summary
Some embodiments may be associated with a cloud computing environment. A serverless runtime workload may execute an eBPF program via a kprobe which gets invoked when function code is executed as a Linux process. The system may determine, by the kprobe function associated with an identifier, that an orchestrator is evicting the serverless runtime workload. Responsive to the determination, a userspace program may be invoked via the eBPF in tandem with the kprobe acting as an interception mechanism. The system may then capture the current workload process state data associated with the serverless runtime workload based on the identifier. A clustered memory-based storage component may store the captured current workload process state data in association with the identifier. A subsequent serverless runtime workload may determine that the orchestrator is restoring the serverless runtime workload. Responsive to the determination, the system may load the workload process state data from the clustered memory-based storage component.


