© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
2 replies
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to sustain TcpListener keep-alive?
C#CC# / help
2y ago
Do event subscribers keep broadcasters alive and vice-versa?
C#CC# / help
2y ago
✅ DI with HttpClient / HttpClientFactory
C#CC# / help
3y ago