Abstract
Serverless computing, or Function-as-a-Service (FaaS), has traditionally relied on late-binding scheduling and random load balancing. However, these industry standards are often sub-optimal for real-world workloads characterized by heavy-tailed execution times and extreme burstiness. This paper introduces Hermes, a locality-aware hybrid scheduler that utilizes early binding and processor sharing. By addressing the "head-of-line blocking" problem common in First-Come-First-Serve (FCFS) queues, Hermes reduces function slowdown by up to 85% and increases system throughput by 60% compared to existing platforms like Apache OpenWhisk.
Introduction
The rise of Function-as-a-Service (FaaS) has revolutionized cloud application development by abstracting away server management. In this paradigm, users care most about "slowdown"—the ratio of total response time to actual execution time. While significant research has focused on minimizing container startup times (the "cold start" problem), the fundamental scheduling of these functions has remained largely overlooked. Most production systems still rely on "late binding" and simple load balancing, which are ill-suited for the highly variable nature of real-world serverless traffic.
The Challenges of Real-World Workloads
Real-world serverless workloads, such as those observed in the Microsoft Azure Functions trace, are notoriously "messy." They exhibit execution times spanning several orders of magnitude—from milliseconds to minutes—forming a heavy-tailed distribution. Furthermore, traffic is extremely skewed; for instance, a mere 0.6% of functions can account for 90% of total traffic.
Traditional schedulers often use late binding, where a request waits in a central queue until a worker is free. In a heavy-tailed environment, this leads to "head-of-line blocking": a short, 100ms function can get stuck behind a long-running 10-second function, causing massive spikes in tail latency and slowdown for the majority of users.
Methodology: Introducing Hermes
To address these inefficiencies, the authors developed a taxonomy of scheduling policies based on timing (early vs. late binding), load balancing (locality, least-loaded, or random), and scheduling discipline (Processor-Sharing vs. FCFS). Through extensive simulation, they discovered that the industry-standard "late binding" is actually detrimental for heavy-tailed tasks.
The result of this research is Hermes, a scheduler designed with three core principles:
- Early Binding with Processor Sharing: Unlike late binding, Hermes sends invocations to workers immediately. Workers then use processor sharing (akin to the Linux Completely Fair Scheduler) to ensure that short tasks can make progress even when long tasks are occupying the CPU.
- Hybrid Load Balancing: Hermes adapts its strategy based on system load. At low loads, it "packs" functions onto fewer servers to maximize "warm" container hits and resource efficiency. As load increases, it shifts to a "least-loaded" approach to prevent any single worker from becoming a bottleneck.
- Locality Awareness: By tracking which workers already have "warm" containers for specific functions, Hermes prioritizes these workers to avoid the significant overhead of cold starts.
Evaluation and Results
The authors implemented Hermes within the Apache OpenWhisk framework and evaluated it using the 14-day Azure Functions production trace. The results demonstrate significant improvements across key performance metrics.
As shown in the performance graphs, Hermes (represented by the more stable lines at high loads) significantly outperforms traditional FCFS-based policies. Key findings include:
- Reduced Slowdown: Hermes achieved up to an 85% reduction in function slowdown at low-to-medium loads compared to default OpenWhisk configurations.
- Increased Capacity: The system could handle 60% higher request volumes before reaching instability.
- Cold Start Mitigation: The locality-aware hybrid balancing strategy successfully reduced cold starts compared to pure "least-loaded" schedulers, which tend to spread tasks too thinly.
Conclusion
Hermes proves that the "conventional wisdom" of late binding in cluster computing does not translate effectively to the serverless domain. By combining early binding with worker-level processor sharing and an adaptive load-balancing strategy, Hermes provides a robust solution for the heavy-tailed, bursty workloads typical of modern cloud environments. While architectural bottlenecks in platforms like OpenWhisk remain a challenge for extreme-scale throughput, Hermes offers a practical and highly effective path forward for optimizing FaaS performance.
Summary updated