Differences between in-process and isolated worker process .NET Azure Functions
Functions supports two process models for .NET class library functions:
|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|
|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
Service SDK types such as BlobClient
JSON serializable types
|HTTP trigger model types||HttpRequest / ObjectResult||HttpRequestData / HttpResponseData|
|Output binding interaction||Return values (single output only)
||Return values (expanded model with single or multiple outputs)|
|Imperative bindings1||Supported||Not 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)|
|Cold start times2||(Baseline)||Additionally includes process launch|
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.
To learn more, see: