Upstash Documentation

Parallel Steps

1 min read

Upstash Workflow supports executing multiple steps in parallel.

Since each step returns a Promise, you can execute multiple steps concurrently by using Promise.all(). This behavior works out of the box. No additional configuration is required.

app/api/workflow/route.ts

The results of the parallel steps are available as usual once awaited.

The dashboard visualizes parallel execution as shown below:

The workflow executes three steps in parallel

You can also await different step types together. For example, you can run a context.call() and a context.run() in parallel.

Warning

Whether executing sequentially or in parallel, you should always await all promises in a workflow. Leaving promises unawaited may cause unexpected behavior.