Are Unikernels Ready for Serverless on the Edge? (2403.00515v1)
Abstract: Function-as-a-Service (FaaS) is a promising edge computing execution model but requires secure sandboxing mechanisms to isolate workloads from multiple tenants on constrained infrastructure. Although Docker containers are lightweight and popular in open-source FaaS platforms, they are generally considered insufficient for executing untrusted code and providing sandbox isolation. Commercial cloud FaaS platforms thus rely on Linux microVMs or hardened container runtimes, which are secure but come with a higher resource footprint. Unikernels combine application code and limited operating system primitives into a single purpose appliance, reducing the footprint of an application and its sandbox while providing full Linux compatibility. In this paper, we study the suitability of unikernels as an edge FaaS execution environment using the Nanos and OSv unikernel tool chains. We compare performance along several metrics such as cold start overhead and idle footprint against sandboxes such as Firecracker Linux microVMs, Docker containers, and secure gVisor containers. We find that unikernels exhibit desirable cold start performance, yet lag behind Linux microVMs in stability. Nevertheless, we show that unikernels are a promising candidate for further research on Linux-compatible FaaS isolation.
- Firecracker: Lightweight Virtualization for Serverless Applications. In Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation (Santa Clara, CA, USA) (NSDI ’20). USENIX Association, Berkeley, CA, USA, 419–434.
- FaaSnap: FaaS made fast using snapshot-based VMs. In Proceedings of the Seventeenth European Conference on Computer Systems (Rennes, France) (EuroSys ’22). Association for Computing Machinery, New York, NY, USA, 730–746. https://doi.org/10.1145/3492321.3524270
- Serverless Computing: Current Trends and Open Problems. In Research Advances in Cloud Computing. Springer, 1–20.
- Fran Ballesteros. 2014. Clive. Retrieved February 12, 2024 from https://lsub.org/clive/
- AuctionWhisk: Using an Auction-Inspired Approach for Function Placement in Serverless Fog Platforms. Software: Practice and Experience 52, 2 (Dec. 2021), 1143–1169. https://doi.org/10.1002/spe.3058
- Using Application Knowledge to Reduce Cold Starts in FaaS Services. In Proceedings of the 35th ACM Symposium on Applied Computing (Brno, Czech Republic) (SAC ’20). ACM, New York, NY, USA, 134–143. https://doi.org/10.1145/3341105.3373909
- A Research Perspective on Fog Computing. In Proceedings of the 2nd Workshop on IoT Systems Provisioning & Management for Context-Aware Smart Cities (Malaga, Spain) (ISYCC 2017). Springer, Cham, Switzerland, 198–210. https://doi.org/10.1007/978-3-319-91764-1_16
- On-demand Container Loading in AWS Lambda. In Proceedings of the 2023 USENIX Annual Technical Conference (Boston, MA, USA) (USENIX ATC ’23). USENIX Association, Berkeley, CA, USA, 315–328.
- Bryan Cantrill. 2016. Unikernels are unfit for production. Triton Data Center. Retrieved February 12, 2024 from https://www.tritondatacenter.com/blog/unikernels-are-unfit-for-production
- The rise of serverless computing. Commun. ACM 62, 12 (Nov. 2019), 44–54. https://doi.org/10.1145/3368454
- Adam Dunkels. 2001. Design and Implementation of the lwIP TCP/IP Stack. Technical Report. Swedish Institute of Computer Science.
- Pushing Serverless to the Edge with WebAssembly Runtimes. In Proceedings of the 22nd IEEE International Symposium on Cluster, Cloud and Internet Computing (Taormina, Italy) (CCGrid 2022). IEEE, New York, NY, USA, 140–149. https://doi.org/10.1109/CCGrid54584.2022.00023
- Sledge: a Serverless-first, Light-weight Wasm Runtime for the Edge. In Proceedings of the 21st International Middleware Conference (Delft, Netherlands) (Middleware ’20). Association for Computing Machinery, New York, NY, USA, 265–279. https://doi.org/10.1145/3423211.3425680
- ContainerLeaks: Emerging Security Threats of Information Leakages in Container Clouds. In Proceedings of the 2017 47th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (Denver, CO, USA) (DSN ’17). IEEE, New York, NY, USA, 237–248. https://doi.org/10.1109/DSN.2017.49
- Dániel Géhberger and Dávid Kovács. 2022. Cooling Down FaaS: Towards Getting Rid of Warm Starts. (June 2022). arXiv:2206.00599
- A Functional and Performance Benchmark of Lightweight Virtualization Platforms for Edge Computing. In Proceedings of the 2022 IEEE International Conference on Edge Computing and Communications (Barcelona, Spain) (EDGE 2022). IEEE, New York, NY, USA, 60–68. https://doi.org/10.1109/EDGE55608.2022.00020
- Adam Hall and Umakishore Ramachandran. 2019. An execution model for serverless functions at the edge. In Proceedings of the International Conference on Internet of Things Design and Implementation (Montreal, Quebec, Canada) (IoTDI ’19). Association for Computing Machinery, New York, NY, USA, 225–236. https://doi.org/10.1145/3302505.3310084
- runtimejs - Lightweight JavaScript library operating system for the cloud. Retrieved February 12, 2024 from http://runtimejs.org/
- 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 (Virtual, USA) (ASPLOS ’21). Association for Computing Machinery, New York, NY, USA, 152–166. https://doi.org/10.1145/3445814.3446701
- Cloud Programming Simplified: A Berkeley View on Serverless Computing. Technical Report. EECS Department, University of California, Berkeley.
- kvm: the Linux virtual machine monitor. In Proceedings of the Linux Symposium (Ottawa, ON, Canada). 225–230.
- OSv – Optimizing the Operating System for Virtual Machines. In Proceedings of the 2014 USENIX Annual Technical Conference (Philadelphia, PA, USA) (USENIX ATC ’14). USENIX Association, Berkeley, CA, USA, 61–72.
- Ricardo Koller and Dan Williams. 2017. Will Serverless End the Dominance of Linux in the Cloud?. In Proceedings of the 16th Workshop on Hot Topics in Operating Systems (Whistler, BC, Canada) (HotOS ’17). Association for Computing Machinery, New York, NY, USA, 169–173. https://doi.org/10.1145/3102980.3103008
- Unikernels Everywhere: The Case for Elastic CDNs. In Proceedings of the 13th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (Xi’an, China) (VEE ’17). Association for Computing Machinery, New York, NY, USA, 15–29. https://doi.org/10.1145/3050748.3050757
- Unikernels Everywhere: The Case for Elastic CDNs. SIGPLAN Not. 52, 7 (April 2017), 15–29. https://doi.org/10.1145/3140607.3050757
- Unleashing the power of unikernels with unikraft. In Proceedings of the 12th ACM International Conference on Systems and Storage (Haifa, Israel) (SYSTOR ’19). Association for Computing Machinery, New York, NY, USA, 195. https://doi.org/10.1145/3319647.3325856
- RustyHermit: A Scalable, Rust-Based Virtual Execution Environment. In Proceedings of the ISC High Performance 2020 (Frankfurt, Germany) (ISC ’20). Springer, Cham, Switzerland, 331–342. https://doi.org/10.1007/978-3-030-59851-8_22
- Unikraft and the coming of age of unikernels. login; The Usenix Magazine (July 2021).
- Everything Old is New Again: Binary Security of WebAssembly. In Proceedings of the 29th USENIX Security Symposium (USENIX Security ’20). USENIX Association, Berkeley, CA, USA, 217–234.
- Conghao Liu and Kyle C. Hale. 2019. Towards a Practical Ecosystem of Specialized OS Kernels. In Proceedings of the 9th International Workshop on Runtime and Operating Systems for Supercomputers (Phoenix, AZ, USA) (ROSS ’19). Association for Computing Machinery, New York, NY, USA, 3–9. https://doi.org/10.1145/3322789.3328742
- solo5: A sandboxed execution environment for unikernels. Retrieved February 12, 2024 from https://github.com/Solo5/solo5
- Unikernels: library operating systems for the cloud. SIGARCH Comput. Archit. News 41, 1 (March 2013), 461–472. https://doi.org/10.1145/2490301.2451167
- Unikernels: library operating systems for the cloud. In Proceedings of the Eighteenth International Conference on Architectural Support for Programming Languages and Operating Systems (Houston, Texas, USA) (ASPLOS ’13). Association for Computing Machinery, New York, NY, USA, 461–472. https://doi.org/10.1145/2451116.2451167
- Anil Madhavapeddy and David J. Scott. 2014. Unikernels: the rise of the virtual library operating system. Commun. ACM 57, 1 (Jan. 2014), 61–69. https://doi.org/10.1145/2541883.2541895
- Eyal Manor. 2018. Bringing the best of serverless to you. Google Cloud Platform. Retrieved February 12, 2024 from https://cloudplatform.googleblog.com/2018/07/bringing-the-best-of-serverless-to-you.html
- Docker ecosystem – Vulnerability Analysis. Computer Communications 122 (June 2018), 30–43. https://doi.org/10.1016/j.comcom.2018.03.011
- Demonstrating the Practicality of Unikernels to Build a Serverless Platform at the Edge. In Proceedings of the 2020 IEEE International Conference on Cloud Computing Technology and Science (Bangkok, Thailand) (CloudCom 2020). IEEE, New York, NY, USA, 25–32. https://doi.org/10.1109/CloudCom49646.2020.00001
- NanoVMs Inc. 2023. Nanos.org. Retrieved February 12, 2024 from https://nanos.org/
- Swivel: Hardening WebAssembly against Spectre. In Proceedings of the 30th USENIX Security Symposium (USENIX Security ’21). 1433–1450.
- A binary-compatible unikernel. In Proceedings of the 15th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (Providence, RI, USA) (VEE 2019). Association for Computing Machinery, New York, NY, USA, 59–73. https://doi.org/10.1145/3313808.3313817
- An evaluation of open source serverless computing frameworks support at the edge. In Proceedings of the 2019 IEEE World Congress on Services (Milan, Italy) (SERVICES ’19). IEEE, New York, NY, USA, 206–211. https://doi.org/10.1109/SERVICES.2019.00057
- Tobias Pfandzelter and David Bermbach. 2020. tinyFaaS: A Lightweight FaaS Platform for Edge Environments. In Proceedings of the Second IEEE International Conference on Fog Computing (Sydney, NSW, Australia) (ICFC 2020). IEEE, New York, NY, USA, 17–24. https://doi.org/10.1109/ICFC49376.2020.00011
- Streaming vs. Functions: A Cost Perspective on Cloud Event Processing. In Proceedings of the 10th IEEE International Conference on Cloud Engineering (Asilomar, CA, USA) (IC2E 2022). IEEE, New York, NY, USA, 67–78. https://doi.org/10.1109/IC2E55432.2022.00015
- Ayush Ranjan and Fabricio Voznika. 2023. Improved gVisor file system performance for GKE, Cloud Run, App Engine and Cloud Functions. Google Cloud. Retrieved February 12, 2024 from https://cloud.google.com/blog/products/containers-kubernetes/gvisor-file-system-improvements-for-gke-and-serverless
- Towards a serverless platform for edge AI. In Proceedings of the 2nd USENIX Workshop on Hot Topics in Edge Computing (Renton, WA, USA) (HotEdge ’19). USENIX Association, Berkeley, CA, USA.
- Rusty Russell. 2008. virtio: towards a de-facto standard for virtual I/O devices. SIGOPS Oper. Syst. Rev. 42, 5 (July 2008), 95–103. https://doi.org/10.1145/1400097.1400108
- ProFaaStinate: Delaying Serverless Function Calls to Optimize Platform Performance. In Proceedings of the 9th International Workshop on Serverless Computing (Bologna, Italy) (WoSC ’23). ACM, New York, NY, USA, 1–6. https://doi.org/10.1145/3631295.3631393
- Fusionize: Improving Serverless Application Performance through Feedback-Driven Function Fusion. In Proceedings of the 10th IEEE International Conference on Cloud Engineering (Asilomar, CA, USA) (IC2E 2022). IEEE, New York, NY, USA, 85–95. https://doi.org/10.1109/IC2E55432.2022.00017
- Container Security: Issues, Challenges, and the Road Ahead. IEEE Access 7 (2019), 52976–52996. https://doi.org/10.1109/ACCESS.2019.2911732
- The Apache Software Foundation. 2024. Apache OpenWhisk. Retrieved February 12, 2024 from https://openwhisk.apache.org/
- The FreeBSD Project. 2023. Chapter 12. Linux Binary Compatibility - The FreeBSD Handbook. Retrieved February 12, 2024 from https://docs.freebsd.org/en/books/handbook/linuxemu/
- The gVisor Authors. 2024a. gVisor – Production guide? https://gvisor.dev/docs/user_guide/production/
- The gVisor Authors. 2024b. What is gVisor? https://gvisor.dev/docs/
- Benchmarking, analysis, and optimization of serverless function snapshots. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (Virtual, USA) (ASPLOS ’21). Association for Computing Machinery, New York, NY, USA, 559–572. https://doi.org/10.1145/3445814.3446714
- Dan Williams and Ricardo Koller. 2016. Unikernel Monitors: Extending Minimalism Outside of the Box. In Proceedings of the 8th USENIX Workshop on Hot Topics in Cloud Computing (Denver, CO, USA) (HotCloud ’16). USENIX Association, Berkeley, CA, USA.
- Unikernels as Processes. In Proceedings of the ACM Symposium on Cloud Computing (Carlsbad, CA, USA) (SoCC ’18). Association for Computing Machinery, New York, NY, USA, 199–211. https://doi.org/10.1145/3267809.3267845
- Mitigating Storage Side Channels Using Statistical Privacy Mechanisms. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security (Denver, Colorado, USA) (CCS ’15). Association for Computing Machinery, New York, NY, USA, 1582–1594. https://doi.org/10.1145/2810103.2813645
- The True Cost of Containing: A gVisor Case Study. In Proceedings of the 11th USENIX Workshop on Hot Topics in Cloud Computing (Renton, WA, USA) (HotCloud ’19). USENIX Association, Berkeley, CA, USA.