[rabbitmq-discuss] Latency of publish confirm

Pierpaolo Baccichet pierpaolo at dropbox.com
Tue Dec 4 05:06:23 GMT 2012


Hello,

I am evaluating using rabbitMQ as a component in our backend system. I am
planning to run it with a clustered configuration with queues mirrored on
at least one node beside the one the queue is declared on. Each publisher
opens channels with publisher confirms and the code implements a blocking
call that waits for the ack to be received back before it returns control
to the app. There will be a lot of publisher processes (order of magnitude
in the tens of thousands) and each publisher will have a fairly low message
per second rate (let's say 1 message per second).

I am running a very small experiment to evaluate the latency of the publish
call and I am seeing that rabbitMQ holds the ack for roughly 25
milliseconds before sending it to the publisher. To clarify what I am
seeing, below is a wireshark capture that I took on the rabbit node for a
single published message (gaps in the packet number are due to other
traffic live on the machine).

No.     Time.           Source         Src_port Destination   Dest_port
Proto   Length  Info
174 3.070464 publisher_ip 28086 rabbitmq_ip amqp AMQP 104 Basic.Publish
175 3.070483 publisher_ip 28086 rabbitmq_ip amqp AMQP 90 Content-Header
177 3.070674 publisher_ip 28086 rabbitmq_ip amqp AMQP 77 Content-Body
200 3.072493 rabbitmq_ip amqp consumer_ip 28085 AMQP 149 Basic.Deliver
Content-Header Content-Body
202 3.073846 consumer_ip 28085 rabbitmq_ip amqp AMQP 89 Basic.Ack
207 3.098541 rabbitmq_ip amqp publisher_ip 28086 AMQP 89 Basic.Ack

I did multiple experiments and this behavior is very consistent. All
messages are delivered reasonably fast apart of the very last one that seem
to be held in rabbitMQ for 25 milliseconds before it's delivered on the
network. Why is this happening? Is RabbitMQ trying to aggregate multiple
messages together before delivering them on the network? Is there a way to
speed up this behavior?

Cheers, Pierpaolo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121203/97574513/attachment.htm>


More information about the rabbitmq-discuss mailing list