🤖 AI Summary
Existing stateful FaaS systems for stateful cloud applications struggle to simultaneously achieve low latency and strong consistency—either relaxing transactional strictness or relying on high-overhead external state access and inefficient coordination protocols. This paper introduces the first transactional, stateful function runtime tailored for streaming dataflows, supporting strict serializability and end-to-end exactly-once semantics across arbitrary invocation graph topologies. Key innovations include: (i) a function-level acknowledgment mechanism that dynamically demarcates transaction boundaries; (ii) execution caching and early commit responses to reduce latency; and (iii) a deterministic protocol integrated with a streaming engine, state localization, and lightweight coordination to ensure strong consistency. Evaluated on YCSB, TPC-C, and Deathstar benchmarks, our system achieves over 10× higher throughput, sub-millisecond latency, and near-linear scalability.
📝 Abstract
Developing stateful cloud applications, such as low-latency workflows and microservices with strict consistency requirements, remains arduous for programmers. The Stateful Functions-as-a-Service (SFaaS) paradigm aims to serve these use cases. However, existing approaches provide weak transactional guarantees or perform expensive external state accesses requiring inefficient transactional protocols that increase execution latency. In this paper, we present Styx, a novel dataflow-based SFaaS runtime that executes serializable transactions consisting of stateful functions that form arbitrary call-graphs with exactly-once guarantees. Styx extends a deterministic transactional protocol by contributing: i) a function acknowledgment scheme to determine transaction boundaries required in SFaaS workloads, ii) a function-execution caching mechanism, and iii) an early-commit reply mechanism that substantially reduces transaction execution latency. Experiments with the YCSB, TPC-C, and Deathstar benchmarks show that Styx outperforms state-of-the-art approaches by achieving at least one order of magnitude higher throughput while exhibiting near-linear scalability and low latency.