whatisgithub

What is netpoll?

cloudwego/netpoll — explained in plain English

Analysis updated 2026-06-26

4,563GoAudience · developerComplexity · 4/5Setup · hard

In one sentence

A high-performance Go networking library from ByteDance that handles thousands of simultaneous connections using an event-driven model instead of a goroutine-per-connection, built as the networking foundation for the Kitex RPC and Hertz HTTP frameworks.

Mindmap

mindmap
  root((Netpoll))
    What it does
      Event-driven networking
      High-connection handling
      Zero-copy IO
    Tech Stack
      Go
      Linux
      macOS
    Use Cases
      RPC frameworks
      HTTP frameworks
      High-load services
    Audience
      Go developers
      Systems engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a high-throughput Go RPC server that handles thousands of simultaneous connections without wasting memory on idle goroutines.

USE CASE 2

Replace Go's standard net package in a latency-sensitive microservice to reduce goroutine-switching overhead under heavy load.

USE CASE 3

Use Netpoll as the networking layer when building your own RPC or HTTP framework in Go.

What is it built with?

Go

How does it compare?

cloudwego/netpolldouyu/jupitercharmbracelet/freeze
Stars4,5634,5634,557
LanguageGoGoGo
Setup difficultyhardmoderateeasy
Complexity4/54/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Linux or macOS only, Windows is not supported. Best used as a foundation for a larger framework rather than as a standalone network library.

So what is it?

Netpoll is a Go networking library built by ByteDance, the company behind TikTok, specifically for handling the kind of high-volume internal communication that happens between services in large software systems. That communication pattern, where many services constantly send small requests to each other, is called RPC (remote procedure call), and it has specific performance requirements that Go's built-in networking tools are not well suited for. The core problem is that Go's standard networking library is designed around a model where each connection ties up a thread-like structure called a goroutine while it waits for data. Under high load, this means thousands or millions of goroutines sitting idle waiting, which wastes memory and processing time just switching between them. Netpoll takes a different approach: it handles many connections without dedicating a goroutine to each one, using an event-driven model where the system only acts when data actually arrives. This approach borrows design ideas from similar tools in other languages, notably Netty from the Java world and evio from Go. Netpoll adds features that are specifically useful for RPC workloads: a way to read and write data without copying it in memory, a pool of goroutines that can be reused instead of created fresh for each task, and a way to check whether a connection is still alive before using it. Netpoll is the foundation for two other ByteDance open-source projects: Kitex, an RPC framework, and Hertz, an HTTP framework. Both use Netpoll as their networking layer and are described as having industry-leading performance benchmarks. The library runs on Linux and macOS. Windows is not supported. The README links to benchmark projects and design documentation for readers who want to go deeper.

Copy-paste prompts

Prompt 1
I'm building a high-load RPC service in Go. Show me how to use Netpoll to accept connections and handle requests without creating a new goroutine for every connection.
Prompt 2
Using Netpoll in Go, how do I use the zero-copy reader and writer to process incoming request data without extra memory allocation?
Prompt 3
I want to use Netpoll's goroutine pool to handle requests efficiently. Show me how to configure the pool size and attach it to a connection handler.

Frequently asked questions

What is netpoll?

A high-performance Go networking library from ByteDance that handles thousands of simultaneous connections using an event-driven model instead of a goroutine-per-connection, built as the networking foundation for the Kitex RPC and Hertz HTTP frameworks.

What language is netpoll written in?

Mainly Go. The stack also includes Go.

How hard is netpoll to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is netpoll for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.