I just had an issue with the delay node that caught my attention, because it seems rather unintuitive.
Could somebody confirm and maybe even propose a solution how to implement solution to allow bursts.
Delay node can do rate limiting. But it cannot handle bursts.
It seems whatever I set, the set rate limit is calculated as (1 msg / x sec).
Test flow:
[{"id":"9c74974b13af27c0","type":"inject","z":"e33682730616c2c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":600,"y":100,"wires":[["c219e59f8a28360f","2164b5554c103e02"]]},{"id":"658ecb71f38d1575","type":"debug","z":"e33682730616c2c8","name":"ok","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1230,"y":80,"wires":[]},{"id":"5ba93a1744a8a0f2","type":"delay","z":"e33682730616c2c8","name":"rate limit 10 msg/m","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"10","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":2,"x":1030,"y":100,"wires":[["658ecb71f38d1575"],["1728ec1f7f03c6ae"]]},{"id":"1728ec1f7f03c6ae","type":"debug","z":"e33682730616c2c8","name":"tooo much","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1250,"y":120,"wires":[]},{"id":"c219e59f8a28360f","type":"trigger","z":"e33682730616c2c8","name":"","op1":"trigger","op2":"5.99 sec past","op1type":"str","op2type":"str","duration":"5990","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":780,"y":100,"wires":[["5ba93a1744a8a0f2"]]},{"id":"2164b5554c103e02","type":"trigger","z":"e33682730616c2c8","name":"","op1":"trigger","op2":"6 sec past","op1type":"str","op2type":"str","duration":"6000","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":780,"y":160,"wires":[[],["5ba93a1744a8a0f2"]]}]
Setup of delay node
Setup seems to impose a rate limit at 1 msg every 6 sec.
Pushing the button triggers 1 msg immediately which is passed through the delay node.
2nd msg after 5.99s is treated as above the rate and hence is limited.
3rd msg after 6s is not affected by rate limit.
I would have expected that within a sliding window of 1 minute always 10 msg would be forwarded without rate limiting, hence a short burst of msg would be ok, but a contstant high msg rate would be limited.
Is there an easy fix?