BALANCING_TOKENS and BALANCING_CONNECTIONS were a way of ensuring that connections get
evenly distributed to IO threads. Newer XNIO releases (3.3.3.Final and above) don't
actually use them any more, and they will be ignored (instead hashing is used to ensure an
even distribution).
Stuart
----- Original Message -----
From: "Sascha Sadat-Guscheh" <kid(a)bitkid.com>
To: undertow-dev(a)lists.jboss.org
Sent: Tuesday, 22 December, 2015 1:22:18 AM
Subject: [undertow-dev] Undertow configuration
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
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev