Abstract
Recent WebAssembly advancements including better programming language support and the introduction of both the WebAssembly System Interface, and the WebAssembly Component Model, have transformed it from primarily a client-side technology to a server-side one as well. The advantages associated with WebAssembly, such as cross platform portability, small software artifacts sizes, fast start up times, and per execution isolation make it a good fit for serverless scenarios. While there are existing initiatives for using WebAssembly in such serverless contexts, orchestration is still an open question. To overcome this issue, we present a way for extending Kubernetes, allowing it to orchestrate natively executed WebAssembly modules, in addition to containers. We describe an extension to an existing WebAssembly software shim for containerd and a new Kubernetes WebAssembly operator. Benchmarking results from the proposed solution obtained using 9 serverless functions packaged both as WebAssembly modules and OpenFaaS functions running in containers, show that WebAssembly has clear advantages for frequently executed serverless functions which require elasticity. WebAssembly functions enjoy two times faster deployment times and at least an order of magnitude smaller artifact sizes while still offering comparable execution performance. However, when it comes to sustained performance for long running serverless functions with processor intensive workloads, containers are the preferred choice, compensating for the increased cold start times with faster execution times.
Similar content being viewed by others
Data Availability
The generated raw data, software, and outputs from the data analysis are publicly available under a permissive license on https://github.com/wasm-orchestration.
References
Datadog: The State of Serverless. https://www.datadoghq.com/state-of-serverless/ Accessed 26 Feb 2023
Kratzke, N.: A brief history of cloud application architectures. Appl. Sci. 8(8), 1368 (2018). https://doi.org/10.3390/app8081368
Hassan, H.B., Barakat, S.A., Sarhan, Q.I.: Survey on serverless computing. J. Cloud Comput. 10(1), 39 (2021). https://doi.org/10.1186/s13677-021-00253-7
Pfandzelter, T., Bermbach, D.: IoT Data Processing in the Fog: Functions, Streams, or Batch Processing? In: 2019 IEEE International Conference on Fog Computing (ICFC), pp. 201–206. IEEE, Prague, Czech Republic (2019). https://doi.org/10.1109/ICFC.2019.00033
Varghese, B., Buyya, R.: Next generation cloud computing: new trends and research directions. Future Gener. Comput. Syst. 79, 849–861 (2018). https://doi.org/10.1016/j.future.2017.09.020
Multi-Access Edge Computing (MEC); Framework and Reference Architecture. ETSI MEC ISG. https://www.etsi.org/deliver/etsi_gs/MEC/001_099/003/02.02.01_60/gs_MEC003v020201p.pdf Accessed 27 Feb 2023
Yang, S., Xu, K., Cui, L., Ming, Z., Chen, Z., Ming, Z.: EBI-PAI: Towards An Efficient Edge-Based IoT Platform for Artificial Intelligence. IEEE Internet Things J. (2020). https://doi.org/10.1109/JIOT.2020.3019008
Baresi, L., Filgueira Mendonça, D., Garriga, M.: Empowering Low-Latency Applications Through a Serverless Edge Computing Architecture. In: De Paoli, F., Schulte, S., Broch Johnsen, E. (eds.) Service-Oriented and Cloud Computing Lecture Notes in Computer Science, pp. 196–210. Springer International Publishing, Cham (2017)
Gusev, M., Ristov, S., Amza, A., Hohenegger, A., Prodan, R., Mileski, D., Gushev, P., Temelkov, G.: CardioHPC: Serverless Approaches for Real-Time Heart Monitoring of Thousands of Patients. In: 2022 IEEE/ACM Workshop on Workflows in Support of Large-Scale Science (WORKS), pp. 76–83 (2022). https://doi.org/10.1109/WORKS56498.2022.00015
Salehe, M., Hu, Z., Mortazavi, S.H., Mohomed, I., Capes, T.: VideoPipe: Building Video Stream Processing Pipelines at the Edge. In: Proceedings of the 20th International Middleware Conference Industrial Track, pp. 43–49. ACM, Davis CA USA (2019). https://doi.org/10.1145/3366626.3368131
Kjorveziroski, V., Filiposka, S., Trajkovik, V.: IoT serverless computing at the edge: a systematic mapping review. Computers 10(10), 130 (2021). https://doi.org/10.3390/computers10100130
Manco, F., Lupu, C., Schmidt, F., Mendes, J., Kuenzer, S., Sati, S., Yasukata, K., Raiciu, C., Huici, F.: My VM is Lighter (and Safer) than your Container. In: Proceedings of the 26th Symposium on Operating Systems Principles. SOSP ’17, pp. 218–233. Association for Computing Machinery, New York, NY, USA (2017). https://doi.org/10.1145/3132747.3132763
Randazzo, A., Tinnirello, I.: Kata Containers: An Emerging Architecture for Enabling MEC Services in Fast and Secure Way. In: 2019 Sixth International Conference on Internet of Things: Systems, Management And Security (IOTSMS), pp. 209–214 (2019). https://doi.org/10.1109/IOTSMS48152.2019.8939164
Agache, A., Brooker, M., Iordache, A., Liguori, A., Neugebauer, R., Piwonka, P., Popa, D.-M.: Firecracker: Lightweight Virtualization for Serverless Applications. In: 17th USENIX Symposium on Networked Systems Design and Implementation (NSDI 20), pp. 419–434 (2020)
Hellerstein, J.M., Faleiro, J., Gonzalez, J.E., Schleier-Smith, J., Sreekanti, V., Tumanov, A., Wu, C.: Serverless Computing: One Step Forward, Two Steps Back. arXiv:1812.03651 [cs] (2018)
Kjorveziroski, V., Canto, C.B., Roig, P.J., Gilly, K., Mishev, A., Trajkovik, V., Filiposka, S.: IoT serverless computing at the edge: open issues and research direction. Trans. Netw. Commun. 9(4), 1–33 (2021). https://doi.org/10.14738/tnc.94.11231
Agarwal, S., Rodriguez, M.A., Buyya, R.: A Reinforcement Learning Approach to Reduce Serverless Function Cold Start Frequency. In: 2021 IEEE/ACM 21st International Symposium on Cluster, Cloud and Internet Computing (CCGrid), pp. 797–803 (2021). https://doi.org/10.1109/CCGrid51090.2021.00097
Ling, W., Ma, L., Tian, C., Hu, Z.: Pigeon: A Dynamic and Efficient Serverless and FaaS Framework for Private Cloud. In: 2019 International Conference on Computational Science and Computational Intelligence (CSCI), pp. 1416–1421. IEEE, Las Vegas, NV, USA (2019). https://doi.org/10.1109/CSCI49370.2019.00265
Wang, B., Ali-Eldin, A., Shenoy, P.: LaSS: Running Latency Sensitive Serverless Computations at the Edge. In: Proceedings of the 30th International Symposium on High-Performance Parallel and Distributed Computing, pp. 239–251. Association for Computing Machinery, New York, NY, USA (2020)
Gorlatova, M., Inaltekin, H., Chiang, M.: Characterizing task completion latencies in multi-point multi-quality fog computing systems. Comput. Netw. 181, 107526 (2020). https://doi.org/10.1016/j.comnet.2020.107526
Hall, A., Ramachandran, U.: An execution model for serverless functions at the edge. In: Proceedings of the International Conference on Internet of Things Design and Implementation. IoTDI ’19, pp. 225–236. Association for Computing Machinery, New York, NY, USA (2019). https://doi.org/10.1145/3302505.3310084
W3C WebAssembly Working Group. https://www.w3.org/wasm/. https://www.w3.org/wasm/ Accessed 26 Feb 2023
Wang, Z., Wang, J., Wang, Z., Hu, Y.: Characterization and Implication of Edge WebAssembly Runtimes. In: 2021 IEEE 23rd Int Conf on High Performance Computing & Communications; 7th Int Conf on Data Science & Systems; 19th Int Conf on Smart City; 7th Int Conf on Dependability in Sensor, Cloud & Big Data Systems & Application (HPCC/DSS/SmartCity/DependSys), pp. 71–80 (2021). https://doi.org/10.1109/HPCC-DSS-SmartCity-DependSys53884.2021.00037
WebAssembly System Interface – Proposals. WebAssembly. https://github.com/WebAssembly/WASI/blob/bac366c8aeb69cacfea6c4c04a503191bf1cede1/Proposals.md Accessed 27 Feb 2022
WASI Filesystem. WebAssembly. https://github.com/WebAssembly/wasi-filesystem Accessed 27 Feb 2022
WASI Sockets. WebAssembly. https://github.com/WebAssembly/wasi-sockets Accessed 27 Feb 2022
The WebAssembly System Interface. https://wasi.dev/. https://wasi.dev/ Accessed 27 Feb 2022
Wasi-Threads. WebAssembly (2022). https://github.com/WebAssembly/wasi-threads Accessed 27 Feb 2022
Kjorveziroski, V., Filiposka, S., Mishev, A.: Evaluating WebAssembly for Orchestrated Deployment of Serverless Functions. In: 2022 30th Telecommunications Forum (TELFOR), pp. 1–4 (2022). https://doi.org/10.1109/TELFOR56187.2022.9983733
Gadepalli, P.K., McBride, S., Peach, G., Cherkasova, L., Parmer, G.: Sledge: A Serverless-first, Light-weight Wasm Runtime for the Edge. In: Proceedings of the 21st International Middleware Conference. Middleware ’20, pp. 265–279. Association for Computing Machinery, New York, NY, USA (2020). https://doi.org/10.1145/3423211.3425680
Long, J., Tai, H.-Y., Hsieh, S.-T., Yuan, M.J.: A lightweight design for serverless Function-as-a-Service. IEEE Softw. 38(1), 75–80 (2021). https://doi.org/10.1109/MS.2020.3028991. arXiv:2010.07115 [cs]
Hockley, D., Williamson, C.: Benchmarking Runtime Scripting Performance in Wasmer. In: Companion of the 2022 ACM/SPEC International Conference on Performance Engineering. ICPE ’22, pp. 97–104. Association for Computing Machinery, New York, NY, USA (2022). https://doi.org/10.1145/3491204.3527477
Jangda, A., Powers, B., Berger, E., Guha, A.: Not so fast: analyzing the performance of webAssembly vs. Nativ. Code (2019). https://doi.org/10.5555/3358807.3358817
Ménétrey, J., Pasin, M., Felber, P., Schiavoni, V.: WebAssembly as a Common Layer for the Cloud-edge Continuum. In: Proceedings of the 2nd Workshop on Flexible Resource and Application Management on the Edge, pp. 3–8 (2022). https://doi.org/10.1145/3526059.3533618
Kjorveziroski, V., Filiposka, S.: Kubernetes distributions for the edge: serverless performance evaluation. J. Supercomput. 78(11), 13728–13755 (2022). https://doi.org/10.1007/s11227-022-04430-6
Goethals, T., De Turck, F., Volckaert, B.: Extending kubernetes clusters to low-resource edge devices using virtual kubelets. IEEE Trans. Cloud Comput. 10(4), 2623–2636 (2022). https://doi.org/10.1109/TCC.2020.3033807
Sebrechts, M., Ramlot, T., Borny, S., Goethals, T., Volckaert, B., De Turck, F.: Adapting Kubernetes Controllers to the Edge: On-Demand Control Planes Using Wasm and WASI. arXiv (2022). https://doi.org/10.48550/arXiv.2209.01077
Kubernetes Operator Pattern. https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ Accessed 27 Feb 2022
Kjorveziroski, V., Filiposka, S.: WebAssembly as an enabler for next generation serverless computing. J. Grid Comput. 21, 34 (2023). https://doi.org/10.1007/s10723-023-09669-8
Containerd – An Industry-Standard Container Runtime with an Emphasis on Simplicity, Robustness and Portability. https://containerd.io/. https://containerd.io/ Accessed 27 Feb 2022
Definition of Shim - Gartner Information Technology Glossary. https://www.gartner.com/en/information-technology/glossary/shim Accessed 27 Feb 2022
Containerd - WasmEdge Runtime. https://wasmedge.org/book/en/use_cases/kubernetes/cri/containerd.html Accessed 27 Feb 2022
Containerd-Shim-Spin-v1 – Containerd Shims for Running WebAssembly Workloads in Kubernetes. https://github.com/deislabs/containerd-wasm-shims/tree/main/containerd-shim-spin-v1 Accessed 27 Feb 2022
Introducing Spin. https://spin.fermyon.dev Accessed 27 Feb 2022
Wasmtime. https://wasmtime.dev/ Accessed 27 Feb 2022
Building Spin Components in Other Languages. https://developer.fermyon.com Accessed 27 Feb 2022
Component Model Design and Specification. https://github.com/WebAssembly/component-model Accessed 27 Feb 2022
Wasm, WASI, Wagi: What Are They? https://www.fermyon.com/blog/wasm-wasi-wagi Accessed 27 Feb 2022
Kumar, R., Trivedi, M.C.: Networking Analysis and Performance Comparison of Kubernetes CNI Plugins. In: Bhatia, S.K., Tiwari, S., Ruidan, S., Trivedi, M.C., Mishra, K.K. (eds.) Advances in Computer, Communication and Computational Sciences Advances in Intelligent Systems and Computing, pp. 99–109. Springer, Singapore (2021)
Helm - The Package Manager for Kubernetes. https://helm.sh/ Accessed 27 Feb 2022
Runtime Class. https://kubernetes.io/docs/concepts/containers/runtime-class/ Accessed 27 Feb 2022
Kim, J., Lee, K.: FunctionBench: A Suite of Workloads for Serverless Cloud Function Service. In: 2019 IEEE 12th International Conference on Cloud Computing (CLOUD), pp. 502–504 (2019). https://doi.org/10.1109/CLOUD.2019.00091
WebAssembly Proposals. https://github.com/WebAssembly/proposals Accessed 13 June 2023
OpenFaaS Golang HTTP Templates. https://github.com/openfaas/golang-http-template Accessed 27 Feb 2022
OpenFaaS Rust HTTP Template. https://github.com/openfaas-incubator/rust-http-template Accessed 27 Feb 2022
OpenFaaS - Serverless Functions Made Simple. https://www.openfaas.com/ Accessed 27 Feb 2022
Apache OpenWhisk Is a Serverless, Open Source Cloud Platform. https://openwhisk.apache.org/ Accessed 27 Feb 2022
Knative. https://knative.dev/ Accessed 27 Feb 2022
Kubeless. https://kubeless.io/ Accessed 27 Feb 2022
Dogan, J.: Rakyll/Hey. https://github.com/rakyll/hey Accessed 27 Feb 2022
K3s: Lightweight Kubernetes. https://k3s.io/ Accessed 27 Feb 2022
pREST | Instant RESTFul APIs for Your Data | Join Data across Databases, REST Services to Build Powerful Modern Applications. https://prestd.com/ Accessed 27 Feb 2022
Stack - OpenFaaS. https://docs.openfaas.com/architecture/stack/ Accessed 08 Mar 2022
Client in Reqwest::Blocking - Rust. https://docs.rs/reqwest/latest/reqwest/blocking/struct.Client.html Accessed 04 Mar 2022
Acknowledgements
Not applicable.
Funding
This study was funded by the Faculty of Computer Science and Engineering, Ss. Cyril and Methodius University, Skopje, North Macedonia under the “NSA” project.
Author information
Authors and Affiliations
Contributions
Conceptualization: SF and VK; Investigation: VK; Methodology: SF and VK; Software: VK; Validation: SF and VK; Formal analysis: SF and VK Writing (original draft preparation): VK; Writing (review and editing): SF and VK All authors have reviewed the manuscript.
Corresponding author
Ethics declarations
Conflict of interest
The authors have no relevant financial or non-financial interests to disclose.
Ethical Approval
Not applicable.
Consent for publication
Not applicable.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Kjorveziroski, V., Filiposka, S. WebAssembly Orchestration in the Context of Serverless Computing. J Netw Syst Manage 31, 62 (2023). https://doi.org/10.1007/s10922-023-09753-0
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10922-023-09753-0