7

Is there a way to stimulate 10000 concurrent HTTP request?

I try siege tool but only have 2000 request limit for my laptop How can I make 10000 request?

TheOneTeam
  • 25,806
  • 45
  • 116
  • 158

4 Answers4

11

The most simple approach to generate a huge amount of concurrent requests, it probably Apache's ab tool.

For example, ab -n 100 -c 10 http://www.example.com/ would request the given websites a 100 times, with a concurrency of 10 requests.

It is true that the number of simultaneous requests is limited by nature. Keep in mind that TCP only has 65536 available ports, some of which are already occupied and the first 1024 are usually reserved, this leaves you with a theoretical maximum of around 64500 ports per machine for outgoing request.

Then there are the operating system limits. For example, in Linux there are the kernel parameters in the net.ipv4.* group.

Finally, you should of course configure your HTTP server to handle that amount of simultaneous requests. In Apache, those are StartServers and its friends, in nginx it's worker_processes and worker_connections. Also, if you have some stand-alone dynamic processor attached to your webserver (such as php-fpm), you must raise the number of idle processes in the connection pool, too.

After all, the purpose of massive parallel requests should be to find your bottle necks, and the above steps will give you a fair idea.

Btw. if you use ab, read its final report thoroughly. It may seem brief, but it carries a lot of useful information (e.g. "non-2xx responses" may indicate server-side errors due to overload.)

lxg
  • 12,375
  • 12
  • 51
  • 73
5

Jmeter allows distributed testing, which means that you can setup up a set of computers (one acting as a master and the rest as slaves) to run as many threads as you need. Jmeter has a very good doc explaining this here . . .

http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.pdf

and some more info here . . .

http://digitalab.org/2013/06/distributed-testing-in-jmeter/

You can set this all up on the cloud as well if you do not have access to sufficient slave machines, there are a couple of services out there for this.

remudada
  • 3,751
  • 2
  • 33
  • 60
2

Have you tried using Apache JMeter? You can create a web test plan and there are several options which you can play with. You can wrap the requests in a ThreadGroup as outlined here. You can generate extensive reports and graphs as well. If the simple thread group is not enough you could potentially try using the UltimateThreadGroup plugin for JMeter.

When creating so many threads with JMeter on a single machine you run out of memory to allocate a new stack for a thread. For that you can potentially consider reducing the stack space for the thread. How to do that is explained in the SO answer here. The post has some other alternative approaches as well.

Community
  • 1
  • 1
Saket
  • 3,079
  • 3
  • 29
  • 48
1

If there isn't an OS limit of the number of simultaneous TCP connections allowed, there is a registry setting that removes or increases that limit. After you made sure that isn't the case, you could write some JavaScript that includes AJAX requests and put it in a loop.

You would probably need node.js to execute the JavaScript.

zx485
  • 28,498
  • 28
  • 50
  • 59
ad77
  • 96
  • 7