Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many HTTP request can we make simultaneously?

Tags:

c#

.net

windows-7

How many simultaneous HTTP request can I make at the same time? Is there any rule from the underlying OS? I am on Windows 7. For ex: If I start 100 threads, would they all execute at the same time? If yes, does it depend on the amount of RAM or is it fixed irrespective of RAM size?

like image 823
Joel Wilson Avatar asked Sep 03 '13 06:09

Joel Wilson


1 Answers

It depends, as usual... There are a few aspects to keep in mind here:

(1) How many threads can your PC/server handle at a time? That is dependent upon memory, CPU power (number of cores for instance), what else your server is doing, and whether your threads do I/O-intensive work. Using .NET, there are also different limits on the ThreadPool depending on the version (for instance for .NET 4: 1023 threads max in the 32-bit version, 32768 in the 64-bit version).

(2) Your Windows may also be configured to allow a maximum number of outgoing HTTP or TCP connections (Windows has a hard limit of 64K outgoing TCP connections if I'm not mistaken).

(3) If you are connecting via a proxy server, that proxy server too may impose limitations on outgoing connections. The same is true if you are passing a firewall; that too may block too many simultaneous outgoing connections.

(4) Are you opening all connections to the same server? Because web servers have their limits too, and may be configured to only allow x number of incoming requests from a given source.

So I'm afraid you'll have to experiment to find out what the limits are in your case, unless you know these numbers.

like image 155
Roy Dictus Avatar answered Nov 16 '22 10:11

Roy Dictus