Should I create a new instance of IServiceHubContext each time (with CreateHubContextAsync) or remember and reuse?

Viewed 120

I connection to Azure SignalR Service using Managmenet API. I use C# library for that and run this code:

var context = await _serviceManager.CreateHubContextAsync(hub);

What I failed to figure out is what is the cost of this operation and if there is some pooling behind the scenes. I.e.: should I remember and reuse the context (and it's resilient against errors) or should I create a new hub context for each operation?

0 Answers
Related