u/Elfocrashin r/dotnet • Recommends
Resilient HttpClient using Polly and IHttpClientFactory in .NET Core
#.netcore#polly#ihttpclientfactory
429K subscribers • 30 videos on Hallway
Intermediate. Assumes working knowledge.
44K views6 years ago1 recommendation
Web developmentSoftware designHTTP, REST and GraphQLDesign patternsC# and .NET
Nick Chapsas shows how to build resilient HTTP clients in .NET Core using Polly policies and IHttpClientFactory.
Become a Patreon and get source code access: patreon.com/nickchapsas Check out my courses: dometrain.com The giveaway is now over. Thanks for participating. Hello everybody I'm Nick and in this .NET tutorial I will show you how you can create a high performing, efficient and resilient HttpClient using .NET Core's IHttpClientFactory and it's support for Polly. A new HttpClient instance is returned each time CreateClient is called on the IHttpClientFactory. An HttpMessageHandler is created per named client. The factory manages the lifetimes of the HttpMessageHandler instances. IHttpClientFactory pools the HttpMessageHandler instances created by the factory to reduce resource consumption. An HttpMessageHandler instance may be reused from the pool when creating a new HttpClient instance if its lifetime hasn't expired. Pooling of handlers is desirable as each handler typically manages its own underlying HTTP connections. Creating more handlers than necessary can result in connection delays. Some handlers also keep connections open indefinitely, which can prevent the handler from reacting to DNS (Domain Name System) changes. Don't forget to comment, like and subscribe :) Social Media: Follow me on GitHub: bit.ly/ChapsasGitHub Follow me on Twitter: bit.ly/ChapsasTwitter Connect on LinkedIn: bit.ly/ChapsasLinkedIn #dotnet #polly #httpclientWhat people say. Recommended as a practical guide to configuring resilient HTTP requests and connection pooling in .NET.
u/Elfocrashin r/dotnet • Recommends