Performance and benchmarking#
n8n สามารถรองรับ workflow execution ได้สูงสุด 220 ครั้งต่อวินาทีบน instance เดียว และสามารถขยายได้อีกโดยเพิ่ม instance
เอกสารนี้จะอธิบายการทดสอบประสิทธิภาพ (benchmarking) ของ n8n ปัจจัยที่มีผลต่อ performance และตัวอย่าง benchmark 2 แบบ
Performance factors#
ประสิทธิภาพของ n8n ขึ้นอยู่กับปัจจัยเหล่านี้:
- ประเภท workflow
- ทรัพยากรที่ให้กับ n8n
- การตั้งค่า scaling ของ n8n
Run your own benchmarking#
ถ้าอยากได้ตัวเลขที่ตรงกับ use case ของคุณ ให้รัน benchmarking framework ของ n8n ดูรายละเอียดใน repository
Example: Single instance performance#
การทดสอบนี้ดูว่า response time จะเพิ่มขึ้นยังไงเมื่อ request per second เพิ่มขึ้น โดยวัด response time ตอนเรียก Webhook Trigger node
Setup:
- Hardware: ECS c5a.large instance (RAM 4GB)
- n8n setup: n8n instance เดียว (main mode, ใช้ Postgres database)
- Workflow: Webhook Trigger node, Edit Fields node
Example: Multi-instance performance#
การทดสอบนี้ดูว่า response time จะเพิ่มขึ้นยังไงเมื่อ request per second เพิ่มขึ้น โดยวัด response time ตอนเรียก Webhook Trigger node
Setup:
- Hardware: ECS c5a.4xlarge 7 เครื่อง (RAM 8GB ต่อเครื่อง)
- n8n setup: webhook instance 2 ตัว, worker 4 ตัว, database (MySQL) 1 ตัว, main instance 1 ตัว (รัน n8n และ Redis)
- Workflow: Webhook Trigger node, Edit Fields node
- Multi-instance setup ใช้ Queue mode