Abstract
In the world of microservices (yes, there’s that buzzword again!) and distributed systems, we often find ourselves communicating over HTTP. What seems like a simple requirement can quickly become complicated! Networks aren’t reliable and services fail. Dealing with those inevitable facts and avoiding a cascading failure can be quite a challenge. In this talk, Steve will explore how we can build .NET Core applications that make HTTP requests and rely on downstream services, whilst remaining resilient and fault tolerant.
This session will focus on some of the improvements which have been released in .NET Core and ASP.NET Core 2.1, 2.2 and 3.0, such as IHttpClientFactory and the new, more performant socket-based handler. Steve will identify some HTTP anti-patterns and common mistakes and demonstrate how we can refactor existing code to use the new HttpClientFactory features.
Next, Steve will demonstrate Polly; a fantastic resilience and transient fault handling library which can be used to make your applications less prone to failure. When integrated with the Microsoft HttpClientFactory; wrapping your HTTP calls in retries, timeouts and circuit-breakers has never been easier!
If you’re building services which make HTTP calls, then this talk is for you!
Slides
60 Minute Presentation Slide Deck
40 to 45 Minute Presentation Slide Deck
Resources
- An Introduction to IHttpClientFactory
- IHttpClientFactory – Defining Named and Typed Clients
- IHttpClientFactory – Outgoing Request Middleware with Delegating Handlers
- IHttpCientFactory – Integrating Polly for Transient Fault Handling
- IHttpClientFactory – Reuse Transient Typed Clients within Singleton Services
- IHttpClientFactory – Request and Response Logging
- Creation and Disposal Internals – When Should I Dispose of HttpClient?
- HttpClient Internals – SendAsync Flow
- Internals of HttpResponseMessage
- HttpClient Connection Pooling in .NET Core