Table of Contents
Fetching ...

Roadrunner: Accelerating Data Delivery to WebAssembly-Based Serverless Functions

Cynthia Marcelino, Thomas Pusztai, Stefan Nastic

TL;DR

Roadrunner tackles the data transfer bottlenecks in WebAssembly based serverless functions by introducing a sidecar shim that enables near-zero copy and serialization-free data exchange across intra- and inter-node boundaries. It leverages direct memory access within Wasm linear memory, kernel mediated IPC, and network buffers with zero-copy syscalls to minimize data movement and context switching, delivering substantial latency reductions and throughput gains. The framework is implemented in Rust as an OCI compliant open source component and demonstrates up to 89% latency reduction and up to 69x throughput improvement over Wasm baselines, with favorable intra-node resource efficiency. By preserving sandbox isolation and compatibility with existing serverless runtimes, Roadrunner promises practical impact for data-intensive edge-cloud workflows while outlining security considerations and interoperability with current platforms.

Abstract

Serverless computing provides infrastructure management and elastic auto-scaling, therefore reducing operational overhead. By design serverless functions are stateless, which means they typically leverage external remote services to store and exchange data. Transferring data over a network typically involves serialization and deserialization. These operations usually require multiple data copies and transitions between user and kernel space, resulting in overhead from context switching and memory allocation, contributing significantly to increased latency and resource consumption. To address these issues, we present Roadrunner, a sidecar shim that enables near-zero copy and serialization-free data transfer between WebAssembly-based serverless functions. Roadrunner reduces the multiple copies between user space and kernel space by mapping the function memory and moving the data along a dedicated virtual data hose, bypassing the costly processes of serialization and deserialization. This approach reduces data movement overhead and context switching, achieving near-native latency performance for WebAssembly-based serverless functions. Our experimental results demonstrate that Roadrunner significantly improves the inter-function communication latency from 44% up to 89%, reducing the serialization overhead in 97% of data transfer, and increasing throughput by 69 times compared to state-of-the-art WebAssembly-based serverless functions.

Roadrunner: Accelerating Data Delivery to WebAssembly-Based Serverless Functions

TL;DR

Roadrunner tackles the data transfer bottlenecks in WebAssembly based serverless functions by introducing a sidecar shim that enables near-zero copy and serialization-free data exchange across intra- and inter-node boundaries. It leverages direct memory access within Wasm linear memory, kernel mediated IPC, and network buffers with zero-copy syscalls to minimize data movement and context switching, delivering substantial latency reductions and throughput gains. The framework is implemented in Rust as an OCI compliant open source component and demonstrates up to 89% latency reduction and up to 69x throughput improvement over Wasm baselines, with favorable intra-node resource efficiency. By preserving sandbox isolation and compatibility with existing serverless runtimes, Roadrunner promises practical impact for data-intensive edge-cloud workflows while outlining security considerations and interoperability with current platforms.

Abstract

Serverless computing provides infrastructure management and elastic auto-scaling, therefore reducing operational overhead. By design serverless functions are stateless, which means they typically leverage external remote services to store and exchange data. Transferring data over a network typically involves serialization and deserialization. These operations usually require multiple data copies and transitions between user and kernel space, resulting in overhead from context switching and memory allocation, contributing significantly to increased latency and resource consumption. To address these issues, we present Roadrunner, a sidecar shim that enables near-zero copy and serialization-free data transfer between WebAssembly-based serverless functions. Roadrunner reduces the multiple copies between user space and kernel space by mapping the function memory and moving the data along a dedicated virtual data hose, bypassing the costly processes of serialization and deserialization. This approach reduces data movement overhead and context switching, achieving near-native latency performance for WebAssembly-based serverless functions. Our experimental results demonstrate that Roadrunner significantly improves the inter-function communication latency from 44% up to 89%, reducing the serialization overhead in 97% of data transfer, and increasing throughput by 69 times compared to state-of-the-art WebAssembly-based serverless functions.

Paper Structure

This paper contains 38 sections, 10 figures, 1 table, 1 algorithm.

Figures (10)

  • Figure 1: Overview of standard data transfer between Serverless functions and Roadrunner communication models: a) Standard HTTP Data Passing between functions with Serialization/Deserialization, b) User Space Data Transfer, c) Kernel Space Data Transfer between Serverless functions, serialization-free, and d) Serialization-free Network Data Transfer.
  • Figure 2: Cold start and execution latency (a), and normalized I/O breakdown (b) for functions using Docker Containers (Cont) and Wasm. (a) shows Wasm lowers cold starts for both "Hello World" (no WASI) and "Resize Image" (with WASI), though WASI increases execution time. (b) compares transfer and serialization overhead across various input sizes.
  • Figure 3: Roadrunner data access structured layers for data interactions on the left side and linear memory mapping of Wasm VM for addressable data access on the right side.
  • Figure 4: a) User-space memory-based data transfer between Wasm serverless functions (modules) using Roadrunner's APIs for allocation, reading, and writing into Wasm linear memory. b) Kernel Space Data transfer where the shim leverages IPC to enable serialization-free data transfer.
  • Figure 5: Network-based data transfer with near-zero copy mechanisms, mapping user-space memory into kernel buffers to optimize throughput and minimize latency.
  • ...and 5 more figures