跳至内容

性能与基准测试#

n8n 在单个实例上每秒可处理多达220个工作流执行,并且能够通过添加更多实例来进一步扩展。

本文档概述了n8n的性能基准测试。它描述了影响性能的因素,并包含两个基准测试示例。

性能因素#

n8n的性能取决于以下因素:

  • 工作流类型
  • n8n可用的资源
  • 如何配置n8n的扩展选项

运行您自己的基准测试#

要获取针对您使用场景的准确评估,请运行n8n的基准测试框架。该代码库包含有关基准测试的更多信息。

示例:单实例性能#

本测试衡量随着每秒请求数增加,响应时间如何增长。它关注调用Webhook Trigger节点时的响应时间。

设置:

  • 硬件配置:ECS c5a.large实例(4GB内存)
  • n8n 设置:单个 n8n 实例(以主模式运行,使用 Postgres 数据库)
  • 工作流: Webhook Trigger节点, Edit Fields节点

Graph showing n8n response times by requests per second

This graph shows the percentage of requests to the Webhook Trigger node getting a response within 100 seconds, and how that varies with load. Under higher loads n8n usually still processes the data, but takes over 100s to respond.

示例:多实例性能#

本测试衡量随着每秒请求数增加,响应时间如何增长。它观察调用Webhook Trigger节点时的响应时间。

设置:

  • 硬件:七台 ECS c5a.4xlarge 实例(每台 8GB 内存)
  • n8n 设置:两个 webhook 实例、四个 worker 实例、一个数据库实例(MySQL)、一个运行 n8n 和 Redis 的主实例
  • 工作流: Webhook Trigger节点, Edit Fields节点
  • 多实例设置使用队列模式

Graph showing n8n response times by requests per second

This graph shows the percentage of requests to the Webhook Trigger node getting a response within 100 seconds, and how that varies with load. Under higher loads n8n usually still processes the data, but takes over 100s to respond.
优云智算