Aug 08

Prior to .NET Core 2.1 anyone who has tried to use HttpClient at scale (maybe from a microservice) may have run into the dreaded socket exhaustion issue.

Socket exhaustion happens because HttpClient is designed to be instantiated once and re-used throughout the life of an application, if you make HTTP calls in a server application for every request you will run out of sockets (because sockets get left in TIME_WAIT state for 240 seconds by default).

Using IHttpClientFactory can improve performance by 43%!

Continue reading »

Tagged with:
preload preload preload