[rabbitmq-discuss] multiple publishers to the same exchange

Matthew Sackman matthew at rabbitmq.com
Thu Nov 11 15:18:40 GMT 2010


On Thu, Nov 11, 2010 at 03:10:56PM +0000, T-zex wrote:
> Say in case we have 1 publisher and 1 subscriber we have 10kHz send
> and 10kHz receive throughput.
> In case we have 2 publishers then they will be able to send only 5KHz
> each?, will the receiver  still be 10kHz?
> In case we have 1 10 kHz publisher and two queues, will these queues
> be receiving 5kHz each?

A queue is a single process within Erlang. Thus your throughput limit on
a _single_ queue is one CPU core. However, as I said, channels and other
bits and pieces for each connection are also processes, so one queue
with a channel can, in theory, eat up probably 3 or 4 cores in total,
when absolutely maxed out.

Obviously, with each queue being your single unit of concurrency, if
you need higher throughput, then adding additional queues so you can
utilise more cores, is a valid approach.

So it's not to do with how many producers or consumers you have, it's
more to do with how fast a single queue can run on your hardware, and
then that performance should distribute itself reasonably well as you
add consumers and producers. It's a bit more complex than that, but
that's the general idea.

Matthew


More information about the rabbitmq-discuss mailing list