mccow002
mccow002

Reputation: 6914

Dotnet 6 using Signalr slows down IIS after reset

I have an app hosted on IIS that at any given time has up to 400 - 500 open signalr connections. When the site gets deployed, which involves stopping and starting the site, all those connection get dropped and then reconnect.

With dotnet 5, this is no problem. With dotnet 6, this slows the site down to the point where simple, subsecond requests take over 50 seconds.

Is there anything with dotnet 6 and signalr that would effect performance? Is there a bug with the framework? Does anyone have any ideas?

Upvotes: 1

Views: 185

Answers (1)

Zach Gardner
Zach Gardner

Reputation: 48

Do you have your SignalR hub running in an application that is in the same app pool as your .NET Core 6 API? If so, consider separating them into different deployable artifacts, and put them in separate application pools.

Additionally, do you have a backplane on your SignalR hubs? If not, and you only have the SignalR hub deployed to a single server, there is the potential for losing HA. If you do, then your message producers may not publish the message to the same SignalR instance that your message consumers are connected to. In either case, I'd recommend looking into the Azure SignalR Service. As a managed service it likely has a cheaper TCO than an on-prem self-curated cluster.

Upvotes: 1

Related Questions