Last week #MsBuild was underway in Seattle. I have already made some notes on the keynote last Monday and the following days I tried to keep track with different novelties announced for ASP.Net Core 2.1. And I think for some members of the community it might be useful to have them written down, so in this article I’ll try to summarize all the information. Please note, that I was not present at the #MsBuild conference. I just tried to follow the sessions streamed on Channel 9 and some key Twitter accounts.
One of the novelties I am most exciting about is the new HttpClientFactory feature. If you worked with the HttpClient in production software, there is a good chance that you noticed a lot of challenges and head aches. In a services oriented architecture where we might need to have several different connections, the only way to go is to use several HttpClient instances (sure not for every call a new client 🙂 but still a bunch of them). One of the problems is that each HttpClient would maintain its own connection pool to the remote server, so it’s highly inefficient. The second, and most stringent problem, is that in scenarios where an application needs to make a lot of calls to remote servers, you could exhaust all the available sockets from time to time. And this is really not cool at all. Continue reading