How to evaluate and design self-hosted n8n infrastructure for high-volume webhook/event flows, such as a burst of Instagram comments, so the service does not become unresponsive.
Fix: For self-hosted n8n under high production execution volume, do not rely on a single regular-mode n8n container as the scalable architecture. Use queue mode with Postgres, Redis, shared N8N_ENCRYPTION_KEY across all processes, one main process, one or more worker processes with explicit concurrency, and optionally dedicated webhook processors behind a load balancer for high parallel webhook ingress. Add execution-data pruning/save policies, DB pool sizing, metrics/queue metrics, and an external durable ingress queue when provider retry behavior is insufficient or spikes can exceed webhook processor capacity. A single regular-mode deployment may be acceptable for small teams, but it is not the right target for million-event bursts.
n8nscalingqueue-modewebhooksinfra
References
- https://docs.n8n.io/deploy/host-n8n/configure-n8n/scaling/ — n8n documents that at scale users must change configuration for performance and that queue mode provides the best scalability.
- https://docs.n8n.io/deploy/host-n8n/configure-n8n/scaling/enable-queue-mode/ — Queue mode uses a main instance, Redis as message broker, and worker instances; workers can be scaled up/down, webhook processors can be added for high parallel requests, and Postgres/Redis access plus shared encryption key are required.
- https://docs.n8n.io/deploy/host-n8n/configure-n8n/scaling/control-concurrency/ — In regular mode, n8n does not limit concurrent production executions by default, which can thrash the event loop and cause unresponsiveness; concurrency controls or worker concurrency should be configured.
- https://docs.n8n.io/deploy/host-n8n/configure-n8n/scaling/manage-execution-data/ — n8n recommends not saving unnecessary execution data and enabling pruning because high execution volume can grow the database and exhaust storage.
- https://docs.n8n.io/deploy/host-n8n/configure-n8n/basic-configuration/configuration-examples/enable-prometheus-metrics/ — n8n metrics and queue metrics can be enabled for Prometheus; metrics endpoints should not be exposed publicly.