# lesismal/nbio

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.

Repository: https://github.com/lesismal/nbio
Canonical: https://ross.abutalabs.com/products/nbio
Language: Go
License: MIT
License Family: permissive
Last push: 2026-08-09T11:42:02+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 81, longevity 100
- inputs: {"age_days": 2412, "days_push": 24, "days_rel": 50, "gap_med": 36, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2755, forks 182 (observed 2026-08-28T04:07:18.170515+00:00)

## What it is
NBIO is a pure Go non-blocking, event-driven network I/O library supporting TLS, HTTP/1.x, and WebSocket, largely compatible with net/http. It is designed for massive-connection scenarios (1M+ connections) with high performance and low memory overhead.

## Use cases
- build a websocket server handling a million concurrent connections
- write a high-performance tcp gateway or proxy in go
- replace net/http for lower memory usage under massive connections
- implement an event-driven network server in go
- build a long-lived connection push service
- reduce goroutine count and gc pressure in a go network server

## When to choose
- you need to handle hundreds of thousands to millions of concurrent connections
- you are building infrastructure like gateways or proxies where memory and GC pressure matter
- you want net/http-compatible APIs with event-driven performance
- you need websocket support with better out-of-the-box read/write design than gorilla/websocket

## When to avoid
- your application has only a regular number of connections - the standard library often outperforms nbio there
- you need maximum performance for gateway/proxy infrastructure where C/C++/Rust may be more suitable
- you want a general-purpose websocket library for ordinary connection counts - consider gws or quickws instead

## Facets
- artifact type: library
- maturity: active
- function: http-server, websocket, networking, concurrency
- domain: networking, backend, developer-tools
- platform: go, windows, cross-platform
- tags: event-driven, non-blocking-io, high-concurrency, tls, net-http-compatible, million-connections, real-time, linux, macos

## Member repositories
- lesismal/nbio (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:18.170515+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:18:51.988567+00:00, confidence not recorded.
  - readme: https://github.com/lesismal/nbio (fetched 2026-08-28T04:07:18.170515+00:00, sha 0e1a26d04f9f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
