Connection pooling reuses established network connections for multiple client requests, reducing connection-setup overhead. In .NET, SocketsHttpHandler supports pooling and recycling, while IHttpClientFactory manages handler lifetime and reuse. section 33.2.1
Pool connections with IHttpClientFactory
Register the factory with builder.Services.AddHttpClient(), inject IHttpClientFactory into an endpoint, create an HttpClient, set its BaseAddress, and call the remote API. The factory creates a client whose handler it manages. section 33.2.1
Figure 33.4 Each HttpClient contains a pipeline of HttpMessageHandlers. The final handler is an HttpClientHandler, which makes the connection to the remote server and sends the HTTP request. This configuration is similar to the ASP.NET Core middleware pipeline, and it allows you to make cross-cutting adjustments to outgoing requests.
Trace how HttpClient handlers form a pipeline and how the final handler connects to the remote server. section 33.2.1








