Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

While using signalr, will there be any connection limits on IIS

I have been looking at SignalR from last few days. Using this I have created an Admin Dashboard to get realtime information about a database table. Basically this table gets populated by may different users from various applications. It has come out well. These updates are possible only when there is persistent connection between client Broswer and WebServer. I have few doubts before deploying this app in production.

I understand that SignalR first checks WebSockets then looks for Long Polling based on there availability between client and server. No matter what it uses, there will be a connection open between client and server.

My question is how does it perform in scenario where more users are connected to the same server for example 100,000 admins are connected at same time. Does IIS has any limitations on number of persistent connections it can open at one point? If so can we configure to that to max value and what wud be that value.

Sorry if it is rookie question

ASP.NET MVC3 & IIS 7 are used for development.

like image 364
Pavan Josyula Avatar asked Jul 26 '12 10:07

Pavan Josyula


People also ask

Does SignalR require IIS?

Supported server IIS versions IIS Express should be used on client operating systems. Also note that for SignalR to use WebSocket, IIS 8 or IIS 8 Express must be used, the server must be using Windows 8, Windows Server 2012, or later, and WebSocket must be enabled in IIS.

How long does a SignalR connection last?

The default keepalive timeout period is currently 20 seconds. If your client code tries to call a Hub method while SignalR is in reconnecting mode, SignalR will try to send the command. Most of the time, such attempts will fail, but in some circumstances they might succeed.

How many concurrent requests can IIS handle?

IIS on Windows XP: Can quickly exceed it's connection limit. Has a maximum of 10 concurrent connections before an HTTP 403.9 error message is returned. HTTP 403.9 returns Access Forbidden: Too many users are connected.


2 Answers

You should review the Performance Section of the SignalR Wiki on GitHub. This provides some really good guidance for the following:

  • IIS Configuration - Max Concurrent Requests Per Application
  • ASP.NET Configuration - Max Concurrent Requests & Request Queue Limits

Additionally, it states the key Peformance Counters to monitor when performing load testing of your application. Which IMO you should do to truly have an understanding of how your application is going to perform and make adjustments as necessary for your specific scenario.

Finally, there is a link to Crank the recommended tool for generating client load with SignalR.

Update: Link to Crank is now current.

like image 74
Paige Cook Avatar answered Sep 22 '22 12:09

Paige Cook


Thanks Paige. Here are my findings. ASP.NET 4.0 by default accepts 5000 maximum concurrent requests per CPU. TO change this we need to set this number in ASP.NET Config file which can be found in this location %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet.config

Also I found this great PodCast by Scott HanselMan http://www.hanselminutes.com/325/aspnet-45-updates-core-webforms-and-signalr-with-damian-edwards

like image 40
Pavan Josyula Avatar answered Sep 25 '22 12:09

Pavan Josyula