You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article explains how to work with the warmup trigger in Azure Functions. A warmup trigger is invoked when an instance is added to scale a running function app. The warmup trigger lets you define a function that's run when a new instance of your function app is started. You can use a warmup trigger to pre-load custom dependencies during the pre-warming process so your functions are ready to start processing requests immediately. Some actions for a warmup trigger might include opening connections, loading dependencies, or running any other custom logic before your app begins receiving traffic.
15
+
This article explains how to work with the warmup trigger in Azure Functions. A warmup trigger is invoked when an instance is added to scale a running function app. The warmup trigger lets you define a function that runs when a new instance of your function app is started. You can use a warmup trigger to preload custom dependencies so your functions are ready to start processing requests immediately. Some actions for a warmup trigger might include opening connections, loading dependencies, or running any other custom logic before your app begins receiving traffic.
16
16
17
17
The following considerations apply when using a warmup trigger:
18
18
19
19
* The warmup trigger isn't available to apps running on the [Consumption plan](./consumption-plan.md).
20
20
* The warmup trigger isn't supported on version 1.x of the Functions runtime.
21
21
* Support for the warmup trigger is provided by default in all development environments. You don't have to manually install the package or register the extension.
22
22
* There can be only one warmup trigger function per function app, and it can't be invoked after the instance is already running.
23
-
* The warmup trigger is only called during scale-out operations, not during restarts or other non-scale startups. Make sure your logic can load all required dependencies without relying on the warmup trigger. Lazy loading is a good pattern to achieve this goal.
23
+
* The warmup trigger is only called during scale-out operations, not during restarts or other nonscaling startups. Make sure your logic can load all required dependencies without relying on the warmup trigger. Lazy loading is a good pattern to achieve this goal.
24
24
* Dependencies created by warmup trigger should be shared with other functions in your app. To learn more, see [Static clients](manage-connections.md#static-clients).
25
25
* If the [built-in authentication](../app-service/overview-authentication-authorization.md) (aka Easy Auth) is used, [HTTPS Only](../app-service/configure-ssl-bindings.md#enforce-https) should be enabled for the warmup trigger to get invoked.
26
26
@@ -34,13 +34,13 @@ The following considerations apply when using a warmup trigger:
34
34
35
35
# [Isolated worker model](#tab/isolated-process)
36
36
37
-
The following example shows a [C# function](dotnet-isolated-process-guide.md) that runs on each new instance when it's added to your app.
37
+
The following example shows a [C# function](dotnet-isolated-process-guide.md) that runs on each new instance when added to your app.
The following example shows a warmup trigger [JavaScript function](functions-reference-node.md) that runs on each new instance when it's added to your app.
87
+
The following example shows a warmup trigger [JavaScript function](functions-reference-node.md) that runs on each new instance when added to your app.
88
88
89
89
```javascript
90
90
import { app } from"@azure/functions";
@@ -98,7 +98,7 @@ app.warmup('warmupTrigger1', {
98
98
99
99
# [Model v3](#tab/nodejs-v3)
100
100
101
-
The following example shows a warmup trigger in a *function.json* file and a [JavaScript function](functions-reference-node.md) that runs on each new instance when it's added to your app.
101
+
The following example shows a warmup trigger in a *function.json* file and a [JavaScript function](functions-reference-node.md) that runs on each new instance when added to your app.
The following example shows a warmup trigger [JavaScript function](functions-reference-node.md) that runs on each new instance when it's added to your app.
131
+
The following example shows a warmup trigger [JavaScript function](functions-reference-node.md) that runs on each new instance when added to your app.
0 commit comments