QUESTION:
I'm looking for some advice on what Tomcat NIO connector settings to use to 
support 100K concurrent websocket connections.  Hopefully I  can reach this 
goal through a combination of Tomcat NIO Connector settings, and Server 2008 R2 
configuration [if needed].

BACKGROUND:
We're scale testing our websocket application and looking to see how many 
concurrent websocket connections we can get on a single Tomcat instance - with 
the goal being 100K.  I've provided the test landscape details at the bottom - 
all VERY BIG EC2 instances over 10 GB network, so memory, CPU and network do 
not appear to be the problem when monitoring.

PROBLEM:
The problem we are running into is that we can't seem to establish even 50K 
connections into Tomcat.  At some point, we start getting connect failures, 
similar to the following:

Couldn't connect java.io.EOFException: null
                at 
org.apache.tomcat.websocket.WsWebSocketContainer.processResponse(WsWebSocketContainer.java:570)
 ~[tomcat7-websocket.jar:7.0.48-dev]
                at 
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:317)
 ~[tomcat7-websocket.jar:7.0.48-dev]
Wrapped by: javax.websocket.DeploymentException: The HTTP request to initiate 
the WebSocket connection failed
                at 
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:344)
 ~[tomcat7-websocket.jar:7.0.48-dev]

I'm hoping that someone may be able to advise what changes we might make to the 
following Tomcat NIO connector setting that will allow upwards of 100K 
websocket connections:

<Connector port="80"
           protocol="org.apache.coyote.http11.Http11NioProtocol"
           connectionTimeout="20000"
           maxConnections="100000"
           maxThreads="100000"
           redirectPort="8443" />


TEST LANDSCAPE:

The test landscape is all Windows Server 2008 R2 boxes running in EC2 and the
Test Client environment:

Our test client is a multi-threaded java client that makes use of the JSR356 
ClientEndpoint functionality.  We're creating 40K+ websocket connections from a 
single test client machine.  The test client is Server 2008 R2 and we have 
configured it to allow 50K ephemeral ports, so we should be able to establish 
40K+ outbound websocket connections.

Server environment:

*         EC2 instance (cc2.8xlarge) (60 GB, 10 GB network, 16 vCPUs)

*         Server 2008 R2

*         Tomcat 7.0.48 (trunk)

*         Java 1.7.0_45


Thanks,
Bob

http://www.thingworx.com<http://www.thingworx.com/>
Skype: bob.deremer.thingworx
O: 610.594.6200 x812
M: 717.881.3986

Reply via email to