Abstract
Modern IoT applications require real-time processing, often struggling with the trade-offs between high-latency cloud offloading and resource-constrained edge execution. This paper introduces a dynamic task placement framework for serverless (FaaS) applications that bridges this gap. By utilizing data-driven performance models to predict execution latency and cost, the framework automatically determines the optimal execution environment—local edge or remote cloud—to satisfy user-defined performance and budget constraints.
Introduction
Intelligent IoT applications, such as smart cameras and voice assistants, demand near real-time data processing. While cloud computing offers vast resources, it introduces significant network latency and bandwidth costs. Conversely, edge computing reduces latency by processing data locally, but devices like the Raspberry Pi often lack the computational power for heavy workloads. Serverless platforms add complexity through "cold starts" and unpredictable performance due to resource sharing. This research addresses the challenge of dynamically choosing the right execution environment and cloud resource configuration for every input in real-time.
The Dynamic Placement Framework
The proposed framework consists of three core components designed to manage the edge-cloud continuum:
- The Predictor: Acts as the system's intelligence, using application-specific, data-driven models to estimate end-to-end latency and cost. It maintains an Active Container Information List (CIL) to track remote resource states and account for "warm" vs. "cold" starts in AWS Lambda.
- The Decision Engine: Solves optimization problems to either minimize latency within a budget or minimize cost within a latency deadline. It employs a "surplus" budget mechanism to balance costs across a sequence of tasks.
- The Executor: Manages local task queuing and handles non-blocking dispatch to the cloud.
Experimental Evaluation
The framework was evaluated using three Python-based applications: Image Resizing (IR), Face Detection (FD), and Speech-To-Text (STT). These represent varying compute and bandwidth intensities. Experiments were conducted using AWS Lambda for cloud resources and AWS Greengrass on a Raspberry Pi 3B for edge processing. Performance models utilized linear regression for networking and Gradient Boosted Regression Trees (GBRT) for complex cloud compute durations.
Key Results and Insights
The prototype demonstrated high predictive accuracy, with average end-to-end latency errors under 6%. For compute-heavy tasks like Face Detection, the framework achieved nearly three orders of magnitude reduction in latency compared to edge-only execution.
A critical insight was the "warmth" tracker (CIL), which successfully estimated cloud container reclamation timeouts (approx. 27 minutes), allowing the system to avoid unexpected cold-start delays. Furthermore, the surplus budgeting allowed for dynamic cloud resource upgrades for complex inputs without violating overall cost constraints. The study also highlighted application heterogeneity: while the edge is almost always better for bandwidth-intensive tasks like image resizing, the cloud is essential for compute-intensive tasks like face detection.
Conclusion and Future Work
While highly effective, the framework currently focuses on single-function applications. Future work aims to address the high variance in serverless latency and extend the logic to complex function chains or graphs. Additionally, while tuned for AWS, the underlying logic is portable to other serverless providers with appropriate re-characterization of their specific behaviors.
Summary updated