4 ms·
I think the case that trips people up is using HttpClient in an ASP.NET MVC controller action. There, it doesn't look like a loop, but if you create/dispose on
by artpepper 10y ago
I think the case that trips people up is using HttpClient in an ASP.NET MVC controller action. There, it doesn't look like a loop, but if you create/dispose on each request, you can get socket exhaustion under load.
- dogma1138 10y agoIf that's the case you should use HTTP pipelining usually to bundle multiple requests via a single tcp connection. https://en.m.wikipedia.org/wiki/HTTP_pipelining https://en.m.wikipedia.org/wiki/HTTP_pipelining Have it sitting in the background waiting for the controller to ask it to do something, you can manage the sockets and you can make a request queue on your end if you getting into resource cap issues.