• Stars
    star
    2,325
  • Rank 19,804 (Top 0.4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance.

CloudWeGo-Netpoll

中文

Release WebSite License Go Report Card OpenIssue ClosedIssue Stars Forks

Introduction

Netpoll is a high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance.

RPC is usually heavy on processing logic and therefore cannot handle I/O serially. But Go's standard library 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 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, gnet, etc., are all focus on scenarios like Redis, HAProxy.

But now, Netpoll was born and solved the above problems. It draws inspiration from the design of evio and netty, has excellent Performance, and is more suitable for microservice architecture. Also Netpoll provides a number of Features, and it is recommended to replace net in some RPC scenarios.

We developed the RPC framework Kitex and HTTP framework Hertz based on Netpoll, both with industry-leading performance.

Examples show how to build RPC client and server using Netpoll.

For more information, please refer to Document.

Features

  • Already

    • LinkBuffer provides nocopy API for streaming reading and writing
    • gopool provides high-performance goroutine pool
    • 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

  • 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 project to track and compare the performance of Netpoll and other frameworks under different conditions for reference.

More benchmarks reference kitex-benchmark and hertz-benchmark.

Reference

More Repositories

1

kitex

Go RPC framework with high-performance and strong-extensibility for building micro-services.
Go
6,844
star
2

volo

Rust RPC framework with high-performance and strong-extensibility for building micro-services.
Rust
2,176
star
3

hertz

A high-performance and strong-extensibility Go HTTP framework that helps developers build microservices.
Go
1,161
star
4

goref

Go heap object reference analysis tool
Go
541
star
5

sonic-rs

A fast Rust JSON library based on SIMD.
Rust
379
star
6

shmipc-go

A high performance inter-process communication golang library developed by CloudWeGo
Go
348
star
7

biz-demo

Business Demo for CloudWeGo
Go
146
star
8

dynamicgo

Dynamically and efficiently operate RPC data for Go
Go
141
star
9

pilota

A thrift and protobuf implementation in pure rust with high performance and extensibility.
Rust
120
star
10

frugal

A very fast dynamic Thrift serializer & deserializer.
Go
112
star
11

cwgo

An all-in-one code generation tool for CloudWeGo
Go
102
star
12

thriftgo

An implementation of thrift compiler in go language.
Go
99
star
13

cloudwego.github.io

Website for CloudWeGo
JavaScript
59
star
14

kitex-examples

Go
50
star
15

netpoll-http2

Go
43
star
16

kitex-benchmark

Go
31
star
17

netpoll-benchmark

Go
18
star
18

hertz-examples

Examples for Hertz.
Go
18
star
19

localsession

transparently transmit context within or between goroutines
Go
18
star
20

configmanager

Go
10
star
21

kitex-tests

Tests for cloudwego/kitex
Go
2
star
22

netpoll-examples

Go
2
star
23

thrift-gen-validator

thrift-gen-validator is a thriftgo plugin to generate struct validators.
Go
2
star
24

.github

1
star
25

community

Governance and community material for CloudWeGo and its open source sub-projects
1
star
26

gopkg

Go
1
star