finds.dev← search

// the find

lesismal/nbio

★ 2,745 · Go · MIT · updated Jun 2026

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.

nbio is a pure-Go non-blocking I/O engine built on epoll/kqueue, designed for servers that need to hold hundreds of thousands of simultaneous connections without a goroutine-per-connection model. It handles TCP/UDP/TLS/HTTP1.x/WebSocket under one API and is broadly compatible with net/http. The target is infrastructure-level code — gateways, proxies, real-time messaging backends — not typical web services.

The README is unusually honest: the author explicitly recommends competing libraries (gws, quickws) for ordinary WebSocket workloads and admits nbio loses to the standard library in low-connection scenarios. That kind of candor is rare and earns trust. The 1M-connection benchmark is reproducible and specific — hardware, CPU pinning, taskset, and raw numbers all provided, not a vague 'blazing fast' claim. The IOMod system (NonBlocking / Blocking / Mixed) is a practical design: you can tune connection handling strategy without rewriting your server, and Mixed mode lets you stay performant across a wide range of online counts. The WebSocket implementation passes the Autobahn test suite and guarantees OnOpen/OnMessage/OnClose ordering, which gorilla/websocket users have historically had to enforce themselves.

HTTP/2 is absent — the project is HTTP/1.x only, which is a hard blocker for anything modern that expects multiplexing or server push. Windows support exists only as a fallback on top of the standard library, explicitly flagged as 'for debugging only', so cross-platform deployment is not a real option. The codebase has essentially one maintainer; with ~2700 stars and no corporate backing, bus-factor risk is real for infrastructure you'd run in production. The mixed-mode API adds config surface area (MaxBlockingOnline, BlockingModAsyncWrite, etc.) that requires understanding the internals to tune correctly — the docs don't give enough guidance on what values to use and why.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →