-
Bug
-
Resolution: Unresolved
-
Major
-
2.0.29.Final
-
60353748
0
I have created a Proxy using Java's Undertow library, which redirects users websocket connections to different ports in the same computer.
The problem is that with only 200 or 300 WebSockets connections the program starts to use a huge amount of CPU.
I've attached JProfiler to the application, and all the threads are either in waiting or network IO state.
The proxy server is started in the following way:
Undertow reverseProxy = Undertow.builder() .addHttpListener(80, "0.0.0.0") .addHttpsListener(443, "0.0.0.0", sslContext) .setIoThreads(4) .setHandler(new ProxyHandler(reverseProxyServer, encodingHandler)) .build(); reverseProxy.start();
I'm thinking that it may be a problem of configuration, because I don't think such a CPU usage is normal.
The colors in the threads image: yellow is waiting, light blue is net io, green is running