Workflow and Orchestration

Once a workflow spans retries, waits, branching, parallel work, or human input, the system needs explicit coordination instead of improvised control flow hidden inside handlers.

This chapter covers the point where serverless systems stop being single-function utilities and start behaving like real business processes. Once a workflow spans retries, waits, branching, parallel work, or human input, the system needs explicit coordination instead of improvised control flow hidden inside handlers.

Read the lessons in order. They move from managed workflow engines to parallel fan-out and fan-in patterns, then to long-running process design, and finally to saga and compensation thinking. The common thread is that durable coordination should live in explicit workflow state, not in function memory or nested callback logic.

In this section

  • Step Functions and Workflow Engines
    Describe the pattern of using managed workflow/orchestration services to coordinate retries, branching, waiting, and human review. This section should explain why explicit workflow tools matter.
  • Fan-Out/Fan-In Workflows
    Explain parallel processing patterns where many tasks are launched and later aggregated. Discuss timeout handling, partial results, and cost implications.
  • Long-Running Business Processes
    Show how serverless can support longer workflows through orchestration, external state, durable timers, and event-driven handoffs. Explain where complexity starts to rise.
  • Saga and Compensation Patterns
    Describe how multi-step serverless workflows can handle partial failure through compensation, reversals, and explicit recovery logic.
Revised on Thursday, April 23, 2026