Stateful Serverless Workloads via eBPF kprobe Interception

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveease of managementVSAvoidstate maintenance
Core Design Contradiction:
Ease of operationVSReliability

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvestate capture and restorationVSAvoidlanguage support
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

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

Engineering Contradiction:
Improvestateful functionalityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

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.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11494234B2Multi-language stateful serverless workloads
Publication Date: 2022.11.08 SAP SE
  • US11494234B2 patent drawing
  • US11494234B2 patent drawing
  • US11494234B2 patent drawing

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.