FIELD NOTESAZURE · SERVERLESS · ARCHITECTURE

Durable Functions, Durable Task Scheduler or Logic Apps for long-running workflows

Functions can now call the same SaaS connectors as Logic Apps, so the connector count no longer decides. Who changes the workflow while instances wait does: replay and versioning in Durable Functions, a 365-day ceiling and resubmit in Logic Apps, and the Durable Task Scheduler chosen on day one.

By Braxx-90004 min readPublished
ON THIS PAGE
One supplier workflow built twice: a Logic Apps workflow reaching SaaS systems through managed connectors, and a Durable Functions app that keeps its state in the Durable Task Scheduler and reaches the same SaaS systems through a Connector Namespace. Drawn in archhy.

Use Logic Apps when the workflow is mostly calls to other systems and the people who will change it work in the designer and the run history. Use Durable Functions when the workflow is your team's code, with branches, loops and your own libraries, and the people who fix it are developers. The Durable Task Scheduler is not a third option. It is the backend to choose under Durable Functions, and you choose it before the first deployment, because an app cannot move its state to another backend later.

Connectors no longer settle it#

The old tie-breaker was the integration count. Logic Apps has more than 1,400 prebuilt connectors; Functions has about a dozen binding types, so every other SaaS API meant your own client, token refresh and webhook registration. A Connector Namespace now gives a function app typed SDK clients in .NET, Python and Node.js, plus a connector trigger. Microsoft's architecture blog explains that each such trigger is a Logic Apps workflow the platform creates in its own subscription. You still run the Logic Apps engine; you just never maintain its workflow. A Durable Functions activity can now post to Teams or read SharePoint without holding a secret. The line blurs from the other side too: Logic Apps Standard workflows can be written in C#, in preview.

The count still matters at the edges. Enterprise connectors such as SAP, IBM MQ and Oracle Database reach Connector Namespace in later waves, B2B messages over AS2, X12 or EDIFACT need a Logic Apps integration account, and the connector trigger does not support Java or PowerShell. If the workflow needs any of those, the choice is made for you: Logic Apps.

The real question: who changes it while it waits#

A long-running workflow is still running when you ship the next version, and the two platforms fail differently there.

Durable Functions rebuilds an orchestrator's state by replaying its recorded history against the code deployed now. Add an activity between two existing calls, and an instance that was waiting resumes, meets a call its history does not contain, and fails with a non-determinism error or sticks in Running. Orchestration versioning stamps each new instance with a version the code can branch on, but instances started before you set a default report none. So put the version and the backend in the first host.json:

JSON
{
  "extensions": {
    "durableTask": {
      "defaultVersion": "1",
      "storageProvider": {
        "type": "azureManaged",
        "connectionStringName": "DURABLE_TASK_SCHEDULER_CONNECTION_STRING"
      }
    }
  }
}

Logic Apps has a ceiling instead. A stateful run lasts 90 days by default and 365 at most, and the limit that applies is the one in force when the run started, so raising it while a slow approval is already waiting saves nothing.

Its recovery is friendlier. Someone with access to the workflow opens the failed run, reads every action's inputs and outputs, and resubmits from the action that failed. Resubmit is for failures outside the workflow, such as a revoked connection or a missing record: the new run uses the workflow version the original started with, even after you edit the definition. Starting from a chosen action works only in a sequential workflow of 40 actions or fewer, and never inside or after a For each or Until loop.

The Durable Functions equivalent, rewind, is an API call, and it does not work on instances that used a durable timer, which rules out any workflow that waited on a deadline. Compensation is the usual answer to a failure halfway through; the saga pattern with Durable Functions covers it.

Choosing the backend#

The Durable Task Scheduler is a separate Azure resource that holds orchestration state, pushes work to your app over gRPC, and has a dashboard showing each instance's timeline, history and inputs, where an operator can suspend, terminate or restart it. Microsoft recommends it over the bring-your-own providers: an Azure Storage account, SQL Server, or Netherite, whose support ends on 31 March 2028. Data cannot be migrated between backends, so switching later means a new app beside the old one until its instances drain. The Consumption SKU bills per action dispatched, up to 500 a second; the Dedicated SKU sells capacity units of 2,000 actions a second, and high availability needs three. Payloads are capped at 1 MB. Its purge clock starts when an orchestration finishes, so a waiting instance is never cleaned up. The hosting plan is a separate choice, covered in Flex Consumption, Premium or Container Apps.

On AWS and Google Cloud#

AWS draws the same line between Step Functions, designed in Workflow Studio and calling SaaS APIs through HTTP Tasks, and Lambda durable functions, which checkpoint and replay ordinary handler code for up to a year. Google Cloud splits it between Workflows, written in YAML or JSON with connectors for Google Cloud APIs, and Application Integration, the drag-and-drop option with Integration Connectors. Event-driven architecture on Azure places Durable Functions among Service Bus, Event Grid and Event Hubs.

The diagram#

One supplier workflow built twice: a Logic Apps workflow reaching SaaS systems through its managed connectors, and a Durable Functions app that keeps its state in the Durable Task Scheduler and reaches the same systems through a Connector Namespace. Open it in archhy and make a copy to draw your own.

Sources: integration services compared, managed connectors in Functions, orchestration versioning, Durable Task Scheduler, Logic Apps limits, rerunning a workflow.