Skip to main content

Open-Source Serverless for Edge Computing: A Tutorial

  • Chapter
  • First Online:
Serverless Computing: Principles and Paradigms

Abstract

Serverless computing is a recent deployment model for cloud, edge and fog computing platforms, which ultimate goal is to provide cost reduction and scalability enhancement with no additional deployment overhead. The main implementation of this model is Functions-as-a-Service (FaaS): Developers deploy modular functions, which are typically event-driven, on the platform without the need to manage the underlying infrastructure. Moreover, using the so called warm start mode, the FaaS containers hosting the application are kept up and running after initialization, granting the user the impression of high availability. Conversely, in a cold start mode scenario, those containers are deleted when no application requests are received within a certain time window, to save resources. This focus on resources efficiency and flexibility could make the serverless approach significantly convenient for edge computing based applications, in which the hosting nodes consist of devices and machines with limited resources, geographically distributed in proximity to the users. In this paper, we explore the available solutions to deploy a serverless application in an edge computing scenario, with a focus on open-source tools and IoT data.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    A Pod is a single running entity containing one or more containers.

  2. 2.

    https://www.iguazio.com/.

  3. 3.

    Go is a statically typed, compiled programming language with memory safety, garbage collection and structural typing features.

  4. 4.

    Available only in OpenFaaS PRO.

  5. 5.

    https://raw.githubusercontent.com/openfaas/faas/master/api-docs/swagger.yml.

  6. 6.

    Kubernetes Secrets can be passwords, tokens or keys. Secrets are stored in the API server’s underlying data store (etcd).

  7. 7.

    Rust is a multi-paradigm, general-purpose programming language designed for performance and security, especially safe concurrency. Syntactically similar to C++, it can also guarantee memory safety by using a borrow checker to validate references.

  8. 8.

    https://github.com/openfaas/connector-sdk.

  9. 9.

    https://istio.io/.

  10. 10.

    https://opennetworking.org/onos/.

  11. 11.

    https://www.opendaylight.org/.

  12. 12.

    https://openvpn.net/.

  13. 13.

    https://www.openvswitch.org/.

  14. 14.

    https://istio.io/.

  15. 15.

    https://www.consul.io/.

  16. 16.

    https://oneedge.io/.

  17. 17.

    https://github.com/OpenIotOrg/openiot.

  18. 18.

    https://openwrt.org/.

  19. 19.

    https://www.ipfire.org/.

  20. 20.

    https://prometheus.io/.

References

  1. Hong C-H, Varghese B (2019) Resource management in fog/edge computing: a survey on architectures, infrastructure, and algorithms. ACM Comput Surv 52(5) [Online]. Available at https://doi.org/10.1145/3326066

  2. Rimal BP, Maier M, Satyanarayanan M (2018) Experimental testbed for edge computing in fiber-wireless broadband access networks. IEEE Commun Mag 56(8):160–167

    Article  Google Scholar 

  3. Artuñedo D et al (2021) Edge computing for 5g networks, v1.0. Tech. Rep., 5GPPP Technology Board Working Group [Online]. Available at https://doi.org/10.5281/zenodo.3698117

  4. Sabella D, Alleman A, Liao E, Filippou M, Ding Z, Gomes Baltar L, Srikanteswara S, Bhuyan K, Oyman O, Schatzberg G, Oliver N, Smith N, Mishra SD, Thakkar P, Shailendra S (2021) Edge Computing: from standard to actual infrastructure deployment and software development—whitepaper 2021

    Google Scholar 

  5. Multi-access edge computing (MEC) [Online]. Available at https://www.etsi.org/technologies/multi-access-edge-computing

  6. Castro P, Ishakian V, Muthusamy V, Slominski A (2019) The rise of serverless computing. Commun ACM 62(12):44–54 [Online]. Available at https://doi.org/10.1145/3368454

  7. CNCF WG-Serverless Whitepaper v1.0

    Google Scholar 

  8. Nastic S, Rausch T, Scekic O, Dustdar S, Gusev M, Koteska B, Kostoska M, Jakimovski B, Ristov S, Prodan R (2017) A serverless real-time data analytics platform for edge computing. IEEE Internet Comput 21(4):64–71

    Article  Google Scholar 

  9. Glikson A, Nastic S, Dustdar S (2017) Deviceless edge computing: extending serverless computing to the edge of the network. In: Proceedings of the 10th ACM international systems and storage conference, ser. SYSTOR ’17. Association for Computing Machinery, New York, NY, USA [Online]. Available at https://doi.org/10.1145/3078468.3078497

  10. Benedetti P, Femminella M, Reali G, Steenhaut K (2021) Experimental analysis of the application of serverless computing to IoT platforms. Sensors 21(3) [Online]. Available at https://www.mdpi.com/1424-8220/21/3/928

  11. Mohan A, Sane H, Doshi K, Edupuganti S, Nayak N, Sukhomlinov V (2019) Agile cold starts for scalable serverless. In: 11th USENIX workshop on hot topics in cloud computing (HotCloud 19). USENIX Association, Renton, WA [Online]. Available at https://www.usenix.org/conference/hotcloud19/presentation/mohan

  12. Manner J, Endreß M, Heckel T, Wirtz G (2018) Cold start influencing factors in function as a service. In: 2018 IEEE/ACM international conference on utility and cloud computing companion (UCC Companion), pp 181–188

    Google Scholar 

  13. OpenFaaS: open function as a service [Online]. Available at https://www.openfaas.com/. Accessed 26 Sept 2021

  14. Hendrickson S, Sturdevant S, Harter T, Venkataramani V, Arpaci-Dusseau AC, Arpaci-Dusseau RH (2016) Serverless computation with OpenLambda. In: 8th USENIX workshop on hot topics in cloud computing (HotCloud 16). USENIX Association, Denver, CO

    Google Scholar 

  15. Kritikos K, Skrzypek P (2018) A review of serverless frameworks. In: 2018 IEEE/ACM UCC Companion, pp 161–168

    Google Scholar 

  16. Aggarwal V, Thangaraju B (2020) Performance analysis of virtualisation technologies in NFV and edge deployments. In: 2020 IEEE CONECCT, pp 1–5

    Google Scholar 

  17. Mohanty SK, Premsankar G, di Francesco M (2018) An evaluation of open source serverless computing frameworks. In: 2018 CloudCom, pp 115–120

    Google Scholar 

  18. OpenFaaS: templates [Online]. Available at https://www.github.com/openfaas/templates

  19. Knative: code samples overview [Online]. Available at https://knative.dev/docs/serving/samples/

  20. Nuclio: code examples [Online]. Available at https://nuclio.io/docs/latest/examples/

  21. Kubernetes: production-grade container orchestration [Online]. Available at https://kubernetes.io/

  22. Li J, Kulkarni SG, Ramakrishnan KK, Li D (2019) Understanding open source serverless platforms: Design considerations and performance. In: Proceedings of the 5th international workshop on serverless computing, ser. WOSC ’19. Association for Computing Machinery, New York, NY, USA, pp 37–42 [Online]. Available at https://doi.org/10.1145/3366623.3368139

  23. Kubernetes horizontal pod autoscaler [Online]. Available at https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

  24. Knative [Online]. Available at https://knative.dev/docs/

  25. Apache OpenWhisk is a serverless, open source cloud platform [Online]. Available at https://openwhisk.apache.org/

  26. Nuclio: serverless platform for automated data science [Online]. Available at https://nuclio.io/

  27. Djemame K, Parker M, Datsev D (2020) Open-source serverless architectures: an evaluation of apache OpenWhisk. In: 2020 IEEE/ACM 13th international conference on utility and cloud computing (UCC), pp 329–335

    Google Scholar 

  28. Triggers | Fission [Online]. Available at https://fission.io/docs/usage/triggers/

    Google Scholar 

  29. Stack—OpenFaaS [Online]. Available at https://docs.openfaas.com/architecture/stack/#layers-and-responsibilities

  30. Prometheus—monitoring system & time series database [Online]. Available at https://prometheus.io/

  31. Benedetti P, Femminella M, Reali G, Steenhaut K (2022) Reinforcement learning applicability for resource-based auto-scaling in serverless edge applications. In: 2022 IEEE international conference on pervasive computing and communications workshops and other affiliated events (PerCom Workshops), pp 674–679

    Google Scholar 

  32. NATS—connective technology for adaptive edge & distributed systems [Online]. Available at https://nats.io/

  33. Watchdog—OpenFaaS [Online]. Available at https://docs.openfaas.com/architecture/watchdog/

  34. Welcome to flask—flask documentation (1.1.x) [Online]. Available at https://flask.palletsprojects.com/en/1.1.x/

  35. CVE Details: CVE-2019-5736 (2019) [Online]. Available at https://www.cvedetails.com/cve/CVE-2019-5736/

  36. Exploiting CVE-2017-5123 (2017) [Online]. Available at https://reverse.put.as/2017/11/07/exploiting-cve-2017-5123/

  37. Chen J (2019) Making containers more isolated: an overview of sandboxed container technologies [Online]. Available at https://bit.ly/2ZcRBOR

  38. Zhang Y et al (2018) KylinX: a dynamic library operating system for simplified and efficient cloud virtualization. In: USENIX ATC 18, Boston, MA, pp 173–186

    Google Scholar 

  39. Talbot J et al (2019) A security perspective on Unikernels [Online]. Available at https://arxiv.org/abs/1911.06260

  40. Nabla Containers [Online]. Available at https://github.com/nabla-containers

  41. gvisor [Online]. Available at https://gvisor.dev/

  42. Randazzo A, Tinnirello I (2019) Kata containers: an emerging architecture for enabling MEC services in fast and secure way. In: IOTSMS, pp 209–214

    Google Scholar 

  43. Linux KVM [Online]. Available at https://www.linux-kvm.org/page/Main_Page

  44. Agache A et al (2020) Firecracker: lightweight virtualization for serverless applications. In: 17th USENIX NSDI, Santa Clara, CA, Feb 2020, pp 419–434

    Google Scholar 

  45. Jung R et al (2017) RustBelt: securing the foundations of the rust programming language. Proc ACM Program Lang 2(POPL)

    Google Scholar 

  46. Perez R, Benedetti P, Pergolesi M, Garcia-Reinoso J, Zabala A, Serrano P, Femminella M, Reali G, Banchs A (2021) A performance comparison of virtualization techniques to deploy a 5g monitoring platform. In: 2021 joint European conference on networks and communications 6g summit (EuCNC/6G Summit), pp 472–477

    Google Scholar 

  47. Knative Services [Online]. Available at https://gvisor.dev/docs/tutorials/knative/

  48. OpenFaaS—Profiles [Online]. Available at https://docs.openfaas.com/reference/profiles/

  49. FC not working with k8s in kata 2.x (2020) [Online]. Available at https://github.com/kata-containers/kata-containers/issues/1130

  50. Kubernetes with containerd and kata-fc not working (2020) [Online]. Available at https://github.com/kata-containers/kata-containers/issues/1118

  51. Firecracker limitation: volume support (2018) [Online]. Available at https://github.com/kata-containers/runtime/issues/1071

  52. Documentation: firecracker limitations (2019) [Online]. Available at https://github.com/kata-containers/documentation/issues/351

  53. Parikh S, Dave D, Patel R, Doshi N (2019) Security and privacy issues in cloud, fog and edge computing. Procedia Comput Sci 160:734–739. The 10th international conference on emerging ubiquitous systems and pervasive networks (EUSPN-2019)/The 9th international conference on current and future trends of information and communication technologies in healthcare (ICTH-2019)/affiliated workshops [Online]. Available at https://www.sciencedirect.com/science/article/pii/S1877050919317181

  54. Hassan B, Askar S (2021) Survey on edge computing security

    Google Scholar 

  55. Marin E, Perino D, Pietro R (2021) Serverless computing: a security perspective

    Google Scholar 

  56. Polinsky I, Datta P, Bates A, Enck W (2021) Sciffs: enabling secure third-party security analytics using serverless computing. In: Proceedings of the 26th ACM symposium on access control models and technologies, ser. SACMAT ’21. Association for Computing Machinery, New York, NY, USA, pp 175–186 [Online]. Available at https://doi.org/10.1145/3450569.3463567

  57. Emitter: scalable real-time communication across devices [Online]. Available at https://emitter.io/

  58. Shi W, Dustdar S (2016) The promise of edge computing. Computer 49(5):78–81

    Article  Google Scholar 

  59. Edge computing—next steps in architecture, design and testing [Online]. Available at https://www.openstack.org/use-cases/edge-computing/edge-computing-next-steps-in-architecture-design-and-testing/

  60. Edgex foundry [Online]. Available at https://www.edgexfoundry.org/

  61. Shi W, Cao J, Zhang Q, Li Y, Xu L (2016) Edge computing: vision and challenges. IEEE Internet Things J 3(5):637–646

    Article  Google Scholar 

  62. Guerzoni R, Trivisonno R, Soldani D (2014) SDN-based architecture and procedures for 5g networks. In: 1st international conference on 5g for ubiquitous connectivity, pp 209–214

    Google Scholar 

  63. Xiong Y, Sun Y, Xing L, Huang Y (2018) Extend cloud to edge with KubeEdge. In: 2018 IEEE/ACM symposium on edge computing (SEC), pp 373–377

    Google Scholar 

  64. Tang J, Yu R, Liu S, Gaudiot J-L (2020) A container based edge offloading framework for autonomous driving. IEEE Access 8:33713–33726

    Article  Google Scholar 

  65. George A, Ravindran A (2019) Distributed middleware for edge vision systems. In: 2019 IEEE 16th international conference on smart cities: improving quality of life using ICT IoT and AI (HONET-ICT), pp 193–194

    Google Scholar 

  66. Lei B, Zhao Q, Mei J (2021) Computing power network: an interworking architecture of computing and network based on IP extension. In: 2021 IEEE 22nd international conference on high performance switching and routing (HPSR), pp 1–6

    Google Scholar 

  67. Singh J, Bello Y, Hussein AR, Erbad A, Mohamed A (2021) Hierarchical security paradigm for IoT multiaccess edge computing. IEEE Internet Things J 8(7):5794–5805

    Article  Google Scholar 

  68. ONOS Platform: an overview [Online]. Available at https://opennetworking.org/onos/

    Google Scholar 

  69. Li X, Ma Z, Zheng J, Liu Y, Zhu L, Zhou N (2020) An effective edge-assisted data collection approach for critical events in the SDWSN-based agricultural internet of things. Electronics 9(6) [Online]. Available at https://www.mdpi.com/2079-9292/9/6/907

  70. Baresi L, Filgueira Mendonça D (2019) Towards a serverless platform for edge computing. In: 2019 IEEE international conference on fog computing (ICFC), pp 1–10

    Google Scholar 

  71. Ning Z, Kong X, Xia F, Hou W, Wang X (2019) Green and sustainable cloud of things: enabling collaborative edge computing. IEEE Commun Mag 57(1):72–78

    Article  Google Scholar 

Download references

Acknowledgements

This work has been partially supported by the EU project 5G-CARMEN under grant agreement No. 825012. The views expressed are those of the authors and do not necessarily represent the project. The Commission is not responsible for any use that may be made of the information it contains. Section 6 was also supported by the Vlaio TETRA OpenCloudEdge project, project number HBC.2019.2017.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Priscilla Benedetti .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Benedetti, P., Gattobigio, L., Steenhaut, K., Femminella, M., Reali, G., Braeken, A. (2023). Open-Source Serverless for Edge Computing: A Tutorial. In: Krishnamurthi, R., Kumar, A., Gill, S.S., Buyya, R. (eds) Serverless Computing: Principles and Paradigms. Lecture Notes on Data Engineering and Communications Technologies, vol 162. Springer, Cham. https://doi.org/10.1007/978-3-031-26633-1_5

Download citation

Publish with us

Policies and ethics