Task Runners for Code node: public beta release

As of 1.71.0, we’re excited to announce that Task runners for the Code node has entered public beta on self-hosted instances. This is a significant upgrade that fundamentally changes how JavaScript code executes in n8n, bringing major performance improvements and enhanced isolation.

What’s New?

  • Performance Boost: Our benchmarks show up to 6x improvement in workflow executions using Code nodes (from ~6 to ~35 executions per second)
  • Better process isolation: Code execution now happens in a separate process
  • Zero learning curve: All improvements happen under the hood - your Code node experience remains exactly the same

How Does It Work?

Task Runners move JavaScript code execution to a separate process, preventing Code node operations from blocking your entire n8n instance. We offer two modes:

  • Internal Mode (default): Perfect for getting started, automatically manages task runners as child processes
  • External Mode: For advanced hosting scenarios requiring maximum isolation and security

Getting Started

Task Runners are currently opt-in. To try it out:

  1. Make sure you’re on 1.71.0 or later
  2. Enable the feature using environment variables
  3. Check out our detailed documentation for setup instructions

Why are we introducing Task Runners?

  • Performance: Significantly improves workflow execution speed
  • Resource management: Better handling of system resources with isolated processes
  • Enterprise ready: Enhanced security and isolation for business-critical workflows

How to provide feedback

We’re actively collecting feedback and bug reports. Before posting:

  • Check existing issues to avoid duplicates
  • If you encounter any problems, please include:
    • Your n8n version
    • Environment configuration (excluding sensitive data)
    • Steps to reproduce the issue

What’s Next?

Once the beta period concludes successfully, Task runners will become the default execution method for Code nodes. We’ll continue monitoring performance and stability to ensure a smooth transition.

Thank you for helping us test and improve Task Runners! Your feedback is crucial in making n8n better for everyone.

20 Likes

Woow! That’s awesome! :muscle::tada:

2 Likes

Awesome!

some compose example for docker users ?

1 Like

You just need to set the environment variables, see the link above.

1 Like

Basically the only environment variable you need is N8N_RUNNERS_ENABLED=true to get started, and that should be enough for majority of the cases. It’s the external mode that requires a more complex setup. See the documentation for more details.

4 Likes

This is actually so huge!

Biggest gripe with VM2 has been its inability to use native, standard nodeJS APIs (eg. fetch, buffers) nor extend Javascript classes which has ruled out some newer libraries. Looking forward to trying all sorts of fun experiments with this!

Python next? Maybe Rails, Lua or PHP? :grin:

Also probably not but I have to ask - any plans to extend task runners to Langchain Code node enjoyers?

3 Likes

Thanks. Yes, I have read the documentations.

For the external, I have don’t understand if it requires some change of config on compose. For that, I have questioning about compose example :slight_smile:

This could not come at a better time. Testing a workflow with a code step that has a nasty habit of locking up the entire server. This completely resolved that!

1 Like

The feature is still in beta, so we don’t have all documentation available yet. Thank you for bringing this up. We will consider adding more examples how to configure the external mode.

2 Likes