NodeRED速率限制节点:数据到达率超限后的行为问询
a) Is there a backpressure mechanism?
You’re right to connect this to Node.js’s model, but let’s break it down clearly: Node-RED’s core rate limit node doesn’t have a built-in active backpressure system. That means it won’t send a signal upstream telling other nodes to pause sending messages when it’s overwhelmed.
That said, thanks to Node.js’s single-threaded event loop, there’s a form of passive backpressure that kicks in indirectly. If the rate limit node’s internal queue (for holding delayed messages) grows huge, processing those queued tasks will eat up event loop time. This slows down how quickly upstream nodes can process and send new messages—since the event loop can’t get to their tasks as fast. But this is a side effect of the runtime, not a deliberate backpressure feature built into the node itself. If you need explicit backpressure, you’d have to add custom logic or use third-party nodes designed for that.
b) Will heap memory balloon rapidly?
It depends entirely on the node’s mode and your incoming message volume:
- If you’re using the default Delay mode, excess messages get stored in an internal queue. If incoming messages keep flooding in faster than the set limit, this queue will grow over time. Each message takes up memory, so heap usage will climb steadily. In extreme cases (like unrelenting high traffic), this could lead to an out-of-memory crash.
- If you switch to Drop mode, excess messages are discarded immediately. Since they aren’t stored, you won’t see any noticeable heap memory spike—even with way-too-fast incoming traffic.
- Some third-party rate limit nodes let you set a maximum queue size; once the queue hits that limit, new messages are dropped or errored out. This prevents unlimited memory growth too.
c) Are messages dropped directly?
Not by default—this is fully configurable in the core rate limit node:
- Delay mode: No messages are dropped (unless the system runs out of memory entirely, which is a worst-case scenario). Excess messages are queued up and released at the set rate.
- Drop mode: Any message that arrives faster than the limit is immediately discarded. Only the messages that fit within your rate constraint are passed through.
A quick note: Third-party rate limit nodes might have extra behaviors (like sending an error message when a message is dropped), but the core node sticks strictly to these two modes.
内容的提问来源于stack exchange,提问作者Romeo Kienzler

