Abstract
Serverless computing has emerged as an attractive paradigm due to the efficiency of development and the ease of deployment without managing any underlying infrastructure. Nevertheless, serverless computing approaches face numerous challenges to unlock their full potential in hybrid environments. To gain a deeper understanding and firsthand knowledge of serverless computing in edge-cloud deployments, we review the current state of open-source serverless platforms and compare them based on predefined requirements. We then design and implement a serverless computing platform with a novel edge orchestration technique that seamlessly deploys serverless functions across the edge and cloud environments on top of the Knative serverless platform. Moreover, we propose an offloading strategy for edge environments and four different functions for experimentation and showcase the performance benefits of our solution. Our results demonstrate that such an approach can efficiently utilize both cloud and edge resources by dynamically offloading functions from the edge to the cloud during high activity, while reducing the overall application latency and increasing request throughput compared to an edge-only deployment.
Introduction
Serverless computing, or Function-as-a-Service (FaaS), is a developer-centric paradigm that abstracts away infrastructure management. While highly successful in the cloud, this model faces significant hurdles in the Edge-Cloud Continuum. Edge environments are typically heterogeneous and resource-constrained. When local edge nodes become overwhelmed, performance degrades sharply. Conversely, while the cloud offers virtually infinite scalability, it introduces higher network latency. The challenge lies in creating a seamless system that treats the edge and cloud as a unified resource pool, automatically deciding where to execute functions based on real-time conditions.
System Design and Implementation
To address these challenges, we developed Knative Edge, an extension of the Knative serverless framework. Knative was chosen following a rigorous evaluation of nine open-source platforms against criteria such as scalability, scale-to-zero capabilities, and hardware support.
The system architecture consists of two primary components:
- Cloud-to-Edge Replication: A controller mirrors service definitions from the cloud to the edge. To prevent "circular updates" or feedback loops between environments, the system uses selective field comparison to update only essential configuration data.
- Edge-to-Cloud Offloading: This latency-aware component monitors metrics via Prometheus. It calculates a latency response ratio (P95 latency divided by P50 latency) to detect congestion. If this ratio exceeds a defined threshold, the system offloads traffic to the cloud. An inertia factor is included in the algorithm to prevent "flapping," where traffic rapidly toggles between the edge and cloud.
Experimental Evaluation
We evaluated Knative Edge using four distinct workload profiles to simulate real-world applications:
- MatMult: Matrix multiplication (CPU-intensive).
- Image Proc.: Image processing (Memory and CPU-intensive).
- I/O: Random input/output operations (Disk/Network-intensive).
- Mixed: A combination of the above profiles.
The testbed utilized four Raspberry Pi 3B+ devices and one x64 device as the edge cluster, connected to a virtual machine in the cloud.
Key Results and Discussion
Our experiments demonstrate that the "Auto" offloading strategy effectively balances the low latency of the edge with the high capacity of the cloud.
Key findings include:
- Throughput Improvements: In I/O-heavy workloads, successful responses increased from 4,852 in an edge-only setup to 9,408 with 100% offloading. The "Auto" strategy achieved a balanced 6,548 responses while maintaining lower latency than the full cloud offload.
- Latency Mitigation: The system successfully "capped" latency spikes by shifting excess load to the cloud once the edge reached its saturation point. This prevents the exponential latency growth typically seen when edge resources are exhausted.
- Resource Efficiency: By using the P95/P50 ratio as a signal, the system detects queuing and congestion before total failure, allowing for proactive resource management.
Conclusion and Future Work
Knative Edge successfully bridges the gap between edge and cloud by providing a location-agnostic execution environment. While the current offloading strategy focuses on execution latency, future work will incorporate network awareness to account for bandwidth constraints. Additionally, we plan to explore advanced scheduling techniques, potentially using machine learning to predict traffic bursts and optimize resource allocation further.
Summary updated