简体   繁体   中英

How many HTTP request can we make simultaneously?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM