Asynchronous, event-driven network framework for building protocol servers and clients on the JVM
open sourceApache-2.0free
Netty is an NIO client-server framework for the JVM for building high-performance protocol servers and clients, such as TCP and UDP socket servers. It gives one API over blocking and non-blocking transports, a flexible event model and a customisable thread model, with support for protocols such as HTTP, HTTP/2 and SSL/TLS and optional native transports, including io_uring. Netty 4.2 runs on Java 8 or newer and is published as a family of Maven modules.
Problems it solves
- build a high-performance TCP or UDP server in Java
- write a custom network protocol server and client on the JVM
- handle thousands of concurrent connections in Java without a thread per connection
Features
- One API over blocking and non-blocking socket transports
- Event model with clear separation of concerns
- Customisable thread model, from a single thread to thread pools
- Connectionless datagram (UDP) support
- Support for HTTP, HTTP/2 and SSL/TLS
- Optional native transports, including io_uring
Alternatives
The same job
These do what Netty does.
- Reactor Netty Non-blocking, backpressure-ready TCP, HTTP, UDP and QUIC clients and servers for Java, on Netty
- Eclipse Vert.x Toolkit for building reactive, non-blocking applications on the JVM
