~/talk

Optimizing your HttpClient usage

Talkat NDC London 2026 · 2026-01-26..01-30· [devops-and-delivery]
slides:none on file

Shows that creating 20,000 new HttpClient instances exhausts sockets after a 2s API delay and explains why reusing connections matters: DNS, TCP handshake and TLS handshake happen on new connections. Demonstrates using IHttpClientFactory with named and typed clients, warns about shared cookie containers and the default 2‑minute handler timeout, covers delegating handlers and OpenTelemetry instrumentation, and uses Polly for exponential backoff with jitter and a circuit breaker (3 failures → open 5s) to reduce thundering‑herd retries.

AI-written summary · about

  1. 0:00Introduction
  2. 1:58HTTP client usage in .NET
  3. 3:45HTTP client pitfalls
  4. 5:53Disposing HTTP clients
  5. 8:40TCP/TLS handshakes
  6. 10:50Live demo: HTTP misuse
  7. 13:20Fixing HTTP usage with DI
  8. 17:47HTTP client factory
  9. 21:25Blazor HTTP calls
  10. 27:12Handling responses/exceptions
  11. 30:16Named HTTP clients
  12. 33:04Typed HTTP clients
  13. 36:17Delegating handlers
  14. 44:35OpenTelemetry integration
  15. 48:10Resiliency patterns
  16. 51:15Polly policies
  17. 59:16Resources & closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.