Flow Execution

A Contextual agent is the host process for the execution of a Node-RED flow. Node-RED runs on a single-threaded event loop (like Node.js) but can handle multiple concurrent operations through non-blocking asynchronous callbacks.

However, the Agent-type (HTTP or Event) determines whether multiple requests can be handled concurrently. HTTP agents can handle multiple concurrent operations, but Event agents handle one message at a time received from the message service.

While the agent process hosts the Node-RED flow, it also interfaces to other Contextual services such as the logging service. This allows you to use Log-tap nodes in your flows which emit data which is then sent to the logging service by the Agent.

Similarly, it is the agent software outside of Node-RED that receives incoming events and injects them into the flow at the apporpriate input node.

And while you can catch errors within your flow using a Catch Node, the agent itself will catch any uncaught errors and log them to the logging service, allowing you to further diagnose problems with your flows.

Last updated

Was this helpful?