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.
This article helps you decide between the two Durable Task hosting models — Durable Functions (Azure Functions) and the standalone Durable Task SDKs (self-hosted) — based on your hosting platform, scaling needs, and operational requirements.
Tip
Already know your hosting platform? Jump to the platform lookup table for a quick answer.
As described in What is Durable Task?, Durable Task supports two hosting models:
- Azure Functions (via Durable Functions)
- Self-hosted (via the standalone Durable Task SDKs).
Both hosting models provide the same core durable execution capabilities (orchestrations, activities, timers, external events, and more) but differ in how your application is hosted, scaled, and deployed.
In general, where your application runs determines which hosting model you use. If you're building on Azure Functions, you use Durable Functions. If you're building on any other compute platform, you use the standalone Durable Task SDKs.
Choose based on hosting platform
If you already know your application's hosting platform, the following table can help you determine which hosting model to use:
| Hosting platform | Hosting model |
|---|---|
| Azure Functions (Consumption, Flex Consumption, Premium) | Durable Functions |
| Azure Container Apps (with Azure Functions runtime) | Either |
| Azure App Service (with Azure Functions runtime) | Either |
| Azure Kubernetes Service (AKS) | Standalone Durable Task SDKs |
| Virtual machines or on-premises | Standalone Durable Task SDKs |
Note
Azure App Service and Azure Container Apps can both host the Azure Functions runtime, either through fully managed Azure Functions integration or by deploying the Functions runtime directly. Thus, both platforms support either hosting model. For more information on Azure Functions hosting models, see Azure Functions hosting plans.
Compare the hosting models
The following table summarizes the key differences between the two hosting models:
| Durable Functions (Azure Functions) | Standalone Durable Task SDKs (self-hosted) | |
|---|---|---|
| Hosting | Azure Functions (Consumption, Flex Consumption, Premium), App Service, and Container Apps (with Functions runtime) | Any platform: Azure Container Apps, AKS, App Service, VMs, on-premises |
| Scaling | Automatic, managed by the Azure Functions managed scale infrastructure | You manage scaling yourself, or use platform-native autoscaling (for example, KEDA on Kubernetes) |
| Triggers | Built-in support for HTTP, Queue, Timer, Event Grid, and other Azure Functions triggers | You define your own entry points (for example, HTTP endpoints, message consumers, etc.) |
| State storage | Durable Task Scheduler (recommended), Azure Storage, MSSQL, Netherite | Durable Task Scheduler |
| Languages | .NET (C#/F#), JavaScript/TypeScript, Python, Java, PowerShell | .NET (C#/F#), JavaScript/TypeScript, Python, Java |
| Monitoring | Built-in integration with Azure portal, Application Insights | You set up your own monitoring solution (for example, Azure Monitor, Prometheus, or Grafana) |
Note
Cold start occurs when a function app starts after being idle. Premium and Dedicated hosting plans keep instances warm to reduce cold start latency.
The Flex Consumption hosting plan offers an "always ready instances" concept as cold start mitigation.
Learn more about Azure Functions hosting models.
Built-in HTTP APIs
Azure Functions provides HTTP endpoints for your functions app, which the Durable Functions extension leverages to provide built-in support for instance management over HTTP.
When using the Durable Task SDKs, you need to implement your own HTTP endpoints depending on your hosting compute.
| Feature | Durable Functions | Durable Task SDKs |
|---|---|---|
| Management HTTP APIs | ✅ Built-in | ❌ Implement your own |
| Automatic status URLs | ✅ Built-in | ❌ Implement your own |
Durable Functions HTTP features
Durable Functions automatically exposes HTTP endpoints for starting orchestrations, querying status, raising events, and terminating instances. These APIs follow the async HTTP polling pattern, making it easy to integrate with external systems.
Note
Durable Functions supports using DurableTaskClient class directly if you would prefer it to using the built-in HTTP APIs.
Learn more: HTTP features in Durable Functions | HTTP API reference
Durable Task SDKs management
With the Durable Task SDKs, you use the DurableTaskClient class directly to manage orchestration instances. If you need HTTP endpoints, you implement them yourself using your preferred web framework.
Learn more: Manage orchestration instances
Storage backends
Both hosting models use the Durable Task Scheduler — a fully managed Azure service for orchestration state persistence and execution (pricing). Durable Functions additionally supports bring-your-own storage backends (Azure Storage, MSSQL, and Netherite). The Durable Task SDKs exclusively use the Durable Task Scheduler.
Learn more: Storage providers
Task hub configuration
Durable Functions configures task hubs in the host.json file. The Durable Task SDKs configure task hubs in code and environment variables (connection string/endpoint).
Learn more: Task hubs
Diagnostics and versioning
| Feature | Durable Functions | Durable Task SDKs |
|---|---|---|
| Durable Task Scheduler dashboard | ✅ Yes | ✅ Yes |
| Application Insights | ✅ Built-in | Manual setup |
| Zero-downtime deployment | ✅ Functions slots | Platform-specific |
Learn more: Diagnostics | Versioning
When to choose each model
When choosing between the two hosting models, consider the following factors:
| Choose Durable Functions if... | Choose standalone Durable Task SDKs if... |
|---|---|
| You want built-in Azure Functions triggers (HTTP, Queue, Timer, etc.). | You want full control over your container and its entry points. |
| You're already familiar with the Azure Functions hosting model. | You prefer a lightweight SDK without the Azure Functions runtime overhead. |
| You want Azure portal integration for function management. | You want the same code to be portable across container platforms (AKS, App Service, etc.). |
| You need to choose from multiple storage backends. | You have existing non-Functions application code to integrate with. |
| You need serverless, event-driven apps that scale to zero. | You need always-on, low-latency workloads without cold start delays. |
| You want pay-per-execution pricing with the consumption plan. | You need high-throughput scenarios optimized for batch processing. |
| You need quick prototyping with declarative triggers and bindings. | You have existing containerized or Kubernetes applications. |
Migration
If you're already using Durable Functions and want to move to a container-based deployment or take advantage of the Durable Task SDKs' hosting flexibility, migration is straightforward. The orchestration code is very similar between both frameworks.
For detailed migration guidance, see Migrate from Durable Functions to the Durable Task SDKs.
Note
Durable Task Framework (DTFx): The Durable Task Framework is a community-maintained, open-source .NET library for durable orchestration. It's used internally as a dependency of Durable Functions, but doesn't come with official Microsoft support. If you're starting a new project, use the modern Durable Task SDKs or Durable Functions instead.
Next steps
Get started with the framework you chose:
Then, learn more about the Durable Task Scheduler backend provider.