You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by mqperson <an...@anjul.com> on 2008/04/12 03:18:29 UTC

Thread Model, and Simultaneous Connections Scalability

In the web server world, most web servers fire off a new thread to process a
request, but a few, such as Jetty, for scalability, separate the couple of
requests and threads.

I need to know what does ActiveMQ do in this regard?  If a consumer is
connected listening on a queue, does it have a dedicated thread?  If so,
that seems like there would be something like one thread per subscriber. 
Which would limit the number of simultaneous subscribers to perhaps a few
hundreds.

On the other hand, if ActiveMQ has a modest number of threads servicing a
LARGE number of open network connections (sockets / file descriptors) --
then it could easily scale to thousands of simultaneous subscribers if not
more.

I feel like the nature of ActiveMQ would imply the latter.  However, my
brief search of ActiveMQ documentation did not yield a confirmation.

Could somebody please enlighten me or point me to a document?  Thanks in
advance.
-- 
View this message in context: http://www.nabble.com/Thread-Model%2C-and-Simultaneous-Connections-Scalability-tp16643565s2354p16643565.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Thread Model, and Simultaneous Connections Scalability

Posted by Rob Davies <ra...@gmail.com>.
On 12 Apr 2008, at 02:18, mqperson wrote:

>
> In the web server world, most web servers fire off a new thread to  
> process a
> request, but a few, such as Jetty, for scalability, separate the  
> couple of
> requests and threads.
>
> I need to know what does ActiveMQ do in this regard?  If a consumer is
> connected listening on a queue, does it have a dedicated thread?  If  
> so,
> that seems like there would be something like one thread per  
> subscriber.
> Which would limit the number of simultaneous subscribers to perhaps  
> a few
> hundreds.
>
> On the other hand, if ActiveMQ has a modest number of threads  
> servicing a
> LARGE number of open network connections (sockets / file  
> descriptors) --
> then it could easily scale to thousands of simultaneous subscribers  
> if not
> more.
>
> I feel like the nature of ActiveMQ would imply the latter.  However,  
> my
> brief search of ActiveMQ documentation did not yield a confirmation.
>
> Could somebody please enlighten me or point me to a document?   
> Thanks in
> advance.
> -- 
> View this message in context: http://www.nabble.com/Thread-Model%2C-and-Simultaneous-Connections-Scalability-tp16643565s2354p16643565.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>

There's a a good article here: http://open.iona.com/wiki/display/ProdInfo/Understanding+the+Threads+Allocated+in+ActiveMQ

The number of threads is dependent on the default blocking i/o mode of  
the message broker - one thread per socket (equivalent to one per  
connection).
the use of nio is an option - and performs very well too. The choice  
you make is often down to the usage scenario and environment





cheers,

Rob

http://open.iona.com/ -Enterprise Open Integration
http://rajdavies.blogspot.com/