Durable Task Scheduler in Durable Functions (preview)

The Azure Functions Durable Task Scheduler is a highly performant, fully managed backend provider for Durable Functions with an out-of-the-box monitoring dashboard. Azure Functions extensions built into Durable Functions makes building event-driven scenarios easy. In this article, you learn how to:

  • Create a scheduler and task hub.
  • Configure identity-based authentication for your application to access Durable Task Scheduler.
  • Monitor the status of your app and task hub on the Durable Task Scheduler dashboard.

Learn more about Durable Task Scheduler features, supported regions, and plans.

Create a scheduler and task hub

You can create a scheduler and a task hub as part of the Function app creation on Azure portal. This creation approach automatically configures identity-based authentication for the app to access the task hub.

Note

Durable Task Scheduler currently supports apps hosted in the App Service and Functions Premium plans, so this experience is available only when either of these plan types is picked.

  1. Navigate to the Function app creation blade and select Functions Premium or App Service as a hosting option.

    Screenshot of hosting options for Function apps and selecting App Service.

  2. In the Create Function App (App Service) blade, fill in the information in the Basics tab.

    Screenshot of the Basic tab for creating an App Service plan Function app.

    Field Description
    Subscription Select your Azure subscription.
    Resource Group Select an existing resource group or click Create new to create a new one.
    Function App name Create a unique name for your function app.
    Do you want to deploy code or container image? Keep the Code option selected.
    Runtime stack Select the runtime you're using for this quickstart.
    Version Select your runtime stack version.
    Region Select one of the supported regions.
    Operating System Select your operating system.
  3. Select the Durable Functions tab.

  4. Choose Durable Task Scheduler as the backend provider for your durable functions.

  5. Create a scheduler resource. This action automatically creates a task hub.

    Screenshot of creating an App Service plan Function app.

    Field Description
    Storage backend Select Durable Task Scheduler.
    Region It's recommended that the scheduler and function app regions should be the same.
    Durable task scheduler Use the scheduler name offered, or click Create new to create a custom name.
    Plan Only Dedicated is available at the moment.
    Capacity units Currently, you can only choose one Capacity Unit as an option.
  6. Click Review + create to review the resource creation.

    A user-assigned managed identity with the required role-based access control (RBAC) permission is created automatically and added to the Function app. You can find in the summary view information related to the managed identity resource, such as:

    • The role assigned to it (Durable Task Data Contributor)

    • The assignment scoped to the task hub level

      Screenshot of fields and properties chosen and in review on the Review + create tab.

  7. Click Create once validation passes.

Configure identity-based authentication for app to access Durable Task Scheduler

Durable Task Scheduler only supports either user-assigned or system-assigned managed identity authentication. User-assigned identities are recommended, as they aren't tied to the lifecycle of the app and can be reused after the app is deprovisioned.

See step-by-step instructions on how to configure managed identity for your Durable Functions app.

Access the Durable Task Scheduler dashboard

Assign the required role to your developer identity (email) to gain access to the Durable Task Scheduler dashboard.

Auto scaling in Functions Premium plan

For Durable Functions apps on the Functions Premium plan, you can enable autoscaling using the Runtime Scale Monitoring setting.

  1. In the portal overview of your function app, navigate to Settings > Configuration.

  2. Under the Function runtime settings tab, turn on Runtime Scale Monitoring.

    Screenshot of searching for Durable Task Scheduler in the portal.

You can also set autoscaling using the Azure CLI.

az resource update -g <resource_group> -n <function_app_name>/config/web --set properties.functionsRuntimeScaleMonitoringEnabled=1 --resource-type Microsoft.Web/sites

Limitations

  • Supported hosting plans:

    The Durable Task Scheduler currently only supports Durable Functions running on Functions Premium and App Service plans. For apps running on the Functions Premium plan, you must enable the Runtime Scale Monitoring setting to get auto scaling of the app.

    The Consumption, Flex Consumption, and Azure Container App hosting plans aren't yet supported when using the Durable Task Scheduler.

  • Migrating task hub data across backend providers:

    Currently, migrating across providers isn't supported. Function apps that have existing runtime data need to start with a fresh, empty task hub after they switch to the Durable Task Scheduler. Similarly, the task hub contents that are created by using the scheduler resource can't be preserved if you switch to a different backend provider.

  • Management operations using the Azure Functions Core Tools

Next steps