Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. gev

gev

MITGov0.5.0

A lightweight, fast, non-blocking TCP network library and WebSocket server for Go, based on the Reactor pattern.

GitHubGitHub
1.8k stars194 forks0 contributors

What is gev?

Gev is a high-performance, event-driven networking library for Go, designed to simplify the creation of fast TCP servers and WebSocket endpoints. It leverages the Reactor pattern with efficient epoll/kqueue event loops to handle massive concurrent connections with minimal resource overhead.

Target Audience

Go developers building high-performance TCP servers or WebSocket applications that require handling massive concurrent connections, such as real-time messaging systems, game servers, or API gateways.

Value Proposition

Developers choose Gev for its combination of a minimalistic API that abstracts event loop complexity, fine-grained control over network protocols, and high performance through scalable I/O multiplexing and multi-core support.

Overview

🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.

Use Cases

Best For

  • Building high-performance TCP servers that need to handle thousands of concurrent connections efficiently.
  • Creating WebSocket servers with low latency and high throughput requirements.
  • Developing custom protocol implementations where fine-grained control over data framing is needed.
  • Implementing servers that require automatic idle connection cleanup and connection management.
  • Leveraging multi-core systems for network applications with configurable worker goroutines.
  • Scaling network services with SO_REUSEPORT support for load balancing across multiple processes.

Not Ideal For

  • Teams building HTTP REST APIs who need built-in routing and middleware support.
  • Projects requiring seamless TLS/SSL encryption without manual implementation.
  • Applications where rapid prototyping is prioritized over low-level networking control.
  • Environments needing cross-platform compatibility beyond Linux/BSD due to epoll/kqueue dependency.

Pros & Cons

Pros

Scalable Event Loop

Uses epoll on Linux and kqueue on BSD for efficient I/O multiplexing, handling massive concurrent connections with minimal resource overhead as demonstrated in performance benchmarks.

Multi-Core Optimization

Configurable worker goroutines leverage all CPU cores effectively, with default settings matching the host's core count for optimal throughput in multi-threaded scenarios.

Flexible Protocol Support

Plug-in architecture allows easy integration of custom data framing, evidenced by included WebSocket and Protobuf plugins and the ability to implement the Protocol interface for tailored protocols.

Efficient Memory Management

Implements dynamic ring buffers that expand as needed, reducing memory fragmentation and improving performance for variable payloads, as highlighted in the network model.

Cons

No Built-in TLS

The library lacks native support for TLS encryption, requiring developers to manually integrate secure connections using external packages like crypto/tls, which adds complexity.

Steep Protocol Learning Curve

Implementing the Protocol interface for custom data framing demands a deep understanding of event-driven I/O and ring buffer management, as shown in the detailed UnPacket and Packet method requirements.

Limited Higher-Level Features

Focuses on low-level networking, so common web server features like HTTP routing, middleware, or session management aren't included, necessitating additional boilerplate code for full applications.

Frequently Asked Questions

Quick Stats

Stars1,776
Forks194
Contributors0
Open Issues11
Last commit10 months ago
CreatedSince 2019

Tags

#event-driven#websocket-server#high-performance#tcp-server#network-library#network-programming#non-blocking-io#golang#epoll#go#event-loop#reactor#kqueue

Built With

G
Go

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

fasthttpfasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Stars23,341
Forks1,816
Last commit4 days ago
webrtcwebrtc

Pure Go implementation of the WebRTC API

Stars16,238
Forks1,835
Last commit3 days ago
kcptunkcptun

Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.

Stars14,406
Forks2,629
Last commit16 days ago
cloudflaredcloudflared

Cloudflare Tunnel client

Stars13,929
Forks1,262
Last commit9 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub