Remote TCP Connection Offload and Applications

Shuo Li (University of Edinburgh), Steven Chien (University of Edinburgh), Tianyi Gao (University of Edinburgh), Michio Honda (University of Edinburgh)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 1 · Clouds with Benefits

Overview

Modern cloud-scale data centers rely heavily on hierarchical load balancing to manage massive volumes of client traffic. While Layer 4 load balancers operate efficiently at flow granularity, Layer 7 load balancers (L7 LBs) are indispensable for inspecting request payloads, handling Transport Layer Security (TLS) termination, and routing traffic based on application-level content. However, traditional L7 LBs act as persistent bottlenecks and single points of congestion because every ingress and egress packet must traverse the proxy's complex data path, crossing kernel and user-space boundaries multiple times while consuming precious CPU cycles and network bandwidth.

Watch on YouTube · Slides

Visual summary for Remote TCP Connection Offload and Applications by Shuo Li, Steven Chien, Tianyi Gao, Michio Honda
Visual summary for Remote TCP Connection Offload and Applications by Shuo Li, Steven Chien, Tianyi Gao, Michio Honda

Key moments

  1. 0:00 Introduction to Layer 7 load balancers and XO
  2. 3:58 How XO works: Connection offload and direct server return
  3. 6:03 Design highlight: Software-hardware hybrid packet redirection
  4. 8:00 Design highlight: User-space cancelable command queue
  5. 9:59 Application porting experience with NGINX and Ceph
  6. 12:00 Performance evaluation and throughput comparisons
  7. 15:20 Consolidated TCP state serialization system calls
  8. 17:39 Deployment implications, limitations, and summary

Remote TCP Connection Offload and Applications

Speakers: Shuo Li (University of Edinburgh); Steven Chien (University of Edinburgh); Tianyi Gao (University of Edinburgh); Michio Honda (University of Edinburgh)

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=l2qb_kEUkM4

Overview

Modern cloud-scale data centers rely heavily on hierarchical load balancing to manage massive volumes of client traffic. While Layer 4 load balancers operate efficiently at flow granularity, Layer 7 load balancers (L7 LBs) are indispensable for inspecting request payloads, handling Transport Layer Security (TLS) termination, and routing traffic based on application-level content. However, traditional L7 LBs act as persistent bottlenecks and single points of congestion because every ingress and egress packet must traverse the proxy's complex data path, crossing kernel and user-space boundaries multiple times while consuming precious CPU cycles and network bandwidth.

This talk introduces XO, a novel system designed to achieve remote TCP connection offload and streamline L7 load balancing. Developed by researchers at the University of Edinburgh, XO allows an L7 LB to inspect an initial client request, terminate the TLS/TCP handshake, select an appropriate backend server, and then serialize and migrate the active connection state directly to that backend. Crucially, XO implements packet-level redirection rules so that subsequent packets bypass the L7 LB entirely via Direct Server Return (DSR), flowing straight from the backend server back to the client.

The significance of XO lies in its ability to dramatically reduce CPU utilization at the load balancer and eliminate redundant network bandwidth amplification without requiring radical, non-standard application rewrites. By preserving standard Linux kernel socket APIs and file descriptor semantics, XO bridges the gap between high-performance connection migration architectures and real-world deployability, marking a major step forward in cloud networking systems design.

Background

▶ Watch: Introduction to Layer 7 load balancers and XO (0:00)

In cloud environments, L7 proxies like Nginx or application-specific gateways provide advanced routing, content transformation, and security inspection. As microservices architectures proliferate, the volume of traffic handled by these proxies explodes. Traditional proxy architectures trap data in a rigid path: packets ingress through the network interface card (NIC), traverse the operating system kernel stack, cross into user space where the proxy process decrypts TLS streams, parses HTTP/HTTPS headers, evaluates routing policies, and forwards the request to a backend server on a separate connection.

This multi-hop paradigm creates severe architectural inefficiencies. First, the L7 LB becomes a heavy resource consumer, often saturating its CPU cores on TLS decryption and proxying overhead rather than productive compute. Second, return traffic (egress) typically routes back through the proxy, doubling the network bandwidth consumed across internal datacenter links.

Prior research has attempted to mitigate these bottlenecks using programmable network hardware or connection migration strategies. Systems like Prism and Capiara explored connection migration, but they frequently relied on specialized programmable switches that are inaccessible to typical host applications, lacked complete TLS integration, or demanded invasive application modifications that prevented them from being ported to production systems. Furthermore, purely software-based connection handoff schemes introduce latency and scalability limits. XO was built to solve these exact gaps by combining software-flexible redirection with hardware-accelerated NIC offloading, all while maintaining compatibility with unmodified Linux networking primitives.

Key Findings

▶ Watch: Design highlight: Software-hardware hybrid packet redirection (6:03)

The evaluation of XO demonstrates that remote TCP connection offload can fundamentally alter the performance profile of L7 load balancing tiers. Key findings from the research include:

  • Massive CPU Offloading: XO successfully relieves the L7 LB of heavy data-plane responsibilities, shifting payload transmission directly to backend servers via DSR and dropping proxy CPU utilization significantly under sustained traffic.
  • Throughput Multipliers: By eliminating the proxy bottleneck, overall cluster throughput for applications like Nginx and the distributed object storage system Safis increases substantially compared to conventional proxy architectures.
  • Payload-Dependent Sweet Spots: The optimal redirection mechanism depends heavily on request size and state transfer frequency. Pure software redirection excels at tiny objects due to zero hardware configuration latency, whereas hardware-accelerated TC (Traffic Control) flower rules dominate for larger payloads.
  • Kernel API Overhead: Unmodified Linux kernel stacks introduce measurable serialization overhead due to multiple system calls and socket locks, prompting the design of a consolidated single system call that dramatically accelerates connection state handoff.

Technical Deep Dive

▶ Watch: Application porting experience with NGINX and Ceph (9:59)

XO’s architecture hinges on a clean protocol handoff lifecycle and a hybrid hardware-software redirection engine. When a client initiates a TLS/TCP connection, the L7 LB accepts the connection, decrypts the payload, and reads the HTTP request. Based on content-aware routing logic, the proxy selects an optimal backend server. It then serializes the active TCP/TLS connection state and transfers it to the selected backend over the internal network.

To eliminate future proxy involvement, the L7 LB installs a packet redirection rule at the ingress data path. XO implements a software-hardware hybrid packet redirection scheme to balance installation latency and forwarding performance:

  1. eBPF (Extended Berkeley Packet Filter): XO installs an initial redirection rule into an eBPF map residing in shared memory. This software-level path initializes instantly because it bypasses hardware reconfiguration, enabling immediate packet steering. However, processing packets purely through eBPF consumes CPU cycles.
  2. TC Flower with NIC Offload: Concurrently, XO provisions a hardware-level rule using TC flower offloaded directly to the smart NIC (evaluated using Nvidia ConnectX-5 and Netronome Agilio smart NICs). Once the hardware rule becomes active, incoming packets are redirected at line rate directly by the NIC silicon without engaging host CPU cycles.

Because servers may occasionally need to return a connection back to the L7 LB—such as when a backend becomes overloaded or lacks requested content—system states must be fully reversible. However, withdrawing hardware TC flower rules can suffer from serialization delays in the kernel command queue. If a connection is migrated back while a hardware insertion command is still pending, packets may be misrouted. XO solves this via a cancelable command queue positioned in user space. Worker threads push role commands into a multi-producer, single-consumer queue, allowing a dedicated thread to pop and purge obsolete commands before they hit the NIC hardware.

To maximize deployability, XO deliberately preserves the standard Linux kernel TCP/IP stack. However, standard Linux APIs require multiple system calls to serialize and restore socket states, forcing separate socket locking operations. XO addresses this by implementing a consolidated TCP state serialization and restoration system call, compressing these operations into a single atomic kernel entry that drastically reduces handoff latency.

Experimental Setup & Results

▶ Watch: Performance evaluation and throughput comparisons (12:00)

The authors evaluated XO using a testbed comprising real-world applications and smart NIC hardware. The evaluation benchmarked two distinct real-world systems ported to XO:

  • Nginx: Configured as a reverse proxy with replicated backends.
  • Safis: A distributed object storage system featuring partitioned backend servers.

Hardware platforms tested include hosts equipped with Nvidia ConnectX-5 NICs (XO CX5) and Netronome Agilio NICs (XO Agilio), evaluated against a conventional software proxy baseline and an eBPF-only software variant (XO eBPF).

  • Small Objects & State Transfer Frequency: When state transfer occurs on every single request, XO eBPF outperforms hardware-backed variants on small objects (e.g., payloads under 128 KB) because pure software rule installation avoids the latency penalty of hardware NIC reconfiguration. For objects sized 2048 KB and larger, XO Agilio and XO CX5 overtake the eBPF variant due to hardware-accelerated wire-speed redirection. Netronome Agilio demonstrated faster hardware reconfiguration times compared to the ConnectX-5 in these benchmarks.
  • Latency Breakdown: The baseline TCP state serialization and restoration overhead measures approximately 225 microseconds (excluding hardware reconfiguration). Integrating the consolidated single system call visibly shifts performance curves upward, yielding higher throughput and lower tail latency across all payload tiers.
  • Resource Utilization: While small-object workloads with high state-transfer frequencies impose initial CPU overhead during handoffs, XO consistently reduces L7 LB CPU utilization across stable connections while simultaneously driving higher aggregate throughput to backend servers. Safis and Nginx both demonstrated higher CPU utilization at the backend tier relative to vanilla configurations, directly correlating with the increased transaction volume enabled by the bypassed proxy bottleneck.

Practical Implications

▶ Watch: Deployment implications, limitations, and summary (17:39)

For infrastructure teams and cloud architects, XO provides a compelling blueprint for scaling ingress tiers without ripping out existing application logic. By retaining standard POSIX socket APIs and file descriptor semantics, XO avoids the prohibitive engineering friction associated with kernel-bypass networking stacks, making it practical to port complex proxy and storage systems like Nginx and Safis.

Nevertheless, deployers must navigate specific tradeoffs and limitations:

  • Virtualization Boundaries: In bare-metal environments, TC flower hardware offload performs optimally. In virtualized cloud instances (VMs), direct hardware offload is typically constrained unless SR-IOV or direct NIC pass-through is exposed to the guest OS. In purely virtualized environments, deployers must rely on the eBPF-only software forwarding mode, which trades off peak throughput for software portability.
  • Congestion Control State: Current implementations do not migrate TCP congestion control parameters (such as congestion window size and measured RTT) because standard Linux kernels lack clean APIs for serializing these internal variables. Consequently, migrated connections temporarily enter slow start upon handoff. The authors note that this represents a conservative performance estimate, leaving congestion state migration as vital future work.

Key Takeaways

  • Proxy Bypass via DSR: XO eliminates the traditional L7 load balancer bottleneck by migrating active TCP/TLS connections to backend servers and routing return traffic directly to clients.
  • Hybrid Redirection Engine: Combining instant-setup eBPF software maps with line-rate TC flower hardware NIC offloading captures the best of both low-latency rule installation and zero-CPU packet forwarding.
  • User-Space Cancelable Queues: Moving hardware command queues to user space prevents race conditions and stale packet redirection when connections rapidly migrate back to the proxy.
  • Unmodified Kernel Compatibility: By preserving standard Linux kernel socket APIs, XO successfully ports complex real-world software like Nginx and Safis without invasive application rewrites.
  • Consolidated System Calls: Merging TCP state serialization and restoration into a single custom system call successfully eliminates socket-locking overhead and accelerates connection handoff.

About the Speaker(s)

Shuo Li is a researcher at the University of Edinburgh presenting work co-authored with colleagues Steven Chien, Tianyi Gao, and Michio Honda, who is also based at the University of Edinburgh. Their collective research focuses on operating systems, cloud networking infrastructure, and high-performance data center systems architecture.

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)