You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Amit Bhagra <am...@agnity.com> on 2013/02/13 16:19:59 UTC
Achieve large number of concurrent websocket connections (~40000-50000)
Hello All
Tomcat Server: 7.0.35
Operating System Version: Red Hat Enterprise Linux Server release 5.5
(Tikanga)
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.
Regards
Amit Bhagra
Re: Achieve large number of concurrent websocket connections (~40000-50000)
Posted by Mark Thomas <ma...@apache.org>.
On 13/02/2013 15:19, Amit Bhagra wrote:
> 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.
That is certainly the behaviour I would expect the the default settings
for the HTTP connectors.
Look at this page:
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
and search for maxConnections.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Achieve large number of concurrent websocket connections (~40000-50000)
Posted by Charles Richard <ch...@thelearningbar.com>.
Hi,
Not sure if this is the same issue but I believe you might need the
tcp_tw_reuse and tcp_tw_recycle parameters in /proc/sys/net/ipv4 to be at
a value of 1? Since you already achieved 10000 connections, I'm thinking
it's probably something else though.
Cheers,
Charles
On Wed, Feb 13, 2013 at 11:19 AM, Amit Bhagra <am...@agnity.com>wrote:
> Hello All
>
> Tomcat Server: 7.0.35
>
> Operating System Version: Red Hat Enterprise Linux Server release 5.5
> (Tikanga)
>
> 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.
>
>
>
> Regards
>
> Amit Bhagra
>
>
Re: Achieve large number of concurrent websocket connections (~40000-50000)
Posted by Vijaya <sv...@solutionscraft.com>.
Hi Amit,
I do not want to top post on this issue. But I do have the same problem. If
you come across the solution, please post the solution so that I can also
benefit from it.
Thanks,
Vijaya
-----Original Message-----
From: Amit Bhagra
Sent: Friday, February 15, 2013 8:41 AM
To: 'Tomcat Users List'
Subject: RE: Achieve large number of concurrent websocket connections
(~40000-50000)
Hi Carrillo
Thanks for the answer. I will certainly look into clustering
options once I know the maximum connection limit achievable from a single
instance of tomcat. I was wondering if anyone else has done the same thing
and could help with required configurations and provide his numbers
Regards
Amit
-----Original Message-----
From: Carrillo, Dan [mailto:dcarrillo@idanalytics.com]
Sent: Wednesday, February 13, 2013 8:54 PM
To: Tomcat Users List
Subject: RE: Achieve large number of concurrent websocket connections
(~40000-50000)
You should consider setting up a cluster of Tomcat's to service your
requests. With 40-50 thousand concurrent connections you're likely to need
to balance the load anyway. Are you familiar with setting up a Tomcat
cluster?
-----Original Message-----
From: Amit Bhagra [mailto:amit.bhagra@agnity.com]
Sent: Wednesday, February 13, 2013 7:20 AM
To: users@tomcat.apache.org
Subject: Achieve large number of concurrent websocket connections
(~40000-50000)
Hello All
Tomcat Server: 7.0.35
Operating System Version: Red Hat Enterprise Linux Server release 5.5
(Tikanga)
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.
Regards
Amit Bhagra
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Achieve large number of concurrent websocket connections (~40000-50000)
Posted by Amit Bhagra <am...@agnity.com>.
Hi Carrillo
Thanks for the answer. I will certainly look into clustering
options once I know the maximum connection limit achievable from a single
instance of tomcat. I was wondering if anyone else has done the same thing
and could help with required configurations and provide his numbers
Regards
Amit
-----Original Message-----
From: Carrillo, Dan [mailto:dcarrillo@idanalytics.com]
Sent: Wednesday, February 13, 2013 8:54 PM
To: Tomcat Users List
Subject: RE: Achieve large number of concurrent websocket connections
(~40000-50000)
You should consider setting up a cluster of Tomcat's to service your
requests. With 40-50 thousand concurrent connections you're likely to need
to balance the load anyway. Are you familiar with setting up a Tomcat
cluster?
-----Original Message-----
From: Amit Bhagra [mailto:amit.bhagra@agnity.com]
Sent: Wednesday, February 13, 2013 7:20 AM
To: users@tomcat.apache.org
Subject: Achieve large number of concurrent websocket connections
(~40000-50000)
Hello All
Tomcat Server: 7.0.35
Operating System Version: Red Hat Enterprise Linux Server release 5.5
(Tikanga)
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.
Regards
Amit Bhagra
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Achieve large number of concurrent websocket connections
(~40000-50000)
Posted by "Carrillo, Dan" <dc...@idanalytics.com>.
You should consider setting up a cluster of Tomcat's to service your requests. With 40-50 thousand concurrent connections you're likely to need to balance the load anyway. Are you familiar with setting up a Tomcat cluster?
-----Original Message-----
From: Amit Bhagra [mailto:amit.bhagra@agnity.com]
Sent: Wednesday, February 13, 2013 7:20 AM
To: users@tomcat.apache.org
Subject: Achieve large number of concurrent websocket connections (~40000-50000)
Hello All
Tomcat Server: 7.0.35
Operating System Version: Red Hat Enterprise Linux Server release 5.5
(Tikanga)
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.
Regards
Amit Bhagra
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org