Scheduling Real-Time Serverless Smart Grid Workflows with Chain-Aware DRL
Serverless computing has emerged as a promising paradigm for deploying distributed cyber-physical systems (CPS), such as smart grids and industrial control applications, due to its elasticity and lightweight execution model. In these CPS settings, sensing, communication, and actuation are tightly coupled in closed-loop control workflows, where end-to-end latency and reliability directly affect physical system behavior. However, in networked edge environments, inter-node communication delay and congestion frequently dominate end-to-end latency, which makes network-agnostic scheduling unsuitable for time-critical workflows. Most existing Function-as-a-Service (FaaS) schedulers make per-function placement decisions and fail to account for sequential dependencies and cumulative latency effects in multi-stage, time-critical control workflows executed over networked edge nodes. Modern smart grid communication infrastructures, as a representative class of CPS, increasingly rely on 5G networks, which enable heterogeneous service classes with distinct latency and reliability requirements. This limitation of FaaS is particularly problematic for ultra-reliable low-latency communication (URLLC) applications, where delayed execution of any stage can violate end-to-end service-level objectives (SLOs) and compromise grid protection actions. We formulate the joint scheduling of mixed URLLC and massive machine-type communication (mMTC) workloads as an optimization problem over execution and inter-node communication decisions in dynamic edge smart grids, and show that it is computationally intractable. We then propose a deep reinforcement learning (DRL) scheduler that incorporates tail-latency penalties and chain-level reliability feedback to control worst-case delay accumulation across network hops and successive workflow stages. We implement the proposed approach on a Kubernetes-based FaaS platform and evaluate it on a lightweight edge testbed using realistic smart grid workloads. Results show significant reductions in end-to-end latency and tail-delay events for URLLC workflows, while maintaining scalable support for mMTC and outperforming state-of-the-art baselines.