IIS 8.5 的并发请求数设置 [英] how many concurrent requests settings for IIS 8.5

查看:48
本文介绍了IIS 8.5 的并发请求数设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 IIS 8.5 中可以执行多少个并发请求?

How many concurrent requests can be executed in IIS 8.5?

我找不到在 IIS 8.5 中可以执行多少并发请求的正确值

I could not find proper values for how many concurrent requests can be executed in IIS 8.5

正如我在下面发现的 2 个不同的值:

As I found out below 2 different values:

  1. 默认情况下,IIS 8.5 可以根据 aspnet.config 中的 MaxConcurrentRequestsPerCPU 设置处理 5000 个并发请求

  1. By default IIS 8.5 can handle 5000 concurrent requests as per MaxConcurrentRequestsPerCPU settings in aspnet.config

在 machine.config 中,默认情况下每个 CPU 的最大连接数为 2.所以如果有 6 核 CPU,那么默认情况下可以有 12 个并发请求.

In machine.config, the maxconnection is 2 per CPU as default. So if have 6 core CPU then 12 concurrent requests are possible by default.

所以我想知道对于 IIS 8.5 的并发请求,第 1 点是正确的还是第 2 点是正确的.

So I would like to know that Point 1 is right or Point 2 is right for concurrent requests for IIS 8.5.

推荐答案

假设您使用的是 ASP.NET 应用程序,执行的并发请求可能因应用程序代码的编写方式和您使用的框架版本而异运行应用程序(2.0、3.5、4+ 等).此外,您对并发请求的最大连接感到困惑.两者是两件不同的事情.

Assuming that you are using ASP.NET application, the concurrent requests executed can vary based on the way the application code is written and the framework version you are using to run the application(2.0,3.5,4+ etc). Also You are confusing with max connect with concurrent requests.Both are two different things.

更详细的理解请阅读msdn博客IIS 7.5、IIS 7.0 和 IIS 6.0 上的 ASP.NET 线程使用.

For more detailed understanding please read msdn blog ASP.NET Thread Usage on IIS 7.5, IIS 7.0, and IIS 6.0 .

总结

  1. MaxConcurrentRequestsPerCPU 内HKEY_LOCAL_MACHINESOFTWAREMicrosoftASP.NET2.0.50727.0 确定每个 CPU 的并发请求数.默认不存在,每个CPU的请求数限制为12

  1. MaxConcurrentRequestsPerCPU within HKEY_LOCAL_MACHINESOFTWAREMicrosoftASP.NET2.0.50727.0 determines the number of concurrent requests per CPU. By default, it does not exist and the number of requests per CPU is limited to 12

如果您的 asp.net 应用程序完全是异步请求,则默认的 MaxConcurrentReqeustsPerCPU 限制 12 会更小,并将此设置 MaxConcurrentRequestsPerCPU 增加到一个非常高的数字.

If your asp.net application is written entirely asynchronous requests, the default MaxConcurrentReqeustsPerCPU limit of 12 is less and increasse this setting MaxConcurrentRequestsPerCPU to a very high number.

Maxconnection 是每个 HTTP 协议的设置.任何应用程序只能向任何应用程序发出两个并发请求服务器.eg您的浏览器(IE 6,7)只能与您的 www.example.com 建立两个连接.但是为了提高速度,许多浏览器目前同时建立 6 个以上的连接(在 chrome、firefox 和 IE 中有所不同).类似地,当您的服务器应用程序向网络服务或休息 API 发出请求时,客户端就是您的应用程序,并且 maxconnection 强制执行对于同一个服务器(其余端点),您只能建立两个连接.

Maxconnection is the setting per HTTP protocol.Any applicaion can only make two concurrent requests to any server.e.g. Your browser(IE 6,7) can make only two connection to your www.example.com. But for speed improvement ,many of the browsers currently make more than 6 simultaneous connections (vary in chrome,firefox and IE).Similarly when your server application make a request to a webservice or a rest API,the client is your application and maxconnection enforces that for the same server(rest end point),you are allowed to make only two connections .

要在 ASP.NET 应用程序中增加 maxconnection,请设置System.Net.ServicePointManager.DefaultConnectionLimit 以编程方式,从 Application_Start,例如您可以将其设置为 Int32.MaxValue

To increase maxconnection in an ASP.NET application, set System.Net.ServicePointManager.DefaultConnectionLimit programatically, from Application_Start, E.g. You can set this to Int32.MaxValue

希望这有帮助!

这篇关于IIS 8.5 的并发请求数设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆