Differences between in-process and isolated worker process .NET Azure Functions
Functions supports two process models for .NET class library functions:
Execution mode | Description |
---|---|
In-process | Your function code runs in the same process as the Functions host process. Supports only Long Term Support (LTS) versions of .NET. To learn more, see Develop .NET class library functions. |
Isolated worker process | Your function code runs in a separate .NET worker process. Use with supported versions of .NET and .NET Framework. To learn more, see Develop .NET isolated worker process functions. |
This article describes the current state of the functional and behavioral differences between the two models.
Execution mode comparison table
Use the following table to compare feature and functional differences between the two models:
Feature/behavior | In-process3 | Isolated worker process |
---|---|---|
Supported .NET versions | Long Term Support (LTS) versions | All supported versions + .NET Framework |
Core packages | Microsoft.NET.Sdk.Functions | Microsoft.Azure.Functions.Worker Microsoft.Azure.Functions.Worker.Sdk |
Binding extension packages | Microsoft.Azure.WebJobs.Extensions.* | Microsoft.Azure.Functions.Worker.Extensions.* |
Durable Functions | Supported | Supported (public preview) |
Model types exposed by bindings | Simple types JSON serializable types Arrays/enumerations Service SDK types such as BlobClient IAsyncCollector (for output bindings) |
Simple types JSON serializable types Arrays/enumerations Some service-specific SDK types |
HTTP trigger model types | HttpRequest / ObjectResult | HttpRequestData / HttpResponseData |
Output binding interaction | Return values (single output only)out parametersIAsyncCollector |
Return values (expanded model with single or multiple outputs) |
Imperative bindings1 | Supported | Not supported |
Dependency injection | Supported | Supported |
Middleware | Not supported | Supported |
Logging | ILogger passed to the function ILogger<T> via dependency injection |
ILogger/ILogger<T> obtained from FunctionContext or via dependency injection |
Application Insights dependencies | Supported | Supported (public preview) |
Cancellation tokens | Supported | Supported |
Cold start times2 | (Baseline) | Additionally includes process launch |
ReadyToRun | Supported | Supported |
1 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.
2 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.
3 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.
Next steps
To learn more, see:
Feedback
Submit and view feedback for