Synergy: Collaborating Centralized and Local Scheduling for Serverless Functions
Hanmei Chen, Laiping Zhao, Yanan Yang, Jianing You, Keqiu Li · 2024
Serverless computing enables a new way of building and scaling cloud applications by allowing developers to write fine-grained functions. The execution duration of a cloud function is typically short, usually ranging from a few milliseconds to a few seconds. FaaS providers charge users based on the execution duration of cloud functions with a granularity of 1 millisecond. Existing mixed scheduling methods collocate functions with varying execution times, which may prolong their execution duration and lead to unfair charges for FaaS users. To address this problem, we propose a partition scheduling approach, placing functions with varying execution times on different partitions. We introduce Synergy, a solution in serverless computing that leverages a collaboration of central and local scheduling to partition functions and employs suitable scheduling algorithms for these partitions respectively. Synergy also supports the dynamic switching of scheduling algorithms for partitioned nodes to adapt to highly fluctuating loads. We evaluate Synergy using real-world, representative benchmarks. Experimental results demonstrate that, compared to state-of-the-art and conventional approaches, Synergy can reduce the average function execution duration by $63 \%$.