[Paper Review] Affinity-aware Serverless Function Scheduling
This paper proposes aAPP, a declarative, platform-agnostic language extension to Apache OpenWhisk that enables affinity-aware scheduling in Serverless Function-as-a-Service (FaaS) environments. By allowing developers to express policies that co-locate or isolate functions based on runtime presence of other functions, aAPP improves performance in latency-sensitive and security-critical scenarios while imposing negligible overhead in non-affinity workloads.
Functions-as-a-Service (FaaS) is a Serverless Cloud paradigm where a platform manages the scheduling (e.g., resource allocation, runtime environments) of stateless functions. Recent work proposed using domain-specific languages to express per-function policies, e.g., policies that enforce the allocation on nodes that enjoy lower latencies to databases and services used by the function. Here, we focus on affinity-aware scenarios, i.e., where, for performance and functional requirements, the allocation of a function depends on the presence/absence of other functions on nodes. We present aAPP, an extension of a declarative, platform-agnostic language that captures affinity-aware scheduling at the FaaS level. We implement an aAPP-based prototype on Apache OpenWhisk. Besides proving that a FaaS platform can capture affinity awareness using aAPP and improve performance in affinity-aware scenarios, we use our prototype to show that aAPP imposes no noticeable overhead in scenarios without affinity constraints.
Motivation & Objective
- To address the lack of native support for function (anti-)affinity constraints in FaaS platforms.
- To enable developers to express scheduling policies based on the co-location or isolation of functions at runtime.
- To design a declarative, platform-agnostic language extension that integrates seamlessly with existing FaaS runtimes.
- To evaluate the performance impact of aAPP in both affinity-aware and non-affinity scenarios.
- To demonstrate that aAPP imposes negligible runtime overhead while enabling complex scheduling policies.
Proposed method
- Extends the existing APP language with new constructs to express function affinity and anti-affinity constraints.
- Designs a linear-time scheduling algorithm that checks whether a function can be allocated to a worker based on aAPP policies.
- Implements an aAPP-based prototype on Apache OpenWhisk, integrating policy evaluation into the scheduling pipeline.
- Uses a declarative syntax to define policies per function, specifying required or excluded presence of other functions on target workers.
- Employs a centralized scheduler to enforce policies while avoiding scheduling races in multi-controller deployments.
- Validates the prototype using 7 benchmarks and compares it with vanilla OpenWhisk to measure performance overhead.
Experimental results
Research questions
- RQ1Can aAPP effectively express affinity-aware scheduling policies at the FaaS level, such as co-locating functions that share database connections?
- RQ2Does the integration of aAPP into Apache OpenWhisk introduce measurable performance overhead in non-affinity scenarios?
- RQ3How does aAPP-based scheduling improve performance in affinity-aware use cases, such as avoiding resource contention with compute-intensive functions?
- RQ4Can aAPP be efficiently evaluated at runtime, ensuring scalability and low latency?
- RQ5What is the impact of (anti-)affinity constraints on function scheduling in real-world FaaS workloads?
Key findings
- The aAPP-based prototype successfully enforces (anti-)affinity constraints in FaaS scheduling, improving performance in affinity-aware scenarios by reducing inter-function latency and resource contention.
- In non-affinity workloads, aAPP imposes negligible overhead, with performance degradation below measurable thresholds across 7 benchmarks.
- The scheduling algorithm operates in linear time relative to the number of workers and script length, ensuring scalability.
- The prototype demonstrates that FaaS-level affinity scheduling is feasible and efficient without sacrificing VM/container reuse or introducing infrastructure abstraction leaks.
- The evaluation confirms that aAPP enables expressive, safe, and efficient scheduling policies without compromising platform performance.
- The study highlights the potential for integrating aAPP into other FaaS platforms, with initial support already extended to FunLess.
Better researchstarts right now
From paper design to paper writing, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.