Junctiond: Extending FaaS Runtimes with Kernel-Bypass

Enrique Saurez, Joshua Fried, Gohar Irfan Chaudhry, Esha Choukse, Íñigo Goiri, Sameh Elnikety, Adam Belay, Rodrigo FonsecaarXiv 2024

TL;DR

This paper introduces junctiond, an integration of the Junction kernel-bypass system into the faasd serverless runtime. By replacing traditional Linux containers with lightweight, user-space library OS (libOS) instances and centralizing network polling, it achieves a 10x increase in throughput and a 63% reduction in tail latency without wasting CPU cores on idle functions.

What Problem Does This Paper Address?

Serverless Function-as-a-Service (FaaS) architectures are notoriously network-heavy. A single function invocation typically traverses gateways, providers, and sidecars, triggering multiple remote procedure calls (RPCs). Traditional Linux kernel networking adds significant overhead to this critical path through frequent context switches and layered processing.

While kernel-bypass networking (e.g., DPDK) eliminates this overhead by allowing applications to communicate directly with network hardware, it traditionally relies on "polling mode drivers." This means a CPU core must be completely dedicated to constantly polling the network interface card (NIC) for packets. In a FaaS environment—where thousands of distinct tenant functions are hosted simultaneously but sit idle most of the time—dedicating a polling core to every single function instance is prohibitively expensive and resource-inefficient.

Methods

The authors design and implement junctiond, which acts as a direct, drop-in replacement for the local container manager (containerd) within faasd (a lightweight, single-node OpenFaaS implementation).

Instead of sandboxing user code in standard Linux containers, junctiond deploys them within Junction instances. Junction is a libOS-based kernel-bypass system where unmodified Linux binaries run as user-level processes (uProcs) sharing a user-space network stack.

To solve the polling resource problem, Junction introduces a centralized scheduler that runs on a single reserved core. Instead of each function polling its own queues, this central scheduler busy-polls across all instances collectively. It dynamically allocates CPU cores to Junction instances based on actual traffic demand, scaling polling costs relative to active compute rather than the total number of deployed functions.

Figure 4: Extending faasd architecture with junctiond.

Additionally, the authors extended the faasd provider with a metadata caching mechanism to prevent slow container state lookups from bottlenecking the critical path.

Datasets

The system was evaluated using a serverless benchmark from the vSwarm suite: a Python/Go/C++ function that encrypts a 600-byte random input using AES. The physical testbed consisted of two machines equipped with 10-core Intel Xeon CPUs (2.2GHz), 48GB of RAM, and 100GbE NICs.

Key Insights and Ideas

  • Decoupling Polling from Instance Count: The core "aha!" moment is that kernel-bypass efficiency doesn't require a 1:1 mapping between polling cores and application instances. Centralizing the polling logic allows a single dedicated core to manage thousands of idle functions safely.
  • Hardware-Direct Multi-Tenancy: Junction delivers packets directly to specific function instances via hardware NIC queues, bypassing software switching entirely.
  • Security via Reduced Surface Area: Moving the network stack and standard OS abstractions into a user-space libOS means untrusted tenant functions rarely interact with the host kernel, significantly shrinking the security attack surface.

Key Results

  • Latency Reductions: Compared to standard containerd, junctiond reduced median end-to-end latency by 37.33% and P99 tail latency by 63.42%.
  • Throughput Scaling: Under heavy load, the Junction-backed runtime sustained 10× more throughput while lowering median latency by 2× and tail latency by 3.5×.
Figure 5: faasd [8] latency distribution as observed from the gateway for 100 sequential invocations to an AES function [23,24]. Junction significantly improves the median and tail latency.
  • Compute Efficiency: Pure function execution latency dropped by 35.3% (median) and 81% (P99), driven by better thread multiplexing and fewer context switches within the libOS.

Limitations and Future Work

  • Cold Start Evaluation: The authors did not fully evaluate end-to-end cold starts within the integrated junctiond system. However, separate isolated profiling indicated a baseline Junction instance startup cost of 3.4 ms.
  • Cache Scope: The performance-enhancing metadata cache added to the faasd provider was not evaluated in broader, non-kernel-bypass deployment contexts to isolate its specific impact.

Summary updated

BibTeX
@misc{saurez2024junctiond,
  author = {Enrique Saurez and Joshua Fried and Gohar Irfan Chaudhry and Esha Choukse and Íñigo Goiri and Sameh Elnikety and Adam Belay and Rodrigo Fonseca},
  title = {{Junctiond: Extending FaaS Runtimes with Kernel-Bypass}},
  year = {2024},
  eprint = {2403.03377},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.03377},
}
Figure