Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. nbio

nbio

MITGov1.6.12

A high-performance, non-blocking I/O framework for Go optimized for massive connection scenarios like gateways and proxies.

GitHubGitHub
2.8k stars181 forks0 contributors

What is nbio?

NBIO is a non-blocking I/O framework written in pure Go, designed to handle massive concurrent connections with high performance and low memory overhead. It provides a scalable solution for infrastructure applications such as gateways and proxies, supporting protocols like TLS, HTTP/1.x, and WebSocket while maintaining basic compatibility with the standard net/http package.

Target Audience

Go developers building high-performance infrastructure applications like gateways, proxies, or servers that need to handle over a million concurrent WebSocket or TCP connections efficiently.

Value Proposition

Developers choose NBIO for its optimized event-driven architecture that minimizes goroutine and memory usage under massive connection loads, significantly reducing GC pressure compared to standard blocking I/O. It offers flexible I/O modes (blocking, non-blocking, mixed) to balance performance and resource usage across different connection scales.

Overview

Pure Go 1000k+ connections solution, support tls/http1.x/websocket and basically compatible with net/http, with high-performance and low memory cost, non-blocking, event-driven, easy-to-use.

Use Cases

Best For

  • Building high-performance WebSocket servers that need to support over a million concurrent connections with low memory overhead.
  • Developing scalable TCP/UDP gateways or proxies where minimizing goroutine count and GC pressure is critical.
  • Creating infrastructure applications that require efficient handling of massive concurrent connections with protocols like HTTP/1.x and TLS.
  • Implementing non-blocking I/O servers on Linux (epoll) or BSD/macOS (kqueue) platforms for high-throughput scenarios.
  • Scaling WebSocket services where maintaining memory under 1GB for a million connections with 100k TPS is a requirement.
  • Building servers that need flexible I/O modes to adapt performance characteristics based on connection load (e.g., using IOModMixed for balanced resource usage).

Not Ideal For

  • Production deployments on Windows servers, as NBIO only uses the standard net package on Windows for debugging purposes.
  • Applications with typical connection loads (e.g., under 50k concurrent connections) where the Go standard library's net/http performs better out-of-the-box.
  • Projects requiring modern HTTP protocols like HTTP/2 or HTTP/3, since NBIO is limited to HTTP/1.x support.
  • Teams looking for a simple, focused WebSocket library for regular use cases, as the author recommends alternatives like gws or quickws for better performance in non-massive scenarios.

Pros & Cons

Pros

Massive Connection Efficiency

Handles over 1 million WebSocket connections with low memory overhead—benchmarks show ~1GB memory usage for 1M connections with 100k TPS, reducing GC pressure significantly.

Flexible I/O Modes

Offers blocking, non-blocking, and mixed I/O modes (IOMod) to optimize performance and resource usage based on connection load, balancing goroutine counts and CPU/memory costs.

Cross-Platform Event Loop

Uses epoll on Linux, kqueue on BSD/macOS for high-performance non-blocking I/O, ensuring scalable event-driven architecture on supported systems.

Protocol Support with Compliance

Supports TCP, UDP, TLS, HTTP/HTTPS 1.x, and WebSocket with Autobahn Test Suite compliance, providing robust protocol handling for infrastructure apps.

Cons

Poor Standard Load Performance

The author explicitly states NBIO performs worse than the Go standard library in regular connection scenarios due to goroutine affinity and buffer reuse issues, making it suboptimal for typical use.

Limited Windows Viability

Windows support is implemented via the standard net package only for debugging, not production, restricting cross-platform deployments for high-performance needs.

Niche and Complex Use Case

NBIO's advantages are limited to massive connection scenarios like gateways/proxies, and its architecture is complex compared to simpler epoll wrappers or standard I/O, increasing learning curve.

Frequently Asked Questions

Quick Stats

Stars2,755
Forks181
Contributors0
Open Issues0
Last commit1 month ago
CreatedSince 2020

Tags

#event-driven#websocket-server#http-server#high-performance#tls#non-blocking-io#go#network-framework

Built With

G
Go

Included in

Go169.1k
Auto-fetched 10 hours ago

Related Projects

fasthttpfasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Stars23,468
Forks1,858
Last commit1 day ago
webrtcwebrtc

Pure Go implementation of the WebRTC API

Stars16,765
Forks1,882
Last commit1 day ago
cloudflaredcloudflared

Cloudflare Tunnel client

Stars15,542
Forks1,424
Last commit4 days ago
kcptunkcptun

Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.

Stars14,403
Forks2,631
Last commit5 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub