I realized Microsoft Graph .Net SDK is using HttpClient
class.
https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/src/Microsoft.Graph.Core/Requests/HttpProvider.cs
Microsoft's own documentation recommends reuse of HttpClient
instances as much as possible instead of spinning up a new instance per request which may lead to exhausting the connection pool and SocketException
s eventually.
Is there a similar recommendation, to reuse GraphServiceClient
as much as possible? Is there any particular concern with instantiating a new GraphServiceClient
per request?