|
| 1 | +--- |
| 2 | +title: Workflows in Azure Container Apps |
| 3 | +description: Learn about your workflow options for Azure Container Apps. |
| 4 | +services: container-apps, azure-functions |
| 5 | +author: lilyjma |
| 6 | +ms.service: azure-container-apps |
| 7 | +ms.topic: overview |
| 8 | +ms.date: 04/29/2025 |
| 9 | +ms.author: jiayma |
| 10 | +ms.reviewer: cshoe, hannahhunter |
| 11 | +--- |
| 12 | + |
| 13 | +# Workflows in Azure Container Apps |
| 14 | + |
| 15 | +> [!NOTE] |
| 16 | +> 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 workflows instead. |
| 17 | +
|
| 18 | +Workflows are multi-step operations that usually occur in a specific order or involve long-running tasks. Real-world scenarios requiring workflows include: |
| 19 | +- Order processing |
| 20 | +- AI agent orchestration |
| 21 | +- Infrastructure management |
| 22 | +- Data processing pipelines |
| 23 | + |
| 24 | +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. |
| 25 | + |
| 26 | +## Durable execution |
| 27 | + |
| 28 | +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: |
| 29 | + |
| 30 | +- **Incremental execution:** Each operation is executed independently and in order. |
| 31 | +- **State persistence:** The output of each step is saved to ensure progress isn't lost. |
| 32 | +- **Fault tolerance:** If a step fails, the operation is retried from the last successful step, skipping previously completed steps. |
| 33 | + |
| 34 | +Durable execution benefits scenarios requiring stateful chaining of operations. It simplifies the implementation of complex, long-running, stateful, and fault-tolerant application patterns. |
| 35 | + |
| 36 | +You can achieve durable execution in your workflows in Azure Container Apps using one of the Azure-managed workflow frameworks. |
| 37 | + |
| 38 | +## Workflow frameworks for developers in Azure |
| 39 | + |
| 40 | +Azure provides two code-oriented workflow frameworks you can use to build apps that run on Azure Container Apps: |
| 41 | +- **Durable Task SDKs** (preview) |
| 42 | +- **Durable Functions** |
| 43 | + |
| 44 | +The Durable Task SDKs and Durable Functions workflow frameworks are designed for developers and available in multiple programming languages. |
| 45 | + |
| 46 | +### Durable Task SDKs (preview) |
| 47 | + |
| 48 | +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](../azure-functions/durable/durable-task-scheduler/durable-task-scheduler.md). |
| 49 | + |
| 50 | +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: |
| 51 | + |
| 52 | +- Schedules and manages workflow task execution. |
| 53 | +- Stores and maintains workflow state. |
| 54 | +- Handles persistence, failures, and retries. |
| 55 | +- Load balances orchestration execution at scale on your container app. |
| 56 | + |
| 57 | +#### Quickstarts |
| 58 | + |
| 59 | +Try out configuring the Durable Task SDKs for your container app using the following quickstarts. |
| 60 | + |
| 61 | +| Quickstart | Description | |
| 62 | +| ---------- | ----------- | |
| 63 | +| [Configure a Durable Task SDK in your application](../azure-functions/durable/durable-task-scheduler/quickstart-portable-durable-task-sdks.md) | 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. | |
| 64 | +| [Configure a Durable Task SDK in your container app](../azure-functions/durable/durable-task-scheduler/quickstart-container-apps-durable-task-sdk.md) | 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. | |
| 65 | + |
| 66 | +### Durable Functions |
| 67 | + |
| 68 | +As a feature of Azure Functions, [Durable Functions](../azure-functions/durable/durable-functions-overview.md) inherits many of its characteristics as a code-oriented workflow framework offering in Azure. For example, with Durable Functions, you benefit from: |
| 69 | +- Integrations with other Azure services through Azure Functions [triggers and bindings](../azure-functions/functions-triggers-bindings.md) |
| 70 | +- Local development experience |
| 71 | +- Serverless pricing model |
| 72 | + |
| 73 | +> [!NOTE] |
| 74 | +> Durable Functions with Durable Task Scheduler currently only runs in App Service and Elastic Premium SKUs. Until it's available in other SKUs (like Flex Consumption), you need to use the [Microsoft SQL backend](../azure-functions/durable/durable-functions-storage-providers.md#mssql) for state persistence when hosting a Durable Functions app in Azure Container Apps. |
| 75 | +
|
| 76 | +## How to choose |
| 77 | + |
| 78 | +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](../azure-functions/durable/durable-task-scheduler/choose-orchestration-framework.md). |
| 79 | + |
| 80 | +## Next steps |
| 81 | + |
| 82 | +> [!div class="nextstepaction"] |
| 83 | +> [Learn more about the Durable Task Scheduler](../azure-functions/durable/durable-task-scheduler/durable-task-scheduler.md) |
0 commit comments