0c6169ee22
# Motivation In Queue mode, finished executions would cause the main instance to always pull all execution data from the database, unflatten it and then use it to send out event log events and telemetry events, as well as required returns to Respond to Webhook nodes etc. This could cause OOM errors when the data was large, since it had to be fully unpacked and transformed on the main instance’s side, using up a lot of memory (and time). This PR attempts to limit this behaviour to only happen in those required cases where the data has to be forwarded to some waiting webhook, for example. # Changes Execution data is only required in cases, where the active execution has a `postExecutePromise` attached to it. These usually forward the data to some other endpoint (e.g. a listening webhook connection). By adding a helper `getPostExecutePromiseCount()`, we can decide that in cases where there is nothing listening at all, there is no reason to pull the data on the main instance. Previously, there would always be postExecutePromises because the telemetry events were called. Now, these have been moved into the workers, which have been given the various InternalHooks calls to their hook function arrays, so they themselves issue these telemetry and event calls. This results in all event log messages to now be logged on the worker’s event log, as well as the worker’s eventbus being the one to send out the events to destinations. The main event log does…pretty much nothing. We are not logging executions on the main event log any more, because this would require all events to be replicated 1:1 from the workers to the main instance(s) (this IS possible and implemented, see the worker’s `replicateToRedisEventLogFunction` - but it is not enabled to reduce the amount of traffic over redis). Partial events in the main log could confuse the recovery process and would result in, ironically, the recovery corrupting the execution data by considering them crashed. # Refactor I have also used the opportunity to reduce duplicate code and move some of the hook functionality into `packages/cli/src/executionLifecycleHooks/shared/sharedHookFunctions.ts` in preparation for a future full refactor of the hooks |
||
---|---|---|
.. | ||
bin | ||
scripts | ||
src | ||
templates | ||
test | ||
.eslintrc.js | ||
BREAKING-CHANGES.md | ||
jest.config.js | ||
LICENSE.md | ||
LICENSE_EE.md | ||
nodemon.json | ||
package.json | ||
README.md | ||
tsconfig.build.json | ||
tsconfig.json |
n8n - Workflow Automation Tool
n8n is a free and open fair-code distributed node-based Workflow Automation Tool. You can self-host n8n, easily extend it, and even use it with internal tools.
Contents
- Demo
- Getting Started
- Available integrations
- Documentation
- Create Custom Nodes
- Contributing
- What does n8n mean and how do you pronounce it
- Support
- Jobs
- Upgrading
- License
Demo
📺 Here's a 📺 short video (< 4 min) that goes over key concepts of creating workflows in n8n.
Getting Started
There are a couple of ways to get started with n8n.
Use npx
To spin up n8n using npx, you can run:
npx n8n
It will download everything that is needed to start n8n.
You can then access n8n by opening: http://localhost:5678
Note: The minimum required version for Node.js is v14.15. Make sure to update Node.js to v14.15 or above.
Run with Docker
To play around with n8n, you can also start it using Docker:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
docker.n8n.io/n8nio/n8n
Be aware that all the data will be lost once the Docker container gets removed. To persist the data mount the ~/.n8n
folder:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Refer to the documentation for more information on the Docker setup.
Install with npm
To install n8n globally using npm:
npm install n8n -g
After the installation, start n8n running the following command:
n8n
# or
n8n start
Sign-up on n8n.cloud
Sign-up for an n8n.cloud account.
While n8n.cloud and n8n are the same in terms of features, n8n.cloud provides certain conveniences such as:
- Not having to set up and maintain your n8n instance
- Managed OAuth for authentication
- Easily upgrading to the newer n8n versions
Available integrations
n8n has 280+ different nodes that allow you to connect various services and build your automation workflows. You can find the list of all the integrations at https://n8n.io/integrations
Documentation
To learn more about n8n, refer to the official documentation here: https://docs.n8n.io
You can find additional information and example workflows on the n8n.io website.
Create Custom Nodes
You can create custom nodes for n8n. Follow the instructions mentioned in the documentation to create your node: Creating nodes
Contributing
🐛 Did you find a bug?
✨ Do you want to contribute a feature?
The CONTRIBUTING guide will help you set up your development environment.
You can find more information on how you can contribute to the project on our documentation: How can I contribute?
What does n8n mean, and how do you pronounce it?
Short answer: n8n is an abbreviation for "nodemation", and it is pronounced as n-eight-n.
Long answer: In n8n, you build your automation ("-mation") workflows by connecting different nodes in the Editor UI. The project is also built using Node.js. As a consequence, the project was named nodemation.
However, the name was long, and it wouldn't be a good idea to use such a long name in the CLI. Hence, nodemation got abbreviated as "n8n" (there are eight characters between the first and the last n!).
Support
If you run into issues or have any questions reach out to us via our community forum: https://community.n8n.io.
Jobs
If you are interested in working at n8n and building the project, check out the job openings.
Upgrading
Before you upgrade to the latest version, make sure to check the changelogs: Changelog
You can also find breaking changes here: Breaking Changes
License
n8n is fair-code distributed under the Sustainable Use License.
Proprietary licenses are available for enterprise customers. Get in touch
Additional information about the license can be found in the docs.