- No more serverless function timeouts
- Automatic recovery when a workflow fails mid-execution
- Automatic retries when your service is temporarily unavailable
- Easily monitor system activity in real-time

- Call your workflow endpoint to trigger the workflow
- The Workflow SDK sends a request to QStash with an automatically generated workflow run ID, headers, and the initial data as the request body
-
QStash calls your workflow endpoint with the current step to execute and the results of the previous steps:
- Skip successfully executed steps
- Assign previous step results to their respective variables
- Invoke the next step
In serverless environments, an API route is normally limited by a maximum function execution time (i.e. 10 seconds). By using
context.run
, each step can now take up to the maximum duration, as each step is a separate HTTP request containing data from previous steps.
As Upstash Workflow is built on top of QStash, the context
methods map to QStash features:
context.run
-> regular QStash callcontext.sleep
andcontext.sleepUntil
-> QStash’s delay featurecontext.call
-> QStash’s callback feature