100 simultaneous requests on a servlet

1.1k views Asked by At

I would like to test a sevlet that I 've made with simultaneous requests (100 or 1000 or more). I was searching about it and I found JMeter but I am not quite sure if it does what I want.

Do you know how I could do something like that. Do you know any tutorial or guide that it could help me? (I am not experienced in programming)

p.s. I run my servlet on Jetty because I am using the jetty continuations. This is also what I want to test.

5

There are 5 answers

2
home On BEST ANSWER

JMeter is a good choice, it can do this job. See the user manual, it explains in detail how to set up the test.

Btw: Running the test tool and the application on the same machine is not a relistic performance/throughput test scenario and can only provide an indication on how your servlet behaves in the real world.

0
phihag On

You can just use any HTTP performance tester, for example apache bench:

ab -c 100 -n 100000 http://localhost/
# Hit the http://localhost/ with 100000 requests, 100 at a time

This will output something like:

Requests per second:    4497.18 [#/sec] (mean)
0
Tomasz Nurkiewicz On

JMeter is rather easy to use. Also consider installing JMeter plugins that enable richer set of graphs and sampling methods. See my blog post for some instructions, also have a look at a sample performance test plan for JMeter.

1
omnomnom On

JMeter is a good choice - easy to use and sufficient for most cases. If you want to do simple tests it should be enough. However, you are interested in writing more complex tests scenarios, I'd recommend HP LoadRunner (but it's commercial software).

0
James Pulley On

You may want to rethink he preciseness of your test. Unless your connecting agents are defined by a synchronized clock the odds of a simultaneous event connection are pretty low. Humans are pretty chaotic, organic computing units tied to imprecise clocks dictating the interval between requests to a service. You actually have to get a very high number of chaotic requests before you get some behavior of natural simultaneous incidents of some number of users within the same section of code having made the request and the same time mark. Now, it is highly likely that you can have a high number coincident within a short window, such as 200 per second, but true simultaneous behavior is quite rare in real world conditions.

Food for thought....