SlideShare a Scribd company logo
1 of 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

More Related Content

Similar to Getting started with Azure Functions in Isolated Mode

Similar to 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
 

More from Callon Campbell

More from 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
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

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

Editor's Notes

  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.