SlideShare une entreprise Scribd logo
1  sur  27
Getting started with Azure Functions
using Isolated worker process
Callon Campbell
Microsoft MVP | Azure
@flying_maverick
About me
Callon Campbell
Azure Architect | Developer
Adastra
Microsoft MVP | Azure
 20 years enterprise development with Microsoft technologies – .NET (C#),
Azure, ASP.NET, Desktop, SQL, and Mobile
 Passionate about serverless and cloud-native application development,
with focus on app migration and modernization, app integration and data
analytics
 Blogging at https://TheFlyingMaverick.com
 Speaker at community events and meetups
 Organizer of “Canada’s Technology Triangle .NET User Group” in
Kitchener, Ontario
Agenda  Overview of serverless
 Different hosting models
 Preparing for .NET 8
 Demos
 Wrap-up
 Q&A
Azure Functions
Run code when events occur
Event-driven scaling
No infrastructure management
Consumption pricing with free grant
Platform
Application
delivery
Operating
system
●●● ●●●
●●●
+
https://github.com/azure/azure-functions-host
(+other repos)
Azure Functions
host runtime
Azure Functions
Core Tools
Azure Functions
base Docker image
Azure Functions
.NET Docker image
Azure Functions
Node Docker image
●●●
Functions everywhere
.NET functions hosting models
In-process
 Your function code runs in the same process as the Functions host
process. Only supports LTS versions of .NET
Isolated worker
 Your function code runs in a separate .NET worker process.
 This is what all non .NET languages use.
Why .NET Functions isolated worker process?
 When it was introduced, Azure Functions only supported a tightly
integrated mode for .NET functions called in-process.
 Your code runs in the same process as the host, resulting in a tight
coupling between the host process and the .NET function app.
 In-process function can only run on the LTS version of .NET.
 Non-LTS required you to use an isolated worker process that debut
in .NET 5.
 Isolated worker process aligns with the evolution of .NET.
Comparing Azure Functions hosting models
In-process
 Migrate from .NET Core 3.1 in-
process
 Need Durable Functions Entities or
“rich” SDK type bindings that are
 Support for .NET 6 and .NET
Framework 4.8
 Performance and cold-start
optimization
Isolated worker
 Migrate from .NET 5 or .NET 6
isolated process
 Added support for middleware
 Support for .NET 6, .NET 7, .NET
Framework 4.8, and .NET 8
(preview)
Which one do I use?
Details: https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-in-process-differences
Comparing available Azure Function triggers
.NET 6 In-process .NET 7 Isolated worker
Azure Functions .NET Roadmap
In-process
Isolated process
.NET 5 .NET 6 LTS .NET 7 .NET 8 LTS
.NET Core 3.1 LTS .NET 6 LTS
with Durable Functions
Nov 2021
Nov 2022 Nov 2023
Strengths of Isolated worker process
 Fewer conflicts: Assemblies used in your app won't conflict with
different version of the same assemblies used by the host process.
 Full control of the process: You control the start-up of the app and
can control the configurations used and the middleware started.
 Dependency injection: Use current .NET behaviors for
dependency injection and incorporating middleware into your
function app.
 Target new versions: Easily target new versions of .NET as they
become available.
Demo
Creating Azure Function app using Isolated worker process
Migrating to the Isolated worker process
.NET 6 In-process .NET 7 Isolated worker
Project file changes
Migrating to the Isolated worker process
.NET 6 In-process .NET 7 Isolated worker
• The packages for these extensions will all be under the
Microsoft.Azure.Functions.Worker.Extensions prefix.
• Be sure to install the latest stable version of any packages you are targeting.
• Your application should not reference any packages in the Microsoft.Azure.WebJobs.*
namespaces. If you have any remaining references to these, they should be removed.
 Microsoft.NET.Sdk.Functions  Microsoft.Azure.Functions.Worker
 Microsoft.Azure.Functions.Worker.Sdk
Migrating to the Isolated worker process
Code changes: new Program.cs
file
In-process Isolated worker
[FunctionName("Function1")] [Function("Function1")]
Code changes: Function
attribute
Migrating to the Isolated worker process
In-process Isolated worker
Configuration changes
"FUNCTIONS_WORKER_RUNTIME":
"dotnet"
"FUNCTIONS_WORKER_RUNTIME":
"dotnet-isolated"
Tip
If you are moving to an LTS or STS version of .NET, the .NET Upgrade Assistant can be used to
automatically make many of the changes mentioned.
Update your function app in Azure
Upgrading your function app to the isolated model consists of two
steps:
1. Change the configuration of the function app to use the isolated model by
setting the FUNCTIONS_WORKER_RUNTIME application setting to "dotnet-
isolated". Make sure that any deployment automation is similarly updated.
2. Publish your upgraded project to the upgraded function app.
Use a staging slot to test and verify your upgraded code /
configuration. Then perform a swap operation when ready to deploy
to the production slot.
Demo
Migrating an Azure Function app to Isolated worker process
What’s coming?
Azure Functions .NET 8 roadmap
 Isolated worker process reaching feature parity.
 Isolated worker will be initially supported on .NET 8 release.
 In-process for .NET 8 will be the last LTS release and will be
released slightly after the .NET 8 release.
.NET 8 (preview) for Azure Functions
 Preview support for .NET 8 function apps is currently limited to Linux
applications.
 Requires .NET 8 Preview SDKs in Visual Studio (Visual Studio 2022
Preview).
 Performance optimizations is coming…
 Placeholder for cold-start
 Optimized executor
 ReadyToRun (form of AOT)
 .NET 8 AOT compilation
Demo
Sneak peak at Azure Functions in .NET 8
What we covered
 Comparison of in-process and isolated worker processes.
 Benefits of the isolated worker process and migration path.
 Sneak peak at .NET 8
Closing
 The isolated worker is in position to tackle things that can’t be done
with the in-process model.
 Try the isolated worker process and plan your migration.
 If performance and certain key features are critical, stick to the in-
process model for the time being since with .NET 8 it will still be
supported.
References
Azure functions runtime versions overview
C# Azure Functions in an isolated worker process
.NET on Azure Functions — August 2023 roadmap update
.NET Upgrade Assistant
Let’s Connect
https://LinkedIn.com/in/CallonCampbell
@flying_maverick
Callon@CloudMavericks.ca
https://GitHub.com/CallonCampbell
Thanks for joining
Time for Q&A

Contenu connexe

Similaire à Getting started with Azure Functions in Isolated Mode

ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsKen Cenerelli
 
vRO Training Document
vRO Training DocumentvRO Training Document
vRO Training DocumentMayank Goyal
 
Building 12 factor apps with ASP.NET Core, Сергій Калинець
Building 12 factor apps with ASP.NET Core, Сергій КалинецьBuilding 12 factor apps with ASP.NET Core, Сергій Калинець
Building 12 factor apps with ASP.NET Core, Сергій КалинецьSigma Software
 
.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection Workshop.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection WorkshopSerhii Kokhan
 
NuGet 3.0 - Transitioning from OData to JSON-LD
NuGet 3.0 - Transitioning from OData to JSON-LDNuGet 3.0 - Transitioning from OData to JSON-LD
NuGet 3.0 - Transitioning from OData to JSON-LDJeff Handley
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
Durable Azure Functions
Durable Azure FunctionsDurable Azure Functions
Durable Azure FunctionsPushkar Saraf
 
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...VMware Tanzu
 
[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...
[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...
[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...Christian Lechner
 
Microsoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateMicrosoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateAdam John
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kuberneteskloia
 
#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learned#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learnedVincent Biret
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316Jupil Hwang
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Andrea Tosato
 

Similaire à Getting started with Azure Functions in Isolated Mode (20)

SSDT unleashed
SSDT unleashedSSDT unleashed
SSDT unleashed
 
ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bits
 
vRO Training Document
vRO Training DocumentvRO Training Document
vRO Training Document
 
Building 12 factor apps with ASP.NET Core, Сергій Калинець
Building 12 factor apps with ASP.NET Core, Сергій КалинецьBuilding 12 factor apps with ASP.NET Core, Сергій Калинець
Building 12 factor apps with ASP.NET Core, Сергій Калинець
 
.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection Workshop.NET Intro & Dependency Injection Workshop
.NET Intro & Dependency Injection Workshop
 
NuGet 3.0 - Transitioning from OData to JSON-LD
NuGet 3.0 - Transitioning from OData to JSON-LDNuGet 3.0 - Transitioning from OData to JSON-LD
NuGet 3.0 - Transitioning from OData to JSON-LD
 
Durable Azure Functions
Durable Azure FunctionsDurable Azure Functions
Durable Azure Functions
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Durable Azure Functions
Durable Azure FunctionsDurable Azure Functions
Durable Azure Functions
 
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
 
[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...
[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...
[SOT322] Serverless Side-by-Side Extensions with Azure Durable Functions - Wh...
 
Microsoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateMicrosoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New Update
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Chinnasamy Manickam
Chinnasamy ManickamChinnasamy Manickam
Chinnasamy Manickam
 
.Net Core
.Net Core.Net Core
.Net Core
 
#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learned#SpFestSea azr203 Azure functions lessons learned
#SpFestSea azr203 Azure functions lessons learned
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019
 

Plus de Callon Campbell

Global Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in AzureGlobal Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in AzureCallon Campbell
 
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...Callon Campbell
 
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App JourneyGlobal Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App JourneyCallon Campbell
 
Festive Tech Calendar 2021
Festive Tech Calendar 2021Festive Tech Calendar 2021
Festive Tech Calendar 2021Callon Campbell
 
Festive Tech Calendar 2022
Festive Tech Calendar 2022Festive Tech Calendar 2022
Festive Tech Calendar 2022Callon Campbell
 
BestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptxBestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptxCallon Campbell
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Callon Campbell
 
Building scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloudBuilding scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloudCallon Campbell
 
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Callon Campbell
 
Developing scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .netDeveloping scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .netCallon Campbell
 
Exposing services with Azure API Management
Exposing services with Azure API ManagementExposing services with Azure API Management
Exposing services with Azure API ManagementCallon Campbell
 
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)Callon Campbell
 
Centralized configuration with azure app configuration
Centralized configuration with azure app configurationCentralized configuration with azure app configuration
Centralized configuration with azure app configurationCallon Campbell
 
Creating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event GridCreating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event GridCallon Campbell
 
Getting Started with Azure Artifacts
Getting Started with Azure ArtifactsGetting Started with Azure Artifacts
Getting Started with Azure ArtifactsCallon Campbell
 
Serverless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsServerless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsCallon Campbell
 
Serverless Application Development with Azure
Serverless Application Development with AzureServerless Application Development with Azure
Serverless Application Development with AzureCallon Campbell
 
Introduction to Azure Event Grid
Introduction to Azure Event GridIntroduction to Azure Event Grid
Introduction to Azure Event GridCallon Campbell
 

Plus de Callon Campbell (20)

Global Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in AzureGlobal Azure 2023 - Building Multitenant SaaS Applications in Azure
Global Azure 2023 - Building Multitenant SaaS Applications in Azure
 
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
Azure Durable Functions: The Festive Magic of Scalable Serverless Workflows f...
 
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App JourneyGlobal Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
Global Azure 2024 - On-Premises to Azure Cloud: .NET Web App Journey
 
Festive Tech Calendar 2021
Festive Tech Calendar 2021Festive Tech Calendar 2021
Festive Tech Calendar 2021
 
Festive Tech Calendar 2022
Festive Tech Calendar 2022Festive Tech Calendar 2022
Festive Tech Calendar 2022
 
BestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptxBestOfBuild2021 - Azure Functions (15min).pptx
BestOfBuild2021 - Azure Functions (15min).pptx
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
 
Building scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloudBuilding scalable applications using serverless on the cloud
Building scalable applications using serverless on the cloud
 
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
Bringing Serverless into the Enterprise (Global Azure Virtual 2020)
 
Developing scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .netDeveloping scalable enterprise serverless applications on azure with .net
Developing scalable enterprise serverless applications on azure with .net
 
Exposing services with Azure API Management
Exposing services with Azure API ManagementExposing services with Azure API Management
Exposing services with Azure API Management
 
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
Build embedded and IoT solutions with Microsoft Windows IoT Core (BRK30077)
 
Centralized configuration with azure app configuration
Centralized configuration with azure app configurationCentralized configuration with azure app configuration
Centralized configuration with azure app configuration
 
Creating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event GridCreating Event Driven Applications with Azure Event Grid
Creating Event Driven Applications with Azure Event Grid
 
Getting Started with Azure Artifacts
Getting Started with Azure ArtifactsGetting Started with Azure Artifacts
Getting Started with Azure Artifacts
 
Serverless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsServerless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable Functions
 
Azure DevOps in Action
Azure DevOps in ActionAzure DevOps in Action
Azure DevOps in Action
 
Tour of Azure DevOps
Tour of Azure DevOpsTour of Azure DevOps
Tour of Azure DevOps
 
Serverless Application Development with Azure
Serverless Application Development with AzureServerless Application Development with Azure
Serverless Application Development with Azure
 
Introduction to Azure Event Grid
Introduction to Azure Event GridIntroduction to Azure Event Grid
Introduction to Azure Event Grid
 

Dernier

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Dernier (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Getting started with Azure Functions in Isolated Mode

  • 1. Getting started with Azure Functions using Isolated worker process Callon Campbell Microsoft MVP | Azure @flying_maverick
  • 2. About me Callon Campbell Azure Architect | Developer Adastra Microsoft MVP | Azure  20 years enterprise development with Microsoft technologies – .NET (C#), Azure, ASP.NET, Desktop, SQL, and Mobile  Passionate about serverless and cloud-native application development, with focus on app migration and modernization, app integration and data analytics  Blogging at https://TheFlyingMaverick.com  Speaker at community events and meetups  Organizer of “Canada’s Technology Triangle .NET User Group” in Kitchener, Ontario
  • 3. Agenda  Overview of serverless  Different hosting models  Preparing for .NET 8  Demos  Wrap-up  Q&A
  • 4. Azure Functions Run code when events occur Event-driven scaling No infrastructure management Consumption pricing with free grant
  • 5. Platform Application delivery Operating system ●●● ●●● ●●● + https://github.com/azure/azure-functions-host (+other repos) Azure Functions host runtime Azure Functions Core Tools Azure Functions base Docker image Azure Functions .NET Docker image Azure Functions Node Docker image ●●● Functions everywhere
  • 6. .NET functions hosting models In-process  Your function code runs in the same process as the Functions host process. Only supports LTS versions of .NET Isolated worker  Your function code runs in a separate .NET worker process.  This is what all non .NET languages use.
  • 7. Why .NET Functions isolated worker process?  When it was introduced, Azure Functions only supported a tightly integrated mode for .NET functions called in-process.  Your code runs in the same process as the host, resulting in a tight coupling between the host process and the .NET function app.  In-process function can only run on the LTS version of .NET.  Non-LTS required you to use an isolated worker process that debut in .NET 5.  Isolated worker process aligns with the evolution of .NET.
  • 8. Comparing Azure Functions hosting models In-process  Migrate from .NET Core 3.1 in- process  Need Durable Functions Entities or “rich” SDK type bindings that are  Support for .NET 6 and .NET Framework 4.8  Performance and cold-start optimization Isolated worker  Migrate from .NET 5 or .NET 6 isolated process  Added support for middleware  Support for .NET 6, .NET 7, .NET Framework 4.8, and .NET 8 (preview) Which one do I use? Details: https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-in-process-differences
  • 9. Comparing available Azure Function triggers .NET 6 In-process .NET 7 Isolated worker
  • 10. Azure Functions .NET Roadmap In-process Isolated process .NET 5 .NET 6 LTS .NET 7 .NET 8 LTS .NET Core 3.1 LTS .NET 6 LTS with Durable Functions Nov 2021 Nov 2022 Nov 2023
  • 11. Strengths of Isolated worker process  Fewer conflicts: Assemblies used in your app won't conflict with different version of the same assemblies used by the host process.  Full control of the process: You control the start-up of the app and can control the configurations used and the middleware started.  Dependency injection: Use current .NET behaviors for dependency injection and incorporating middleware into your function app.  Target new versions: Easily target new versions of .NET as they become available.
  • 12. Demo Creating Azure Function app using Isolated worker process
  • 13. Migrating to the Isolated worker process .NET 6 In-process .NET 7 Isolated worker Project file changes
  • 14. Migrating to the Isolated worker process .NET 6 In-process .NET 7 Isolated worker • The packages for these extensions will all be under the Microsoft.Azure.Functions.Worker.Extensions prefix. • Be sure to install the latest stable version of any packages you are targeting. • Your application should not reference any packages in the Microsoft.Azure.WebJobs.* namespaces. If you have any remaining references to these, they should be removed.  Microsoft.NET.Sdk.Functions  Microsoft.Azure.Functions.Worker  Microsoft.Azure.Functions.Worker.Sdk
  • 15. Migrating to the Isolated worker process Code changes: new Program.cs file In-process Isolated worker [FunctionName("Function1")] [Function("Function1")] Code changes: Function attribute
  • 16. Migrating to the Isolated worker process In-process Isolated worker Configuration changes "FUNCTIONS_WORKER_RUNTIME": "dotnet" "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated" Tip If you are moving to an LTS or STS version of .NET, the .NET Upgrade Assistant can be used to automatically make many of the changes mentioned.
  • 17. Update your function app in Azure Upgrading your function app to the isolated model consists of two steps: 1. Change the configuration of the function app to use the isolated model by setting the FUNCTIONS_WORKER_RUNTIME application setting to "dotnet- isolated". Make sure that any deployment automation is similarly updated. 2. Publish your upgraded project to the upgraded function app. Use a staging slot to test and verify your upgraded code / configuration. Then perform a swap operation when ready to deploy to the production slot.
  • 18. Demo Migrating an Azure Function app to Isolated worker process
  • 20. Azure Functions .NET 8 roadmap  Isolated worker process reaching feature parity.  Isolated worker will be initially supported on .NET 8 release.  In-process for .NET 8 will be the last LTS release and will be released slightly after the .NET 8 release.
  • 21. .NET 8 (preview) for Azure Functions  Preview support for .NET 8 function apps is currently limited to Linux applications.  Requires .NET 8 Preview SDKs in Visual Studio (Visual Studio 2022 Preview).  Performance optimizations is coming…  Placeholder for cold-start  Optimized executor  ReadyToRun (form of AOT)  .NET 8 AOT compilation
  • 22. Demo Sneak peak at Azure Functions in .NET 8
  • 23. What we covered  Comparison of in-process and isolated worker processes.  Benefits of the isolated worker process and migration path.  Sneak peak at .NET 8
  • 24. Closing  The isolated worker is in position to tackle things that can’t be done with the in-process model.  Try the isolated worker process and plan your migration.  If performance and certain key features are critical, stick to the in- process model for the time being since with .NET 8 it will still be supported.
  • 25. References Azure functions runtime versions overview C# Azure Functions in an isolated worker process .NET on Azure Functions — August 2023 roadmap update .NET Upgrade Assistant

Notes de l'éditeur

  1. Quick overview of Azure Functions - Run code based on an event (http, storage account, cosmos db, event grid, service bus and many more) - Don’t have to worry about infrastructure, that’s handled for you. - It will scale from not running to 1000s of instances and back down as needed. - As it scales you only pay for what you use.
  2. Functions is open source – runtime, core tools, docker images. Run it locally, its exactly what you see in the cloud. Very easy to get going and publish. Publish to Azure Functions services – consumption, app service, and premium (best of both worlds) There is also other places to run functions – Raspberry Pi, Kubernetes cluster, or on non-azure hosts and on-prem.
  3. - However, this integration also requires a tight coupling between the host process and the .NET function. - This means that you're in-process functions can only run on version of .NET with Long Term Support (LTS).  - To enable you to run on non-LTS version of .NET, you can instead choose to run in an isolated worker process. This process isolation lets you develop functions that use current .NET releases not natively supported by the Functions runtime, including .NET Framework. - It offers a rich dependency injection model, full control over main() and app dependencies, improved reliability, additional features like invocation middleware, and more. - The isolated worker process in functions is now aligned with how the .NET ecosystem has evolved.
  4. For .NET, Azure Functions supports both in-process and isolated (out-of-process) execution models. Choose in-process if you are upgrading from .NET Core 3.1 Azure Functions or if you are looking for features, such as Durable Functions, that are currently only available to in-process apps. Isolated function apps provide more control of the function worker process and greater compatibility with libraries.
  5. If you’re using the in-process model, you can continue to use this for a while its supported on LTS branch, but as you can see all new .NET versions will be targeting the isolated process.
  6. Support for middleware which can help with exception handling, stamping common HTTP response headers, and more. 
  7. - TargetFramework - AzureFunctionsRuntime - OutputType - PackageReferences
  8. A diagram showing the change in release patterns after parity. .NET 8 has an in-process model option on a delay after the isolated worker model. All subsequent updates use the isolated worker model.