Use of HttpClient could cause socket starvation on server
Closed this issue · 1 comments
drakepro commented
What is the current behavior?
Code is directly creating an instance of HttpClient.
What's happening that seems wrong?
In high load server situations this can cause socket starvation
Steps to reproduce
This is a known problem with HttpClient, no reproduction steps needed.
Solution
Use HttpClientFactory to create instances of an HttpClient.
dvonthenen commented
This is available since 4.0.0-alpha.1
. Closing.
https://github.com/deepgram/deepgram-dotnet-sdk/blob/main/Deepgram/Factory/HttpClientFactory.cs#L22