How to Optimize Performance of Real-Time SignalR Applications in .NET Core?

Bruce Barker 0 Reputation points
2023-09-23T16:28:14.3966667+00:00

I am developing a real-time application using SignalR in .NET Core and seeking advice on optimizing its performance for handling a large number of concurrent connections. What are the strategies and best practices for optimizing real-time SignalR applications?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,787 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Krew Noah 500 Reputation points
    2023-09-23T16:53:27.2233333+00:00

    Optimize the transport type, prefer WebSockets where possible. Use message pack protocol for smaller payloads. Implement backplane for scale-out scenarios, consider using Azure SignalR Service for automatic scaling. Optimize client reconnection logic and limit the number of concurrent connections. Monitor and tune server performance, and consider using streaming for large messages.

    0 comments No comments

  2. Bruce (SqlWork.com) 63,916 Reputation points
    2023-09-23T17:49:01.65+00:00

    Signal/r requires a persistent connection on the server. So your server needs to manage a large number of concurrent connections. To scale out, your load balancer needs to support server affinity, or the client can not reconnect on a network interruption.

    If you need large scaling you may want to look azure signal/r.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.