[Back]


Diploma and Master Theses (authored and supervised):

P. Gackstatter:
"A WebAssembly Container Runtime for Serverless Edge Computing";
Supervisor: S. Dustdar, P. Frangoudis; Institute of Information Systems Engineering, Distributed Systems Group, 2021; final examination: 2021-06-23.



English abstract:
Serverless computing has become a popular part of the cloud computing model, thanks to abstracting away infrastructure management. It enables any developer to write functions that auto-scale, while only paying for the used compute time. This model is ideal for handling the unpredictable and bursty workloads in the Internet of Things. However, even the physically close edge computers cannot facilitate low latency use cases due to a significant performance issue. The first invocation of a function requires creating its execution environment - typically a Docker container. This cold start can take hundreds of milliseconds or even multiple seconds under concurrent requests, making serverless with Docker unsuitable for these use cases. Running these platforms on edge devices with limited CPU power and memory available, increases cold start latencies even further. To alleviate this issue, we follow a radical approach and replace Docker, the de-facto standard runtime for serverless computing, with a lighter-weight technology. However, any alternative must offer similar levels of security, language-agnosticism and high performance. A nascent technology, which claims to have these properties, is a target format called WebAssembly. In this work, we examine WebAssembly's suitability for use in a serverless container runtime for Apache OpenWhisk, a serverless framework, with a focus on edge computing. We choose three WebAssembly runtimes to build our container runtime on top of and present its design to achieve fast cold starts while retaining a high performance. We compare the Docker-based OpenWhisk with the three WebAssembly container runtimes in terms of cold start time, execution performance and memory usage via extensive experiments in a testbed. On a Raspberry Pi, a typical low-end edge computing device, we find our WebAssembly container runtimes to achieve 99.5% faster cold starts than Docker, and 94% faster starts on server-grade hardware. Docker's execution performance is strongly linked to the cold start time, while the throughput of WebAssembly containers is not noticeably susceptible to cold starts. In a mixed CPU- and I/O-bound workload, our container runtimes achieve at least 2.4 and up to 4.2 times the throughput of Docker. Overall, we find WebAssembly to be very suitable for use in serverless platforms due to its lightweight isolation mechanism, enabling fast startups, as well as support for ahead-of-time compilation to fast, native code. Our approach is thus a promising step towards low-latency serverless edge computing.

German abstract:
Serverless Computing ist durch die Abstraktion des Infrastrukturmanagements ein beliebter Teil des Cloud Computings geworden. Es ermöglicht automatisch skalierende Funktionen zu schreiben, wobei nur die verbrauchte Rechenzeit in Rechnung gestellt wird. Dieses Modell ist daher ideal um Fluten von Anfragen zu verarbeiten, wie sie etwa aus dem Internet der Dinge kommen. Allerdings können selbst die räumlich nahen Edge Computer latenzsensible Anwendungsfälle aufgrund eines signifikanten Performanceproblems nicht bedienen. Beim ersten Aufruf einer Funktion muss dessen Ausführungsumgebung gestartet werden - üblicherweise ein Docker Container. Dieser Kaltstart benötigt mehrere hundert Millisekunden bis hin zu mehreren Sekunden bei parallelen Anfragen, was Serverless in Kombination mit Docker für diese Anwendungsfälle ungeeignet macht. Zudem erhöht der Betrieb dieser Plattformen auf Edge Computern mit begrenzten Ressourcen die Kaltstartzeit noch weiter. Um dieses Problem zu beheben verfolgen wir einen radikalen Ansatz, bei dem Docker, die de-facto Standard Serverless Runtime, gänzlich durch eine leichtgewichtigere Technologie ersetzt wird. Jede Alternative muss eine ähnliche Sicherheit, Sprachunabhängigkeit und Performance bieten. WebAssembly ist eine aufkommende Technologie die diese Eigenschaften bereitzuhalten scheint. Daher untersuchen wir in dieser Arbeit die Eignung von WebAssembly in einer Serverless Container Runtime mit einem Fokus auf Edge Computing. Dazu modifizieren wir das Serverless Framework Apache OpenWhisk und wählen drei WebAssembly Runtimes aus, um unsere Container Runtime darauf aufzubauen. Insbesondere wird dabei dessen Design diskutiert, mit dem schnelle Kaltstarts bei hoher Performance erzielt werden können. Wir vergleichen OpenWhisk in der Dockervariante mit den drei WebAssembly Container Runtimes im Hinblick auf Kaltstartzeit, Performance und Speicherverbrauch in umfangreichen Experimenten. Auf einem Raspberry Pi, einem typischen low-end Edge Computer, erreichen unsere WebAssembly Container Runtimes einen 99.5% schnelleren Kaltstart als Docker und einen 94% schnelleren Start auf Serverhardware. Docker's Performance wird stark von der Kaltstartzeit beeinträchtigt, während der Durchsatz von WebAssembly Containern nicht spürbar davon beeinflusst wird. In einem Lasttest mit CPU- und I/O-gebundenen Funktionen erreichen unsere Container Runtimes das 2,4- bis 4,2-fache des Durchsatzes von Docker. Insgesamt zeigt sich WebAssembly als geeignete Alternative für Serverless Plattformen durch den leichtgewichtigen Isolationsmechanismus, der schnelle Starts ermöglicht, sowie Unterstützung für vorzeitige Kompilierung zu schnellem nativen Maschinencode. Unser Ansatz ist daher ein aussichtsreicher Schritt hin zu latenzarmem Serverless Edge Computing.

Keywords:
Serverless / Function-as-a-Service / WebAssembly / Container Runtime / Edge Computing


"Official" electronic version of the publication (accessed through its Digital Object Identifier - DOI)
http://dx.doi.org/10.34726/hss.2021.85181


Created from the Publication Database of the Vienna University of Technology.