[rabbitmq-discuss] Producer confirms as a heuristic for rate limiting

Matthias Radestock matthias at rabbitmq.com
Wed Feb 27 18:52:01 GMT 2013


Ben,

On 27/02/13 18:38, Ben Hood wrote:
> I'm trying to write a benchmark suite for latency and was wondering
> whether using outstanding producer confirms can be used a heuristic for
> back pressure (where the application defines it own window size).
>
> What I am trying to achieve is to improve the accuracy of my latency
> figures.
>
> So I was wondering whether I could use the confirms to exert back
> pressure onto the sending app, or is this idea completely bogus?

Using confirms to exert back pressure on a producing application is 
fine. But I wouldn't expect that to result in particularly stable 
latencies. For a few reasons:

1) one way that the internal confirm logic gets triggered is by "absence 
of other stuff happening", so when throttling producers, confirms may 
well happen a lot quicker.

2) more generally, much of the internal confirm logic will try to batch 
things if it can, which reduces the overall cost but makes the timing of 
confirms more variable.

3) confirms do come at a noticeable penalty on throughput and latency. 
So a benchmark employing confirms would not be a very good proxy for a 
real system running w/o confirms.


Having said all that, go and try it :)


Matthias.


More information about the rabbitmq-discuss mailing list