asp.net-mvc 使用signalr时,IIS是否有连接限制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11667799/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
While using signalr, will there be any connection limits on IIS
提问by Pavan Josyula
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.
我最近几天一直在看 SignalR。使用它,我创建了一个管理仪表板来获取有关数据库表的实时信息。基本上这个表由来自各种应用程序的不同用户填充。它已经出来了。只有当客户端 Broswer 和 WebServer 之间存在持久连接时,这些更新才可能。在生产中部署这个应用程序之前,我几乎没有怀疑。
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.
我知道 SignalR 首先检查 WebSockets,然后根据客户端和服务器之间的可用性查找长轮询。不管它使用什么,客户端和服务器之间都会有一个连接打开。
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.
我的问题是在更多用户连接到同一服务器(例如同时连接 100,000 个管理员)的情况下,它如何执行。IIS 对它一次可以打开的持久连接的数量是否有任何限制?如果是这样,我们可以将其配置为最大值以及该值是多少。
Sorry if it is rookie question
抱歉,如果是菜鸟问题
ASP.NET MVC3 & IIS 7 are used for development.
ASP.NET MVC3 & IIS 7 用于开发。
采纳答案by Paige Cook
You should review the Performance Sectionof the SignalR Wiki on GitHub. This provides some really good guidance for the following:
您应该查看GitHub 上 SignalR Wiki的性能部分。这为以下方面提供了一些非常好的指导:
- IIS Configuration - Max Concurrent Requests Per Application
- ASP.NET Configuration - Max Concurrent Requests & Request Queue Limits
- IIS 配置 - 每个应用程序的最大并发请求数
- ASP.NET 配置 - 最大并发请求和请求队列限制
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.
此外,它还说明了在执行应用程序负载测试时要监控的关键性能计数器。您应该执行哪种 IMO 才能真正了解您的应用程序将如何执行并根据您的特定场景进行必要的调整。
Finally, there is a link to Crankthe recommended tool for generating client load with SignalR.
最后,有一个链接到Crank推荐的工具,用于使用 SignalR 生成客户端负载。
Update: Link to Crank is now current.
更新:曲柄链接现在是最新的。
回答by Pavan Josyula
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
谢谢佩奇。这是我的发现。默认情况下,ASP.NET 4.0 每个 CPU 接受 5000 个最大并发请求。要更改此设置,我们需要在 ASP.NET 配置文件中设置此数字,该文件位于 %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
我还发现了 Scott HanselMan 的这个很棒的 PodCast http://www.hanselminutes.com/325/aspnet-45-updates-core-webforms-and-signalr-with-damian-edwards
回答by Simon_Weaver
You're probably more likely to run into this on Windows 8 / 10 which has connection limits of only 10*. This will only affect you during development of course - but it's a big pain if you have multiple browsers open with active connections and it's very easy to exceed 10.
您可能更有可能在连接限制仅为 10* 的 Windows 8 / 10 上遇到此问题。当然,这只会在开发过程中影响您 - 但如果您打开多个浏览器并使用活动连接,这将是一个很大的痛苦,并且很容易超过 10 个。
*I'm unable to confirm at this time that Windows 10 has the same connection limit as Windows 8, but likely so.
*我目前无法确认 Windows 10 具有与 Windows 8 相同的连接限制,但可能如此。

