性能和基准测试#
¥Performance and benchmarking
n8n 在单个实例上每秒最多可处理 220 个工作流执行,并且可以通过添加更多实例来进一步扩展。
¥n8n can handle up to 220 workflow executions per second on a single instance, with the ability to scale up further by adding more instances.
本文档概述了 n8n 的性能基准测试。它描述了影响性能的因素,并包含两个示例基准测试。
¥This document outlines n8n's performance benchmarking. It describes the factors that affect performance, and includes two example benchmarks.
性能因素#
¥Performance factors
n8n 的性能取决于以下因素:
¥The performance of n8n depends on factors including:
- 工作流类型
¥The workflow type
- n8n 可用的资源。
¥The resources available to n8n
- 如何配置 n8n 的扩展选项
¥How you configure n8n's scaling options
运行你自己的节点基准测试#
¥Run your own benchmarking
要获得针对你用例的准确估算,请运行 n8n 的 基准测试框架。该仓库包含更多关于基准测试的信息。
¥To get an accurate estimate for your use case, run n8n's benchmarking framework. The repository contains more information about the benchmarking.
示例:单实例性能#
¥Example: Single instance performance
此测试衡量响应时间如何随每秒请求数的增加而增加。它查看调用 Webhook 触发节点时的响应时间。
¥This test measures how response time increases as requests per second increase. It looks at the response time when calling the Webhook Trigger node.
设置:
¥Setup:
- 硬件:ECS c5a.large 实例(4GB 内存)
¥Hardware: ECS c5a.large instance (4GB RAM)
- n8n 设置:单个 n8n 实例(在主模式下运行,使用 Postgres 数据库)
¥n8n setup: Single n8n instance (running in main mode, with Postgres database)
- 工作流:Webhook 触发节点,编辑字段节点
¥Workflow: Webhook Trigger node, Edit Fields node
示例:多实例性能#
¥Example: Multi-instance performance
此测试衡量响应时间如何随每秒请求数的增加而增加。它查看调用 Webhook 触发节点时的响应时间。
¥This test measures how response time increases as requests per second increase. It looks at the response time when calling the Webhook Trigger node.
设置:
¥Setup:
- 硬件:七个 ECS c5a.4xlarge 实例(每个实例 8GB 内存)
¥Hardware: seven ECS c5a.4xlarge instances (8GB RAM each)
- n8n 设置:两个 Webhook 实例、四个工作实例、一个数据库实例(MySQL)、一个运行 n8n 和 Redis 的主实例。
¥n8n setup: two webhook instances, four worker instances, one database instance (MySQL), one main instance running n8n and Redis
- 工作流:Webhook 触发节点,编辑字段节点
¥Workflow: Webhook Trigger node, Edit Fields node
- 多实例设置使用 队列模式
¥Multi-instance setups use Queue mode

