[jboss-user] [JBoss Messaging] - Re: Clustered server preference

timfox do-not-reply at jboss.com
Thu Apr 24 11:33:19 EDT 2008


"chip_schoch" wrote : Thank you Andy and Clebert for taking the time to explain this in detail.  To reiterate, what you are saying is that if I need to have multiple consumers processing messages from a clustered queue in FIFO order, than I should have all my client consumers connect to the same node in the cluster.
  | 
  | 

The key point here, is that if you want to have true FIFO queue semantics, then there is

a) Absolutely no point in having more than one consumer - it will never give you better throughput

Think about it this way: For true FIFO, ordered processing, you take a message from the queue, you process it, when you have finished processing it, you can take another, ad infinitum...

So you can clearly see there is no point in having more than one consumer on the queue since you can never process them in parallel if you want to guarantee order.

Now, that one one consumer, it always makes sense for it to live on the same node, since you don't want to incur an extra network hit to deliver it to another node before processing.

Furthermore it makes zero sense to have different consumers on different nodes for the same reasons outlined above. If you want FIFO then messages *must be processed sequentially*, so if message 1 is being processed on node 1, then message 2 can be processed on node 2 until message 1 processing is done.

Again, you can see that there's absolutely no point in having multiple consumers, since you'll never get better throughput, since the processing is serialized. In fact you'll get a negative hit due to the extra overhead of moving messages around unnecessarily.

For a more technical explanation see Amdahl's law: http://en.wikipedia.org/wiki/Amdahl's_law. In the case of a strict FIFO queue, zero proportion of the work is parallelizable, so there is zero gain, in clustering it.

Clustering will only help you to improve throughput if at least some of your work load is parallelizable.




In more technical terms, see Amdahls law:



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146554#4146554

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146554



More information about the jboss-user mailing list