Preview of Durable Functions Extension v3.0.0
Published Dec 05 2023 09:00 AM 6,029 Views
Microsoft

We have just released the preview of a new major version of the Durable Functions extension! 

 

Durable Functions (DF) enables you to write long-running, reliable, event-driven, and stateful logic on the Azure Functions platform using everyday imperative code. 

 

There are two major changes introduced in this release: upgrading to the latest version of the Azure Storage SDK (a breaking change for .NET in-process apps) and the introduction of a new partition manager. We describe these and the motivation for each in the sections below. 

 

Please note: 

 

Upgrade to Azure Storage SDK V12 

 

By default, DF utilizes Azure Storage as its storage backend to durably save application state. With this new release, the Azure Storage backend replaces its dependency on the deprecated Azure Storage SDK (Windows.Azure.Storage v9.3.1), for v12 of Azure.Data.Tables, Azure.Storage.Blobs, and Azure.Storage.Queues, the major releases of the Azure Storage SDKs. 

 

This migration addresses to a top request from our customers, and provides us with the latest performance, correctness, and security updates. However, it may represent a breaking change for .NET in-process customers that have taken a transitive dependency on the deprecated Azure Storage SDK.  

 

Improved partition management for the Azure Storage 

 

In the Azure Storage backend, an internal component known as the Partition Manager is responsible for distributing partitions/control queues among workers. Internally, this partition manager uses Azure Blob leases to determine which app instances own which control queue partitions. In the new v3 extension release, we’ve introduced a new partition manager (called Partition Manager V3) that uses Azure Tables to manage partition assignment instead of Azure Blob leases. This new design reduces storage costs, especially when using an Azure Storage v2 account, and is easier to debug compared to previous implementations. 

 

Improvements to Partition Manager V3 

 

Cost savings 

 

Partition Manager V3 is more cost efficient for both Azure Storage V1 and V2 accounts. To test this, we compared the costs of both partition managers in the App Service Plan when configured with four Durable Functions partitions and four VMs. 

Since the Partition Manager runs in the background without needing to trigger the orchestrator, we deployed a simple sequential orchestrator (that we did not trigger) and left the test apps idle for a month. As such, the data collected below represents the background costs of the partition manager. 

 

costpm.png

 

 

 

As the table shows, Partition Manager V3 offers significant savings in our benchmark: about a 93% reduction on daily costs on Storage V2 and about 89% reduced daily costs on Storage V1. We expect that these savings should increase as additional VMs are added as each VM runs its own Partition Manager instance, though your results may vary depending on your application’s inner workings. 

 

Easier to debug. 

 

When utilizing Partition Manager V3, a new Table named "Partitions" is introduced into your Durable Function App’s TaskHub. This Table stores and displays the current partition information, providing a clear view of your app’s activity for improved debuggability. 

 

The screenshots below display a sample Partition table in Azure Storage Explorer. 

 

azureexplorerpp.png

 

 

Try it out! 

 

Step 1: Get the package

 

  • For .NET in-process users:  

Install Microsoft.Azure.WebJobs.Extensions.DurableTask v3.0.0-rc.1 from nuget.org.  

  • For .NET Isolated (out-of-process) users:  

Install Microsoft.Azure.Functions.Worker.Extensions.DurableTask v1.2.0-rc.1 from nuget.org.  

  • For other language users with extension bundles: 

Users need to opt out of bundles to manually upgrade to this preview version of the Durable Functions extension. Please follow the steps here.  

 

Step 2: Configuration  

 

There is no need to make any code adjustments to your app for trying this preview package as the updates integrate in the background. 

Durable Functions v3.0.0-rc.1 is configured to use Partition Manager V3 by default.  No configuration is required. You can start using it right away. 

 

Partition Manager V3 is also supported in Durable Functions V2 starting from version V2.10.0. To enable it, add the following configuration in your app’s host.json file. Note that managed identity is not supported for Partition Manager V3 when running on Durable Functions Extension v2.x. 

 

 

 

"extensions": { 
​    "durableTask": { 
​      "storageProvider": { 
​        "useTablePartitionManagement": true 
​      }
   } 
​} 

 

 

 

Step 3: Test 

 

There is no need to make any code adjustments to your app for trying this preview package as the updates integrate in the background. However, since this is a preview release with some breaking changes, it’s highly recommended to test your application after upgrading. Should any issues or feedback arise, please report them to our GitHub repository here. 

 

Keep in touch! 

 

This release marks a significant milestone. Durable Functions extension v3.0.0-rc.1 includes two major changes from v2.x.  

 

Don’t hesitate to find us on Twitter / X via @cgillum, @lilyyym1, or @AzureFunctions. Your feedback is highly valued, and we welcome everyone to try out the new features. We're committed to working diligently to address any concerns and continue to enhance the experience for the General Availability release. 

 

Thank you for your continued support and interest in making this release a success! 

Co-Authors
Version history
Last update:
‎Jan 26 2024 03:06 PM
Updated by: