Fog Creek Software
g
Discussion Board




Stress/Load Testing a Web Application

What are the best ways to load/stress test a web application?

Are there benchmarks that we can also refer to?

DoS
Thursday, October 16, 2003

Get mentioned on Slashdot.
Or use Microsoft's Web Application Stress Tool if you are running a windows setup, otherwise I believe the Jakarta project have something similar in Java.

Damian
Thursday, October 16, 2003

I've never stress tested a web application myself, but I would approach it like any other stress testing task: evaluate the areas you feel are most fragile and/or likely to fail under heavy load, and focus first on generating stress tests that exercise those areas.

There are tools to do things like generate many concurrent connections and requests. Check out http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=e2c0585a-062a-439e-a67d-75a89aa36495 for one example. That particular tool (the Microsoft Web Application Stress Tool) is a bit old, but it gives a good idea of one approach you can take to stress testing your app by bombarding it with requests of your own choosing. See the related articles on using it:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnduwon/html/d5wast_2.asp?frame=true

and

http://www.west-wind.com/presentations/webstress/webstress.htm

There are lots of other tools out there that are designed to assist with this sort of testing - do a google search if you're interested in the various options.

Of course, the best way to stress test a particular web app depends entirely on the app - you can't generalize about such a broad category. A web application that is a very thin front-end on top of a complex database back-end needs to be stress tested primarily through the back-end. A web app that has a small back-end but lots of complicated logic in the front-end probably needs to be stress tested primarily through the interface.

-Mike

Mike Treit
Thursday, October 16, 2003

Load up your page in the browser and hold down the F5 key.

Matthew Lock
Thursday, October 16, 2003

The company I work for took a web-based travel mgmt system into use, really nice user interface, really nice features.

Only problem was that there's some 50k people working in the company. The system was taken out of use week after launch and was never seen again.

So Matthew, I really suggest you to think again your "press F5" method. First thing you should do is to fill your DB, then have really many concurrent connections. Some of the tests must include overload to test that your overload control system works.

Tero
Friday, October 17, 2003

Avoid Rational LoadTest for a start - it's extremely overpriced and buggy.  (Although, to be fair, if you've got the time and patience to work around all of it's problems it is pretty powerful).

r1ch
Friday, October 17, 2003

Apache comes with a command-line tool 'ab' that will nail your server with a configurable number of simultaneous connections. IIRC you can also feed it an access log to simulate *actual* page/resource views on your site.

The Jakarta tool JMeter (in Java) does this as well and is supposed to be pretty slick.

Chris Winters
Friday, October 17, 2003

You might want a stresser capable of simulating lags (keyword: bandwidth throttling). That way it forces you to notices problems in how you code your web solutions. Some programmers have learned not to keep database connections open as they Response.Write/Response.Flush this way and use tools like this to prevent themselves or teammates from making similar mistakes. It'll point out a hotspot pretty quickly.

Li-fan Chen
Saturday, October 18, 2003

http://www.pushtotest.com/ptt/books/thebook.html

Evgeny Goldin
Sunday, October 19, 2003

*  Recent Topics

*  Fog Creek Home