top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Are there any websocket-specific tomcat 7 connector settings?

+3 votes
478 views

As we start load testing our jsr-356 applications, I'd like to find out if there are any websocket-specific connector settings we should be aware of for tuning the underlying websocket connection processing. Since this is a tcp socket at the end of the day, I'm assuming all the socket.* options still apply if needed.

posted Oct 24, 2013 by Seema Siddique

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Nothing WebSocket specific. Threads that handle WebSocket requests come from the same pool that handles HTTP requests.

Note there are a few Tomcat specific WebSocket configuration knobs you can twiddle are documented here (note this is for svn head): http://ci.apache.org/projects/tomcat/tomcat7/docs/web-socket-howto.html#Tomcat_WebSocket_specific_configuration

answer Oct 24, 2013 by Anderson
Similar Questions
0 votes

Is it true that current servlet-based websocket implementation will be deprecated due to the implementation of the JSR-356. We are currently implementing a Tomcat 7-based websocket server implementation that we hoped could scale up to at least 50K concurrent connections [or more], but are concerned if there are any known issues and/or limitations with the websocket implementation in Tomcat 7.

We are currently trying to test how high Tomcat 7 will scale with regards to the maximum number of concurrent websocket connections, but have already hit some problems with only 200 concurrent connections. Perhaps it's our multi-threaded client, or Tomcat configuration - not sure at this point. We have the Tomcat Connector configured with maxConnections=50000 and maxThreads=1000, so 200 concurrent connections shouldn't be a problem.

If anyone could elaborate on the Tomcat 7 servlet websocket implementation stability from a highly concurrent aspect that would be great. Additionally, if anyone has achieved 10(s) of 1000(s) of concurrent websocket connections with Tomcat 7, can you share how Tomcat was configured, what OS it was running on, and what client library you used in testing this?

+1 vote

Has anyone had a large WS message sent as the response to an outbound call? We have a scenario where the request causes a 300K WS message to be sent back as the "response". The client is sending multiple WS continuation frames and after a couple of frames are successfully sent, Tomcat just closes the websocket connection. I the response fits in a single frame, it's fine. Where can I look to try and troubleshoot this?

+2 votes

Is there a standard way to access ServletContext from a WebSocket ServerEndpoint ?

+2 votes

In our current generation web application we used session replication with tomcat clustering. (and a load balancer). That way, we received an auto fail-over when a client sends an ajax request to a tomcat node that failed.

In our next generation web application, We would like to have a similar behavior, only with web-sockets. So my questions are :

1) Is it possible ?
2) Does it involve websocket-session replication? if so, are there any guides on how to do that?

...