I am building a large-scale web application using ASP.NET Core SignalR to deliver real-time notifications to thousands of concurrent users. While everything works well in small setups, I am facing challenges with performance as the number of connected users grows beyond a few thousand. The primary issue arises when trying to push notifications to all users at once, which results in high server load and some messages being delayed or dropped.
I need a way to efficiently manage and throttle these notifications so that my application remains responsive, even under heavy load.
Basic SignalR Hub Implementation: I set up a basic SignalR hub to handle connections and broadcast messages, which works fine for small user bases.
Scaling with Azure SignalR Service: I used Azure SignalR Service to manage scaling, but I noticed performance bottlenecks when the number of notifications increased rapidly.
Server-Side Throttling: I attempted to implement server-side throttling, but it caused delays in message delivery that impacted the user experience.
What I Expected:
I was hoping to find a way to:
Throttle Notifications more efficiently without causing significant delays.
Use message queues or some form of load balancing to ensure all users receive timely notifications, even when there are surges in the number of messages.
Scale out the notification system with minimal performance hits.
Abid Farooq Bhutta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.