KUBEDIRECT: Unleashing the Full Power of the Cluster Manager for Serverless Computing

Sheng Qi (Peking University), Zhiquan Zhang (Peking University), Xuanzhe Liu (Peking University), Xin Jin (Peking University)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 2 · Living Large in Shared Clouds

Overview

Serverless computing—specifically Function-as-a-Service (FaaS) execution models—relies on a simple abstraction: compute scaled at function granularity. Beneath this clean interface, however, infrastructure platforms must handle complex operational burdens, including autoscaling, instance lifecycles, and runtime management. To avoid building these subsystems from scratch, many modern FaaS platforms rely on featurerich cluster managers, most notably Kubernetes. By leveraging Kubernetes, platform developers inherit robust low-level resource orchestration alongside a thriving ecosystem of extensions for service mesh routing, monitoring, and storage.

Watch on YouTube · Slides

Visual summary for KUBEDIRECT: Unleashing the Full Power of the Cluster Manager for Serverless Computing by Sheng Qi, Zhiquan Zhang, Xuanzhe Liu, Xin Jin
Visual summary for KUBEDIRECT: Unleashing the Full Power of the Cluster Manager for Serverless Computing by Sheng Qi, Zhiquan Zhang, Xuanzhe Liu, Xin Jin

Key moments

  1. 0:00 Introduction and background on serverless and Kubernetes
  2. 2:00 The centralized message passing bottleneck in Kubernetes
  3. 4:00 Introducing Kubirect and its narrow-waste optimization scope
  4. 6:00 Key properties: sequential writes and rollback tolerance
  5. 9:00 Hierarchical right-back cache and pairwise agreement models
  6. 11:00 Handling termination semantics and tombstones
  7. 12:30 Evaluation results and performance comparisons
  8. 14:00 Conclusion, limitations, and Q&A setup

KUBEDIRECT: Unleashing the Full Power of the Cluster Manager for Serverless Computing

Speakers: Sheng Qi (Peking University); Zhiquan Zhang (Peking University); Xuanzhe Liu (Peking University); Xin Jin (Peking University)

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=2gU8QUAgl-s

Overview

Serverless computing—specifically Function-as-a-Service (FaaS) execution models—relies on a simple abstraction: compute scaled at function granularity. Beneath this clean interface, however, infrastructure platforms must handle complex operational burdens, including autoscaling, instance lifecycles, and runtime management. To avoid building these subsystems from scratch, many modern FaaS platforms rely on featurerich cluster managers, most notably Kubernetes. By leveraging Kubernetes, platform developers inherit robust low-level resource orchestration alongside a thriving ecosystem of extensions for service mesh routing, monitoring, and storage.

This architectural choice introduces a fundamental conflict. Kubernetes is built on a state-centric design philosophy where cluster state is maintained as a collection of API objects, and management logic is distributed across autonomous, decoupled controllers that communicate exclusively through a centralized API server and etcd storage backend. While this architecture provides strong extensibility and loose coupling, it creates severe performance bottlenecks for bursty FaaS workloads that generate 10,000 or more instance creation requests per minute. A single upscaling call triggers a cascade of sequential state transitions across multiple controllers, with every stage writing, persisting, and notifying via the API server. Consequently, Kubernetes can take tens of seconds to provision a few hundred instances—a latency profile that easily dominates short-lived FaaS workloads whose average execution time sits around 800 milliseconds.

To resolve this tension, researchers typically choose between two extremes: clean-slate redesigns of cluster managers (such as Deyent), which sacrifice native ecosystem compatibility for monolithic performance, or vanilla Kubernetes deployments, which preserve compatibility at the cost of crippling control plane latency. This talk introduces KubeDirect, a system that bridges the gap. KubeDirect preserves full Kubernetes compatibility while bypassing the centralized message-passing bottleneck, achieving up to a 16.9x improvement in total upscaling latency.

Background

▶ Watch: Introduction and background on serverless and Kubernetes (0:00)

The architectural impedance mismatch between Kubernetes and serverless workloads stems from how cluster managers handle state. Kubernetes relies on an API server and an etcd storage backend as the single source of truth for all cluster operations. Controllers act as distributed state machines that subscribe to API objects, evaluate desired versus actual state, and publish updates back through the API server.

In a standard Kubernetes deployment running a serverless platform (such as Knative), a function invocation surge triggers a strict, sequential controller chain:

  1. The autoscaler detects increased load and requests new replicas.
  2. The deployment and replica set controllers process the configuration changes.
  3. The scheduler assigns the pods to specific nodes.
  4. The Kubelets on the cluster nodes instantiate the underlying sandboxes.

Under high-burst conditions, this pipeline saturates the API server and etcd backend. Every intermediate state transition must be persisted, rate-limited, and broadcasted to subsequent controllers. Because serverless functions have extremely short lifetimess—often under a second—control plane queuing delays inflate tail latency and dwarf actual execution time. Although data plane components (such as lightweight sandboxes) have been heavily optimized to start in mere milliseconds, the control plane remains the primary performance bottleneck.

Prior attempts to solve this problem focused on clean-slate architectures. While monolithic control planes eliminate distributed coordination overhead, they abandon the vast Kubernetes ecosystem, requiring extensive engineering effort to replicate features like monitoring, security policies, and networking extensions. KubeDirect avoids this trade-off by analyzing the structural properties of the control plane pipeline itself, targeting optimizations directly at the intersection of performance and compatibility.

Key Findings

▶ Watch: Introducing Kubirect and its narrow-waste optimization scope (4:00)

KubeDirect demonstrates that legacy cluster managers can be successfully retrofitted for high-performance serverless workloads without sacrificing compatibility. Evaluated on an 80-node CloudLab cluster, KubeDirect yields substantial performance gains across both microbenchmarks and end-to-end traces:

  • Upscaling Latency: KubeDirect improves total upscaling latency by 3.7x to 16.9x compared to vanilla Kubernetes across various burst sizes.
  • Controller Bottleneck Removal: Microbenchmark latency breakdowns confirm that direct message passing successfully removes the API server and etcd serialization overhead from the critical path of the controller chain.
  • End-to-End Performance: Using a 30-minute clip from the production Azure Functions trace, KubeDirect reduces per-function scheduling delay by 26.7 times compared to standard Knative variants, achieving performance parity with state-of-the-art clean-slate systems like Deyent.
  • Lightweight Failure Recovery: Emulated crash-recovery experiments demonstrate that cache invalidation handshakes remain cheap and scalable across multi-point failures, avoiding stale upstream state replays.

Technical Deep Dive

▶ Watch: Hierarchical right-back cache and pairwise agreement models (9:00)

The core insight behind KubeDirect is that Kubernetes-based FaaS platforms share a common structural bottleneck termed the "narrow waist." This narrow waist consists of the sequential controller chain spanning from the autoscaler down to the Kubelet. This segment dominates critical-path latency while remaining cleanly separated from external client submissions and third-party extensions.

Inside this narrow waist, KubeDirect exploits two key properties that make API server bypassing viable:

  1. Sequentiality: Controllers in the narrow waist operate in a stage-by-stage chain where each stage has a single authoritative writer, eliminating the need for centralized conflict resolution via the API server.
  2. Rollback Tolerance: Intermediate half-provisioned function instances are fungible and invisible to external observers. If an intermediate state is lost, the platform can simply instantiate an equivalent replacement without violating external semantics.

To replace centralized coordination without relying on traditional chain replication (which fails in this context due to heterogeneous, non-idempotent controller updates), KubeDirect introduces a hierarchical rightback cache governed by pairwise agreements.

Instead of treating upstream configurations as the ultimate source of truth, KubeDirect treats the downstream size as the actual source of truth, feeding downstream state backward to maintain consistency. Two types of invalidation signals enforce this model:

  • Hard Invalidation: Triggered upon disconnect or crash. It forcefully rolls back the state using a synchronous handshake to re-establish agreement based on downstream truth.
  • Soft Invalidation: Used during active connections to carry incremental changes asynchronously as feedback.

For asymmetric life-cycle semantics—specifically instance termination, where rollbacks are impermissible—KubeDirect employs tombstones. A tombstone replicates termination intent downstream. Because termination is inherently idempotent, KubeDirect safely adopts chain replication semantics here, garbage-collecting tombstones lazily only upon receiving downstream confirmation.

From an implementation standpoint, KubeDirect is minimally intrusive. Each controller in the narrow waist is retrofitted with an extra pair of ingress and egress modules for forward propagation and backward invalidation, requiring only about 150 lines of code changes per controller. Dynamic attribute filtering further minimizes payload sizes during state exchange.

Experimental Setup & Results

▶ Watch: Handling termination semantics and tombstones (11:00)

The evaluation of KubeDirect was conducted on an 80-node CloudLab cluster. The experimental evaluation spans three main axes: microbenchmarks measuring controller stage latency, end-to-end platform comparisons using real-world traces, and failure-recovery overhead tests.

  • Baselines: The system was evaluated against vanilla Kubernetes at the cluster manager level, and against standard Knative as well as the clean-slate monolithic system Deyent at the platform level.
  • Workloads: Microbenchmarks tested varying burst scales, while end-to-end evaluations utilized a 30-minute workload extracted from the public Azure Functions trace to simulate realistic, bursty invocation patterns.
  • Headline Numbers: KubeDirect achieved a 3.7x to 16.9x speedup in total upscaling latency over vanilla Kubernetes. In end-to-end Knative deployments, per-function scheduling delays dropped by 26.7x, matching the performance of custom clean-slate architectures while retaining standard Kubernetes API compliance.
  • Ablations & Recovery: Crash-recovery overhead was tested by artificially forcing controller state resets. The evaluation confirmed that batched and parallelized cache invalidation handshakes maintain low recovery overhead even under multi-point failures.

Practical Implications

▶ Watch: Conclusion, limitations, and Q&A setup (14:00)

For infrastructure teams and platform engineers, KubeDirect demonstrates that high-performance serverless computing does not require abandoning mainstream cluster orchestration frameworks. By isolating optimizations to the internal controller chain, organizations can retain out-of-the-box compatibility with critical extensions such as Prometheus for monitoring and Istio or other service meshes for networking.

However, engineers must account for two key architectural tradeoffs and limitations:

  1. Reduced Observability: Because KubeDirect bypasses the central API server for intermediate state exchanges within the narrow waist, internal transient state transitions are no longer exposed through standard Kubernetes API query mechanisms.
  2. Security Boundaries: The fast-path optimization bypasses standard API server authentication and authorization checks along the internal control path. Consequently, KubeDirect is intended for trusted platform environments where the serverless control plane itself secures the underlying cluster manager from untrusted or malicious workloads.

Key Takeaways

  • The Narrow Waist Optimization: Serverless performance bottlenecks in Kubernetes are concentrated in a predictable, sequential controller chain that can be optimized independently of external APIs.
  • Downstream-Driven Consistency: Replacing centralized etcd coordination with hierarchical rightback caches and downstream-driven truth eliminates message-passing bottlenecks.
  • Compatibility without Compromise: KubeDirect achieves performance comparable to clean-slate monolithic engines (like Deyent) while preserving native Kubernetes ecosystem integrations.
  • Lightweight Invalidation Primitives: Hard and soft invalidation handshakes handle disconnections, crashes, and rollbacks with minimal overhead and approximately 150 lines of code modifications per controller.
  • Security & Observability Tradeoffs: Bypassing the API server improves throughput and latency but sacrifices internal intermediate visibility and strips out-of-the-box API authentication along the optimized path.

About the Speaker(s)

The research presented was conducted by a team from Peking University, featuring Sheng Qi, Zhiquan Zhang, Xuanzhe Liu, and Xin Jin. The authors specialize in distributed systems, computer architecture, and systems infrastructure for cloud computing and AI workloads, focusing on reconciling high-performance systems design with practical software compatibility.

Reviews

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)