Skip to content

Commit 7dbbffc

Browse files
Merge pull request #215093 from ggailey777/melony
[Functions] .NET migration guides and isolated worker clean-up
2 parents 5a4e32c + 4fe732b commit 7dbbffc

File tree

83 files changed

+1355
-622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1355
-622
lines changed

.openpublishing.publish.config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@
164164
"branch": "dev",
165165
"branch_mapping": {}
166166
},
167+
{
168+
"path_to_root": "functions-quickstart-templates-v1",
169+
"url": "https://github.com/Azure/azure-functions-templates",
170+
"branch": "v1.x",
171+
"branch_mapping": {}
172+
},
167173
{
168174
"path_to_root": "azure-functions-samples-java",
169175
"url": "https://github.com/Azure-Samples/azure-functions-samples-java",

articles/azure-functions/TOC.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,13 @@
268268
items:
269269
- name: In-process
270270
href: functions-dotnet-class-library.md
271-
- name: Isolated process
271+
- name: Isolated worker process
272272
displayName: .NET isolated, .NET 5
273273
href: dotnet-isolated-process-guide.md
274274
- name: Script (.csx)
275275
href: functions-reference-csharp.md
276+
- name: Execution mode comparison
277+
href: dotnet-isolated-in-process-differences.md
276278
- name: F#
277279
href: functions-reference-fsharp.md
278280
- name: JavaScript
@@ -295,6 +297,7 @@
295297
items:
296298
- name: Develop and debug locally
297299
href: functions-develop-local.md
300+
displayName: local.settings.json
298301
- name: Visual Studio Code development
299302
href: functions-develop-vs-code.md
300303
displayName: VS Code, VS
@@ -422,6 +425,12 @@
422425
href: ../availability-zones/migrate-functions.md?toc=%2fazure%2fazure-functions%2ftoc.json
423426
- name: Work with legacy Functions Proxies
424427
href: legacy-proxies.md
428+
- name: Migrate
429+
items:
430+
- name: Migrate v3.x to v4.x
431+
href: migrate-version-3-version-4.md
432+
- name: Migrate v1.x to v4.x
433+
href: migrate-version-1-version-4.md
425434
- name: Monitor
426435
items:
427436
- name: Monitor function apps with Azure Monitor

articles/azure-functions/create-first-function-cli-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The return object is an [ActionResult](/dotnet/api/microsoft.aspnetcore.mvc.acti
119119

120120
# [Isolated process](#tab/isolated-process)
121121

122-
*HttpExample.cs* contains a `Run` method that receives request data in the `req` variable is an [HttpRequestData](/dotnet/api/microsoft.azure.functions.worker.http.httprequestdata) object that's decorated with the **HttpTriggerAttribute**, which defines the trigger behavior. Because of the isolated process model, `HttpRequestData` is a representation of the actual `HttpRequest`, and not the request object itself.
122+
*HttpExample.cs* contains a `Run` method that receives request data in the `req` variable is an [HttpRequestData](/dotnet/api/microsoft.azure.functions.worker.http.httprequestdata) object that's decorated with the **HttpTriggerAttribute**, which defines the trigger behavior. Because of the isolated worker process model, `HttpRequestData` is a representation of the actual `HttpRequest`, and not the request object itself.
123123

124124
:::code language="csharp" source="~/functions-docs-csharp/http-trigger-isolated/HttpExample.cs":::
125125

articles/azure-functions/create-first-function-vs-code-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ adobe-target-content: ./create-first-function-vs-code-csharp-ieux
1515

1616
In this article, you use Visual Studio Code to create a C# function that responds to HTTP requests. After testing the code locally, you deploy it to the serverless environment of Azure Functions. This article creates an HTTP triggered function that runs on .NET 6.0. There's also a [CLI-based version](create-first-function-cli-csharp.md) of this article.
1717

18-
By default, this article shows you how to create C# functions that run [in the same process as the Functions host](functions-dotnet-class-library.md). These _in-process_ C# functions are only supported on Long Term Support (LTS) versions of .NET, such as .NET 6. To create C# functions on .NET 6 that can also run on [other supported versions](functions-versions.md) for Azure functions [in an isolated process](dotnet-isolated-process-guide.md).
18+
By default, this article shows you how to create C# functions that run [in the same process as the Functions host](functions-dotnet-class-library.md). These _in-process_ C# functions are only supported on Long Term Support (LTS) versions of .NET, such as .NET 6. To create C# functions on .NET 6 that can also run on [other supported versions](functions-versions.md) for Azure functions [in an isolated worker process](dotnet-isolated-process-guide.md).
1919

2020
Completing this quickstart incurs a small cost of a few USD cents or less in your Azure account.
2121

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Differences between in-process and isolate worker process .NET Azure Functions
3+
description: Compares features and functionality differences between running .NET Functions in-process or as an isolated worker process.
4+
ms.service: azure-functions
5+
ms.topic: conceptual
6+
ms.date: 09/29/2022
7+
recommendations: false
8+
#Customer intent: As a developer, I need to understand the differences between running in-process and running in an isolated worker process so that I can choose the best process model for my functions.
9+
---
10+
11+
# Differences between in-process and isolate worker process .NET Azure Functions
12+
13+
Functions supports two process models for .NET class library functions:
14+
15+
[!INCLUDE [functions-dotnet-execution-model](../../includes/functions-dotnet-execution-model.md)]
16+
17+
This article describes the current state of the functional and behavioral differences between the two models.
18+
19+
## Execution mode comparison table
20+
21+
Use the following table to compare feature and functional differences between the two models:
22+
23+
| Feature/behavior | In-process<sup>3</sup> | Isolated worker process |
24+
| ---- | ---- | ---- |
25+
| .NET versions | Long Term Support (LTS) versions<br/>(.NET 6.0) | All supported versions + .NET Framework<br/>(.NET 6.0, .NET 7.0 (Preview), .NET Framework 4.8 (GA)) |
26+
| Core packages | [Microsoft.NET.Sdk.Functions](https://www.nuget.org/packages/Microsoft.NET.Sdk.Functions/) | [Microsoft.Azure.Functions.Worker](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/)<br/>[Microsoft.Azure.Functions.Worker.Sdk](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk) |
27+
| Binding extension packages | [Microsoft.Azure.WebJobs.Extensions.*](https://www.nuget.org/packages?q=Microsoft.Azure.WebJobs.Extensions) | [Microsoft.Azure.Functions.Worker.Extensions.*](https://www.nuget.org/packages?q=Microsoft.Azure.Functions.Worker.Extensions) |
28+
| Durable Functions | [Supported](durable/durable-functions-overview.md) | [Supported (public preview)](https://github.com/microsoft/durabletask-dotnet#usage-with-azure-functions) |
29+
| Model types exposed by bindings | Simple types<br/>JSON serializable types<br/>Arrays/enumerations<br/>Service SDK types such as [BlobClient]<br/>`IAsyncCollector` (for output bindings) | Simple types<br/>JSON serializable types<br/>Arrays/enumerations |
30+
| HTTP trigger model types| [HttpRequest]/[ObjectResult] | [HttpRequestData]/[HttpResponseData] |
31+
| Output binding interaction | Return values (single output only)<br/>`out` parameters<br/>`IAsyncCollector` | Return values (expanded model with single or [multiple outputs](dotnet-isolated-process-guide.md#multiple-output-bindings)) |
32+
| Imperative bindings<sup>1</sup> | [Supported](functions-dotnet-class-library.md#binding-at-runtime) | Not supported |
33+
| Dependency injection | [Supported](functions-dotnet-dependency-injection.md) | [Supported](dotnet-isolated-process-guide.md#dependency-injection) |
34+
| Middleware | Not supported | [Supported](dotnet-isolated-process-guide.md#middleware) |
35+
| Logging | [ILogger] passed to the function<br/>[ILogger&lt;T&gt;] via dependency injection | [ILogger]/[ILogger&lt;T&gt;] obtained from [FunctionContext] or via [dependency injection](dotnet-isolated-process-guide.md#dependency-injection)|
36+
| Application Insights dependencies | [Supported](functions-monitoring.md#dependencies) | [Supported (public preview)](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ApplicationInsights) |
37+
| Cancellation tokens | [Supported](functions-dotnet-class-library.md#cancellation-tokens) | [Supported](dotnet-isolated-process-guide.md#cancellation-tokens) |
38+
| Cold start times<sup>2</sup> | (Baseline) | Additionally includes process launch |
39+
| ReadyToRun | [Supported](functions-dotnet-class-library.md#readytorun) | [Supported](dotnet-isolated-process-guide.md#readytorun) |
40+
41+
<sup>1</sup> When you need to interact with a service using parameters determined at runtime, using the corresponding service SDKs directly is recommended over using imperative bindings. The SDKs are less verbose, cover more scenarios, and have advantages for error handling and debugging purposes. This recommendation applies to both models.
42+
43+
<sup>2</sup> Cold start times may be additionally impacted on Windows when using some preview versions of .NET due to just-in-time loading of preview frameworks. This applies to both the in-process and out-of-process models but may be noticeable when comparing across different versions. This delay for preview versions isn't present on Linux plans.
44+
45+
<sup>3</sup> C# Script functions also run in-process and use the same libraries as in-process class library functions. For more information, see the [Azure Functions C# script (.csx) developer reference](functions-reference-csharp.md).
46+
47+
## Next steps
48+
49+
To learn more, see:
50+
51+
+ [Develop .NET class library functions](functions-dotnet-class-library.md)
52+
+ [Develop .NET isolated worker process functions](dotnet-isolated-process-guide.md)
53+

0 commit comments

Comments
 (0)