C#C
C#2y ago
Cracker

HttpClientFactory and Keep-Alive

How do we use Keep-Alive with HttpClientFactory ? Or is it just not needed ? Default lifetime of client handler is two minutes. Handler open close cost for this period is too short for my usecase/traffic
I can set it up to like 15 minutes but curious if there is a Keep-Alive like approach
This is the previous implementation which is still using the client factory but manipulating the created client after retrieve. Which doesn't look correct approach. I want to either move it to AddHttpClient or remove this section
e7255a50-16aa-4a90-8148-a90f4b8210af.png
Was this page helpful?