n8n at scale: loop, batch, or queue for thousands of records?
How to choose loops, batches, or queues when n8n processes thousands of records, with production controls for retries, idempotency, and load.

When n8n must process thousands of records, the best answer is rarely one of the three in isolation. Do not add a loop when a node already processes all input items; use batching to cap data volume and request rate within an execution; use a queue or durable job store when work needs independent distribution, retries, and recovery. A common production pattern reads data by page or batch, creates jobs with idempotency keys, and lets workers process them under bounded concurrency.
Record count alone is not enough to decide. Ask whether the destination supports a batch API, what rate limits apply, whether one failed record needs an independent retry, and whether the SLA permits a long-running execution. Writing 5,000 rows through a database bulk operation is fundamentally different from making 5,000 external API requests. The design must control throughput, memory, duplicate side effects, and restart behavior.
Decision
Loops, batches, and queues solve three different problems
Separating the orchestration layers prevents queue mode from hiding an oversized execution or loops from hiding weak recovery controls.
Direct processing fits when a node accepts multiple items or supports a bulk operation, data fits within memory limits, and retrying the group is safe. Loop Over Items fits when work must advance in rounds, such as fetching 100 records at a time, pausing between groups, or stopping when pagination ends. is the broader strategy of dividing a dataset into bounded chunks; it may use Loop Over Items, pagination, or a node's native batching options.




