Ócáid
Mar 17, 9 PM - Mar 21, 10 AM
Bí ar an tsraith meetup chun réitigh AI inscálaithe a thógáil bunaithe ar chásanna úsáide fíor-dhomhanda le forbróirí agus saineolaithe eile.
Cláraigh anoisNí thacaítear leis an mbrabhsálaí seo a thuilleadh.
Uasghrádú go Microsoft Edge chun leas a bhaint as na gnéithe is déanaí, nuashonruithe slándála, agus tacaíocht theicniúil.
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.
Nóta
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:
Nóta
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>"
}
}
Nóta
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.
Nóta
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.
Nóta
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.
Nóta
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.
Nóta
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.
Nóta
For information about how to deploy your project to Azure, review the deployment instructions for your programming language in Prerequisites.
Ócáid
Mar 17, 9 PM - Mar 21, 10 AM
Bí ar an tsraith meetup chun réitigh AI inscálaithe a thógáil bunaithe ar chásanna úsáide fíor-dhomhanda le forbróirí agus saineolaithe eile.
Cláraigh anoisOiliúint
Cosán foghlama
Exécuter des applications HPC (High-Performance Computing) sur Azure - Training
Azure HPC est une fonctionnalité cloud conçue spécialement pour les charges de travail HPC et IA, qui utilise des processeurs de pointe et une interconnexion InfiniBand de classe HPC pour offrir les meilleures performances, scalabilité et valeur aux applications. Azure HPC permet aux utilisateurs de laisser libre cours à l’innovation, la productivité et l’agilité métier grâce à une gamme de technologies HPC et IA hautement disponibles qui peuvent être allouées dynamiquement à mesure que vos besoins technico
Deimhniú
Microsoft Certified: Azure Developer Associate - Certifications
Générez des solutions de bout en bout dans Microsoft Azure pour créer des fonctions Azure Functions, implémenter et gérer des applications web, développer des solutions qui utilisent le Stockage Azure, et bien plus encore.