tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Bhagra" <>
Subject Achieve large number of concurrent websocket connections (~40000-50000)
Date Wed, 13 Feb 2013 15:19:59 GMT
Hello All

                        Tomcat Server:             7.0.35

Operating System Version:  Red Hat Enterprise Linux Server release 5.5

Java Version:              java version "1.6.0_11"

Memory:                    4137112 kB

CPU:                       Intel(R) Xeon(R) CPU           E5530  @ 2.40GHz
(Quad core with HT enabled)


                        I am developing a tomcat application which requires
a large number of websocket connections to remain opened during the time
users are logged in (around 40-50 thousand). I have a ruby script (written
using faye-websocket) which can open as many websocket connections as we
desire and then send random messages on websockets and receive response from
server. This works well for small number of concurrent websocket
connections. The issue is I am not able to achieve a very high number of
websocket connections. Using the default blocking connector of Tomcat only
that much connections can be opened as specified with maxThreads param
(500-600). Configuring a NIO connector I am able to open around 10000
connections after that the connections start to close automatically. I have
set the fd-limit to 65535 accordingly and using a 1GB initial heap size.
Even with an APR connector the number remains pretty much same.


                        My question is what configurations or steps I can
take in order to achieve desired number of concurrent websocket connections
(40000-50000). Has anybody been able to achieve this much number of
simultaneous websocket connections with a tomcat app? Thanks in advance for
answering this.



Amit Bhagra

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message