Creating HttpClient per request is a silent killer.
Problem
-
Socket exhaustion
-
DNS caching issues
Fix
Use IHttpClientFactory.
services.AddHttpClient();
Why
It pools handlers safely.
Daily micro-tips for C#, SQL, performance, and scalable backend engineering.
Creating HttpClient per request is a silent killer.
Problem
Socket exhaustion
DNS caching issues
Fix
Use IHttpClientFactory.
services.AddHttpClient();
Why
It pools handlers safely.