J
Jimi Hullegård
I'm using HTTPClient (http://www.innovation.ch/java/HTTPClient/) to test my
webapplication (Apache Tomcat), trying to simulate the load of several
simultaneous online users. Each user in an own thread, logged in with an own
session, and repetedly requests the same page 100 times in a row, with a
pauss of about one second between each request.
At the moment the program creates 17 user threads.
But I'm getting Network timeouts, and I'm not sure what is causing them.
The page requested is a very simple jsp-page, that simply prints the name of
the current user. I.e no DB access or anything.
The test code:
www.hullegard.com/java/HttpTest.java
When I run this code, all works fine for a while, but then when the threads
are at about 60
requests, several of the threads gets "java.net.ConnectException: Connection
timed out". The output from the program shows that the requests take about
2 seconds maximum and about 60ms in average, in the beginning. But then
after about 50-80 requests, the time out starts to happen, and the printouts
shows that the threads waited about 21 seconds for the response. But the
average waiting time (not counting the timeouts) are still very low (about
60-90ms). How come these sudden time outs?
The thing is, I wanted to simulate users that access my site over the
internet, so the program connects to my no-ip address (from www.no-ip.com)
instead of just localhost. When I tried localhost, I got (not surpricingly)
alot lower response times (max 40ms, in average close to 0ms), and no
timeouts.
Does this mean that the problem is no-ip.com related? Maybe they detect the
burst of connections from a single ip number, and purposly slow them down?
Or would I expect the same behaivor if these connections came from unique ip
numbers?
I know this might not be really java related, but I thought that if I asked
this question in some "network" group, they probably would have questions
about the HttpTest java program.
But to make this a little more java related:
Can anyone recommend a better way to stress test my webapplication? I have
searched the net, and found many programs. But all have either been too
complex, expensive or too limited. What I want is a way to create multiple
threads (maybe several thousands) that should simulate multiple simultaneous
online users. I prefere simple no-nonsense programs. A fancy GUI is not a
priority.
Any suggestions or ideas are very welcome!
Regards
/Jimi
webapplication (Apache Tomcat), trying to simulate the load of several
simultaneous online users. Each user in an own thread, logged in with an own
session, and repetedly requests the same page 100 times in a row, with a
pauss of about one second between each request.
At the moment the program creates 17 user threads.
But I'm getting Network timeouts, and I'm not sure what is causing them.
The page requested is a very simple jsp-page, that simply prints the name of
the current user. I.e no DB access or anything.
The test code:
www.hullegard.com/java/HttpTest.java
When I run this code, all works fine for a while, but then when the threads
are at about 60
requests, several of the threads gets "java.net.ConnectException: Connection
timed out". The output from the program shows that the requests take about
2 seconds maximum and about 60ms in average, in the beginning. But then
after about 50-80 requests, the time out starts to happen, and the printouts
shows that the threads waited about 21 seconds for the response. But the
average waiting time (not counting the timeouts) are still very low (about
60-90ms). How come these sudden time outs?
The thing is, I wanted to simulate users that access my site over the
internet, so the program connects to my no-ip address (from www.no-ip.com)
instead of just localhost. When I tried localhost, I got (not surpricingly)
alot lower response times (max 40ms, in average close to 0ms), and no
timeouts.
Does this mean that the problem is no-ip.com related? Maybe they detect the
burst of connections from a single ip number, and purposly slow them down?
Or would I expect the same behaivor if these connections came from unique ip
numbers?
I know this might not be really java related, but I thought that if I asked
this question in some "network" group, they probably would have questions
about the HttpTest java program.
But to make this a little more java related:
Can anyone recommend a better way to stress test my webapplication? I have
searched the net, and found many programs. But all have either been too
complex, expensive or too limited. What I want is a way to create multiple
threads (maybe several thousands) that should simulate multiple simultaneous
online users. I prefere simple no-nonsense programs. A fancy GUI is not a
priority.
Any suggestions or ideas are very welcome!
Regards
/Jimi