Learning resourcesReviewed · n8n

Scale and run at high availability on AWS

This n8n documentation page explains how to scale n8n and run it at high availability on AWS with the terraform-aws-n8n Terraform module, for developers and infrastructure operators who deploy n8n with that module. By default, the module's multi-main setup requires an n8n Enterprise license, and its Redis is a single node. It explains worker autoscaling, Redis failover, connection timeouts and encryption settings in the terraform-aws-n8n module.

Researched 14 Nov 2026

In short.

This deployment guide helps developers and infrastructure operators scale n8n on AWS, but enabling multiple main pods does not eliminate the default Redis failure risk. It documents license requirements, queue-based worker autoscaling and optional Redis replication across two Availability Zones. It also explains why failover can still cause pod restarts or lose recent queue writes, and why changing Redis topology requires maintenance. Costs beyond a relative Redis estimate, version compatibility and actual deployment performance are unknown; nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete selected documentation page at its exact source address, including warnings about licensing, single-main downtime, autoscaler diagnostics, Redis failover, timeout tuning, destructive topology changes, memory pressure and connection security. Linked pages, the documentation index and repository files are excluded. No resource behavior was executed or tested, and deployment performance, absolute costs, version compatibility and full license terms remain unknown.

The overview

Identity

Scale and run at high availability on AWS is an n8n documentation page covering module-specific settings for terraform-aws-n8n. Its scope is multi-main operation, worker autoscaling and Redis availability.

The original source is [https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-aws-with-terraform/scale-and-run-at-high-availability.md]. The Terraform module's repository and related documentation are linked, but their contents are not included in the evidence.

Assessment

The guide is useful for planning availability improvements because it names specific configuration controls and explains their failure modes. A particularly useful distinction is that multiple main pods still depend on Redis for both queue operation and leader election.

It supports configuration decisions, but does not establish an uptime guarantee, supported workload size or measured throughput. Its recovery timings are documentation claims, not independently verified results.

Users

The strongest fit is a developer or infrastructure team already using, or evaluating, terraform-aws-n8n and responsible for workflow queues, maintenance and service availability.

Using the settings and diagnostics assumes familiarity with Terraform, Kubernetes pods, ingress routing and Redis. Beginners can use the explanations to understand the trade-offs, but the page does not provide a complete first-deployment walkthrough.

Capabilities

The page covers choosing one or multiple main pods, scaling workers according to Redis queue depth, enabling a two-zone Redis replication group, tuning Redis connection tolerance and enabling encrypted, authenticated Redis connections.

It also explains session persistence, Redis memory eviction behavior and autoscaler diagnostics. The module installs KEDA automatically and enables sticky sessions on its own Ingress.

Using it

Requirements

The module's default multi-main deployment requires an Enterprise license. Setting n8n_main_hpa_min_replicas = 1 disables multi-main leader election and requires a Business plan license instead.

A load balancer or Ingress serving multiple main pods needs sticky sessions so a browser stays connected to one pod. A customer-managed Ingress must provide this behavior.

The diagnostics require access to the Kubernetes deployment. This page does not specify supported software versions, complete AWS permissions or workload-specific sizing requirements.

Mechanism

By default, the module deploys n8n in queue mode with a multi-main setup. Redis holds queue data and supports multi-main leader election, while KEDA adjusts worker pod counts according to queue depth.

By default, Redis is a single-node aws_elasticache_cluster. Enabling Redis high availability replaces that topology with a replication group containing one primary and one replica across two Availability Zones, with automatic failover.

Redis replication is asynchronous. A promoted replica may therefore lack recent queue writes, so automatic failover does not guarantee that every queued write survives.

Setup

The documented Redis availability control is redis_high_availability_enabled = true. Both Redis nodes use redis_node_type. The page also shows n8n_redis_timeout_threshold = 60000 to give connections more time to recover during failover and DNS changes.

Redis defaults to private-subnet access restricted by a security group, without TLS or a password. Setting redis_transit_encryption_enabled = true enables TLS, generates an AUTH token and configures every n8n container to use it. KEDA's queue-depth triggers automatically use the same encrypted, authenticated connection.

The module sets redis_maxmemory_policy to noeviction. Redis memory must accommodate both queue data and n8n's cache.

Example

For an illustrative deployment needing Redis failover, the page shows redis_high_availability_enabled = true with redis_node_type = "cache.r6g.large". It separately shows combining high availability with n8n_redis_timeout_threshold = 60000 to tolerate longer Redis interruptions.

These settings illustrate the controls available. The evidence does not establish that this node size fits a particular workload, or that the timeout will prevent restarts in every environment. No example was executed.

Assessment & evidence

Limitations

Single-main mode forces the main autoscaling maximum to one, uses a Recreate upgrade strategy and permits eviction of the only main pod. The page warns of editor, REST API and scheduled-trigger downtime during upgrades and maintenance.

The page reports Redis promotion in about twenty seconds, while n8n's default Redis timeout threshold is ten seconds. Main, worker and webhook pods can consequently restart during failover. Kubernetes restarts them, and the page describes recovery as typically completing within a minute when Redis is available; these timings were not verified.

Switching redis_high_availability_enabled on a live deployment destroys the existing cache and loses work queued or in progress. Separately, noeviction prevents silent queue-key eviction but still allows memory exhaustion to cause rejected writes and job-lock-renewal failures.

Reasoning

A longer Redis timeout can allow failover and stale DNS resolution to finish before n8n exits. The page reports approximate effective budgets of 11.1 seconds for a setting of 10000, 33.2 seconds for 30000 and 66.4 seconds for 60000, because connection attempts make the timing coarser than the configured value.

The trade-off is slower process exit when Redis remains genuinely unavailable. Choosing a longer threshold therefore balances tolerance of temporary interruptions against the desired restart response; it does not guarantee uninterrupted service or prevent asynchronous replication losses.

Alternatives

Within this module, the documented choices include an Enterprise-licensed multi-main deployment or a Business-licensed single-main deployment with maintenance downtime. Redis can remain a single node or use the optional two-zone replication group.

These choices address different dependencies: main-pod redundancy does not remove Redis's single-node failure risk. Other deployment tools and hosting services are not compared in the supplied page.

Evidence

The evidence consists of the complete n8n documentation page, including its configuration examples, diagnostic commands and operational warnings. No linked repository contents, related documentation or license files are included.

The source revision is sha256:31fbb44777d691edd9909b6b0d75f1e6edcd2f7f0bf5435d105aa573b2fa6ffa. Recovery behavior and timing figures are attributed to the documentation. No commands, deployments, load tests or failover tests were executed.

Access & freshness

Costs

The page says enabling Redis high availability roughly doubles Redis cost because it provisions two nodes of the same type. This is a Redis-only comparison, not an estimate that the entire deployment costs twice as much.

Enterprise and Business plan prices, absolute AWS costs and any savings from worker autoscaling are unknown. The page supplies no regional pricing, workload assumptions or total deployment estimate.

Rights

The page states the plan requirements for multi-main and single-main operation, but does not provide the complete license terms for n8n or the Terraform module.

Documentation reuse rights, module redistribution permissions and the full terms of either plan are not established by this evidence.

Freshness

The documentation snapshot was captured on 14 November 2026 at 23:10:30.112 UTC. The page does not provide a publication date, last-updated date or module release identifier.

Specific n8n, Terraform, Kubernetes, Redis and KEDA versions are not stated. Compatibility with a particular installed version and changes after the capture are unknown.

Actions

Confirm the required n8n plan, Redis capacity and projected AWS cost before choosing the topology. Check sticky sessions when supplying an Ingress, and decide whether to enable Redis TLS and authentication.

For autoscaler diagnostics, the page specifies kubectl -n n8n get scaledobject. READY=True indicates a healthy scaler; READY=False warrants inspecting KEDA operator logs for Redis connection problems. An HPA TARGETS value of <unknown> alone does not establish an autoscaling failure.

Before changing Redis topology, schedule maintenance, stop new work from reaching n8n, let workers drain and verify that bull:jobs:wait, bull:jobs:active and bull:jobs:delayed are empty before applying the change.

Evidence for this report

selected-page.txtselected · checked 2026-11-14