Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update connection-pooling.md #43895

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/framework/data/adonet/connection-pooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@
---
# Connection Pooling

Connecting to a data source can be time consuming. To minimize the cost of opening connections, ADO.NET uses an optimization technique called *connection pooling*, which minimizes the cost of repeatedly opening and closing connections. Connection pooling is handled differently for the .NET Framework data providers.
Connecting to a data source can be time consuming. To minimize the cost of opening connections, ADO.NET uses an optimization technique called *connection pooling*, which minimizes the cost of repeatedly opening and closing connections. Connection pooling is handled differently for the .NET Framework data providers. While connection pooling improves performance and resource utilization, several factors can influence its efficiency depending on the database environment and configuration:

- **Connection Limits and Resource Constraints:** In database environments, connection limits are often tied to service tiers or resource configurations. For instance, Azure SQL Database defines connection limits based on the selected service tier, while Azure SQL Managed Instance enforces limits based on allocated resources, such as CPU, memory, or vCores. When connection pool configurations exceed these limits, applications may experience rejected connections, throttling, or degraded performance.

- **Authentication Methods:** Token-based authentication mechanisms, such as Microsoft Entra ID authentication, can impact connection pooling due to token expiration. Expired tokens may invalidate connections within the pool, disrupting reuse. This behavior occurs in both cloud-based and on-premises database systems that use modern authentication protocols.

- **Network Latency and Endpoints:** Network latency and endpoint configurations can influence the efficiency of connection pooling. Public endpoints, commonly used in cloud-hosted databases, typically introduce higher latency compared to private or direct connections. In cloud-native applications with dynamic IP addressing, connection reuse may be disrupted if firewall rules are not updated to accommodate changing IP addresses.

- **Encryption Requirements:** Databases that enforce TLS/SSL encryption require alignment between connection pooling configurations and encryption settings. For example, omitting required encryption parameters in connection strings, such as `Encrypt=True`, can lead to connection failures, reducing pooling efficiency.

- **DNS Resolution:** Private endpoints and custom DNS configurations may pose challenges for connection pooling. Misconfigured or inconsistent DNS settings can delay or block connection establishment, impacting the performance and reliability of connection reuse. This is especially relevant in environments with hybrid or private cloud setups.


Check failure on line 21 in docs/framework/data/adonet/connection-pooling.md

View workflow job for this annotation

GitHub Actions / lint

Multiple consecutive blank lines

docs/framework/data/adonet/connection-pooling.md:21 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md012.md
## In This Section

[SQL Server Connection Pooling (ADO.NET)](sql-server-connection-pooling.md)
Expand Down
Loading