Batch Process Data with Redis-powered Debouncing System

How it works This implementation aggregates incoming data into a Redis list from potentially concurrent workflow executions. It buffers the data for a set period before a single execution retrieves and processes the entire batch.

Step-by-step Flow: Trigger: Data is received from a trigger (e.g., an external workflow execution).

Lock Check: The system verifies that the queue is not currently locked; if it is, the process waits.

Append: The received data is appended to a Redis list.

Tagging: A unique execution identifier is generated and written to a specific Redis key (acting as a "last writer" marker).

Wait: The execution pauses for a configured duration.

Verification: After the wait, the execution checks if the Redis key still contains its specific identifier.

Exit Condition: If the identifier has changed, it indicates a newer execution has arrived. The current execution terminates.

Processing: If the identifier matches, this execution assumes responsibility for the batch. It locks the queue, retrieves all data, clears the Redis list, releases the lock, and forwards the aggregated data further.

Setup Add your Redis instance credentials Configure the debounce period (2 seconds by default) Adjust this workflow's trigger and what it calls in the end

0
Downloads
0
Views
6.84
Quality Score
beginner
Complexity
Author:Gregory(View Original →)
Created:11/25/2025
Updated:11/25/2025

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments