azure functions
308 TopicsAzure Functions Canvas (Preview): Build, run, and modernize Function Apps with GitHub Copilot
If you use the GitHub Copilot app or Visual Studio Code, meet the Azure Functions canvas. More and more developers now build with coding agents. The Azure Functions canvas helps you get more from that workflow. It addresses three common problems in Azure Functions development: Use official templates without leaving your workflow. Get the same high-quality Azure Functions templates available in VS Code, directly in the GitHub Copilot app. Start building without switching tools. Agents get there eventually, but slowly. A coding agent can produce an app that runs, but it can take many turns. You also can't always tell whether the result follows best practices. Outdated choices cause incidents. Programming models, hosting plans, and runtime versions that reach end of support can cause outages. So can incorrect code or settings. Canvases are new in the GitHub Copilot app. A canvas runs deterministic tasks quickly, without a round trip through the agent. It also gives you a visual workspace with state that you and the agent share. We're only starting to explore what canvases make possible. Build faster with up-to-date templates The canvas includes 90 starter and scenario templates for Azure Functions and Hosted Skills. They're more than samples: many include Bicep templates that deploy with the Azure Developer CLI (azd). The canvas applies a template directly, so the agent needs fewer turns and less time to give you working code. This is real code in your local work tree. You own the code and can extend it with GitHub Copilot, add it to your repository, and deploy it to Azure. The canvas supports the full development loop: create, run locally, test, and deploy. You can also open your project in VS Code to continue development and debugging. Test your event-driven functions Azure Functions is built for event-driven applications, but testing different triggers isn't always straightforward. The Azure Functions canvas brings event-driven testing into your development workflow. It supports HTTP, Timer, Event Hubs, Service Bus, Storage Queue, Blob, Durable Functions, and Blob triggers with Event Grid. Instead of switching between tools, you can test your functions as you build them, making it easier to develop and validate event-driven applications. Build Hosted Skills with templates and an agent With Hosted Skills, you build event-driven agents in natural language. The canvas includes 14 templates for them. Start from the template that matches your scenario to scaffold quickly, then let the agent continue. Built-in skills help the agent with creation, deployment, and configuration. To build and test a Hosted Skill step by step, see Quickstart: Build and test a hosted skill with the Azure Functions hosted skills canvas. Modernize with confidence On PaaS and serverless platforms, you must regularly review programming models, hosting plans, and supported runtime versions. This is important for security and reliability. Internal data from the Azure Functions team shows that 58% of incidents come from code or configuration issues. These issues are easy to miss. With the canvas, you can quickly find them in local projects and in apps deployed to Azure, and then have the agent fix them. Checks are read-only, and fixes need your approval. The canvas helps you follow current Azure Functions security and runtime best practices, from choosing supported configurations to identifying issues in existing applications. Continue development in VS Code Your project is real code, not a prototype locked inside the canvas. Open it in VS Code to continue development with your familiar tools. The generated project includes configuration and infrastructure files to help you run locally and deploy to Azure. Available in seven languages From day one, the canvas supports seven languages: English, Chinese (Simplified), German, Japanese, Korean, Portuguese (Brazil), and Spanish. Get started Find Azure Functions on Awesome GitHub Copilot, or install it from the marketplace: in the GitHub Copilot app, open Customize > Plugins, select Awesome Copilot, and install Azure Functions. Pro tip: install it directly. Start a new session, then ask: Open Azure Functions canvas. Use it in VS Code (Preview). Canvases are available in VS Code 1.142 and later for local sessions that use the Copilot harness. Install the plugin in the GitHub Copilot app as shown above. Then, in VS Code, enable chat.canvases.enabled, start a new session with the Copilot harness, and ask the agent to open the Azure Functions canvas. For details, see Canvases (Preview). On Home, choose a task: Create, Open, Modernize, or Monitor. You don't need extra tools to open the canvas. To create from a template or deploy, install the Azure Developer CLI (azd). To run locally, install Azure Functions Core Tools 4. Check prerequisites in the canvas shows what you're missing. Give it a try, and tell us what you think.413Views3likes2CommentsPublic preview: OS-level dependency support via containers for Azure Functions Flex Consumption
Your function needs Chromium to generate a PDF. Or GnuPG to encrypt data. Or a native Linux library that isn’t available in the managed execution environment. Until now, an OS-level dependency could require redesigning the application, moving part of the workload to another service, or selecting another hosting option. Today, we’re announcing the public preview of OS-level dependency support via containers on Azure Functions Flex Consumption. With this capability, you can build a Linux container image containing your function application, one supported Functions language worker, application dependencies, and the OS-level software your workload needs. Azure continues to operate the Functions host, trigger integration, routing, and Flex Consumption scaling outside your image. See it in action: Generate PDFs with .NET and Chromium Consider a function that converts HTML into a PDF by using .NET, Puppeteer Sharp, and Chromium. The application needs more than a NuGet package. Puppeteer Sharp needs a compatible browser and the native Linux libraries and fonts required by Chromium. These dependencies aren’t part of the standard managed execution environment. With OS-level dependency support, the application can package those components in its worker image: The .NET isolated function application The .NET isolated Functions worker supplied through the application’s NuGet dependencies Puppeteer Sharp Chromium and its required Linux libraries Fonts and other assets used when rendering the document After the image is deployed to Flex Consumption, an HTTP request invokes the function. Puppeteer Sharp launches the packaged Chromium browser, renders the supplied HTML, and returns the generated PDF. You can explore the complete implementation in the Azure Functions Flex Consumption .NET isolated container sample. A worker-only container model Flex Consumption uses a different container model from other hosting options where the complete Function App runtime is packaged in the customer image. Bring your preferred compatible Linux or language base image to Flex Consumption. As long as the final image satisfies the Flex worker-image contract, you control the base OS, language runtime, application dependencies, and OS-level packages, while Azure provides and maintains the Functions host. Your Flex Consumption container image contains: Your function application One supported Functions language worker Language and application dependencies OS packages, native libraries, browsers, fonts, drivers, executables, and command-line tools required by the application Azure provides and operates: The Azure Functions host and platform components Trigger integration Request and event routing Communication with the language worker Flex Consumption managed scaling This worker-only boundary is important. The feature isn’t arbitrary web-container hosting, and you don’t package or operate the Functions host. You customize the environment in which your function code runs while retaining the Azure-managed Functions programming and scaling model. For broader context on how Azure Functions separates the managed host from the compute that runs your application, see Separating Compute in Azure Functions: Building for scale, efficiency, and reliability. What makes a Flex app registry-backed? A registry-backed Flex app uses the same `Microsoft.Web/sites` resource as a code-package app. The deployment storage type identifies the deployment model: A code-package app uses `properties.functionAppConfig.deployment.storage.type` set to `BlobContainer`. A worker-image app uses the same property set to `Registry`. For a registry-backed app, `deployment.storage.value` contains the fully qualified image reference, and `deployment.storage.authentication` tells Azure how to pull the image. Registry-backed apps omit `functionAppConfig.runtime` because the language runtime and Functions worker are supplied inside the image. properties: { functionAppConfig: { deployment: { storage: { type: 'Registry' value: '<registry>/<repository>:<tag-or-digest>' authentication: { type: '<authentication-type>' } } } // No runtime property for a Registry-backed app. } } Other Function App configuration, including scale and concurrency settings, remains part of the resource and should be preserved when changing the deployment model. See the complete documentation for authentication options, Azure CLI commands, and the complete resource shape. How it works The end-to-end flow is straightforward: Start with the sample Dockerfile for your supported Functions language. Add the OS packages and native dependencies required by your application. Test the source application locally using the normal Functions development experience. Build and scan the linux/amd64 image, then push it to a supported registry. Configure the Flex Consumption app with the fully qualified image reference. Deploy and validate the complete image integration in Azure, then monitor it through logs and Application Insights. For deterministic deployments and rollback, use an immutable image digest for each release. When you need to update the language worker, runtime, base image, OS packages, or application dependencies, rebuild and test the image, push a new version, and update the function app to reference it. Microsoft publishes supported worker artifacts or packages, depending on the language, along with sample Dockerfiles, but doesn’t provide a Flex Consumption base image. You select and maintain the Linux or language base image that meets your application and organizational requirements. When should you use this feature? Use OS-level dependency support when you want the Flex Consumption programming and scaling model but your function requires software that can’t be supplied through the language package manager alone. Examples include: Browser automation with Chromium and Puppeteer PDF generation with Chromium and Puppeteer Sharp Data encryption and signing with GnuPG Image, audio, or video processing with native libraries Database drivers or vendor-provided native SDKs Custom fonts required for document generation Linux executables and command-line tools invoked by application code This capability isn’t intended as a blanket replacement for other Azure Functions hosting options or general container platforms. Choose it when Flex Consumption fits your workload and OS-level dependencies are the missing requirement. Public preview considerations During the preview, keep these considerations in mind: The preview is currently available in several public regions and is rolling out to additional Azure regions over the next few weeks. Use only the documented Functions languages and supported language versions. Images must target Linux amd64. Durable Functions isn’t supported. The Azure Service Bus extension (trigger and output bindings) isn’t supported. Availability zone support isn’t available. The preview doesn’t currently provide a supported experience for running the Flex worker container locally. Continue to test the source application locally and validate the complete image integration in Azure. You are responsible for selecting, securing, scanning, patching, rebuilding, testing, and redeploying the base image, language worker, application dependencies, and OS-level dependencies in your image. Preview capabilities and limitations can change. See the complete documentation for the current language versions, configuration procedures, registry authentication options, operational behavior, and known limitations. Get started Start with the sample for your preferred language: .NET isolated container sample Python container sample Node.js container sample Go container sample Read Use OS-level dependencies via containers with Azure Functions Flex Consumption for the complete image contract and deployment guidance. Try the preview with a workload that needs Chromium, GnuPG, a native library, a driver, a font, or another Linux dependency and share what this capability enables for your application!215Views0likes0CommentsManaged connectors in Azure Functions are now generally available
Today, we're announcing the general availability of managed connectors in Azure Functions, bringing managed connectivity to business systems directly into Azure Function apps and hosted skills. Modern applications rarely operate within a single system. Whether you're processing documents from SharePoint, responding to customer updates in Salesforce, or reacting to changes in Microsoft Dataverse, building these integrations often means writing service-specific API code, building and managing authentication, handling event delivery and retry before you can focus on your application's business logic. With managed connectors, developers can: Connect to 1,600+ services through the managed connector ecosystem, including Microsoft 365, Salesforce, Dataverse, Jira, Slack, Dropbox, and many more. React to events from connected services using Connector triggers. Take actions against connected services using language-native Connector SDKs. Build in familiar languages, including C#, Python, and TypeScript. Scale automatically with polling triggers, newly supported for GA Built through close collaboration between the Azure Functions and Azure Connector Namespace teams, this integration brings managed connectors directly into the Azure Functions programming model. Connector Namespace handles connections, authentication, and service-specific integration logic, while Azure Functions provides the familiar development experience, event-driven execution, and automatic scaling. Together, they enable developers to build integrations with enterprise services using the same programming model and tools they already use for Azure Functions. See managed connectors in action Suppose you're building an application that processes documents uploaded to SharePoint. When a new file arrives, you want to extract information, run custom validation, and update another business system. Traditionally, implementing this workflow requires managing SharePoint authentication, detecting new files, and delivering those events to your application. With managed connectors, you can use a Connector Trigger to invoke your function when a new event is detected. For example, here's what a connector-triggered function looks like in C#, using a SharePoint event to illustrate the programming model: [Function("OnNewFile")] public void OnNewFile( [ConnectorTrigger( DeliveryMode = ConnectorTriggerDeliveryMode.Poll, Connection = "ConnectorNamespace", TriggerConfigName = "%OnNewFileTriggerConfigName%")] SharePointOnlineOnNewFileItemsTriggerPayload payload) { _logger.LogInformation("Received OnNewFile trigger ({Count} items)", payload.Body?.Value?.Count ?? 0); } The function receives the events and runs your application logic. Connector Namespace handles the integration with the external service. The same approach works for other supported connector events, including Outlook changes, Dataverse updates, and more. The following is a connector-trigger function in Python showing a Outlook new calendar event: @app.function_name(name="OnNewCalendarEvent") @app.connector_trigger( arg_name="events", connection="ConnectorNamespace", delivery_mode=func.DeliveryMode.POLL, trigger_config_name="%OnNewCalendarEventTriggerConfigName%", ) def on_new_calendar_event(events: List[office365.GraphCalendarEventClientReceive]) -> None: """Triggered when a new calendar event is created in Office 365.""" logging.info("Received OnNewCalendarEvent trigger (%d items)", len(events)) Connector-trigger function in TypeScript showing a Dataverse row modified event: import { app, DeliveryMode, InvocationContext } from '@azure/functions'; app.connectorTrigger('OnDataverseRowModified', { deliveryMode: DeliveryMode.Poll, connection: 'ConnectorNamespace', triggerConfigName: '%OnDataverseRowModifiedTriggerConfigName%', handler: async (payload: unknown, invocationContext: InvocationContext) => { invocationContext.log('Received OnDataverseRowModified trigger.'); return payload; }, }); Take actions with strongly typed Connector SDKs While Connector triggers let your functions react to events, Connector SDKs let your code call operations in connected services. This makes it easy to combine integrations with external services, custom business logic, and Azure AI capabilities within the same application. For example, in this RFP intake sample, an Azure Function is triggered when a new document arrives in SharePoint. It uses the SharePoint Connector SDK to retrieve the document, Azure Content Understanding to extract its contents, and the Teams Connector SDK to post a summary card to a Teams channel. The following is simplified code from the RFP sample showing how the Teams client from the .NET Connector SDK is used to post an Adaptive Card to a channel: 1. Register the TeamsClient in `Program.cs` services.AddSingleton(new TeamsClient( new Uri(teamsRuntimeUrl), new DefaultAzureCredential())); 2. Inject and use it in the function: public class RfpFunctions(TeamsClient teams) { [Function("OnNewFile")] public async Task OnNewFile( [ConnectorTrigger] SharePointOnlineOnNewFileItemsTriggerPayload payload, CancellationToken cancellationToken) { var request = new DynamicPostCardRequest { AdditionalProperties = { ["recipient"] = JsonSerializer.SerializeToElement( new { groupId = "<team-id>", channelId = "<channel-id>" }), ["messageBody"] = JsonSerializer.SerializeToElement(new { type = "AdaptiveCard", version = "1.4", body = new[] { new { type = "TextBlock", text = "New RFP received!" } } }) } }; await teams.PostCardToConversationAsync( "Flow bot", "Channel", request, cancellationToken); } } The connector catalog For popular connectors such as Outlook, SharePoint, and Teams, the Azure Functions Connector extension provides strongly typed event payloads, while the Connector SDKs offer strongly typed clients and models for interacting with these services. This lets developers work with familiar language-native objects when responding to events or calling connector operations, with less manual JSON parsing and API integration code. Below are examples of popular connectors in each enterprise integration category: Microsoft 365 and productivity: Outlook, SharePoint, Teams, OneDrive for Business, Planner, and OneNote CRM and business applications: Salesforce, Pipedrive, Microsoft Dataverse, and Zendesk Developer tools and collaboration: Azure DevOps, GitHub, Jira, and Slack. File storage and data services: Dropbox, Box, FTP, Azure Blob Storage, and SQL Server. Messaging and event streaming: Azure Event Hubs, Azure Service Bus, and RSS. For other connectors supported by Connector Namespace, developers can still use the generic Connector Trigger to receive events as JSON payloads and parse them in their function code. Together, the breadth of the managed connector ecosystem and a code-first, strongly typed developer experience make it easier to integrate business systems while retaining the flexibility of Azure Functions. To explore the strongly typed APIs available for each connector, refer to the following resources. These references help you identify supported trigger payloads, SDK clients, operations, and models: Capability Where to find supported types Strongly typed trigger payloads Connector trigger payloads for Azure Functions Python Connector SDK clients Python API reference TypeScript Connector SDK clients TypeScript API reference .NET Connector SDK clients .NET API reference Note: generic trigger support doesn't automatically imply Connector SDK action support. Developers can receive events from connectors across the broader catalog, but strongly typed SDK clients for taking actions are available only for supported connectors and operations. New for GA: Polling triggers with automatic scaling One of the biggest additions in this release is support for polling-based connector triggers. Previously, managed connector triggers in Azure Functions relied on webhook delivery. With GA, developers can choose between webhook and polling mode, depending on their application's requirements. Both models use the same Connector Trigger programming model, but they differ in how events reach your function. Webhook delivery With webhook delivery, Connector Namespace sends events directly to your Function App's webhook endpoint. This is useful when you want events pushed to your application as they become available, minimizing latency. Polling delivery With polling delivery, Connector Namespace makes events available through a polling endpoint, and Azure Functions retrieves those events. Polling triggers integrate with the Azure Functions scaling infrastructure to monitor pending connector events, allowing applications to handle changing event volumes without manually managing the number of function instances. The polling model also supports batching, so a function invocation can process multiple events. Developers can configure settings such as: MaxBatchSize: Controls how many events can be retrieved in a batch. TargetPendingEventThreshold: Influences scaling based on the number of pending events. maxPollingInterval: Controls the maximum interval between polling attempts. These settings provide flexibility to balance processing throughput, responsiveness, and resource consumption. Local development experience For GA, we're also introducing a new Connector Triggers experience in the Azure Functions extension for VS Code (v1.23.0 or higher), making it easier to build and test polling-based connector triggers. From Azure Functions: Create New Project -> Connectors tab, you can: Choose a connector and event. Browse available connectors and select one or more events you want your function to respond to. Generate your project and code. VS Code scaffolds an Azure Functions project with the corresponding connector trigger code, so you can start building without writing the integration boilerplate yourself. Configure resources for local testing. When you're ready to debug with F5, VS Code guides you through creating or reusing the required Connector Namespace, connection, and trigger resources, including connection authentication and configuration. This streamlined experience lets you go from selecting an event to running and debugging your function locally, without manually provisioning and configuring each integration resource. For developers who prefer the command line, Azure Functions Core Tools (v4.16.1 or higher) also includes a selection of connector trigger templates, providing another way to get started with connector-triggered functions. Pricing Managed connectors in Azure Functions follow existing Azure pricing models, with no additional charge for the integration itself. Two pricing components apply: Azure Functions: Standard Azure Functions pricing applies based on your hosting plan. Managed connectors: Connector usage is billed based on connector calls, with rates depending on whether the connector is classified as Standard or Enterprise. For details, see the Connector Namespace pricing. Get started with managed connectors There are several ways to get started with managed connectors in Azure Functions, depending on your preferred development tools. Azure Developer CLI (azd) If you're familiar with the Azure Developer CLI, the easiest way to get started is with our sample repositories. They include examples of different connectors and triggers, along with Bicep templates that provision the required Azure resources, connector connections, and trigger configurations. Clone a sample, follow its prerequisites, and run azd up to provision and deploy the application. C# samples Python samples TypeScript samples Visual Studio Code Use the Azure Functions extension for VS Code to browse connectors and events in the Template Gallery, scaffold your project, and get guided setup for the connector resources and trigger configurations needed for local testing. Azure Functions Core Tools If you prefer working from the command line, Azure Functions Core Tools also offers a selection of connector trigger templates to help you scaffold your project. Follow the instructions at aka.ms/connectortrigger to set up the required resources and configurations to test the scaffolded project. More references To learn more about managed connectors in Azure Functions, explore the following resources: Use managed connectors in Azure Functions Azure Functions Connectors Samples Azure Connector Namespace Overview Browse available managed connectors Connector SDKs: .NET SDK Python SDK Node.js SDK667Views1like0CommentsSeparating Compute in Azure Functions: Building for Scale, efficiency, and reliability.
As customers bring new workloads to Azure Functions, we continue to evolve the runtime to support them securely and at scale. Compute Separation is part of that work. We're revisiting how the host and language workers are deployed and managed to improve efficiency and reliability, and to enable new capabilities while preserving the Functions programming model. When a Functions app needs more capacity, the work you want to scale is its language worker and customer code. In the co-located, out-of-process hosting model, adding that capacity also adds another Functions host, even if the existing host capacity could coordinate more workers. The language worker is already a separate process, but the platform's unit of scale is still the instance that contains both host and worker. Compute Separation changes that unit of scale. The host and the workers run on separately managed compute, allowing the platform to add workers without creating a host for each one. For customers, that opens up more control over the environment running their code, while the platform retains responsibility for the Functions host. Getting there means revisiting assumptions that were convenient when both components lived in the same instance: access to application files, who starts and replaces a process, and even which side opens the connection. One of the most consequential constraints was networking. Existing workers connect to the host, but the platform's networking model requires the remote connection to run in the other direction. This post follows the engineering decisions behind that change, the cold-start and reliability requirements that shaped it, and how we're building and proving the architecture in small end-to-end steps. Preview scope: Everything in this article describes a preview implementation that is still in progress. It is not a released product contract or a migration recommendation. We expect the architecture, behavior, and scope to change as we implement features and validate performance and reliability. Why change the host-worker boundary? The host and the language worker do different jobs. The host connects the app to the platform's control model and implements the runtime-side contract used for worker assignment, readiness, scaling, and reliability actions. It also understands the Functions execution model: it loads trigger and binding extensions, discovers functions, manages listeners, and coordinates invocations. The language worker understands how to load and execute your code in its language runtime. Process isolation already separates these responsibilities into different processes. Compute Separation also separates their compute and lifecycle. Keeping those components together made several things straightforward. The host could start a child process, communicate over localhost, and treat process exit as a direct signal that its worker had stopped. Configuration and application files were available in the same deployment environment. Those conveniences also created dependencies. Scaling the worker repeated the host's resource overhead. A language-specific image carried the host and its dependencies as well as the language runtime. Host maintenance and application image maintenance were coupled. Consider an application that needs native libraries or a particular operating-system dependency. A customer-provided worker image should let you package that environment without also packaging and maintaining the Functions host. You'd own your application, language runtime, dependencies, and image maintenance. The platform would own the host. Custom worker containers are the first customer-facing scenario we're using Compute Separation to enable. The architecture has broader value, though. A host fix shouldn't inherently require rebuilding every language-specific application image. Adding customer execution capacity shouldn't require repeating the full host. Independent release and scaling decisions become possible, subject to protocol compatibility and the capacity of each component. There is a platform-efficiency motivation too. Keeping combined host-and-worker environments warm fragments capacity by language, version, and instance size. A language-independent runtime gives us more options for reusing warm runtime capacity without preparing every combined environment. That is an architectural opportunity, not a measured cold-start improvement or a customer pricing claim. The goal is to preserve the Functions programming model while changing how its components are operated. Functions still execute in language workers, and trigger and binding behavior still needs to hold across the new boundary. Challenge: the worker couldn't initiate the remote connection In the co-located model, the host listens for a connection and the language worker connects to it. Moving the host to another compute instance might suggest replacing a localhost address with a remote endpoint. The platform's network security model rules out that approach. Once separated, worker pods run customer code, so they aren't allowed to open outbound connections to runtime pods. Any connection between the two has to be initiated by the runtime. One option was to change the workers' connection behavior. That would have had a significant compatibility impact across existing worker implementations. It would also have introduced a worker contract tied to the networking needs of this particular hosting model. We wanted to keep those deployment details out of the language workers. We introduced a platform-owned WorkerProxy between the two sides. The runtime opens an authenticated TLS FunctionRpc stream to WorkerProxy. The language worker connects to WorkerProxy over the worker pod's local network, retaining the worker-initiated connection pattern. WorkerProxy bridges the two connections. Each worker pod contains WorkerProxy and a separate container for the language worker and customer code. WorkerProxy provides the transport bridge and worker-side lifecycle contract. It doesn't become a second Functions host, start the customer process, or take ownership of platform placement and pod deletion. For workers that negotiate HTTP streaming, there is also a separate data path: the host forwards HTTP through WorkerProxy's assigned HTTPS origin to the worker's local HTTP endpoint. Requests still pass through the host. On the runtime side, the preview uses a dedicated Functions.Host executable with a client-backed worker composition. The ordinary co-located host retains its server-backed path. We can develop the new topology without making every existing app switch to it. This preserves an important part of worker compatibility, but doesn't eliminate all protocol work. Remote startup also needs configuration, metadata, and extension delivery. Keeping the connection pattern familiar is different from promising that every existing worker version supports the complete new hosting model. Preview limitations and why they exist The networking constraint affects more than the main connection. The FunctionRpc stream isn't the only conversation between a worker and the host. Some extensions add their own communication paths, where code in the worker calls back into components running in the host. In the co-located model, those calls never leave the instance. In the new topology, they become worker-initiated calls to a remote host, which is the direction the networking constraints rule out. WorkerProxy bridges the main stream, but these additional paths are specific to each extension and carry their own protocols and expectations. Supporting them requires changes in both the host and the extensions. Some of that work was more complex than the initial preview's scope and timeline allowed, so the first preview has extension limitations. Service Bus and Durable Functions are the most visible examples. Service Bus message settlement relies on one of these paths: when a function explicitly settles a message, for example to complete or dead-letter it, the worker asks the host-side extension to perform that operation. Durable Functions has a similar dependency. Operations such as starting an orchestration or raising an event go from the worker to APIs that the Durable Functions extension exposes in the host. Neither extension is supported in the first preview, and host and extension work to address these limitations is in progress. Challenge: protecting cold-start performance Cold-start performance was the key performance requirement shaping the design. Separating compute adds networking and coordination to activation. Optimizing steady-state invocation forwarding would not be enough if starting an application became slower. Activation spans networking configuration, specialization of a host instance for the application, initialization of the application container, and linking the worker to the host. Treating all of that as one serial sequence would make each step's latency part of the wait for useful execution. We designed the activation process to overlap independent work while keeping its dependencies explicit. An assignment can arrive before the language worker starts. Other steps really do need to wait: the host must validate initialization before accepting a link, and invocation dispatch must wait for application setup. The requirement is to parallelize preparation without treating partial progress as readiness. The host-side startup path illustrates those distinctions: Assignment configures the worker side. WorkerProxy accepts application and function-group identity, limits, and the HTTP origin when needed. Assignment acceptance doesn't prove that the customer process has initialized. The runtime establishes and validates the link. It connects to WorkerProxy and validates worker initialization, application proof, and delivered host configuration before accepting the link. Application preparation continues. Advertised extensions are prepared before the initialized signal is published. Metadata acquisition and ScriptHost construction and setup follow. The channel becomes eligible for dispatch. The current application-host setup and channel-readiness checks determine when the worker can receive invocations. A successful Link response is therefore an intermediate checkpoint, not permission to send traffic. Platform status publication is another checkpoint, not proof that the entire serving path has converged. Smaller worker images and more reusable warm runtime capacity give us opportunities to improve startup. Neither establishes the result on its own. Cold-start measurements need to cover the full activation path, including scheduling, image availability, networking, specialization, and linking. Application setup without a shared filesystem Activation also exposed a dependency inside the host: it previously had local access to the customer's deployment. A remote host still needs configuration, function metadata, and binding extensions before it can run the app. For host configuration, the compute host advertises the HostConfiguration=1 capability during initialization. A compatible worker returns a typed envelope containing the configuration, and WorkerProxy relays it. The host validates the delivery rather than asking the proxy to interpret the customer's host.json . Malformed configuration fails admission instead of silently becoming defaults. The selected configuration source stays stable across later worker links and child-host restarts. Adding execution capacity must not silently reconfigure an app because another worker connected. Consistency between workers' configuration and function definitions still needs to be validated. Extensions make the boundary more interesting. Customer function code runs in the worker, but host-side binding extensions still run in the host. The preview implementation can receive an advertised extension archive over the connection, validate and extract it, and prepare those assemblies before extension discovery and listener startup. The host can therefore start without a shared customer deployment mount, but it still has application-specific dependencies. Moving files across the connection doesn't add the extension-specific communication paths described earlier or qualify every binding. Those behaviors also have to work across the new boundary. Challenge: preserving reliability without owning the process The co-located host could observe and manage its worker as a child process. With independent compute, the platform owns process creation and replacement. Existing host logic has to participate in that lifecycle through explicit contracts while preserving recovery behavior. A lost connection, for example, is no longer equivalent to a child process exiting. It tells one component that communication stopped; it doesn't prove what the other component is doing. Admission, draining, and replacement need coordinated decisions rather than assumptions based on local process state. That starts with knowing where work can run. The scheduler selects a ready, non-draining worker in the function's group, using a round-robin preference. For HTTP, a full worker is skipped; if all eligible workers are full, admission waits for capacity. A FIFO gate orders invocation attempts, not execution or completion. Listeners need to follow that capacity too. The preview gates supported pull-based listeners on workers for their function group, so the runtime doesn't keep acquiring events with no corresponding worker available. Push-based triggers and shared listeners need different handling. Preserving trigger semantics requires more than a generic worker-selection policy. When is an invocation actually finished? Planned scale-in requires a precise answer. The host closes new admission, withdraws the worker from usable capacity, and drains accepted work before terminating or unlinking the channel. The platform then remains responsible for physically removing the pod. Accepted work includes invocations still buffered or converting input. HTTP adds another case: a worker can send a successful gRPC invocation response while the HTTP response body is still being forwarded to the caller. Removing the worker at that point can truncate a response even though the invocation protocol reported success. The implementation tracks completion through dispatch and, for proxied HTTP, through response forwarding. Worker retirement waits for that lifecycle. This is a useful example of how a familiar operation, stopping a worker, acquires a more explicit contract once its pieces run independently. Unexpected runtime loss follows a separate path. In the current implementation, WorkerProxy enters a sticky removal-requested state and rejects new work, leaving removal and replacement to the platform. It doesn't transparently attach another runtime or replay invocations. Separate compute boundaries also change the failure scenarios we need to test. A worker failure need not require restarting the host, but a runtime failure can affect several workers for the same application. Independent scaling doesn't eliminate shared dependencies. Challenge: carrying platform services across the boundary The host-worker connection now crosses a network and compute boundary. Authenticating the caller, associating a worker with the right application, and handling credentials become explicit parts of the design. The preview implements TLS, runtime caller tokens, and application-key proof during initialization. Those mechanisms are not a claim that the security contract is finished. The implementation documents limitations in certificate identity validation, shared-key authority, and replay protection. Provisioning, network policy, revocation, and cross-application containment remain part of qualification. Managed identity illustrates how platform integration also affects startup. Application code can need an identity token before worker initialization completes. If identity access depended on completed initialization, startup could wait on itself. The preview includes an opt-in Token Service proxy. WorkerProxy carries the worker's local identity request over the existing runtime-initiated stream, and the host forwards it to the host-side Token Service. That path can operate before the customer's worker stream starts. The application gets access to the operation it needs without moving the upstream Token Service credential into the worker-side forwarding contract. Diagnostics and metering need the same attention to ownership. A failure now involves a runtime, a worker pod, and a connection session; logs need to let us distinguish them while preserving the customer logging path. One runtime can dispatch to several workers, so execution measurements need to identify the worker that actually accepted an invocation. The preview records that attribution at dispatch and tracks completion against the selected worker. Binding and extension work can happen before admission, though, so the worker's execution window doesn't cover the whole invocation pipeline. Those records are part of the accounting work, not a final billing definition. Proving the change one end-to-end outcome at a time The initial checkpoint deliberately used one worker and one HTTP request. Even that small scenario crossed platform assignment, the host's outbound link, worker metadata, readiness publication, and both the HTTP and FunctionRpc paths. It gave us a bounded way to exercise the new connections and contracts together. From there, the work expands along several related dimensions: starting an app without a shared deployment mount, executing correctly as worker capacity changes, integrating with platform services, and qualifying the customer experience. These are parallel workstreams with shared contracts, not sequential releases. Figure 3. An explanatory grouping of overlapping engineering workstreams, with dependencies and validation feedback. This is not an availability timeline. Each step needs an observable outcome. Can another worker join without restarting the application host? Can an early identity request complete during startup? Can a worker drain while its HTTP response is still streaming? Can a non-HTTP trigger preserve its binding and execution behavior? These questions cross repository and component boundaries. The host provides components and contracts, while placement, networking, frontend routing, image delivery, language-worker support, and rollout involve other parts of the platform. A merged host change isn't evidence that the whole service path is ready. Small end-to-end scenarios let us test those interactions before broadening coverage. They also let us revise a contract after learning from it, rather than treating a successful connection as proof that startup, execution, and recovery are complete. What remains to prove The next evidence has to cover the full application workload. Cold-start and scale-out measurements need tail latency and image-cache misses, as well as the activation path under normal conditions. Steady-state tests need to quantify network and proxy overhead. Capacity tests need to establish how many workers a runtime can safely coordinate. Compatibility is another qualification task. We need full fidelity with the existing model to ensure applications continue to run with no modifications. What this makes possible The payoff we're working toward is concrete: customers can own the environment running their code without maintaining the Functions host, and the platform can scale and service those components independently. Custom containers are the first scenario, but the value extends beyond packaging. Separate compute gives the host and workers their own CPU and memory resources. A worker that misbehaves is less likely to take resources away from the host or affect the rest of the app, though work assigned to that worker can still fail. We can also allocate capacity to each role independently, rather than adding host overhead whenever we add workers. That gives us room to use resources more efficiently. This separation also gives us a foundation for more advanced deployment options and more flexible scaling. Customer containers can be smaller because they no longer need to include the host and its dependencies. These are opportunities, not capabilities or performance results we can claim for this preview. We've explored this architecture in internal prototypes. It's exciting to see it making its way into the service and opening up new scenarios for customers, starting with custom worker containers. We also plan to extend this model transparently to existing apps, so current customers can benefit without changing how they build and run their apps. We still have work to do to implement the features and validate the performance, but the direction is clear. Separating the host from the worker gives every Functions app a more reliable and efficient foundation, and opens the door to capabilities we couldn't build with both roles sharing the same compute.184Views0likes0CommentsWhat's new in Azure Functions durable task scheduler: Durable agents, disaster recovery, and more
There's been a lot happening with the Azure Functions durable task scheduler lately. Here's a quick look at what's new: Durable agents: The Durable Extension for Microsoft Agent Framework is generally available, durable execution with DTS for LangGraph is in preview, and Pydantic AI now includes Azure Durable Task as a built-in durability option. Native disaster recovery and task queues: Both are now in public preview. Private endpoints and customer-managed keys: Both are now generally available. Durable Task Go SDK: Now available in preview. Whether you're running business workflows, processing event-driven pipelines, or coordinating AI agents, here's what these updates mean for your apps and how to get started. What is the Durable Task Scheduler? If you're new to the Durable Task Scheduler, it's a fully managed durable execution backend for workflows and agents on Azure. It saves progress as work runs, so applications can recover from interruptions without starting over. Completed steps whose results have been saved can be reused, and workflows can wait for human input or external events without keeping a worker active just to wait. DTS handles task scheduling, state persistence, and recovery. Its built-in dashboard lets you inspect execution history and manage running orchestrations. The DTS dashboard shows the execution timeline of a travel-planning workflow, including agent calls and a wait for approval. DTS runs separately from your application. Use it with Durable Functions, the Durable Task SDKs, or supported agent framework integrations, including the Durable Extension for Microsoft Agent Framework. Your application code can run anywhere in Azure, including Azure Functions, Azure Container Apps, and Azure Kubernetes Service. Already using DTS? Here's what's new. Durable execution in agent SDKs Agents and workflows need more than conversation history to recover from interruptions. They might call several tools, start a long-running job, or wait for someone's approval. If a worker restarts halfway through, the application needs to know which steps completed and what should happen next. Durable execution saves that progress, so agents and workflows can run for minutes, days, or weeks and resume from recorded progress after worker or container restarts, scaling events, or infrastructure failures. Retry policies help handle transient errors such as rate limits and timeouts. Completed model calls, tool calls, and activities whose results have been saved can be reused during recovery, reducing repeated work and token costs. Conversation context remains available, and workflows can wait for approvals or external events for hours or days without keeping a worker active just to wait. You can bring these durable execution capabilities to agents and workflows built with Microsoft Agent Framework, LangGraph, or Pydantic AI. Here's how to get started with each: Microsoft Agent Framework: The Durable Extension is generally available for .NET and Python. Keep your core agent logic and coordinate durable agents and multi-agent workflows with Durable Task orchestrations or Agent Framework graphs. See the GA blog post and samples. LangGraph: In public preview. Add DTS to existing Python graphs, ReAct agents, and Deep Agents on Azure without rewriting your graph logic. Pydantic AI: Azure Durable Task is now available as a durability capability in Pydantic AI Harness. Use it with Durable Task orchestration and worker setup to persist model and tool results and recover agent execution without building your own checkpointing or recovery system. Native disaster recovery is now in public preview Native disaster recovery for Azure Functions durable task scheduler is now in public preview. For business-critical workflows and applications with cross-region recovery requirements, it provides a way to resume work in another region from replicated state rather than starting workflows over. Pair your primary scheduler with a secondary in another Azure region, and DTS replicates orchestration and entity state to the secondary. When you need to fail over, you can promote the secondary and resume work from that replicated state. Learn more: Disaster recovery documentation. Task queues are now in public preview Task queues for Azure Functions durable task scheduler are now in public preview. Group orchestration and activity work into named queues within a task hub and control how quickly DTS delivers that work to workers. This helps teams pace batch processing and give different workloads their own dispatch-rate budgets without creating separate task hubs. For workloads that call downstream services, it provides a way to manage how quickly work is dispatched. Create a queue, configure its work-item delivery rate, and select it using the DTS_TaskQueue tag when scheduling work. For a closer look at how task queues work and an example of how to use them, see Task queues in Durable Task Scheduler. Learn more: Task queues documentation and SDK examples. Private endpoints are now generally available Private endpoints for Azure Functions durable task scheduler are now generally available for both Consumption and Dedicated SKU schedulers. Connect your applications to DTS through a private IP address in your virtual network using Azure Private Link. Traffic stays on the Microsoft backbone instead of traversing the public internet. You can also disable public network access so your scheduler accepts connections only through private endpoints. Applications continue to use the same scheduler endpoint and Microsoft Entra authentication. Learn more: Configure private endpoints for DTS. Customer-managed keys are now generally available Customer-managed keys for Azure Functions durable task scheduler are now generally available for Dedicated SKU schedulers. Organizations that need to manage their own encryption keys can now use customer-managed keys to protect their workflow data, supporting separation of duties, centralized auditing of key access, and customer-defined key rotation policies. Use a key you own in Azure Key Vault or Azure Managed HSM to protect scheduler data at rest. Configuration is available through the ARM REST API, Azure CLI using az rest, or Bicep. Learn more: Configure customer-managed keys for DTS. The Durable Task Go SDK is now available in preview Writing your application in Go? You can now build durable workflows with the Durable Task Go SDK, available in preview. Write your orchestrations and activities in Go, and let DTS take care of durable state and dispatching work. You can chain activities, run work in parallel, wait for external events, and use durable timers. Retry policies help you handle failures, and orchestration management APIs let you manage execution. Start locally with the DTS emulator, then connect your application to a scheduler in Azure when you're ready. You'll need Go 1.25 or later, and DTS is currently the SDK's only supported runtime. Get started: Go SDK documentation, DTS quickstart sample, and Go sample catalog. Get started with the Durable Task Scheduler If you're new to DTS, start with the documentation and samples. You can develop locally with the emulator, then choose the Consumption or Dedicated SKU based on your workload's pricing and capacity requirements. We'd love to hear your feedback, especially as you try the new previews. Share questions and feedback through the Durable Task Scheduler GitHub repository.252Views0likes0CommentsWhat's new in Azure Functions and Durable Task Scheduler at Microsoft Ignite 2026
At Microsoft Ignite 2026, we're announcing a significant set of updates across Azure Functions and Durable Task Scheduler. Read the full summary and technical breakdown covering Managed Connectors (GA), custom containers on Flex Consumption, durable execution and enterprise controls for AI and stateful workloads, Hosted Skill and agent bindings, Go (GA) and .NET 11 (GA), and new CLI and networking diagnostics.1.1KViews1like0CommentsInside the architecture: How connectors work with Azure Functions
Say you run a shared support inbox. Each time a customer writes in, you want a function to read the email, pick out the important parts, and post a summary in your team's Teams channel. The business logic might be twenty lines. The rest is authorization, change detection, event delivery, and a second set of permissions to post in Teams, and you rebuild most of it for every service you touch. Azure Connectors and the Connector SDKs take that work on. The platform manages connections and authorization. The same app can react to events in one service and call operations in another. Webhook and poll delivery give you push or pull, so you can pick what fits your app. One SDK per language covers the Connector catalog with typed operations and payloads, VS Code tooling handles setup, and SDKs are available for .NET, Python, and Node.js from day one. Underneath those promises are a handful of pieces we built and a few decisions about where each one stops. The support inbox runs through all of them. Follow that one email from Outlook to Teams, and you'll know exactly how to wire up the next hundred integrations yourself. Starting from what Azure already has Azure already runs more than 1,600+ managed Connectors to services like Salesforce, SAP, SQL Server etc. They power Azure Logic Apps and Power Automate, and API Hub hosts their connections, OAuth consent, and runtime. Logic Apps already knows how to run Connector triggers, whether the source sends notifications, accepts a webhook subscription, or has to be polled. So we didn't write a second integration for each service. We built a new front door to the existing Connector runtime, one that application code can use directly, and added the glue Azure Functions needs on top. Most of the new work falls into four areas: A control plane, the Connector Namespace, that exposes connections, access policies, and trigger configurations as Azure resources. A runtime layer that proxies SDK calls into API Hub and turns trigger configurations into system-managed workflows with a delivery step at the end. A Functions Connector extension, with host and worker pieces, that receives events by webhook or by polling and feeds the Functions scale controller. One code generator that emits typed SDKs for .NET, Python, and Node.js from live Connector metadata, plus tooling that sets everything up. The control plane: Connector Namespace A Connector Namespace is an Azure Resource Manager resource of type Microsoft.Web/connectorGateways. Under it sit three child resource types: connections, connection access policies, and trigger configurations. Because they're ARM resources, you can create them with Bicep, the CLI, or the VS Code tooling, and they get the usual Azure role-based access control and lifecycle. A connection is the application-facing name for a backing API Hub connection, the same kind Logic Apps uses. The consent you grant for Outlook lives there. An access policy lists the Microsoft Entra identities, such as a Function App's managed identity, that may use a connection. That split means the identity that calls the connection and the account that consented to the mailbox are separate, and you can change one without touching the other. Authorize the connections: the Function App's managed identity presents a token to the access policies, and the Outlook and Teams connections hold OAuth consent for their accounts A trigger configuration describes an event source. Its properties include the connection, the Connector operation (for the support inbox, OnNewEmail), the operation's parameters, optional trigger conditions and settings, and a delivery mode. For webhook delivery it carries the callback details; for poll delivery the service fills in the polling endpoints. Each namespace also gets a stable host name, and a background job repairs its DNS record if it drifts. The action path: a proxy into API Hub When your handler posts the summary to Teams, the generated SDK client sends an HTTPS request to the connection's runtime URL. On the platform side that URL maps to `api/connectorGateways/{gateway}/connections/{connection}/runtime`, followed by the operation's own path. Behind that route, the runtime processor handles each request in four steps: It resolves the application-facing connection to its backing API Hub connection and environment, in the namespace's scale unit. It builds the API Hub runtime URL and checks that the requested path stays inside that connection, so a caller can't reach a different connection by rewriting the path. It strips identity headers supplied by the caller and attaches a platform service token, plus headers that pass the caller's managed identity through. It forwards the method, path, query, and body to API Hub, which runs the Connector operation against Teams. The caller authenticates with a Microsoft Entra token for the API Hub audience. In the Node.js SDK the default scope is `https://apihub.azure.com/.default`, and the token comes from any Azure Identity TokenCredential, typically the Function App's managed identity. The SDK side is thin on purpose. Generated clients extend a shared base class that holds the runtime URL and credential. A shared HTTP pipeline built on Azure Core adds the token, a user agent, tracing, and retries. Retries apply by default only to safe methods such as `GET` and `HEAD`, because retrying a `POST` that sends a message could send it twice. Paged operations follow `nextLink` values. When a continuation link points at a different host, as some Connector back ends return, the SDK reroutes its path and query through the connection's runtime URL, so paging stays behind the proxy. Failures surface as a ConnectorExceptions that carries the Connector name, the operation, the status code, and the response body. The trigger path: system-managed workflows When you create a trigger configuration, the trigger API validates the request, generates a Logic Apps workflow definition, creates the workflow directly in a platform-owned subscription under a generated name, and stores the workflow details alongside the trigger configuration. Updates rewrite the workflow, and deleting the trigger configuration removes the workflow, its poll queue, and its message history. The workflow generator picks the right trigger shape for the operation's metadata: a notification subscription, a webhook subscription, or a recurring poll. It adds `splitOn` for operations that return batches, so each item becomes its own run unless the configuration opts out, and it applies any trigger conditions you set. The workflow ends with a Connector delivery action. We generate a workflow per trigger configuration because Logic Apps already has years of hardening around subscription renewal, polling state, and trigger history, and every Connector trigger already runs on it. The workflow stays an implementation detail: customers work with the trigger configuration resource and never see or edit the workflow. Two ways to deliver an event How the platform notices a new email and how the event reaches your function are separate problems. The backing workflow handles the first. The delivery action at the end of the workflow handles the second, and it supports two transports. Webhook delivery For webhook delivery, which is the default, the delivery action makes an HTTPS call to the callback in the trigger configuration, using the workflow engine's HTTP retry policy. On the Function App side, the callback is the host's `/runtime/webhooks/connector` route, protected by a system key named `connector_extension`. A `functionName` query parameter selects the function. The host returns `202` when the invocation succeeds, `400` for a missing or invalid name, `404` for an unknown function, and `500` when the invocation fails. Poll delivery For poll delivery, the delivery action writes the event to an Azure Storage queue owned by that trigger configuration and records it in a message history table. Storage queue messages are limited to 64 KB, so when an event is larger the action queues a reference to the workflow run's output instead of the output itself. The poll runtime API sits in front of the queue and has four operations: `receive`, `acknowledge`, `hasMessages`, and `approximateQueueDepth`. `receive` hands out events under a temporary lease with an opaque lock token. `acknowledge` deletes an event only when the message ID and a still-valid lock token match. If the lease expires first, the event becomes visible again. The reported depth is approximate and excludes leased messages. Deliver the event by Poll: the delivery action enqueues the event, and the Functions host receives and acknowledges it from the Poll queue Poll delivery means the Function App never exposes an inbound endpoint, and work can build up safely when the app is busy, scaled to zero, or running on a developer's laptop. Inside Azure Functions: the connector extension The Functions side has two layers. A host extension, written as a WebJobs extension, owns transport and scaling. A worker extension for each language turns payloads into typed objects for your handler. The host extension The host extension registers a connectorTrigger binding. Each function picks webhook or poll delivery, and the binding starts the matching listener. Backoff: an empty queue backs off with jitter, up to a configurable maximum interval; receive failures get their own capped backoff. Auth: the listener authenticates to the polling endpoint with the connection's credential, usually the Function App's managed identity. Concurrency: a function that takes one event at a time can run several invocations in parallel, up to `MaxConcurrentCalls`. A batched function processes one batch at a time per listener. Acknowledgment: an event is acknowledged only after its invocation succeeds; a failed invocation leaves it unacknowledged so it comes back when the lease expires. Large outputs: when an event holds a link to a large output, the listener downloads it, with a 100 MB default cap. Poll delivery also plugs into Azure Functions target-based scaling: The Connector trigger reports how much work is waiting by reading the queue's approximate depth through the same poll runtime API. Azure Functions does the scaling, aiming for `ceil(depth / target)` instances. The target is the function's pending-event threshold, or the per-instance concurrency that the platform supplies when it has one. Batch size and concurrency don't change that calculation. Batching therefore happens in several places. The source trigger can return a collection, `splitOn` can split it into separate runs, and the poll listener can deliver several events to one invocation. The batch settings have the same meaning in every language: Setting .NET isolated Python Node.js Receive several events per invocation IsBatched = true cardinality=func.Cardinality.MANY cardinality: Cardinality.Many Maximum events per invocation MaxBatchSize max_batch_size maxBatchSize Concurrent single-event calls MaxConcurrentCalls max_concurrent_calls maxConcurrentCalls Pending events per instance, for scaling TargetPendingEventThreshold target_pending_event_threshold targetPendingEventThreshold The batch size can be 1 through 32 and defaults to 1. The worker extensions Because the host extension does the transport work, each language worker only has to bind payloads. The .NET isolated worker extension deserializes the payload into the type your function declares, such as a generated Office365OnNewEmailTriggerPayload, or into `ConnectorEvent<T>[]` when you also want each poll message ID. Python functions use the connector_trigger decorator from the azure-functions library. Other workers reach the same host extension through the Functions extension bundle and the connectorTrigger binding type. The Node.js extension shows how thin this layer is. One generic wrapper registers the trigger and flattens every payload shape (a single item, a collection in `body.value`, or an array of poll envelopes) into one list of items, keeping the original in `rawPayload`. Each Connector's helper is then a few lines that add a friendly alias and borrow the item type from the generated SDK. This is the whole OneDrive for Business file: import { BlobMetadata } from "@azure/connectors/generated/OneDriveForBusinessExtensions"; import { OneDriveFileTriggerContext } from "../../types"; import { createConnectorTrigger } from "./createConnectorTrigger"; const registerFileTrigger = createConnectorTrigger<BlobMetadata, OneDriveFileTriggerContext>( (context) => ({ ...context, files: context.items }), ); export const onNewFiles = registerFileTrigger; export const onUpdatedFiles = registerFileTrigger; `BlobMetadata` comes from the same generated module that the OneDrive client uses for actions, so a trigger payload and an action response share one type, defined once from the connector's metadata. Calling out from the handler After reading the email, the handler posts a summary to Teams. That call leaves the Function App through the same Connector platform, going the other way. The handler calls a generated Teams client with typed input. The client holds the Teams connection's runtime URL and an Azure Identity credential, gets a Microsoft Entra token, usually for the Function App's managed identity, and sends the request. The Function App never holds a Teams token or secret. The connection's access policies decide whether that identity may use the Teams connection, and the connection holds the OAuth consent for the account that posts. The Connector runtime resolves the connection, replaces the caller's identity headers with a platform token, and runs the operation against Teams. This path doesn't depend on how the email arrived, so it works the same with webhook or poll delivery and with any Connector in the catalog. Idempotency is the handler's job. The SDK won't retry a failed post, but a redelivered event runs the whole invocation again, so the handler should check before posting the same summary twice. One generator, three SDKs The SDKs are generated. A shared generator, `CodefulSdkGenerator`, reads live Connector Swagger definitions through Azure Resource Manager, cleans them up, and emits clients for C#, Python, and TypeScript. Each SDK repository records what produced it in a generation manifest: the generator commits, the metadata API version, and a hash of every Connector's Swagger input. That makes each regeneration traceable to a specific generator revision and a specific set of Connector definitions. Besides action methods, the generator emits models for request and response bodies, typed trigger payloads and trigger operation constants, catalog constants that list the available Connectors, and support for paging and dynamic schemas. Each language then has a small handwritten runtime (the base client, the HTTP pipeline, errors, and paging) that the generated code builds on. Naming rules are kept consistent across languages, so the same Connector and operation have recognizable names whether you write C#, Python, or TypeScript. For setup, the VS Code connection manager and the connection-setup skill create the namespace and connection through the ARM preview API, open the OAuth consent page and check that the connection reports `Connected`, add access policies for your developer identity or the Function App's managed identity, and write the runtime URLs into local or deployed app settings. Recap When a customer writes in, the backing workflow detects the email through API Hub's existing Connector trigger. The delivery action then either calls the Function App's webhook or writes to a per-trigger storage queue that the host extension polls and scales on. The language worker binds the payload to a type that came from the same generator as the SDK, and the handler uses a generated Teams client whose calls go through the namespace's runtime proxy into API Hub. Each piece reuses what was already there: the Logic Apps workflow engine for triggers, API Hub for connections and Connector runtime, the Functions extension model and scale controller for hosting, and Azure Identity for credentials. The new parts are the namespace resources that tie them together, the delivery step, the Functions extension, and the generator that keeps every language's types in step with the Connectors themselves. References Connectors SDKs Language Repository .NET Azure/Connectors-NET-SDK Python Azure/Connectors-Python-SDK Node.js Azure/Connectors-NodeJS-SDK Azure Functions connector extensions Component Repository Host extension and .NET isolated worker extension Azure/azure-functions-connector-extension Python worker extension azurefunctions-extensions-connectors Node.js worker extension azure-functions-nodejs-extensions-connectors Samples Sample Repository .NET email triage into Teams Azure-Samples/functions-connectors-net-e2e-email-users-teams .NET connector samples Azure/Connectors-NET-samples Python connector samples Azure-Samples/functions-connectors-python TypeScript connector samples Azure-Samples/functions-connectors-typescript Note: The connector platform internals described in the post (the resource model, runtime proxy, trigger workflows, delivery action, and Poll runtime API) aren't in a public repository, so they have no links here.289Views3likes0CommentsTask queues in Durable Task Scheduler
Task queues in Durable Task Scheduler: control the pace of your work As teams scale their workflows on Durable Task Scheduler (DTS), many of them hit the same problem: the scheduler is fast, but the systems they call are not. A batch job starts 50,000 orchestrations. Each one calls a partner API that allows only 10 requests per second. Your workers are happy to go as fast as the scheduler hands them work, so the partner API starts returning 429 Too Many Requests. Retries pile up, the batch slows down, and other workloads in the same task hub feel the pain too. Without a built-in way to pace one workload, teams use workarounds. Some move the slow workload to its own task hub with fewer workers. Others write throttling code inside every activity, or cap worker concurrency and hope the number matches the downstream limit. Task queues, now in public preview, are a simpler option. A task queue groups orchestration and activity work inside a task hub and sets how fast the scheduler hands that work to workers. What is a task queue? A task queue is a small Azure resource that lives under a task hub. It has a name and one optional setting: a throughput limit. Scheduler └── Task hub ├── Task queue: orders (20 actions per second) └── Task queue: partner-api (5 actions per second) You send work to a queue with a tag. When you start an orchestration (or call an activity), you set the tag DTS_TaskQueue to the queue name. The scheduler then delivers that work to workers at about the rate the queue allows. You keep your existing workers, client, and task hub. The only worker change is the filter setting covered in step 4 below. How it works The throughput setting is called actionsPerSecond. It controls the sustained rate of work-item handouts, which is the number of times per second the scheduler gives a work item to a worker. Here is what counts as one handout: Each orchestration turn is one handout. An orchestration usually runs in several turns: it starts, waits for an activity, then continues. Each activity execution is one handout. If an activity is delivered again after a failure, the redelivery counts too. Orchestrations and activities in the same queue share one rate. Activities and sub-orchestrations use their parent's queue unless you choose a different one. Entity work items don't use task queues, so if an orchestration in a queue calls an entity, the entity work runs outside the queue's budget. So actionsPerSecond: 20 means the scheduler hands out about 20 work items per second from this queue. It doesn't mean 20 orchestrations finish per second. Short bursts above that rate can happen, and real throughput can be lower if your workers are busy. If you create a queue without a throughput value, it has no queue-specific limit. Normal scheduler and worker limits still apply. Behind the scenes Clusters and partitions A Durable Task Scheduler runs on a cluster of backend nodes. Each task hub is split into a fixed number of partitions. A partition is a slice of the task hub: it owns a set of orchestration instances, their state, and the queues of work that are ready to run. At any moment, each partition is owned by one node in the cluster. If a node fails or the cluster rebalances, another node takes over the partition and continues from its saved state. When you start an orchestration, the scheduler hashes the instance ID to choose its partition, so the same ID always lands in the same partition. With many instances and random IDs, work spreads evenly across partitions. Inside each partition there is a base queue for normal work, plus one ready queue for each task queue you define. Workers don't connect to partitions directly. A worker opens one streaming connection to the scheduler, and the scheduler pulls work for that worker from every partition. How work flows through a Durable Task Scheduler The routing decision is saved with the instance When an orchestration starts with DTS_TaskQueue, the scheduler saves the queue name as part of the instance's state. Later turns of that orchestration, the activities it schedules, and the child orchestrations it starts all go to the same queue unless you override it. Because the choice is stored with the instance, it survives node failovers and retries. The queue choice is saved with the instance This design has three effects: When an external event, an activity result, or a child result wakes up an orchestration, the work goes to that orchestration's queue, not the sender's. Continue-as-new can switch queues. If the new execution has a DTS_TaskQueue tag, that becomes the new choice. If it doesn't, the old choice stays. The scheduler saves the queue name even if the queue doesn't exist, and checks whether it exists each time it routes work. If the queue is missing, the work goes to normal routing and the scheduler logs a warning. The work itself doesn't fail. A token bucket in every partition The rate limit is a token bucket. Every handout from a limited queue takes one token, and tokens refill with time, not when work completes. When the bucket is empty, the work waits in its queue while other queues keep moving. The rate you configure applies to the whole task hub. The scheduler divides it evenly across partitions, so each partition has its own small bucket for each queue and decides on its own, with no central coordinator. One rate, split across partitions For example, with actionsPerSecond: 20 and a task hub with 4 partitions: Value Refill rate per partition 20 ÷ 4 = 5 tokens per second Bucket size per partition 1 second of its share = 5 tokens Total across the task hub 4 × 5 = 20 handouts per second Buckets start full. When a partition starts or moves to a new node, you can see a short burst before the steady rate takes over. Low rates still work. A partition's share can be less than one token per second; the scheduler keeps the fraction, and each bucket can hold at least one token. That partition waits longer between handouts. The split is static, so partitions don't borrow tokens from each other. If most of your work sits in one partition, it can only use that partition's share while the other buckets stay full. This matters when you have only a few long-running instances. With many instances, the hash spreads them out and you get close to the full rate. Taking turns between queues When a worker asks a partition for work, the partition has several ready queues: the base queue and each task queue. The scheduler reads from all of them at once and takes the first item that is ready. If more than one item comes back, it keeps one, puts the others back, and returns their tokens to the bucket. The starting queue rotates on each read (round-robin), so every queue gets a turn to be first. A busy queue can't block a quiet one, and no queue has priority over another. Worker concurrency limits still apply. A token lets the scheduler hand out a work item, but the worker still needs a free slot to accept it. Changing queues while work is running Queue definitions are Azure resources managed by the DTS control plane. When you create, update, or delete a queue, a durable control-plane workflow saves the new definition. Every partition then reloads its list of queues, and worker connections start reading the new set. Updating a rate gives each partition a new bucket with the new refill speed, and like any new bucket it starts full. Work is not moved or cancelled. Deleting a queue doesn't wait for it to drain: its pending work moves to normal routing, and work that is already running can finish. Example: an order workload with a rate-limited partner API This example processes orders and calls a partner API that allows 10 requests per second. Step 1: Create the queues Task queues use management API version 2026-07-01-preview. You can create them with the Azure CLI, the ARM REST API, or Bicep. Here is Bicep: param schedulerName string param taskHubName string resource scheduler 'Microsoft.DurableTask/schedulers@2026-02-01' existing = { name: schedulerName } resource taskHub 'Microsoft.DurableTask/schedulers/taskHubs@2026-02-01' existing = { parent: scheduler name: taskHubName } resource ordersQueue 'Microsoft.DurableTask/schedulers/taskHubs/taskQueues@2026-07-01-preview' = { parent: taskHub name: 'orders' properties: { throughput: { actionsPerSecond: 20 } } } resource partnerQueue 'Microsoft.DurableTask/schedulers/taskHubs/taskQueues@2026-07-01-preview' = { parent: taskHub name: 'partner-api' properties: { throughput: { actionsPerSecond: 5 } } } Or with the Azure CLI: taskHubResourceId="/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.DurableTask/schedulers/<scheduler>/taskHubs/<task-hub>" queueUrl="https://management.azure.com$taskHubResourceId/taskQueues/orders?api-version=2026-07-01-preview" az rest --method put \ --url "$queueUrl" \ --body '{"properties":{"throughput":{"actionsPerSecond":20}}}' Wait until properties.provisioningState is Succeeded before you send work to the queue. Step 2: Route an orchestration to a queue Add the DTS_TaskQueue tag when you schedule the orchestration: var options = new StartOrchestrationOptions { Tags = new Dictionary<string, string> { { "DTS_TaskQueue", "orders" }, }, }; string instanceId = await client.ScheduleNewOrchestrationInstanceAsync( "ProcessOrderOrchestration", input: order, options: options); The same idea works in Python: instance_id = client.schedule_new_orchestration( "process_order_orchestration", input=order, tags={"DTS_TaskQueue": "orders"}, ) Every activity and sub-orchestration this orchestration starts will also use the orders queue. You don't need to repeat the tag on each call. Step 3: Slow down only the part that needs it Often only one step of a workflow needs a lower rate. Here, the orchestration can move at 20 handouts per second, but the partner API call should stay at 5 per second, well below the partner's limit of 10. You can move just that activity to another queue: var partnerOptions = new TaskOptions(tags: new Dictionary<string, string> { { "DTS_TaskQueue", "partner-api" }, }); await context.CallActivityAsync( "CallPartnerApi", input: order, options: partnerOptions); The parent orchestration stays in orders. Only CallPartnerApi is paced by partner-api. Step 4: Make sure your workers can pick up the work Only workers without work item filters receive work from a task queue. The .NET SDK creates filters automatically from your task registry, so turn them off for these workers: builder.Services.AddDurableTaskWorker() .AddTasks(registry => registry.AddAllGeneratedTasks()) .UseDurableTaskScheduler(connectionString) .UseWorkItemFilters(null); In the Java, Python, and Go SDKs, don't turn on work item filtering for these workers. Step 5: Tune at runtime You can change the rate at any time without redeploying code or changing tags: az rest --method patch --url "$queueUrl" \ --body '{"properties":{"throughput":{"actionsPerSecond":10}}}' To remove the limit but keep the queue, set throughput to null. Use cases Rate-limited downstream services. A payment provider, a CRM, or an LLM endpoint often has a strict quota. Put the activities that call it in their own queue and set a rate below the quota, so fewer calls come back with 429. Large batch jobs. Nightly imports and data backfills often start thousands of orchestrations at once. A task queue lets the batch move at a steady pace instead of hitting your database or storage in one wave. Mixed workloads in one task hub. If a heavy workload shares a task hub with lighter, interactive work, a rate limit on the heavy workload's queue leaves room for the rest, without splitting into separate task hubs. AI agent workflows. Agent loops can call models and tools many times per request. Routing the model-calling activities through a queue helps you stay inside token or request quotas while the rest of the workflow keeps moving. Limits to know Task queues pace work. Keep these limits in mind when you design with them: Queues have no priority. Each queue is paced on its own, and none runs before another. Queues don't reserve compute or give physical isolation. They share the same scheduler and workers. Worker isolation via Task Queues will come later. The handout rate is not an exact cap on downstream calls, because of bursts and retries. For a hard limit, also add rate limiting in the activity that calls the service. If the tag names a queue that doesn't exist or was deleted, the work still runs, but without the rate limit. Don't delete a queue to pause a workload. Work in a defined queue waits for an unfiltered worker. It doesn't fall back to a filtered one. A queue doesn't limit how fast you create instances. If you start 50,000 orchestrations, they are all created right away, and their work then waits in the queue. This will cause longer periods in the pending state for the new orchestrations. In this preview, extended sessions are not paced. If your workers use them, turns that run inside an open session don't take a token. SDK support You select a queue with orchestration and activity tags. Support today: SDK Start orchestration Call activity Call sub-orchestration Durable Task .NET Yes Yes Yes Durable Task JavaScript/TypeScript Yes Yes Yes Durable Task Python Yes Yes No Durable Task Java (v1.6.0+) Yes No No Durable Task Go (beta) Yes Yes Yes Durable Functions .NET isolated Yes Yes Yes Durable Functions Java Yes No No When an SDK can't set the tag on a child call, the child inherits the parent's queue. Best practices Start with one queue. Put the workload you worry about most into a single queue with a safe rate. Add more queues only when you see a clear need. Think in handouts, not orchestrations. An orchestration that calls five activities one after another uses about 11 handouts: six orchestration turns (one to start, plus one after each activity) and five activity executions. Do this math before you pick a number. Set the rate below the downstream limit. Leave room for retries and short bursts. Spread the work. The rate is split across partitions, so it works best with many instances. If you run only a few long-lived orchestrations, expect lower throughput than the configured rate. Random or unique instance IDs help the hash spread work evenly. Create the queue first, then send work. Wait for provisioningState to be Succeeded. Otherwise the work runs without a limit. Check the dashboard. The DTS dashboard shows orchestration status and tags, so you can confirm that work lands in the queue you expect. Getting started Task queues are available now in public preview. To try them: Create a queue under your task hub with API version 2026-07-01-preview. Make sure your workers connect without work item filters. Add the DTS_TaskQueue tag when you schedule work. Read the full guide: Use task queues in Durable Task Scheduler. To tell us how you use task queues or what you want next, open an issue in your SDK's GitHub repository.245Views1like0CommentsA Rust foundation for Python Functions: evolution of the Python worker
When you write a Python function, your focus is on what the function should do. Behind the scenes, the layer that passes requests to your code affects dependency compatibility, support for new Python versions, and performance. As we started working on Python 3.15 support for Azure Functions, we took another look at that layer. Our goal was to move host communication away from Python transport packages while keeping the code that runs functions in Python. The result is R2P2, short for Rust to Python Proxy. Its communication layer is written in Rust, and your functions still run in Python. Here's what we changed, why we chose Rust, and what we learned along the way. How a Python function gets to work Azure Functions lets you run code in response to events, such as an HTTP request, a message in a queue, or a file upload. Two components work together to get that event to your code: The Functions host listens for events and sends work to the appropriate language worker. The Python worker loads and calls your Python function, then sends the result and logs back to the host. The worker for Python 3.13 and 3.14 already split that work into two layers. A Python-based proxy worker, an intermediary inside the worker process, handled communication with the host. It then passed requests to the Python runtime libraries, which discover functions, prepare their inputs, and invoke them. Here, runtime libraries mean the worker's Python execution code, rather than a separate service. Python 3.13 and 3.14: the host communicates with a Python proxy, which calls the runtime libraries. The proxy and application share an interpreter. That split gave us a place to make a focused change. We could build a new communication layer while keeping the Python runtime libraries. What changed, and what stayed Python R2P2 builds on architectural decisions made over several Python releases. With Python 3.13, we introduced the proxy workerand separated communication with the host from the libraries that execute functions. That gave each layer a clearer responsibility and allowed the Python execution libraries to evolve separately from the transport. That earlier work made this change practical. For Python 3.15, we had an established boundary where we could replace the Python proxy with a Rust transport while retaining the Python execution libraries. The work involved adapting the runtime integration, handling the Rust-to-Python handoff, and validating startup, imports, and function execution together. It was an evolution of the worker architecture, built on the separation introduced in Python 3.13. With R2P2, the host uses the same protocol as before, but a Rust transport layer, the part that sends and receives messages, handles the communication. PyO3 connects it to an embedded CPython interpreter, the Python interpreter running inside the worker process, and the existing Python execution libraries. Python 3.15 and R2P2: Rust replaces the Python transport. The bridge and Python execution libraries run in the same worker process. We adapted the integration with the runtime libraries and kept Python responsible for function execution. Users continue to write Python functions using the same programming models. For a deeper look at how the worker fits together, see the Python worker architecture documentation. Why consider Rust? We wanted the worker's communication stack to use a different set of dependencies while preserving the Python execution layer. Rust gave us a way to do both. A communication stack independent of Python packages: The Python proxy used grpcio for gRPC, the protocol the host and worker use to communicate, and protobuf to encode and decode their messages. These packages include native components, so a new Python version or platform needs compatible package builds. They also share an interpreter with your application, which might need different versions of those packages. Moving that layer to Rust let us use tonic for gRPC and prost for Protocol Buffers. The host still speaks the same protocol, while the worker uses a Rust implementation. Your application can continue to use Python's grpcio and protobuf packages; the worker's transport uses its own Rust libraries for communication. A practical bridge back to Python: We also needed a practical way for Rust to call the existing Python execution libraries. PyO3 gave us that connection. It provided the capabilities we needed to integrate a Rust transport with the existing worker’s Python execution libraries: embedding CPython, calling Python code, and passing values between the two languages. That let us build on the Python execution layer we already had. Through PyO3, the Rust transport calls those libraries within the same worker process, and they continue to load and run your Python functions. What this enables Changing the transport gives us a few benefits: A shorter path to supporting new Python versions: The worker's communication layer can be built for a new Python release independently of compatible Python grpcio and protobuf packages. Using tonic and prost removes that transport-package gate from the process. We still build against the new interpreter and validate the execution libraries, tooling, and application compatibility. Removing a dependency from that process gives us more control over the path to a new Python release. Separate transport dependencies from application packages: The Rust transport uses its own libraries for messaging. An application can choose the Python grpcio and protobuf packages it needs without competing with the worker's transport for those imports. That removes one source of dependency collisions: the worker transport and application needing different versions. Compatibility between an application's own dependencies remains something to manage. Windows ARM64 support in the Azure Functions CLI: The Azure Functions CLI (v5) lets users run and test functions locally. Python support on Windows ARM64 depended in part on the availability of Python's gRPC package, grpcio for that platform. Moving the worker's transport to Rust removes that dependency and helps enable Python support on Windows ARM64 in the Azure Functions CLI (v5). Performance as an added benefit: Every request needs work before and after your function runs. The worker receives and decodes a message, routes it, and sends the response back. For a short function, that overhead can make up a meaningful part of the request. Rust lets us handle that communication natively and keep it moving while Python runs a function. In our performance testing, Python 3.15 with R2P2 delivered about 50% higher throughput than Python 3.14. The comparison includes both a Python version change and a worker change, so it measures the combined result rather than Rust's contribution alone. What we learned Start with a boundary: The split between the proxy and execution libraries gave us a clear place to start. We could focus on how the worker receives and sends messages while keeping the existing Python code for function discovery, bindings, and invocation. That boundary helped us keep the project manageable. We could test whether the Rust transport worked with the behavior the Python runtimes already provided, instead of rebuilding that behavior in another language. We still had integration work to do, especially where messages and function inputs cross from one side to the other. The handoff has a cost: A request crosses several steps on its way from the host to your function. Rust receives and decodes the host's message, then passes the values Python needs to the execution layer. The result takes the return journey. Each conversion between Rust and Python has a cost, particularly for functions that do very little work themselves. We learned to look at the whole request path when evaluating performance. Faster message handling is useful, but the data passed across the bridge and the work done on either side matter too. Rust can keep communication moving while Python runs a function; Python execution still follows the standard interpreter's concurrency constraints. Rust has a learning curve: Rust asks you to think explicitly about ownership: which part of the program is responsible for a value, how long it lives, and who can use it. Coming from Python, that took some adjustment. The questions became especially important at the bridge, where Rust code interacts with objects managed by the Python interpreter and work may arrive concurrently. The compiler gives useful feedback while we build, and that helped us reason about how data is shared. It also took time to learn how to express those relationships. Debugging can now involve both Rust and Python, and the interpreter and its native extensions still need their own testing. The learning continues beyond getting the code to compile. Startup and imports need attention: Getting a request through a running worker is one part of the job. At startup, the worker also needs to find the application, select the appropriate Python execution layer, and load dependencies in the expected order. Those steps matter because applications may bring packages that overlap with packages used by the worker. Shared Python namespaces were a useful example. Several packages can contribute modules under the same namespace. When dependency paths change, Python may still have earlier imports cached. The worker needs to account for both the paths and the loaded modules so subsequent imports find the right code. That work made the boundary more than a function call. Startup, imports, and the way the worker is packaged all contribute to a reliable experience. The trade-offs We now maintain a mixed-language worker, build native binaries for supported platforms, and test the Rust-to-Python boundary. Troubleshooting can involve both toolchains. Startup, imports, and packaging all need attention as the worker evolves. For us, those costs were worth taking on to address the transport dependencies while keeping the Python execution layer. This boundary gave us a place to use Rust for communication and Python for running the functions users write.190Views3likes0CommentsAzure Functions Network Troubleshooter and Connectivity Checks
Introduction The new Network Troubleshooter experience is now in preview for Function Apps. You can find it in the Diagnose and solve problems section of the Azure portal. This is an upgrade from the previous v1 experience and builds on the work for Web Apps Network Troubleshooter. Troubleshooting networking and configuration dependencies in Azure Functions can be complex. The Azure Functions Network Troubleshooter is a self-service solution designed to help customers independently diagnose connectivity issues, identify potential causes, and take corrective action. The troubleshooter helps you: Identify dependencies: Discover the resources your Function App depends on. Test connectivity: Check connectivity from within your Function App to its dependencies. Diagnose DNS and TCP issues: Identify where connectivity is failing. Review network and MI/RBAC configurations: Identify potential networking misconfigurations and permission-related issues that may affect connectivity to dependent resources. Get actionable recommendations: Understand which dependencies are affected, where connectivity is failing, and what steps to take next. The troubleshooter is available today for Windows and Linux Function Apps across all SKUs as well as Azure Logic Apps Standard. For Flex Consumption tier apps, support for full connectivity testing from within the app will be available in a future update. Try It Out You can try this out by visiting the Azure Portal and going to the Diagnose and Solve section on the left-hand side. You can also open it from the Networking page by selecting Troubleshoot in the top bar. Or you can also access it via the Diagnose and solve problems section via Diagnostics tools. Sample Experience When you start the experience, it analyzes the app dependencies. If it detects an issue, it shows the analysis and the recommended fix. e.g. for Service Bus e.g. for the Storage file volume check. Feedback There are many scenarios that are already implemented, and also some that are not yet covered. If you find a specific scenario that is not implemented, or the current implementation does not meet your expectations, then please share feedback using the link in the troubleshooter. Try it on your Function app today.149Views0likes0Comments