Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
The term workflow often has multiple meanings. In the context of Durable Functions, you might see workflows referred to as orchestrations. To avoid any confusion with container orchestrations, this article uses the term workflow instead.
A workflow is a multi-step operation that usually occurs in a specific order or involves long-running tasks. Real-world scenarios requiring workflows include:
- Order processing
- AI agent orchestration
- Infrastructure management
- Data processing pipelines
Events like temporary infrastructure failures or dependency downtime can often interrupt workflow execution. To prevent interruptions, you can use durable execution, which continues from the point of failure instead of restarting.
Durable execution
Durable execution provides a fault-tolerant approach to running code and handles failures gracefully through automatic retries and state persistence. Durable execution is built on three core principles:
- Incremental execution: Each operation is executed independently and in order.
- State persistence: The output of each step is saved to ensure progress isn't lost.
- Fault tolerance: If a step fails, the operation is retried from the last successful step, skipping previously completed steps.
Durable execution benefits scenarios that require stateful chaining of operations. It simplifies the implementation of complex, long-running, stateful, and fault-tolerant application patterns.
You can achieve durable execution in your workflows in Azure Container Apps by using one of the Azure-managed workflow frameworks.
Workflow frameworks for developers in Azure
Azure provides two code-oriented workflow frameworks you can use to build apps that run on Azure Container Apps:
- Durable Task SDKs
- Durable Functions
These frameworks are designed for developers and are available in multiple programming languages.
Durable Task SDKs
The Durable Task SDKs are lightweight client SDKs that provide an unopinionated programming model for authoring workflows. Unlike Durable Functions, which is tightly coupled with the Functions compute, these portable SDKs are decoupled from any compute. They allow your app to connect to a workflow engine hosted in Azure called the Durable Task Scheduler.
To ensure durable execution, the Durable Task SDKs require a storage backend to persist workflow state as the app runs. The Durable Task Scheduler backend continuously checkpoints workflow state as the app runs and automatically handles retries to ensure durable execution. The scheduler is responsible for:
- Schedules and manages workflow task execution.
- Stores and maintains workflow state.
- Handles persistence, failures, and retries.
- Load balances orchestration execution at scale on your container app.
Note
Currently, the Durable Task Python and Java SDKs are in preview. Learn which framework is recommended for production use.
Quickstarts
Try out configuring the Durable Task SDKs for your container app by using the following quickstarts.
| Quickstart | Description |
|---|---|
| Create an app with Durable Task SDKs and Durable Task Scheduler | Learn how to create workflows that use the fan-out/fan-in Durable Functions application pattern. Currently available with the .NET, Python, and Java Durable Task SDKs. |
| Host a Durable Task SDK app on Azure Container Apps | Use the Azure Developer CLI to create Durable Task Scheduler resources and deploy them to Azure with two container apps running workflow tasks. Currently available with the .NET, Python, and Java Durable Task SDKs. |
Durable Functions
As a feature of Azure Functions, Durable Functions inherits many of its characteristics as a code-oriented workflow framework offering in Azure. For example, with Durable Functions, you benefit from:
- Integrations with other Azure services through Azure Functions triggers and bindings
- Local development experience
- Serverless pricing model
How to choose
Applications built using either the Durable Task SDKs or Durable Functions can be hosted in Azure Container Apps. Learn which framework works best for your scenario.