Abstract
While serverless platforms substantially simplify the provisioning, configuration, and management of cloud applications, implementing correct services on top of these platforms can present significant challenges to programmers. For example, serverless infrastructures introduce a host of failure modes that are not present in traditional deployments. Individual serverless instances can fail while others continue to make progress, correct but slow instances can be killed by the cloud provider as part of resource management, and providers will often respond to such failures by re-executing requests. For functions with side-effects, these scenarios can create behaviors that are not observable in serverful deployments.
In this paper, we propose mu2sls, a framework for implementing microservice applications on serverless using standard Python code with two extra primitives: transactions and asynchronous calls. Our framework orchestrates user-written services to address several challenges, such as failures and re-executions, and provides formal guarantees that the generated serverless implementations are correct. To that end, we present a novel service specification abstraction and formalization of serverless implementations that facilitate reasoning about the correctness of a given application’s serverless implementation. This formalization forms the basis of the mu2sls prototype, which we then use to develop a few real-world microservice applications and show that the performance of the generated serverless implementations achieves significant scalability (3-5× the throughput of a sequential implementation) while providing correctness guarantees in the context of faults, re-execution, and concurrency.
- Martín Abadi, Andrew Birrell, Tim Harris, and Michael Isard. 2008. Semantics of Transactional Memory and Automatic Mutual Exclusion. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’08). Association for Computing Machinery, New York, NY, USA. 63–74. isbn:9781595936899 https://doi.org/10.1145/1328438.1328449
Google Scholar
Digital Library
- Kalev Alpernas, Aurojit Panda, Leonid Ryzhyk, and Mooly Sagiv. 2021. Cloud-Scale Runtime Verification of Serverless Applications. In Proceedings of the ACM Symposium on Cloud Computing (SoCC ’21). Association for Computing Machinery, New York, NY, USA. 92–107. isbn:9781450386388 https://doi.org/10.1145/3472883.3486977
Google Scholar
Digital Library
- 2020. AWS Step Functions. https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html
Google Scholar
- 2022. FoundationDB. https://www.foundationdb.org/
Google Scholar
- Joe Armstrong. 1997. The development of Erlang. In ICFP. 97, 196–203.
Google Scholar
- 2022. AWS Lambda. https://aws.amazon.com/lambda/
Google Scholar
- Jonas Bonér. 2020. Towards Stateful Serverless. https://www.youtube.com/watch?v=DVTf5WQlgB8
Google Scholar
- Sebastian Burckhardt, Chris Gillum, David Justo, Konstantinos Kallas, Connor McMahon, and Christopher S. Meiklejohn. 2021. Durable Functions: Semantics for Stateful Serverless. Proc. ACM Program. Lang., 5, OOPSLA (2021), Article 133, Oct, 27 pages. https://doi.org/10.1145/3485510
Google Scholar
Digital Library
- Sergey Bykov, Alan Geller, Gabriel Kliot, James R. Larus, Ravi Pandya, and Jorgen Thelin. 2011. Orleans: Cloud Computing for Everyone. In Proceedings of the 2nd ACM Symposium on Cloud Computing (SOCC ’11). Association for Computing Machinery, New York, NY, USA. Article 16, 14 pages. isbn:9781450309769 https://doi.org/10.1145/2038916.2038932
Google Scholar
Digital Library
- 2020. Using Durable Objects, Cloudflare Docs. https://developers.cloudflare.com/workers/learning/using-durable-objects
Google Scholar
- 2020. Workers Durable Objects Beta: A New Approach to Stateful Serverless. https://blog.cloudflare.com/introducing-workers-durable-objects/
Google Scholar
- Dmitry Duplyakin, Robert Ricci, Aleksander Maricq, Gary Wong, Jonathon Duerig, Eric Eide, Leigh Stoller, Mike Hibler, David Johnson, Kirk Webb, Aditya Akella, Kuangching Wang, Glenn Ricart, Larry Landweber, Chip Elliott, Michael Zink, Emmanuel Cecchet, Snigdhaswin Kar, and Prabodh Mishra. 2019. The Design and Operation of CloudLab. In Proceedings of the USENIX Annual Technical Conference (ATC). 1–14. https://www.flux.utah.edu/paper/duplyakin-atc19
Google Scholar
- Sadjad Fouladi, Francisco Romero, Dan Iter, Qian Li, Shuvo Chatterjee, Christos Kozyrakis, Matei Zaharia, and Keith Winstein. 2019. From Laptop to Lambda: Outsourcing Everyday Jobs to Thousands of Transient Functional Containers. In Proceedings of the 2019 USENIX Conference on Usenix Annual Technical Conference (USENIX ATC ’19). USENIX Association, USA. 475–488. isbn:9781939133038 https://dl.acm.org/doi/10.5555/3358807.3358848
Google Scholar
- Sadjad Fouladi, Riad S. Wahby, Brennan Shacklett, Karthikeyan Vasuki Balasubramaniam, William Zeng, Rahul Bhalerao, Anirudh Sivaraman, George Porter, and Keith Winstein. 2017. Encoding, Fast and Slow: Low-Latency Video Processing Using Thousands of Tiny Threads. In Proceedings of the 14th USENIX Conference on Networked Systems Design and Implementation (NSDI’17). USENIX Association, USA. 363–376. isbn:9781931971379 https://dl.acm.org/doi/10.5555/3154630.3154660
Google Scholar
- Yu Gan, Yanqi Zhang, Dailun Cheng, Ankitha Shetty, Priyal Rathi, Nayan Katarki, Ariana Bruno, Justin Hu, Brian Ritchken, and Brendon Jackson. 2019. An open-source benchmark suite for microservices and their hardware-software implications for cloud & edge systems. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems. 3–18. https://doi.org/10.1145/3297858.3304013
Google Scholar
Digital Library
- 2022. Google Cloud Functions. https://cloud.google.com/functions
Google Scholar
- Philipp Haller. 2012. On the integration of the actor model in mainstream technologies: the Scala perspective. In Proceedings of the 2nd Edition on Programming Systems, Languages and Applications based on Actors, Agents, and Decentralized Control Abstractions. 1–6. https://doi.org/10.1145/2414639.2414641
Google Scholar
Digital Library
- Maurice P Herlihy and Jeannette M Wing. 1990. Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems (TOPLAS), 12, 3 (1990), 463–492.
Google Scholar
Digital Library
- 2022. Hypercorn. https://pgjones.gitlab.io/hypercorn
Google Scholar
- Suresh Jagannathan, Jan Vitek, Adam Welc, and Antony Hosking. 2005. A transactional object calculus. Science of Computer Programming, 57, 2 (2005), 164–186. https://doi.org/10.1016/j.scico.2005.03.001
Google Scholar
Digital Library
- Abhinav Jangda, Donald Pinckney, Yuriy Brun, and Arjun Guha. 2019. Formal foundations of serverless computing. Proceedings of the ACM on Programming Languages, 3, OOPSLA (2019), 1–26. https://doi.org/10.1145/3360575
Google Scholar
Digital Library
- 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. https://doi.org/10.1145/3477132.3483541
Google Scholar
Digital Library
- Zhipeng Jia and Emmett Witchel. 2021. Nightcore: efficient and scalable serverless computing for latency-sensitive, interactive microservices. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems. 152–166. https://doi.org/10.1145/3445814.3446701
Google Scholar
Digital Library
- Eric Jonas, Qifan Pu, Shivaram Venkataraman, Ion Stoica, and Benjamin Recht. 2017. Occupy the cloud: Distributed computing for the 99%. In Proceedings of the 2017 Symposium on Cloud Computing. 445–451. https://doi.org/10.1145/3127479.3128601
Google Scholar
Digital Library
- Eric Jonas, Johann Schleier-Smith, Vikram Sreekanti, Chia-Che Tsai, Anurag Khandelwal, Qifan Pu, Vaishaal Shankar, Joao Carreira, Karl Krauth, and Neeraja Yadwadkar. 2019. Cloud programming simplified: A berkeley view on serverless computing. arXiv preprint arXiv:1902.03383, https://doi.org/10.48550/arXiv.1902.03383
Google Scholar
- 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. https://dl.acm.org/doi/10.5555/3291168.3291200
Google Scholar
- 2022. Knative. https://knative.dev
Google Scholar
- Mohsen Lesani, Li-yao Xia, Anders Kaseorg, Christian J Bell, Adam Chlipala, Benjamin C Pierce, and Steve Zdancewic. 2022. C4: verified transactional objects. Proceedings of the ACM on Programming Languages, 6, OOPSLA (2022), 1–31. https://doi.org/10.1145/3527324
Google Scholar
Digital Library
- Pedro García López, Aitor Arjona, Josep Sampé, Aleksander Slominski, and Lionel Villard. 2020. Triggerflow: Trigger-Based Orchestration of Serverless Workflows. In Proceedings of the 14th ACM International Conference on Distributed and Event-Based Systems (DEBS ’20). Association for Computing Machinery, New York, NY, USA. 3–14. isbn:9781450380287 https://doi.org/10.1145/3401025.3401731
Google Scholar
Digital Library
- Christopher S. Meiklejohn, Andrea Estrada, Yiwen Song, Heather Miller, and Rohan Padhye. 2021. Service-Level Fault Injection Testing. In Proceedings of the ACM Symposium on Cloud Computing (SoCC ’21). Association for Computing Machinery, New York, NY, USA. 388–402. isbn:9781450386388 https://doi.org/10.1145/3472883.3487005
Google Scholar
Digital Library
- 2022. Azure Functions. https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview
Google Scholar
- 2022. Minikube. https://minikube.sigs.k8s.io
Google Scholar
- Katherine F Moore and Dan Grossman. 2008. High-level small-step operational semantics for transactions. In Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages. 51–62. https://doi.org/10.1145/1328897.1328448
Google Scholar
Digital Library
- Atif Nazir, Saqib Raza, and Chen-Nee Chuah. 2008. Unveiling facebook: a measurement study of social network based applications. In Proceedings of the 8th ACM SIGCOMM Internet Measurement Conference. ACM. https://doi.org/10.1145/1452520.1452527
Google Scholar
Digital Library
- Aurojit Panda, Mooly Sagiv, and Scott Shenker. 2017. Verification in the age of microservices. In Proceedings of the 16th Workshop on Hot Topics in Operating Systems. 30–36. https://doi.org/10.1145/3102980.3102986
Google Scholar
Digital Library
- Benjamin C Pierce, Chris Casinghino, Marco Gaboardi, Michael Greenberg, Cătălin Hriţcu, Vilhelm Sjöberg, and Brent Yorgey. 2010. Software foundations. Webpage: http://www.cis.upenn.edu/bcpierce/sf/current/index.html.
Google Scholar
- 2022. Quart. https://pgjones.gitlab.io/quart
Google Scholar
- Ganesan Ramalingam and Kapil Vaswani. 2013. Fault tolerance via idempotence. In Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages. 249–262. https://doi.org/10.1145/2429069.2429100
Google Scholar
Digital Library
- 2022. Ray Core: A faster, simpler approach to parallel Python. https://ray.io/ray-core
Google Scholar
- 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. https://doi.org/10.1145/3342195.3387535
Google Scholar
Digital Library
- 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. Proc. VLDB Endow., 13, 12 (2020), sep, 2438–2452. issn:2150-8097 https://doi.org/10.14778/3407790.3407836
Google Scholar
Digital Library
- 2022. Temporal. https://temporal.io/
Google Scholar
- Gil Tene. 2022. wrk2. https://github.com/giltene/wrk2
Google Scholar
- Jan Vitek, Suresh Jagannathan, Adam Welc, and Antony L Hosking. 2004. A semantic framework for designer transactions. In European Symposium on Programming. 249–263. https://doi.org/10.1007/978-3-540-24725-8_18
Google Scholar
Cross Ref
- Lucas Waye, Stephen Chong, and Christos Dimoulas. 2017. Whip: Higher-Order Contracts for Modern Services. Proc. ACM Program. Lang., 1, ICFP (2017), Article 36, aug, 28 pages. https://doi.org/10.1145/3110280
Google Scholar
Digital Library
- 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. https://dl.acm.org/doi/10.5555/3488766.3488833
Google Scholar
- Wen Zhang, Vivian Fang, Aurojit Panda, and Scott Shenker. 2020. Kappa: A Programming Framework for Serverless Computing. In Proceedings of the 11th ACM Symposium on Cloud Computing (SoCC ’20). Association for Computing Machinery, New York, NY, USA. 328–343. isbn:9781450381376 https://doi.org/10.1145/3419111.3421277
Google Scholar
Digital Library
Index Terms
Executing Microservice Applications on Serverless, Correctly
Recommendations
Monitoring-based auto-scalability across hybrid clouds
SAC '18: Proceedings of the 33rd Annual ACM Symposium on Applied ComputingCloud computing is a relatively new type of Internet-based computing that becomes more and more popular. Using methods like virtualization, adopting architectures based on microservices, automation of building and deployment processes, Cloud could ...
Practical Tooling for Serverless Computing
UCC '17: Proceedings of the10th International Conference on Utility and Cloud ComputingCloud applications are increasingly built from a mixture of runtime technologies. Hosted functions and service-oriented web hooks are among the most recent ones which are natively supported by cloud platforms. They are collectively referred to as ...
Distributed transactions on serverless stateful functions
DEBS '21: Proceedings of the 15th ACM International Conference on Distributed and Event-based SystemsServerless computing is currently the fastest-growing cloud services segment. The most prominent serverless offering is Function-as-a-Service (FaaS), where users write functions and the cloud automates deployment, maintenance, and scalability. Although ...






Comments