We're currently tuning our services that uses undertow but we can't find the default values of the following properties:
server.undertow.worker-threads
server.undertow.io-threads
We learned that undertow is using org.xnio.Options
in setting-up the threads but can't find any default values.
Undertow is a flexible performant web server written in java, providing both blocking and non-blocking API's based on NIO. Undertow has a composition based architecture that allows you to build a web server by combining small single purpose handlers.
Spring boot provides an easy way to configure undertow server as like jetty. undertow is web server written in Java and manage and sponsored by JBoss. Main advantages of undertow are HTTP/2 Support, HTTP Upgrade Support, Web Socket Support, Servlet 4.0, Embeddable, Flexible.
XNIO workers are the central point of coordination for a network application. A worker includes two different thread pool types: I/O threads, which come in two types: Read threads which handle callbacks for read events, and. Write threads which handle callbacks for write events; and.
From https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/Undertow.java
...
ioThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2);
workerThreads = ioThreads * 8;
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With