Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudwego/netpoll
A high-performance non-blocking I/O networking framework focusing on RPC scenarios.
https://github.com/cloudwego/netpoll
golang high-performance net network-programming rpc
Last synced: 3 days ago
JSON representation
A high-performance non-blocking I/O networking framework focusing on RPC scenarios.
- Host: GitHub
- URL: https://github.com/cloudwego/netpoll
- Owner: cloudwego
- License: apache-2.0
- Created: 2021-02-25T07:24:02.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-12-02T03:08:50.000Z (10 days ago)
- Last Synced: 2024-12-02T12:05:53.555Z (10 days ago)
- Topics: golang, high-performance, net, network-programming, rpc
- Language: Go
- Homepage:
- Size: 621 KB
- Stars: 4,073
- Watchers: 74
- Forks: 470
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-go - netpoll - A high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance. (Networking / Transliteration)
- zero-alloc-awesome-go - netpoll - A high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance. (Networking / Transliteration)
- my-awesome - cloudwego/netpoll - performance,net,network-programming,rpc pushed_at:2024-12 star:4.1k fork:0.5k A high-performance non-blocking I/O networking framework focusing on RPC scenarios. (Go)
- awesome-repositories - cloudwego/netpoll - A high-performance non-blocking I/O networking framework focusing on RPC scenarios. (Go)
- go-awesome - netpoll - Non-blocking I/O Net-Library focused on RPC scenarios (Open source library / The Internet)
- awesome-go - netpoll - A high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance. Stars:`4.1K`. (Networking / Transliteration)
- awesome-go-extra - netpoll - performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance.|2993|321|32|2021-02-25T07:24:02Z|2022-08-25T08:16:43Z| (Networking / Uncategorized)
README
# CloudWeGo-Netpoll
[中文](README_CN.md)
[![Release](https://img.shields.io/github/v/release/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/releases)
[![WebSite](https://img.shields.io/website?up_message=cloudwego&url=https%3A%2F%2Fwww.cloudwego.io%2F)](https://www.cloudwego.io/)
[![License](https://img.shields.io/github/license/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/blob/main/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/cloudwego/netpoll)](https://goreportcard.com/report/github.com/cloudwego/netpoll)
[![OpenIssue](https://img.shields.io/github/issues/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/issues)
[![ClosedIssue](https://img.shields.io/github/issues-closed/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/issues?q=is%3Aissue+is%3Aclosed)
![Stars](https://img.shields.io/github/stars/cloudwego/netpoll)
![Forks](https://img.shields.io/github/forks/cloudwego/netpoll)## Introduction
[Netpoll][Netpoll] is a high-performance non-blocking I/O networking framework, which
focused on RPC scenarios, developed by [ByteDance][ByteDance].RPC is usually heavy on processing logic and therefore cannot handle I/O serially. But Go's standard
library [net][net] is designed for blocking I/O APIs, so that the RPC framework can
only follow the One Conn One Goroutine design. It will waste a lot of cost for context switching, due to a large number
of goroutines under high concurrency. Besides, [net.Conn][net.Conn] has
no API to check Alive, so it is difficult to make an efficient connection pool for RPC framework, because there may be a
large number of failed connections in the pool.On the other hand, the open source community currently lacks Go network libraries that focus on RPC scenarios. Similar
repositories such as: [evio][evio], [gnet][gnet], etc., are all
focus on scenarios like [Redis][Redis], [HAProxy][HAProxy].But now, [Netpoll][Netpoll] was born and solved the above problems. It draws inspiration
from the design of [evio][evio] and [netty][netty], has
excellent [Performance](#performance), and is more suitable for microservice architecture.
Also [Netpoll][Netpoll] provides a number of [Features](#features), and it is recommended
to replace [net][net] in some RPC scenarios.We developed the RPC framework [Kitex][Kitex] and HTTP framework [Hertz][Hertz]
based on [Netpoll][Netpoll], both with industry-leading performance.[Examples][netpoll-examples] show how to build RPC client and server
using [Netpoll][Netpoll].For more information, please refer to [Document](#document).
## Features
* **Already**
- [LinkBuffer][LinkBuffer] provides nocopy API for streaming reading and writing
- [gopool][gopool] provides high-performance goroutine pool
- [mcache][mcache] provides efficient memory reuse
- `IsActive` supports checking whether the connection is alive
- `Dialer` supports building clients
- `EventLoop` supports building a server
- TCP, Unix Domain Socket
- Linux, macOS (operating system)* **Future**
- [io_uring][io_uring]
- Shared Memory IPC
- TLS
- UDP* **Unsupported**
- Windows (operating system)## Performance
Benchmark should meet the requirements of industrial use.
In the RPC scenario, concurrency and timeout are necessary support items.We provide the [netpoll-benchmark][netpoll-benchmark] project to track and compare
the performance of [Netpoll][Netpoll] and other frameworks under different conditions for reference.More benchmarks reference [kitex-benchmark][kitex-benchmark] and [hertz-benchmark][hertz-benchmark].
## Reference
* [Official Website](https://www.cloudwego.io)
* [Getting Started](docs/guide/guide_en.md)
* [Design](docs/reference/design_en.md)
* [Why DATA RACE](docs/reference/explain.md)[Netpoll]: https://github.com/cloudwego/netpoll
[net]: https://github.com/golang/go/tree/master/src/net
[net.Conn]: https://github.com/golang/go/blob/master/src/net/net.go
[evio]: https://github.com/tidwall/evio
[gnet]: https://github.com/panjf2000/gnet
[netty]: https://github.com/netty/netty
[Kitex]: https://github.com/cloudwego/kitex
[Hertz]: https://github.com/cloudwego/hertz[netpoll-benchmark]: https://github.com/cloudwego/netpoll-benchmark
[kitex-benchmark]: https://github.com/cloudwego/kitex-benchmark
[hertz-benchmark]: https://github.com/cloudwego/hertz-benchmark
[netpoll-examples]:https://github.com/cloudwego/netpoll-examples[ByteDance]: https://www.bytedance.com
[Redis]: https://redis.io
[HAProxy]: http://www.haproxy.org[LinkBuffer]: nocopy_linkbuffer.go
[gopool]: https://github.com/bytedance/gopkg/tree/develop/util/gopool
[mcache]: https://github.com/bytedance/gopkg/tree/develop/lang/mcache
[io_uring]: https://github.com/axboe/liburing