Skip to content
0:00 / 0:00

#.netcore#polly#ihttpclientfactory

Resilient HttpClient using Polly and IHttpClientFactory in .NET Core 3

Nick Chapsas

429K subscribers • 30 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Nick Chapsas, creator of Dometrain
  • May be out of date. Uploaded 6 years ago, in an area where tools change fast.

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 #httpclient

Why it's here

1 person recommends this

What people say. Recommended as a practical guide to configuring resilient HTTP requests and connection pooling in .NET.

u/Elfocrashin r/dotnet • Recommends

Resilient HttpClient using Polly and IHttpClientFactory in .NET Core