Skip to content

Commit 3996b66

Browse files
committed
rearrange some text
1 parent 3ab4b49 commit 3996b66

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/azure-functions/manage-connections.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Functions in a function app share resources, and among those shared resources ar
2323

2424
The number of available connections is limited partly because a function app runs in the [Azure App Service sandbox](https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox). One of the restrictions that the sandbox imposes on your code is a [cap on the number of connections, currently 300](https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#numerical-sandbox-limits). When you reach this limit, the functions runtime creates a log with the following message: `Host thresholds exceeded: Connections`.
2525

26-
Chances of exceeding the limit increase when the [scale controller adds function app instances](functions-scale.md#how-the-consumption-plan-works). Each function app instance can be invoking functions many times at once, and all of these functions use the same pool of available connections.
26+
Chances of exceeding the limit increase when the [scale controller adds function app instances](functions-scale.md#how-the-consumption-plan-works). Each function app instance can be invoking functions many times at once, and all of these functions are using connections that count toward the 300 limit.
2727

2828
## Use static clients
2929

30-
To avoid holding more connections than necessary, reuse client instances rather than creating new ones with each function invocation. .NET clients like the `HttpClient`, `DocumentClient`, and Azure Storage clients can manage connections if you use a single, static client. Creating new instances of those clients with each function invocation is an [improper instantiation antipattern](https://docs.microsoft.com/azure/architecture/antipatterns/improper-instantiation/).
30+
To avoid holding more connections than necessary, reuse client instances rather than creating new ones with each function invocation. .NET clients like the `HttpClient`, `DocumentClient`, and Azure Storage clients can manage connections if you use a single, static client.
3131

32-
As a general rule, when using a service-specific client in an Azure Functions application:
32+
Here are some guidelines to follow when using a service-specific client in an Azure Functions application:
3333

3434
- **DO NOT** create a new client with every function invocation.
3535
- **DO** create a single, static client that can be used by every function invocation.
@@ -84,4 +84,6 @@ public static async Task Run(string input)
8484

8585
## Next steps
8686

87+
For more information about why static clients are recommended, see [Improper instantiation antipattern](https://docs.microsoft.com/azure/architecture/antipatterns/improper-instantiation/).
88+
8789
For more Azure Functions performance tips, see [Optimize the performance and reliability of Azure Functions](functions-best-practices.md).

0 commit comments

Comments
 (0)