Serverless computing has gained popularity in edge computing due to its flexible features, including the pay-per-use pricing model, auto-scaling capabilities, and multi-tenancy support. Complex Serverless-based applications typically rely on Serverless workflows (also known as Serverless function orchestration) to express task execution logic, and numerous application- and system-level optimization techniques have been developed for Serverless workflow scheduling. However, there has been limited exploration of optimizing Serverless workflow scheduling in edge computing systems, particularly in high-density, resource-constrained environments such as system-on-chip clusters and single-board-computer clusters. In this work, we discover that existing Serverless workflow scheduling techniques typically assume models with limited expressiveness and cause significant resource contention. To address these issues, we propose modeling Serverless workflows using behavior trees, a novel and fundamentally different approach from existing directed-acyclic-graph- and state machine-based models. Behavior tree-based modeling allows for easy analysis without compromising workflow expressiveness. We further present observations derived from the inherent tree structure of behavior trees for contention-free function collections and awareness of exact and empirical concurrent function invocations. Based on these observations, we introduce BeeFlow, a behavior tree-based Serverless workflow system tailored for resource-constrained edge clusters. Experimental results demonstrate that BeeFlow achieves up to 3.2X speedup in a high-density, resource-constrained edge testbed and 2.5X speedup in a high-profile cloud testbed, compared with the state-of-the-art.
翻译:无服务器计算因其按需付费、自动扩缩容及多租户支持等灵活特性,在边缘计算领域日益普及。基于无服务器计算的复杂应用通常依赖无服务器工作流(亦称无服务器函数编排)来表达任务执行逻辑,且学界已针对此类工作流调度开发了大量应用级与系统级优化技术。然而,面向边缘计算系统(尤其是片上系统集群与单板计算机集群等高密度、资源受限环境)的无服务器工作流调度优化研究仍十分有限。本研究发现,现有无服务器工作流调度技术通常采用表达能力有限的建模方法,并导致严重的资源竞争。为解决这些问题,我们提出基于行为树建模无服务器工作流——这是一种与现有有向无环图模型及状态机模型存在根本差异的创新方法。行为树建模既能保障工作流表达能力,又可实现便捷分析。我们进一步基于行为树的固有树形结构,提出了面向无竞争函数集合的观察结论,以及精确与经验并发函数调用感知机制。基于这些发现,我们设计了面向资源受限边缘集群的BeeFlow无服务器工作流系统。实验结果表明,与当前最优方案相比,BeeFlow在高密度资源受限边缘测试平台可实现高达3.2倍的加速比,在高端云测试平台可实现2.5倍的加速比。