≈ the.bay.news

Wiring the Keyright SDK into ASP.NET Core DI as a typed HttpClient with resilience

DEV Community
Wiring the Keyright SDK into ASP.NET Core DI as a typed HttpClient with resilience
Teams that `new` up the Keyright client ad hoc hit one of two classic HttpClient failures: socket exhaustion from a client-per-call, or stale DNS from a single static client held forever. This post registers the Keyright client through IHttpClientFactory as a typed client so message handlers are pooled and rotated correctly, picks the right DI lifetimes, and layers a resilience pipeline — timeout, retry-with-jitter, and a circuit breaker tuned for a licensing call — so a brief issuing-service blip degrades gracefully instead of hard-failing.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.