[rabbitmq-discuss] Per-Connection Flow Control -- The Case Against (Try #2)

Chip Salzenberg rev.chip at gmail.com
Sat May 26 00:24:31 BST 2012


An untested patch to disable it:

diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 5acf6ac..8b65821 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -368,7 +368,7 @@ terminate(_Explanation, State) ->

 control_throttle(State = #v1{connection_state   = CS,
                              conserve_resources = Mem}) ->
-    case {CS, Mem orelse credit_flow:blocked()} of
+    case {CS, Mem} of
         {running,   true} -> State#v1{connection_state = blocking};
         {blocking, false} -> State#v1{connection_state = running};
         {blocked,  false} -> ok = rabbit_heartbeat:resume_monitor(


On Friday, May 25, 2012 3:42:36 PM UTC-7, Pablo Molnar wrote:
>
> I'm also experiencing the flow control to be unhelpful using spring-amqp 
> libraries. Is there a way to just turn it off?
>
> Thanks,
> Pablo
>
> On  Fri, May 25, 2012 at 2:57 PM, Chip Salzenberg <rev.chip at gmail.com>wrote:
>
>> The fundamental paradox of per-connection flow control is that it holds 
>> up the stop sign just when progress becomes possible.  It is backwards and 
>> unhelpful.  Consider:
>>
>> 1. A client is publishing 1.5K/sec to each of four exchanges, each of 
>> which has a queue.
>> 2. There are no consumers.  Therefore the queue is growing.
>> 3. RMQ does not stop this.  "Flow control" does not trigger.
>> 4. The consumers appear to begin to tear down the backlog.
>> 5. RMQ per-connection flow control suddenly decides that now there are 
>> some consumers, now it has a reason to throttle the sender.
>> 6. If the consumers had not shown up, the producer would not have been 
>> blocked.
>>
>> Therefore, it is only when the backlog can go DOWN that the broker 
>> decides to throttle the sender.  Not when the backlog was GROWING, but when 
>> it could be SHRINKING, that's when RMQ decides to stop accepting.
>>
>> This is not acceptable.
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120525/75fbbfbe/attachment.htm>


More information about the rabbitmq-discuss mailing list