{"id":13413624,"url":"https://github.com/cloudwego/netpoll","last_synced_at":"2025-05-12T05:29:17.486Z","repository":{"id":36966670,"uuid":"342158146","full_name":"cloudwego/netpoll","owner":"cloudwego","description":"A high-performance non-blocking I/O networking framework focusing on RPC scenarios.","archived":false,"fork":false,"pushed_at":"2025-04-24T09:40:08.000Z","size":638,"stargazers_count":4284,"open_issues_count":25,"forks_count":472,"subscribers_count":72,"default_branch":"develop","last_synced_at":"2025-05-12T04:07:52.457Z","etag":null,"topics":["golang","high-performance","net","network-programming","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudwego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-25T07:24:02.000Z","updated_at":"2025-05-12T03:30:01.000Z","dependencies_parsed_at":"2023-10-20T18:57:54.451Z","dependency_job_id":"e29a32f9-8a76-4ac1-9b67-b519154d4c43","html_url":"https://github.com/cloudwego/netpoll","commit_stats":{"total_commits":136,"total_committers":33,"mean_commits":4.121212121212121,"dds":0.6029411764705883,"last_synced_commit":"3e411b105a0b7672cda9c0e3ca682b9d8e5b5f8c"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fnetpoll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fnetpoll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fnetpoll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fnetpoll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudwego","download_url":"https://codeload.github.com/cloudwego/netpoll/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672707,"owners_count":21945481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","high-performance","net","network-programming","rpc"],"created_at":"2024-07-30T20:01:44.806Z","updated_at":"2025-05-12T05:29:17.464Z","avatar_url":"https://github.com/cloudwego.png","language":"Go","readme":"# CloudWeGo-Netpoll\n\n[中文](README_CN.md)\n\n[![Release](https://img.shields.io/github/v/release/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/releases)\n[![WebSite](https://img.shields.io/website?up_message=cloudwego\u0026url=https%3A%2F%2Fwww.cloudwego.io%2F)](https://www.cloudwego.io/)\n[![License](https://img.shields.io/github/license/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/blob/main/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/cloudwego/netpoll)](https://goreportcard.com/report/github.com/cloudwego/netpoll)\n[![OpenIssue](https://img.shields.io/github/issues/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/issues)\n[![ClosedIssue](https://img.shields.io/github/issues-closed/cloudwego/netpoll)](https://github.com/cloudwego/netpoll/issues?q=is%3Aissue+is%3Aclosed)\n![Stars](https://img.shields.io/github/stars/cloudwego/netpoll)\n![Forks](https://img.shields.io/github/forks/cloudwego/netpoll)\n\n## Introduction\n\n[Netpoll][Netpoll] is a high-performance non-blocking I/O networking framework, which\nfocused on RPC scenarios, developed by [ByteDance][ByteDance].\n\nRPC is usually heavy on processing logic and therefore cannot handle I/O serially. But Go's standard\nlibrary [net][net] is designed for blocking I/O APIs, so that the RPC framework can\nonly follow the One Conn One Goroutine design. It will waste a lot of cost for context switching, due to a large number\nof goroutines under high concurrency. Besides, [net.Conn][net.Conn] has\nno API to check Alive, so it is difficult to make an efficient connection pool for RPC framework, because there may be a\nlarge number of failed connections in the pool.\n\nOn the other hand, the open source community currently lacks Go network libraries that focus on RPC scenarios. Similar\nrepositories such as: [evio][evio], [gnet][gnet], etc., are all\nfocus on scenarios like [Redis][Redis], [HAProxy][HAProxy].\n\nBut now, [Netpoll][Netpoll] was born and solved the above problems. It draws inspiration\nfrom the design of [evio][evio] and [netty][netty], has\nexcellent [Performance](#performance), and is more suitable for microservice architecture.\nAlso [Netpoll][Netpoll] provides a number of [Features](#features), and it is recommended\nto replace [net][net] in some RPC scenarios.\n\nWe developed the RPC framework [Kitex][Kitex] and HTTP framework [Hertz][Hertz]\nbased on [Netpoll][Netpoll], both with industry-leading performance.\n\n[Examples][netpoll-examples] show how to build RPC client and server\nusing [Netpoll][Netpoll].\n\nFor more information, please refer to [Document](#document).\n\n## Features\n\n* **Already**\n    - [LinkBuffer][LinkBuffer] provides nocopy API for streaming reading and writing\n    - [gopool][gopool] provides high-performance goroutine pool\n    - [mcache][mcache] provides efficient memory reuse\n    - `IsActive` supports checking whether the connection is alive\n    - `Dialer` supports building clients\n    - `EventLoop` supports building a server\n    - TCP, Unix Domain Socket\n    - Linux, macOS (operating system)\n\n* **Future**\n    - [io_uring][io_uring]\n    - Shared Memory IPC\n    - TLS\n    - UDP\n\n* **Unsupported**\n    - Windows (operating system)\n\n## Performance\n\nBenchmark should meet the requirements of industrial use. \nIn the RPC scenario, concurrency and timeout are necessary support items.\n\nWe provide the [netpoll-benchmark][netpoll-benchmark] project to track and compare \nthe performance of [Netpoll][Netpoll] and other frameworks under different conditions for reference.\n\nMore benchmarks reference [kitex-benchmark][kitex-benchmark] and [hertz-benchmark][hertz-benchmark].\n\n## Reference\n\n* [Official Website](https://www.cloudwego.io)\n* [Getting Started](docs/guide/guide_en.md)\n* [Design](docs/reference/design_en.md)\n* [Why DATA RACE](docs/reference/explain.md)\n\n[Netpoll]: https://github.com/cloudwego/netpoll\n[net]: https://github.com/golang/go/tree/master/src/net\n[net.Conn]: https://github.com/golang/go/blob/master/src/net/net.go\n[evio]: https://github.com/tidwall/evio\n[gnet]: https://github.com/panjf2000/gnet\n[netty]: https://github.com/netty/netty\n[Kitex]: https://github.com/cloudwego/kitex\n[Hertz]: https://github.com/cloudwego/hertz\n\n[netpoll-benchmark]: https://github.com/cloudwego/netpoll-benchmark\n[kitex-benchmark]: https://github.com/cloudwego/kitex-benchmark\n[hertz-benchmark]: https://github.com/cloudwego/hertz-benchmark\n[netpoll-examples]:https://github.com/cloudwego/netpoll-examples\n\n[ByteDance]: https://www.bytedance.com\n[Redis]: https://redis.io\n[HAProxy]: http://www.haproxy.org\n\n[LinkBuffer]: nocopy_linkbuffer.go\n[gopool]: https://github.com/bytedance/gopkg/tree/develop/util/gopool\n[mcache]: https://github.com/bytedance/gopkg/tree/develop/lang/mcache\n[io_uring]: https://github.com/axboe/liburing\n","funding_links":[],"categories":["Go","开源类库","Networking","Open source library","网络","Relational Databases"],"sub_categories":["网络","Transliteration","The Internet","音译","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fnetpoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudwego%2Fnetpoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fnetpoll/lists"}