TSoR: TCP Socket over RDMA Container Network for Cloud Native Computing

Yulin Sun, Qingming Qu, Chenxingyu Zhao, Arvind Krishnamurthy, Hong Chang, Ying XiongarXiv 2023

Abstract

Cloud-native containerized applications constantly seek high-performance and easy-to-operate container network solutions. RDMA network is a potential enabler with higher throughput and lower latency than the standard TCP/IP network stack. However, several challenges remain in equipping containerized applications with RDMA network: 1) How to deliver transparent improvements without modifying application code; 2) How to integrate RDMA-based network solutions with container orchestration systems; 3) How to efficiently utilize RDMA for container networks. In this paper, we present an RDMA-based container network solution, TCP Socket over RDMA (TSoR), which addresses all the above challenges. To transparently accelerate applications using POSIX socket interfaces without modifications, we integrate TSoR with a container runtime that can intercept system calls for socket interfaces. To be compatible with orchestration systems like Kubernetes, TSoR implements a container network following the Kubernetes network model and satisfies all requirements of the model. To leverage RDMA benefits, TSoR designs a high-performance network stack that efficiently transfers TCP traffic using RDMA network. Thus, TSoR provides a turn-key solution for existing Kubernetes clusters to adopt the high-performance RDMA network with minimal effort. Our evaluation results show that TSoR provides up to 2.3x higher throughput and 64% lower latency for existing containerized applications, such as Redis key-value store and Node.js web server, with no code changes.

Introduction

In the world of cloud-native computing, containers are the gold standard for deployment. However, as we push for higher performance in data-intensive applications like AI and real-world databases, the traditional Linux kernel TCP/IP stack has become a significant bottleneck. While Remote Direct Memory Access (RDMA) offers a high-speed, kernel-bypassing alternative, it has historically been difficult to integrate into containerized environments without rewriting applications.

Modern cloud applications demand massive throughput and microsecond-level latency. Traditional networking relies on the kernel's TCP/IP stack, which involves heavy CPU overhead and multiple data copies. RDMA solves this by allowing hardware-offloaded data transfers that bypass the kernel entirely. However, adopting RDMA in a cloud-native environment faces three major hurdles: transparency for existing POSIX socket applications, orchestration compatibility with models like Kubernetes, and scalability of RDMA hardware connections.

System Architecture

TSoR is designed as a high-performance container networking solution that allows standard, unmodified applications to run over RDMA networks. The system consists of three main components: a TSoR Service, a TSoR Client, and a TSoR Gateway.

Overview of the TSoR cluster architecture and node components.

To solve the RDMA scalability issue, TSoR does not create a new RDMA connection for every single TCP socket. Instead, it creates one long-lived, high-speed RDMA "tunnel" between physical nodes and multiplexes many virtual TCP connections through it. This "pre-established" approach makes connection setup nearly instantaneous, avoiding the millisecond-level delays typically associated with RDMA connection setup.

Implementation Details

The core innovation of TSoR lies in its transparent syscall interception and efficient data path. TSoR leverages the Quark secure container runtime to intercept standard socket functions (like connect() or write()).

Detailed data path of TSoR showing syscall interception and RDMA transfer.

As shown in the data path, the TSoR Client (inside the container) and the TSoR Service (on the host) communicate via lock-free shared memory queues (SQ/CQ). This eliminates the need for expensive context switches between the container and the host kernel. Furthermore, TSoR employs signal coalescing to reduce overhead: it only sends a "signal" to the service when the data buffer was previously empty. By mapping application shared buffers directly to RDMA-registered memory regions, TSoR minimizes data movement, achieving near zero-copy performance.

Evaluation

The researchers evaluated TSoR using a testbed of x86 servers connected via a 100Gbps RDMA-capable network. Performance gains were substantial across both microbenchmarks and real-world applications:

  • Throughput: For a 64KB message size, TSoR achieved 34.3 Gbps, outperforming standard "host-mode" networking.
  • Latency: For small 64-byte messages, TSoR hit a latency of 9.3μs, a 70% reduction compared to standard runC containers.
  • Application Performance: Redis handled 2.3x more Requests Per Second (RPS) for SET operations. Node.js web servers saw a 44% reduction in latency and a 3.11x increase in throughput for 64KB document transfers.

Conclusion

TSoR demonstrates that the high performance of RDMA can be brought to standard containerized applications without code modifications. By integrating with the Kubernetes ecosystem and utilizing secure runtime interception, TSoR provides a practical path for cloud-native environments to bypass the traditional TCP/IP bottleneck. Future work includes offloading the TSoR Service logic to SmartNICs to further reduce host CPU overhead and expanding optimized support for UDP traffic.

Summary updated

BibTeX
@misc{sun2023tsor,
  author = {Yulin Sun and Qingming Qu and Chenxingyu Zhao and Arvind Krishnamurthy and Hong Chang and Ying Xiong},
  title = {{TSoR: TCP Socket over RDMA Container Network for Cloud Native Computing}},
  year = {2023},
  eprint = {2305.10621},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.10621},
}
Figure