Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. kcp-go

kcp-go

MITGov5.6.64

A high-performance, crypto-secure Reliable-UDP library for Go with FEC support, designed for latency-sensitive applications.

GitHubGitHub
4.5k stars806 forks0 contributors

What is kcp-go?

kcp-go is a Reliable-UDP library for Go that provides a secure, ordered, and error-checked stream delivery over UDP packets. It solves the problem of unreliable UDP transport by adding reliability, congestion control, and forward error correction, making it suitable for latency-sensitive applications like online gaming and live streaming.

Target Audience

Go developers building network applications that require low-latency, reliable data transmission over UDP, such as game servers, real-time communication tools, and network acceleration proxies.

Value Proposition

Developers choose kcp-go for its high performance, built-in encryption, FEC support, and compatibility with standard Go net interfaces, offering a battle-tested solution that outperforms raw UDP without the overhead of TCP.

Overview

A crypto-secure Reliable-UDP library for Golang with FEC support.

Use Cases

Best For

  • Building low-latency game servers that require reliable UDP communication
  • Creating network acceleration tunnels for improved throughput on lossy links
  • Developing real-time streaming applications like live broadcasting
  • Implementing secure UDP-based proxies with packet-level encryption
  • Synchronizing files over unreliable networks with forward error correction
  • Multiplexing multiple data streams over a single UDP connection

Not Ideal For

  • Applications requiring full TCP semantics like built-in connection termination (SYN/FIN/RST) without extra implementation
  • Environments where UDP traffic is blocked, throttled, or heavily firewalled
  • Simple client-server models where TCP's out-of-the-box reliability and compatibility outweigh latency gains
  • Teams lacking UDP networking experience who may struggle with tuning FEC ratios and encryption parameters

Pros & Cons

Pros

High Performance Core

Cache-friendly and memory-optimized design handles over 5,000 concurrent connections on a single commodity server, with benchmarks showing 128+ MB/s throughput in echo tests.

Forward Error Correction

Integrated Reed-Solomon FEC trades 20-30% bandwidth overhead for reduced tail latency on lossy or long-haul links, as detailed in the design characteristics.

Flexible Encryption Options

Supports multiple algorithms like AES, TEA, and Salsa20 with AEAD, ensuring packet anonymity and security; AES-128 is recommended for hardware acceleration via AES-NI.

Seamless Net Integration

Acts as a drop-in replacement for net.TCPConn, compatible with standard net.Conn and net.Listener interfaces, easing adoption in existing Go network stacks.

Cons

No Built-in Connection Management

Lacks TCP-like control messages for connection termination; the README explicitly states the need for application-level keepalive mechanisms, adding implementation burden.

Configuration Complexity

Requires manual tuning of parameters like FEC ratios, encryption settings, and timing intervals, which can be daunting and error-prone for developers new to reliable UDP.

Potential High CPU Usage

The FAQ notes that handling many connections can lead to high CPU utilization, necessitating optimizations like increasing update intervals or using dedicated gateway servers.

Frequently Asked Questions

Quick Stats

Stars4,536
Forks806
Contributors0
Open Issues63
Last commit2 months ago
CreatedSince 2015

Tags

#kcp#reliable-udp#high-performance#stream-multiplexing#low-latency#golang-library#game-networking#forward-error-correction

Built With

G
Go

Included in

Go169.1k
Auto-fetched 18 hours 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,420
Forks1,841
Last commit3 days ago
webrtcwebrtc

Pure Go implementation of the WebRTC API

Stars16,661
Forks1,872
Last commit2 days ago
cloudflaredcloudflared

Cloudflare Tunnel client

Stars14,949
Forks1,363
Last commit1 day ago
kcptunkcptun

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

Stars14,403
Forks2,631
Last commit3 months 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