• Post Reply Bookmark Topic Watch Topic
  • New Topic

stress test a session based web app  RSS feed

 
Kyle Willkomm
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been assigned the task of stress testing a java web app that maintains a session. What is the best way to simulate a heavy load of users to a session based site? In a cheap manner of couse.
 
Mike Titus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We use ApacheBench to stress-test our webapps. It's included with Apache, so it's free, but documentation is minimal. Assuming you're using Apache, you can find ApacheBench in /apache1.3.x/bin. ApacheBench basically just requests a webpage a specified number of times, with a specified number of concurrent requests. It calculates the requests-per-second the webapp can satisfy, etc.
ApacheBench is ignorant of sessions, but it can pass a cookie back to the webserver. I don't know about other webservers, but WebLogic uses a cookie called "WebLogicSession" which identifies the user session. Here's an example (note the location of double-quotes, which is very important):
ab -C WebLogicSession="12345, etc., etc." -n 1024 -c 64 "http://www.foo.com"
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!