A high-performance, crypto-secure Reliable-UDP library for Go with FEC support, designed for latency-sensitive applications.
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.
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.
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.
A crypto-secure Reliable-UDP library for Golang with FEC support.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.
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.
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.
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.
Lacks TCP-like control messages for connection termination; the README explicitly states the need for application-level keepalive mechanisms, adding implementation burden.
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.
The FAQ notes that handling many connections can lead to high CPU utilization, necessitating optimizations like increasing update intervals or using dedicated gateway servers.