🤖 AI Summary
To address performance degradation and functional anomalies in Function-as-a-Service (FaaS) caused by stateless function schedulers ignoring deployment affinity constraints—such as co-location or anti-affinity—this paper proposes aAPP, the first declarative, platform-agnostic affinity-aware FaaS scheduling language. aAPP formally models affinity constraints and introduces a lightweight runtime mechanism for injecting scheduling policies into the execution environment. We implement a prototype atop Apache OpenWhisk to enable dynamic resource allocation respecting deployment dependencies. Experimental evaluation demonstrates that, under affinity constraints, end-to-end latency is significantly reduced; in unconstrained scenarios, scheduling overhead remains below 2%, imposing negligible runtime burden. This work constitutes the first systematic support for declarative affinity-aware scheduling in FaaS, achieving low overhead, high portability across platforms, and strong generalizability to diverse affinity requirements.
📝 Abstract
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.