# Variable rate limit

**URL:** <https://discourse.nodered.org/t/variable-rate-limit/97516>\
**Category:** General\
**Tags:** delay\
**Created:** [9 June 2025 18:30 UTC](https://discourse.nodered.org/t/variable-rate-limit/97516 "2025-06-09T18:30:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)\
**Post date:** [9 June 2025 18:30 UTC](https://discourse.nodered.org/t/variable-rate-limit/97516/1 "2025-06-09T18:30:45Z")

</div>

Hi all,  
Particular problem;  
I'm running a flow that generates over 200 messages very quickly. The target that receives these messages can easily be overwhelmed due to a number of reasons.

To solve this I'm currently using the `delay` node, in `rate limit` mode, set to 3 seconds however, the target node can sometimes accept quicker, but it all depends on the target node system's existing load and any network delays.

The target node does output when it's completed which I can capture using the `complete` node, but how can I have the delay node output when pulsed, rather than it's internal timer...?

I can't interfere in the flow of the messages other than to delay them, or change them in any way, so any trigger would have to be outside of the main message flow pipeline..

Some kind of delay node that stores up the incoming messages, but only releases them one by one, and only when an independant input triggers it.

Any ideas welcome. Thanks...

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 June 2025 18:33 UTC](https://discourse.nodered.org/t/variable-rate-limit/97516/2 "2025-06-09T18:33:10Z")

</div>

You can use the successful feedback to create a msg containing. {flush:1} and feed that back into the delay node to release the next message immediately. Make sure it just has the flush property. No payload etc.

---

<div class="post-metadata">

**Author:** ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)\
**Post date:** [9 June 2025 18:36 UTC](https://discourse.nodered.org/t/variable-rate-limit/97516/3 "2025-06-09T18:36:57Z")

</div>

What would that look like in a switch node?

msg.flush = 1 ?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 June 2025 18:38 UTC](https://discourse.nodered.org/t/variable-rate-limit/97516/4 "2025-06-09T18:38:35Z")

</div>

Yes. But you’d need to remove any other properties. I’d use a function node that just returned that to be simpler.

---

<div class="post-metadata">

**Author:** ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)\
**Post date:** [9 June 2025 18:50 UTC](https://discourse.nodered.org/t/variable-rate-limit/97516/5 "2025-06-09T18:50:37Z")

</div>

That worked a treat. Thanks Dave 🙏

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 June 2025 18:51 UTC](https://discourse.nodered.org/t/variable-rate-limit/97516/6 "2025-06-23T18:51:23Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
