documentation/manual/working/commonGuide/configuration/SettingsNetty.md
The Netty server backend is built on top of Netty.
Note: The Netty server backend is not the default in 2.6.x, and so must be specifically enabled. See more information in [[Netty Server|NettyServer]] documentation.
Play uses the following default configuration:
The configurations above are specific to Netty server backend, but other more generic configurations are also available:
Native socket transport has higher performance and produces less garbage and is available on Linux, macOS, FreeBSD and OpenBSD. You can configure the transport socket type in application.conf:
play.server {
netty {
transport = "native"
}
}
In addition to native, you can set transport to io_uring to make use of Netty's io_uring native transport. Be aware io_uring is available on Linux only.
When set to native or io_uring, Play will automatically detect the operating system it is running on and load the appropriate native transport library.
Note: On Windows, if the transport configuration is set to
nativeorio_uring, Play will ignore it and automatically fall back to Java NIO transport - just like when using the defaultjdkconfig. A similiar fallback mechanism kicks in on macOS: If transport is set toio_uring, Play will fall back tonativeinstead, because theio_uringnative transport is not available on macOS - but on Linux only (using Kernel 5.14 or newer compiled withCONFIG_IO_URING=y- which is the default anyway).
The available options are defined in the Netty channel option documentation.
If you are using the native socket transport, you can set the following additional options:
io_uring: IoUringChannelOption (instead of EpollChannelOption)