Netty is an asynchronous, event-driven network stack for building maintainable high-performance protocol servers and clients in Java.
Overview
Netty targets developers who need custom protocol servers and clients without hand-rolling low-level socket code. It is built as an NIO client-server framework that simplifies TCP and UDP programming while aiming to keep throughput and stability.
The design offers one API for blocking and non-blocking transports, an extensible event model, and configurable threading from single-threaded runs to pooled executors. Datagram sockets are supported without persistent connections.
Documented qualities include documented Javadoc and examples, minimal mandatory dependencies beyond the JDK for core use, optional SSL/TLS and StartTLS, and attention to buffer copying costs. HTTP/2-related modules may impose extra JDK requirements.
Netty 4.x expects Java 8 or newer at runtime, with additional requirements for optional native transports such as io_uring on Java 9+. Applications embed Netty as a library inside their own Java processes rather than as a standalone end-user program.
Key features
- Unified blocking and non-blocking transports
- Extensible event and pipeline model
- Configurable thread and executor strategies
- Connectionless UDP datagram support
- SSL/TLS and StartTLS helpers
- Protocol experience from FTP, SMTP, HTTP
- Modular components for optional protocols
- Java 8+ runtime with native transport options
Use cases
- Custom TCP protocol servers
- High-concurrency network clients
- UDP-based gaming or telemetry services
- TLS-terminated proxy or gateway layers
- Embedding networking inside Java services