并发请求限制在10 NET中的MVC /网络阿比阿比、网络、NET、MVC

2023-09-06 10:33:50 作者:撸至深处灬撸自身

我正在做一些可扩展性测试,特别是当它涉及到可以同时为特定的Web API调用执行连接/请求数。

I'm doing some scalability testing, particularly when it comes to the number of connections / requests that can be executed concurrently for a particular Web API call.

我创建了一个API函数执行 Thread.sleep代码(10000)(休眠10秒)

I created an API function which performs a Thread.Sleep(10000) (Sleep for 10 seconds)

我使用JMeter的制作调用API(一个基准平台 http://jmeter.apache.org/ )在不同的线程中执行50个请求的一次。

I'm making a call to the API using JMeter (a benchmarking platform http://jmeter.apache.org/) to execute 50 requests all at once on different threads.

在我的第一个10个线程到达网站返回10秒后。 在随后10多线程10多秒后(20现已返回) 在随后10多线程10多秒后(30现已返回) 等。直到所有50已经返回。

显然,11号试图调用API被阻塞,直到一个线程/连接等被释放(或类似的东西)。

Clearly, the 11th attempt to call the API is blocked until a thread / connection, etc. is freed up (or something similar).

我已经证实,10是我的情况下神奇的数字,因为我改变了我的睡眠时间为 5000毫秒,我能够处理的 10 的主题 5 秒,紧接着又 10 线程在未来的 5 秒。

I've confirmed that 10 is the magic number in my scenario because I changed my sleep time to 5000ms and I'm able to process 10 threads in 5 seconds, followed by another 10 threads in the next 5 seconds.

这是怎么回事?什么是强加这个限制,我这里看到的?

Why is this happening? What is imposing this limit I'm seeing here?

P.S。我试图与一个新的MVC项目还有,同样的结果与所有品牌的新格局。的

推荐答案

Windows上的IIS 8.1专业版(或Windows 7旗舰版),有10个并发请求限制(3的Windows 8.1基本)。

IIS on Windows 8.1 Pro (Or Windows 7 Ultimate) has a limit of 10 simultaneous requests (3 for Windows 8.1 Basic).

通常情况下,如果你尝试运行生产工作量,你应该使用Windows Server不具有此限制。

Generally, if you try to run production workload, you should use Windows Server which doesn't have this limitation.

请参阅这篇文章了解更多详细信息关于限制。

See this post for more details about the limitation.

 
精彩推荐
图片推荐