Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Use Durable Functions, a feature of Azure Functions, to write stateful functions in a serverless environment. Durable Functions manages state, checkpoints, and restarts in your application.
Durable Functions offers several storage providers, also called back ends, for storing orchestration and entity runtime state. By default, new projects are configured to use the Azure Storage provider. In this quickstart, you configure a Durable Functions app to use the Netherite storage provider.
Note
Netherite was designed and developed by Microsoft Research for high throughput scenarios. In some benchmarks, throughput increased by more than an order of magnitude compared to the default Azure Storage provider. To learn more about when to use the Netherite storage provider, see the storage providers documentation.
Migrating task hub data across storage providers currently isn't supported. Function apps that have existing runtime data start with a fresh, empty task hub after they switch to the Netherite back end. Similarly, the task hub contents that are created by using MSSQL can't be preserved if you switch to a different storage provider.
The Netherite backend currently isn't supported by Durable Functions when running on the Flex Consumption plan.
The following steps assume that you're starting with an existing Durable Functions app and are familiar with how to operate it.
Specifically, this quickstart assumes that you have already:
If you don't meet these prerequisites, we recommend that you start with one of the following quickstarts:
Note
If your app uses Extension Bundles, skip this section. Extension Bundles removes the need for manual extension management.
First, install the latest version of the Microsoft.Azure.Functions.Worker.Extensions.DurableTask.Netherite storage provider extension from NuGet. For .NET, you usually include a reference to it in your .csproj file and building the project.
You can install the extension by using the following Azure Functions Core Tools CLI command:
func extensions install --package <package name depending on your worker model> --version <latest version>
For more information about installing Azure Functions extensions via the Core Tools CLI, see func extensions install.
The Netherite back end requires a connection string to Azure Event Hubs to run on Azure. However, for local development, providing the string "SingleHost"
bypasses the need to use Event Hubs.
In local.settings.json, set the value of EventHubsConnection
to SingleHost
:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"EventHubsConnection": "SingleHost",
"FUNCTIONS_WORKER_RUNTIME": "<dependent on your programming language>"
}
}
Note
The value of FUNCTIONS_WORKER_RUNTIME
depends on the programming language you use. For more information, see the runtime reference.
Edit the storage provider section of the host.json file to set type
to Netherite
:
{
"version": "2.0",
"extensions": {
"durableTask": {
"storageProvider": {
"type": "Netherite"
}
}
}
}
This code snippet is a basic configuration. Later, you might want to add parameters.
Your app is now ready for local development. You can start the function app to test it. One way to start the app is to run func host start
on your application's root, and then execute a basic orchestrator function.
While the function app is running, Netherite publishes load information about its active partitions to an Azure Storage table named DurableTaskPartitions. You can use Azure Storage Explorer to verify that it's working as expected. If Netherite is running correctly, the table isn't empty. For an example, see the following screenshot.
For more information about the contents of the DurableTaskPartitions table, see Partition Table.
Note
If you use local storage emulation on a Windows OS, ensure that you're using the Azurite storage emulator and not the earlier Azure Storage Emulator component. Local storage emulation with Netherite is supported only via Azurite.
To run your app in Azure, create an Azure Functions app.
You need to set up an Event Hubs namespace to run Netherite in Azure. You can also set it up if you prefer to use Event Hubs during local development.
Note
An Event Hubs namespace incurs an ongoing cost, whether or not it is being used by Durable Functions. Microsoft offers a 12-month free Azure subscription account if you’re exploring Azure for the first time.
Complete the steps to create an Event Hubs namespace in the Azure portal. When you create the namespace, you might be prompted to:
To get the connection string for your Event Hubs namespace, go to your Event Hubs namespace in the Azure portal. Select Shared access policies, and then select RootManagedSharedAccessKey. A field named Connection string-primary key appears, and the field's value is the connection string.
Next, add your connection string as an application setting in your function app. To add it in the Azure portal, go to your function app view, select Configuration, and then select New application setting. You can assign EventHubsConnection
to map to your connection string. The following screenshots show some examples.
Note
Skip this section if your app is not in the Elastic Premium plan.
If your app is running on the Elastic Premium plan, we recommend that you enable runtime scale monitoring for better scaling. Go to Configuration, select Function runtime settings, and set Runtime Scale Monitoring to On.
Note
Skip this section if your app runs on Linux.
Netherite requires a 64-bit architecture. Beginning with Azure Functions V4, 64-bit should be the default. You can usually validate this setting in the Azure portal. Under Configuration, select General Settings, and then ensure that Platform is set to 64 Bit. If you don't see this option in the portal, then you might already run on a 64-bit platform. For example, Linux apps don't show this setting because they support only 64-bit architecture.
You can now deploy your code to the cloud and run your tests or workload on it. To validate that Netherite is correctly configured, you can review the metrics for Event Hubs in the portal to ensure that there's activity.
Note
For information about how to deploy your project to Azure, review the deployment instructions for your programming language in Prerequisites.
Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Learning path
Run high-performance computing (HPC) applications on Azure - Training
Azure HPC is a purpose-built cloud capability for HPC & AI workload, using leading-edge processors and HPC-class InfiniBand interconnect, to deliver the best application performance, scalability, and value. Azure HPC enables users to unlock innovation, productivity, and business agility, through a highly available range of HPC & AI technologies that can be dynamically allocated as your business and technical needs change. This learning path is a series of modules that help you get started on Azure HPC - you
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.