Link Search Menu Expand Document

Stateful Serverless

Augmenting FaaS with state has been the subject of considerable research. One application with specific state management requirements is analytics, which requires ephemeral storage to pass intermediate results between functions [1]. Pocket [2] provides a solution to challenges in this area. Though managing state for analytics can be challenging on account of the volume and transient nature of the data, its simple and well-defined usage patterns lend themselves to optimized solutions.

A more general challenge arises in managing changing application state, which is often subject to certain consistency requirements. Serverless computing gives coordination-free techniques an opportunity to shine because they have provable advantages at scale [3]. Cloudburst [4] is a stateful FaaS system that integrates with the scalable Anna [5] key-value store. It provides local caches in function instances and transactional causal consistency [6]. FaaSTCC [7] is another system that provides similar guarantees.

An alternative approach is to use an underlying logging infrastructure to represent state. Logging involves coordination, but it can provide strong consistency and better throughput scaling than distributed protocols such as two-phase commit [8]. Beldi [9] and work by de Heus et al. [10] both provide transaction mechanisms that integrate FaaS and underlying storage. Boki [11] and Retro-$\lambda$ [12] also make use of an underlying log to manage state.

Azure Functions [13] includes “durable functions” in its production offering. Durable functions use a checkpoint mechanism to allow long-running execution on top of a FaaS runtime. In this programming model, state can be maintained reliably and for long periods of time within the functions themselves. Burckhardt et al. [14] provide a formal model of durable functions and show that various implementations are possible.

Stateful serverless must reckon with faults. AFT [15] provides a fault tolerance shim that can be interposed between a FaaS environment and underlying storage, providing atomicity guarantees. Ray [16] is not derived from FaaS but offers similar scalability and fits under the broader definition of serverless. The platform has served as a proving ground for various novel fault tolerance approaches [17,18]. Other work on stateful serverless computing includes SFL [19], a compiler for generating stateful serverless applications.


  • [1]Ana Klimovic, Yawen Wang, Christos Kozyrakis, Patrick Stuedi, Jonas Pfefferle, and Animesh Trivedi. 2018. Understanding Ephemeral Storage for Serverless Analytics. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), 789–794.
  • [2]Ana Klimovic, Yawen Wang, Patrick Stuedi, Animesh Trivedi, Jonas Pfefferle, and Christos Kozyrakis. 2018. Pocket: Elastic ephemeral storage for serverless analytics. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18), 427–444.
  • [3]Joseph M. Hellerstein and Peter Alvaro. 2020. Keeping CALM: When Distributed Consistency Is Easy. Communications of the ACM 63, 9 (2020), 72–81.
  • [4]Vikram Sreekanti, Chenggang Wu, Xiayue Charles Lin, Johann Schleier-Smith, Joseph E. Gonzalez, Joseph M. Hellerstein, and Alexey Tumanov. 2020. Cloudburst: Stateful Functions-as-a-Service. VLDB 13, 11 (2020), 2438–2452.
  • [5]Chenggang Wu, Jose Faleiro, Yihan Lin, and Joseph Hellerstein. 2019. Anna: A KVS for Any Scale. IEEE Transactions on Knowledge and Data Engineering (2019).
  • [6]Chenggang Wu, Vikram Sreekanti, and Joseph M. Hellerstein. 2020. Transactional Causal Consistency for Serverless Computing. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, 83–97.
  • [7]Taras Lykhenko, Rafael Soares, and Luis Rodrigues. 2021. FaaSTCC: Efficient Transactional Causal Consistency for Serverless Computing. In Proceedings of the 22nd International Middleware Conference, 159–171.
  • [8]Daniel J. Abadi and Jose M. Faleiro. 2018. An Overview of Deterministic Database Systems. Communications of the ACM 61, 9 (2018), 78–88.
  • [9]Haoran Zhang, Adney Cardoza, Peter Baile Chen, Sebastian Angel, and Vincent Liu. 2020. Fault-tolerant and transactional stateful serverless workflows. In 14th USENIX Symposium on Operating Systems Design and Implementation ( OSDI 20), 1187–1204.
  • [10]Martijn de Heus, Kyriakos Psarakis, Marios Fragkoulis, and Asterios Katsifodimos. 2021. Distributed Transactions on Serverless Stateful Functions. In Proceedings of the 15th ACM International Conference on Distributed and Event-based Systems, 31–42.
  • [11]Zhipeng Jia and Emmett Witchel. 2021. Boki: Stateful Serverless Computing With Shared Logs. In Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles, 691–707.
  • [12]Dominik Meissner, Benjamin Erb, Frank Kargl, and Matthias Tichy. 2018. Retro-λ: An Event-sourced Platform for Serverless Applications with Retroactive Computing Support. In Proceedings of the 12th ACM International Conference on Distributed and Event-based Systems, 76–87.
  • [13]Azure Functions. Retrieved from https://docs.microsoft.com/en-us/azure/azure-functions/
  • [14]Sebastian Burckhardt, Chris Gillum, David Justo, Konstantinos Kallas, Connor McMahon, and Christopher S. Meiklejohn. 2021. Durable Functions: Semantics for Stateful Serverless. Proceedings of the ACM on Programming Languages 5, OOPSLA (2021), 1–27.
  • [15]Vikram Sreekanti, Chenggang Wu, Saurav Chhatrapati, Joseph E. Gonzalez, Joseph M. Hellerstein, and Jose M. Faleiro. 2020. A Fault-Tolerance Shim for Serverless Computing. In Proceedings of the Fifteenth European Conference on Computer Systems, 1–15.
  • [16]Philipp Moritz, Robert Nishihara, Stephanie Wang, Alexey Tumanov, Richard Liaw, Eric Liang, Melih Elibol, Zongheng Yang, William Paul, Michael I. Jordan, and others. 2018. Ray: A Distributed Framework for Emerging AI Applications. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18), 561–577.
  • [17]Stephanie Wang, John Liagouris, Robert Nishihara, Philipp Moritz, Ujval Misra, Alexey Tumanov, and Ion Stoica. 2019. Lineage Stash: Fault Tolerance Off the Critical Path. In Proceedings of the 27th ACM Symposium on Operating Systems Principles, 338–352.
  • [18]Siyuan Zhuang, Zhuohan Li, Danyang Zhuo, Stephanie Wang, Eric Liang, Robert Nishihara, Philipp Moritz, and Ion Stoica. 2021. Hoplite: Efficient and Fault-Tolerant Collective Communication for Task-Based Distributed Systems. In Proceedings of the 2021 ACM SIGCOMM 2021 Conference, 641–656.
  • [19]Lukas Brand and Markus Mock. 2021. SFL: A Compiler for Generating Stateful AWS Lambda Serverless Applications. In Proceedings of the Seventh International Workshop on Serverless Computing (WoSC7) 2021, 29–35.