Hi!
We want to use undertow in the following scenario (numbers are from our current app
running jetty as a front end):
- 24 core machine with ~60GB ram
- 10000 requests per second with an average execution time of 2-4 ms
- around 6000 concurrent http connections (keep-alive)
- incoming request size between 2000 and 4000 bytes
- response size around 4000 bytes
At the moment we just copied the configuration from the Undertow class (using a
HttpOpenListener).
OptionMap socketOptions = OptionMap.builder()
.set(Options.WORKER_IO_THREADS, IO_THREADS)
.set(Options.TCP_NODELAY, true)
.set(Options.REUSE_ADDRESSES, true)
.set(Options.BALANCING_TOKENS, 1)
.set(Options.BALANCING_CONNECTIONS, 2)
.set(Options.BACKLOG, 1000)
.getMap();
OptionMap undertowOptions = OptionMap.builder().set(UndertowOptions.BUFFER_PIPELINED_DATA,
true).getMap();
ByteBufferPool buffers = new DefaultByteBufferPool(true, 1024 * 16, -1, 4);
HttpOpenListener openListener = new HttpOpenListener(buffers, undertowOptions);
worker = xnio.createWorker(OptionMap.builder()
.set(Options.WORKER_IO_THREADS, IO_THREADS)
.set(Options.CONNECTION_HIGH_WATER, 1000000)
.set(Options.CONNECTION_LOW_WATER, 1000000)
.set(Options.WORKER_TASK_CORE_THREADS, IO_THREADS * 8)
.set(Options.WORKER_TASK_MAX_THREADS, IO_THREADS * 8)
.set(Options.TCP_NODELAY, true)
.set(Options.CORK, true)
.getMap());
Some of the options i don’t understand fully (BALANCING_TOKENS, BALANCING_CONNECTIONS)
some may not be applicable to our scenario.
I dug around in the code a bit to find out what these settings do but i don’t feel very
confident. A little help would be appreciated!
Enjoy your holidays, Sascha