Design a Durable Workflow Orchestrator Like Azure Durable Functions

Last updated: November 29, 2026

Quick Overview

Design a service that runs long-lived workflows written as code (call activity A, wait for an approval event for up to 3 days, fan out to 100 activities, then aggregate) and survives process crashes without losing progress.

Microsoft
System Design
Software Engineer
Microsoft
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design a service that runs long-lived workflows written as code (call activity A, wait for an approval event for up to 3 days, fan out to 100 activities, then aggregate) and survives process crashes without losing progress.

Azure Functions and Logic Apps teams care about durable execution, and the question tests event sourcing, deterministic replay and reliable messaging. Interviewers look for how state is checkpointed, how timers work, and why orchestrator code has to be deterministic.

What the Interviewer Expects
  • Stores each workflow as an append-only history of events
  • Resumes orchestrations by deterministically replaying history
  • Dispatches activities through durable queues with at-least-once delivery
  • Implements durable timers and external events
  • Handles fan-out and fan-in at scale
  • Explains versioning of orchestrator code
Key Topics to Cover
Event sourcing
Deterministic replay
Durable timers
At-least-once delivery
Fan-out and fan-in
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • Why can an orchestrator not call DateTime.Now or a random number generator directly?
  • How do you deploy a new version of workflow code while old instances are mid-flight?
  • An activity charges a credit card and the worker crashes after charging. What happens?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Users write orchestrator functions that call activities, wait on timers and external events, and run sub-orchestrations. Instances may live for months. Requirements: no progress lost on crashes, milli...

High-Level Design

Components: a history store (table of events per instance), control queues partitioned by instance id hash (messages for orchestrators), a work-item queue for activities, and workers that ...


Submit Your Answer
Markdown supported