menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Technology News

>

NimbusNet:...
source image

Hackernoon

2w

read

168

img
dot

Image Credit: Hackernoon

NimbusNet: Building a High‑Performance Echo & Chat Server Across Boost.Asio and Io_uring

  • NimbusNet presents a cross-platform echo & chat server that scales across various devices, utilizing Boost.Asio and io_uring for enhanced performance.
  • The project includes implementations for Boost.Asio baseline, UDP, and io_uring, aiming to bridge the gap with DPDK-style kernel-bypass while maintaining a single, readable codebase.
  • Boost.Asio enables running the server on macOS, Windows, and CI containers, while UDP reduces latency by eliminating TCP's ordering overhead.
  • By leveraging io_uring on Linux, NimbusNet achieves sub-25 µs round-trip times without requiring kernel patches or CAPNETRAW limitations.
  • Benchmarking was conducted on different platforms like macOS (Boost.Asio), Ubuntu (Boost.Asio, io_uring), and GitHub Actions for CI builds and tests.
  • TCP's reliability mechanisms like 3-way handshake and retransmit queues are contrasted with UDP's 'best-effort but immediate' approach for lower latency in chats or market data transmissions.
  • Switching from TCP to UDP can result in sub-50 µs median latencies even before implementing kernel-bypass techniques.
  • The introduction of io_uring in Linux 5.1 and its subsequent improvements offer a low-overhead pathway to achieve kernel-bypass functionality.
  • The article showcases code snippets for Boost.Asio TCP echo, Boost.Asio UDP echo, and an io_uring TCP echo server to demonstrate different implementations.
  • By running benchmarks using Google Benchmarks, the article quantifies the latency improvements, with io_uring TCP outperforming Boost.Asio TCP and UDP significantly.

Read Full Article

like

10 Likes

For uninterrupted reading, download the app