[undertow-dev] Websocket connections and IO thread affinity

peter royal peter.royal at pobox.com
Thu Jun 16 13:58:30 EDT 2016


(I believe the following is true... please correct me if not!)

I have an application which heavily utilizes web sockets. It is an
internal application which uses a small number of connections with
reasonable load on each.

When a new connection is received by Undertow, there is an
at-connection-time assignment of an XNIO IO Thread to the connection.
This is causing uneven load on my IO threads, due to chance. 

I'm increasing the number of IO threads as a temporary fix, but it might
be useful to be able to either migrate a long-lived connection to
another IO thread (harder) or do better load balancing amongst IO
threads. For the latter, if Undertow was able to provide a strategy for
picking a thread in NioXnioWorker.getIoThread(hashCode), it could try
and pick a thread that had fewer connections assigned to it.

Has anyone else run into this problem? Would a fix be accepted?

-pete

-- 
(peter.royal|osi)@pobox.com - http://fotap.org/~osi


More information about the undertow-dev mailing list