Skip to main content
Log in

WebAssembly Orchestration in the Context of Serverless Computing

  • Published:
Journal of Network and Systems Management Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

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

  1. Datadog: The State of Serverless. https://www.datadoghq.com/state-of-serverless/ Accessed 26 Feb 2023

  2. Kratzke, N.: A brief history of cloud application architectures. Appl. Sci. 8(8), 1368 (2018). https://doi.org/10.3390/app8081368

    Article  Google Scholar 

  3. 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

    Article  Google Scholar 

  4. 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

  5. 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

    Article  Google Scholar 

  6. 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

  7. 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

    Article  Google Scholar 

  8. 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)

    Google Scholar 

  9. 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

  10. 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

  11. 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

    Article  Google Scholar 

  12. 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

  13. 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

  14. 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)

  15. 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)

  16. 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

    Article  Google Scholar 

  17. 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

  18. 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

  19. 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)

  20. 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

    Article  Google Scholar 

  21. 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

  22. W3C WebAssembly Working Group. https://www.w3.org/wasm/. https://www.w3.org/wasm/ Accessed 26 Feb 2023

  23. 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

  24. WebAssembly System Interface – Proposals. WebAssembly. https://github.com/WebAssembly/WASI/blob/bac366c8aeb69cacfea6c4c04a503191bf1cede1/Proposals.md Accessed 27 Feb 2022

  25. WASI Filesystem. WebAssembly. https://github.com/WebAssembly/wasi-filesystem Accessed 27 Feb 2022

  26. WASI Sockets. WebAssembly. https://github.com/WebAssembly/wasi-sockets Accessed 27 Feb 2022

  27. The WebAssembly System Interface. https://wasi.dev/. https://wasi.dev/ Accessed 27 Feb 2022

  28. Wasi-Threads. WebAssembly (2022). https://github.com/WebAssembly/wasi-threads Accessed 27 Feb 2022

  29. 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

  30. 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

  31. 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]

    Article  Google Scholar 

  32. 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

  33. 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

    Article  Google Scholar 

  34. 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

  35. 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

    Article  Google Scholar 

  36. 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

    Article  Google Scholar 

  37. 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

  38. Kubernetes Operator Pattern. https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ Accessed 27 Feb 2022

  39. 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

    Article  Google Scholar 

  40. Containerd – An Industry-Standard Container Runtime with an Emphasis on Simplicity, Robustness and Portability. https://containerd.io/. https://containerd.io/ Accessed 27 Feb 2022

  41. Definition of Shim - Gartner Information Technology Glossary. https://www.gartner.com/en/information-technology/glossary/shim Accessed 27 Feb 2022

  42. Containerd - WasmEdge Runtime. https://wasmedge.org/book/en/use_cases/kubernetes/cri/containerd.html Accessed 27 Feb 2022

  43. 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

  44. Introducing Spin. https://spin.fermyon.dev Accessed 27 Feb 2022

  45. Wasmtime. https://wasmtime.dev/ Accessed 27 Feb 2022

  46. Building Spin Components in Other Languages. https://developer.fermyon.com Accessed 27 Feb 2022

  47. Component Model Design and Specification. https://github.com/WebAssembly/component-model Accessed 27 Feb 2022

  48. Wasm, WASI, Wagi: What Are They? https://www.fermyon.com/blog/wasm-wasi-wagi Accessed 27 Feb 2022

  49. 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)

    Chapter  Google Scholar 

  50. Helm - The Package Manager for Kubernetes. https://helm.sh/ Accessed 27 Feb 2022

  51. Runtime Class. https://kubernetes.io/docs/concepts/containers/runtime-class/ Accessed 27 Feb 2022

  52. 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

  53. WebAssembly Proposals. https://github.com/WebAssembly/proposals Accessed 13 June 2023

  54. OpenFaaS Golang HTTP Templates. https://github.com/openfaas/golang-http-template Accessed 27 Feb 2022

  55. OpenFaaS Rust HTTP Template. https://github.com/openfaas-incubator/rust-http-template Accessed 27 Feb 2022

  56. OpenFaaS - Serverless Functions Made Simple. https://www.openfaas.com/ Accessed 27 Feb 2022

  57. Apache OpenWhisk Is a Serverless, Open Source Cloud Platform. https://openwhisk.apache.org/ Accessed 27 Feb 2022

  58. Knative. https://knative.dev/ Accessed 27 Feb 2022

  59. Kubeless. https://kubeless.io/ Accessed 27 Feb 2022

  60. Dogan, J.: Rakyll/Hey. https://github.com/rakyll/hey Accessed 27 Feb 2022

  61. K3s: Lightweight Kubernetes. https://k3s.io/ Accessed 27 Feb 2022

  62. 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

  63. Stack - OpenFaaS. https://docs.openfaas.com/architecture/stack/ Accessed 08 Mar 2022

  64. Client in Reqwest::Blocking - Rust. https://docs.rs/reqwest/latest/reqwest/blocking/struct.Client.html Accessed 04 Mar 2022

Download references

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

Authors

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

Correspondence to Vojdan Kjorveziroski.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10922-023-09753-0

Keywords

Navigation