You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In .net core, HttpClient is meant to be a singleton with the same lifecycle as an endpoint.
This is the canonical guide for the issues this causes, but it is significant and can make .net core software really unstable as time goes on. It also prevents connection pooling, which means lower performance for users of this library. https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
It appears like the call chain in FusionAuthClient for all methods is to call buildClient() which calls buildAnonymousClient which creates a new instance of DefaultRESTClient for every request. Is this something you would consider improving on? I'm not super clear on if this library is code generated from another, I would be willing to help with this but not sure the best way to make this change.
The text was updated successfully, but these errors were encountered:
I've been running into socket exhaustion issues when trying to update large numbers of users, which I assume is caused by this. I've implemented a solution that pools the HttpClient based on the host, which in my case means only 1 will be created. It could be changed to only use a single HttpClient but that would involve changing how the request URI is built and I don't want to open that can of worms.
In .net core, HttpClient is meant to be a singleton with the same lifecycle as an endpoint.
This is the canonical guide for the issues this causes, but it is significant and can make .net core software really unstable as time goes on. It also prevents connection pooling, which means lower performance for users of this library.
https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
It appears like the call chain in FusionAuthClient for all methods is to call buildClient() which calls buildAnonymousClient which creates a new instance of DefaultRESTClient for every request. Is this something you would consider improving on? I'm not super clear on if this library is code generated from another, I would be willing to help with this but not sure the best way to make this change.
The text was updated successfully, but these errors were encountered: